[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FE6MP0AQMBH19VJ096TFM3":3,"skill-same:01M7FE6MP0AQMBH19VJ096TFM3":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M7FE6MP0AQMBH19VJ096TFM3","code-simplifier",null,"Review RTK Rust code for idiomatic simplification. Detects over-engineering, unnecessary allocations, verbose patterns. Applies Rust idioms without changing behavior.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fcode-simplifier-rtk-master\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: code-simplifier\ndescription: Review RTK Rust code for idiomatic simplification. Detects over-engineering, unnecessary allocations, verbose patterns. Applies Rust idioms without changing behavior.\ntriggers:\n  - \"simplify\"\n  - \"too verbose\"\n  - \"over-engineered\"\n  - \"refactor this\"\n  - \"make this idiomatic\"\nallowed-tools:\n  - Read\n  - Grep\n  - Glob\n  - Edit\neffort: low\ntags: [rust, simplify, refactor, idioms, rtk]\n---\n\n# RTK Code Simplifier\n\nReview and simplify Rust code in RTK while respecting the project's constraints.\n\n## Constraints (never simplify away)\n\n- `lazy_static!` regex — cannot be moved inside functions even if \"simpler\"\n- `.context()` on every `?` — verbose but mandatory\n- Fallback to raw command — never remove even if it looks like dead code\n- Exit code propagation — never simplify to `Ok(())`\n- `#[cfg(test)] mod tests` — never remove test modules\n\n## Simplification Patterns\n\n### 1. Iterator chains over manual loops\n\n```rust\n\u002F\u002F ❌ Verbose\nlet mut result = Vec::new();\nfor line in input.lines() {\n    let trimmed = line.trim();\n    if !trimmed.is_empty() && trimmed.starts_with(\"error\") {\n        result.push(trimmed.to_string());\n    }\n}\n\n\u002F\u002F ✅ Idiomatic\nlet result: Vec\u003CString> = input.lines()\n    .map(|l| l.trim())\n    .filter(|l| !l.is_empty() && l.starts_with(\"error\"))\n    .map(str::to_string)\n    .collect();\n```\n\n### 2. String building\n\n```rust\n\u002F\u002F ❌ Verbose push loop\nlet mut out = String::new();\nfor (i, line) in lines.iter().enumerate() {\n    out.push_str(line);\n    if i \u003C lines.len() - 1 {\n        out.push('\\n');\n    }\n}\n\n\u002F\u002F ✅ join\nlet out = lines.join(\"\\n\");\n```\n\n### 3. Option\u002FResult chaining\n\n```rust\n\u002F\u002F ❌ Nested match\nlet result = match maybe_value {\n    Some(v) => match transform(v) {\n        Ok(r) => r,\n        Err(_) => default,\n    },\n    None => default,\n};\n\n\u002F\u002F ✅ Chained\nlet result = maybe_value\n    .and_then(|v| transform(v).ok())\n    .unwrap_or(default);\n```\n\n### 4. Struct destructuring\n\n```rust\n\u002F\u002F ❌ Repeated field access\nfn process(args: &MyArgs) -> String {\n    format!(\"{} {}\", args.command, args.subcommand)\n}\n\n\u002F\u002F ✅ Destructure\nfn process(&MyArgs { ref command, ref subcommand, .. }: &MyArgs) -> String {\n    format!(\"{} {}\", command, subcommand)\n}\n```\n\n### 5. Early returns over nesting\n\n```rust\n\u002F\u002F ❌ Deeply nested\nfn filter(input: &str) -> Option\u003CString> {\n    if !input.is_empty() {\n        if let Some(line) = input.lines().next() {\n            if line.starts_with(\"error\") {\n                return Some(line.to_string());\n            }\n        }\n    }\n    None\n}\n\n\u002F\u002F ✅ Early return\nfn filter(input: &str) -> Option\u003CString> {\n    if input.is_empty() { return None; }\n    let line = input.lines().next()?;\n    if !line.starts_with(\"error\") { return None; }\n    Some(line.to_string())\n}\n```\n\n### 6. Avoid redundant clones\n\n```rust\n\u002F\u002F ❌ Unnecessary clone\nfn filter_output(input: &str) -> String {\n    let s = input.to_string();  \u002F\u002F Pointless clone\n    s.lines().filter(|l| !l.is_empty()).collect::\u003CVec\u003C_>>().join(\"\\n\")\n}\n\n\u002F\u002F ✅ Work with &str\nfn filter_output(input: &str) -> String {\n    input.lines().filter(|l| !l.is_empty()).collect::\u003CVec\u003C_>>().join(\"\\n\")\n}\n```\n\n### 7. Use `if let` for single-variant match\n\n```rust\n\u002F\u002F ❌ Full match for one variant\nmatch output {\n    Ok(s) => process(&s),\n    Err(_) => {},\n}\n\n\u002F\u002F ✅ if let (but still handle errors in RTK — don't silently drop)\nif let Ok(s) = output {\n    process(&s);\n}\n\u002F\u002F Note: in RTK filters, always handle Err with eprintln! + fallback\n```\n\n## RTK-Specific Checks\n\nRun these after simplification:\n\n```bash\n# Verify no regressions\ncargo fmt --all && cargo clippy --all-targets && cargo test\n\n# Verify no new regex in functions\ngrep -n \"Regex::new\" src\u002F\u003Cfile>.rs\n# All should be inside lazy_static! blocks\n\n# Verify no new unwrap in production\ngrep -n \"\\.unwrap()\" src\u002F\u003Cfile>.rs\n# Should only appear inside #[cfg(test)] blocks\n```\n\n## What NOT to Simplify\n\n- `lazy_static! { static ref RE: Regex = Regex::new(...).unwrap(); }` — the `.unwrap()` here is acceptable, it's init-time\n- `.context(\"description\")?` chains — verbose but required\n- The fallback match arm `Err(e) => { eprintln!(...); raw_output }` — looks redundant but is the safety net\n- `std::process::exit(code)` at end of run() — looks like it could be `Ok(())`but it isn't\n","# RTK Code Simplifier\n\nReview and simplify Rust code in RTK while respecting the project's constraints.\n\n## Constraints (never simplify away)\n\n- `lazy_static!` regex — cannot be moved inside functions even if \"simpler\"\n- `.context()` on every `?` — verbose but mandatory\n- Fallback to raw command — never remove even if it looks like dead code\n- Exit code propagation — never simplify to `Ok(())`\n- `#[cfg(test)] mod tests` — never remove test modules\n\n## Simplification Patterns\n\n### 1. Iterator chains over manual loops\n\n```rust\n\u002F\u002F ❌ Verbose\nlet mut result = Vec::new();\nfor line in input.lines() {\n    let trimmed = line.trim();\n    if !trimmed.is_empty() && trimmed.starts_with(\"error\") {\n        result.push(trimmed.to_string());\n    }\n}\n\n\u002F\u002F ✅ Idiomatic\nlet result: Vec\u003CString> = input.lines()\n    .map(|l| l.trim())\n    .filter(|l| !l.is_empty() && l.starts_with(\"error\"))\n    .map(str::to_string)\n    .collect();\n```\n\n### 2. String building\n\n```rust\n\u002F\u002F ❌ Verbose push loop\nlet mut out = String::new();\nfor (i, line) in lines.iter().enumerate() {\n    out.push_str(line);\n    if i \u003C lines.len() - 1 {\n        out.push('\\n');\n    }\n}\n\n\u002F\u002F ✅ join\nlet out = lines.join(\"\\n\");\n```\n\n### 3. Option\u002FResult chaining\n\n```rust\n\u002F\u002F ❌ Nested match\nlet result = match maybe_value {\n    Some(v) => match transform(v) {\n        Ok(r) => r,\n        Err(_) => default,\n    },\n    None => default,\n};\n\n\u002F\u002F ✅ Chained\nlet result = maybe_value\n    .and_then(|v| transform(v).ok())\n    .unwrap_or(default);\n```\n\n### 4. Struct destructuring\n\n```rust\n\u002F\u002F ❌ Repeated field access\nfn process(args: &MyArgs) -> String {\n    format!(\"{} {}\", args.command, args.subcommand)\n}\n\n\u002F\u002F ✅ Destructure\nfn process(&MyArgs { ref command, ref subcommand, .. }: &MyArgs) -> String {\n    format!(\"{} {}\", command, subcommand)\n}\n```\n\n### 5. Early returns over nesting\n\n```rust\n\u002F\u002F ❌ Deeply nested\nfn filter(input: &str) -> Option\u003CString> {\n    if !input.is_empty() {\n        if let Some(line) = input.lines().next() {\n            if line.starts_with(\"error\") {\n                return Some(line.to_string());\n            }\n        }\n    }\n    None\n}\n\n\u002F\u002F ✅ Early return\nfn filter(input: &str) -> Option\u003CString> {\n    if input.is_empty() { return None; }\n    let line = input.lines().next()?;\n    if !line.starts_with(\"error\") { return None; }\n    Some(line.to_string())\n}\n```\n\n### 6. Avoid redundant clones\n\n```rust\n\u002F\u002F ❌ Unnecessary clone\nfn filter_output(input: &str) -> String {\n    let s = input.to_string();  \u002F\u002F Pointless clone\n    s.lines().filter(|l| !l.is_empty()).collect::\u003CVec\u003C_>>().join(\"\\n\")\n}\n\n\u002F\u002F ✅ Work with &str\nfn filter_output(input: &str) -> String {\n    input.lines().filter(|l| !l.is_empty()).collect::\u003CVec\u003C_>>().join(\"\\n\")\n}\n```\n\n### 7. Use `if let` for single-variant match\n\n```rust\n\u002F\u002F ❌ Full match for one variant\nmatch output {\n    Ok(s) => process(&s),\n    Err(_) => {},\n}\n\n\u002F\u002F ✅ if let (but still handle errors in RTK — don't silently drop)\nif let Ok(s) = output {\n    process(&s);\n}\n\u002F\u002F Note: in RTK filters, always handle Err with eprintln! + fallback\n```\n\n## RTK-Specific Checks\n\nRun these after simplification:\n\n```bash\n# Verify no regressions\ncargo fmt --all && cargo clippy --all-targets && cargo test\n\n# Verify no new regex in functions\ngrep -n \"Regex::new\" src\u002F\u003Cfile>.rs\n# All should be inside lazy_static! blocks\n\n# Verify no new unwrap in production\ngrep -n \"\\.unwrap()\" src\u002F\u003Cfile>.rs\n# Should only appear inside #[cfg(test)] blocks\n```\n\n## What NOT to Simplify\n\n- `lazy_static! { static ref RE: Regex = Regex::new(...).unwrap(); }` — the `.unwrap()` here is acceptable, it's init-time\n- `.context(\"description\")?` chains — verbose but required\n- The fallback match arm `Err(e) => { eprintln!(...); raw_output }` — looks redundant but is the safety net\n- `std::process::exit(code)` at end of run() — looks like it could be `Ok(())`but it isn't\n",{"name":5,"tags":24,"effort":30,"triggers":31,"description":7,"allowed-tools":36},[25,26,27,28,29],"rust","simplify","refactor","idioms","rtk","low",[26,32,33,34,35],"too verbose","over-engineered","refactor this","make this idiomatic",[37,38,39,40],"Read","Grep","Glob","Edit","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","07-后端与架构\u002Fcode-simplifier-rtk-master",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill code-simplifier",{"tool":55,"command":56},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill code-simplifier",{"tool":58,"command":59},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill code-simplifier","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fcode-simplifier-rtk-master\u002FSKILL.md",true,[],[64,71,76,83,90,97],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":72,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]