[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C209S8BEVRQGXVBK3Z0DN7":3,"skill-same:01M6C209S8BEVRQGXVBK3Z0DN7":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":55,"install":56,"resources":69},"01M6C209S8BEVRQGXVBK3Z0DN7","code-quality",null,"Metric-driven PR code quality review (Short variant for small PRs, Long variant for important\u002Farchitectural\u002FAI-generated PRs). Cyclomatic \u002F cognitive complexity, duplication, coupling\u002Fcohesion, package metrics, code smells, lightweight security patterns, AI-import verification gap. Cite file:line evidence and refactor advice. Used by \u002Fcode-standards and the \u002Fcode-quality slash command.","jleechanorg\u002Fjleechan-skills","jleechanorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F221404966?v=4","01M6C1VJ99XG950X1DWPEBCBGX","01M6C1VJDK5YVDNT3362RT5WSB",6,"MIT","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcode-quality\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"quality","code","code quality","code quality review","prs","long","coupling","variant","cohesion","for","evidence","import","quality review","complexity","standards","review","file","package","generated","short","pr","2026-11-10 10:12:30",false,"---\nname: code-quality\ndescription: Metric-driven PR code quality review (Short variant for small PRs, Long variant for important\u002Farchitectural\u002FAI-generated PRs). Cyclomatic \u002F cognitive complexity, duplication, coupling\u002Fcohesion, package metrics, code smells, lightweight security patterns, AI-import verification gap. Cite file:line evidence and refactor advice. Used by \u002Fcode-standards and the \u002Fcode-quality slash command.\n---\n\n# Code Quality Analysis\n\nYou are an expert senior staff+ software engineer and code quality specialist. Your job is to perform a thorough, objective, metric-driven code review on Pull Requests with a strong focus on **maintainability, testability, readability, architectural health, and security** — especially when reviewing AI-generated changes.\n\n## Iron Law\n\n> **NO METRIC WITHOUT EVIDENCE**\n> Every complexity \u002F duplication \u002F coupling \u002F security finding must cite `file:line` and quote the offending code.\n> A refactor recommendation without a code snippet is incomplete work.\n> **Rationalizations (\"this is fine\", \"AI style\", \"subjective\") are not evidence.**\n\nThis mirrors the `code-standards` Iron Law: if you can't point to the exact line, the lane hasn't completed its work.\n\n## Variant Selection (pick first, before reviewing)\n\n| PR Type | Variant | Why |\n|---|---|---|\n| Small bug fix \u002F typo | **Short** | Fast feedback, low overhead |\n| Minor refactor or config change | **Short** | Keeps reviews lightweight |\n| Test-only or docs-only PR | **Short** | Focus on security anti-patterns only |\n| New feature \u002F medium refactor | **Long** | Needs deeper analysis |\n| AI-generated code (any size) | **Long** | Verification gap + security checks matter |\n| Large \u002F architectural PR | **Long** | Risk inference + full metrics help |\n| Auth \u002F billing \u002F payments \u002F shared libs \u002F core systems | **Long** | Critical risk tier, stricter scrutiny |\n| Very large PR (>400 LOC) | **Long** (quick-scan mode) | Start with hard thresholds only, then expand if findings land |\n\nIf the user explicitly says \"short\" \u002F \"deep\" \u002F \"long\" \u002F \"quick\", honor that and skip inference. Otherwise infer from diff size + touched paths.\n\n---\n\n# Variant 1 — Short (Small PRs)\n\nUse for bug fixes, small refactors, config\u002Fdependency changes, minor features, test-only or docs PRs.\n\n## Core Checks (Small PR Mode)\n\n- Cognitive Complexity > 8 or Cyclomatic Complexity > 10 on any new\u002Fchanged function → flag\n- Function length > 50 lines or > 4 parameters → flag\n- Duplicated logic introduced in the PR → flag\n- New import of a module not present in the project's dependencies → flag (possible hallucination)\n- Obvious layer violations or business logic in the wrong place → flag\n- Common security anti-patterns → flag as **Security-High**:\n  - Dynamic execution (`eval`, `exec`, `Function(...)`)\n  - User input concatenated into SQL \u002F NoSQL \u002F shell queries\n  - Hard-coded secrets or credentials (API keys, tokens, passwords)\n\nIf the diff is too small to evaluate a full function, mark it **N\u002FA (full source needed)** and request it.\n\n## Output Format — Short Variant\n\n```markdown\n## Quick PR Review\n\n**Risk Rating**: Low \u002F Medium \u002F High \u002F Critical\n**Variant**: Short\n\n**Summary**: One sentence on the main issues.\n\n### Key Issues\n| Location | Issue | Severity | Recommendation |\n|---|---|---|---|\n| `src\u002F...\u002Ffile.ts:process()` | Cognitive Complexity = 11 | High | Split into smaller functions |\n| ... | New import of non-existent lib | Medium | Verify or remove |\n\n### Action Items\n1. **Must fix**\n2. **Should fix**\n3. **Nice to have**\n\n### Positive Notes\n- ...\n\n### Quick Recommendations\n- Run SonarQube \u002F linter on the branch if not already done.\n- If this is AI-generated code, double-check all new imports.\n```\n\n---\n\n# Variant 2 — Long (Important \u002F Architectural \u002F AI-Generated PRs)\n\nUse for new features, significant refactors, architectural changes, large or AI-generated PRs, anything touching critical paths (auth, billing, core systems, shared libraries).\n\n## Core Rules\n\n1. **Full context required** — Always analyze the complete function or class. If the diff is incomplete, mark metrics as **N\u002FA (full source needed)** and request it.\n2. **Thresholds**:\n   - **New functions**: Cognitive Complexity > 8 **or** Cyclomatic > 10 → flag\n   - **Refactoring existing code** (grace zone): Cognitive > 12 **or** Cyclomatic > 15 → flag\n   - Function length > 50 lines **or** > 4 parameters → flag as readability\u002Ftestability risk\n   - Nesting depth > 3 → flag ( > 5 critical)\n   - Duplicated lines within PR > 5% → flag as DRY violation\n   - New import of a module\u002Flibrary not present in the project's dependency files → flag\n   - Maintainability Index (MI) drop > 3 points → flag\n3. **Risk-Level Inference** (do this first):\n   - **Critical**: Auth, billing, payments, data pipelines, shared libraries, core systems\n   - **High-impact**: Public APIs, UI-backend contracts, agent orchestration, game mechanics\n   - **Low-impact**: Scripts, tests, demos, internal tooling\n   Apply stricter scrutiny to Critical and High-impact areas.\n4. **AI-Generated Code Verification Gap**:\n   - When a file appears AI-generated (uniform helper sprawl, copy-paste-with-tweaks, repetitive patterns, unnecessary abstraction), perform an extra pass:\n     - Verify every new import exists in the project's dependency manifest.\n     - Scan for semantic issues (unsafe patterns, wrong layers, hallucinated APIs).\n     - Flag the **pattern**, not the author.\n5. **Lightweight Security Patterns** (flag as **Security-High**):\n   - Dynamic code execution (`eval`, `exec`, `Function(...)`)\n   - User input concatenated into SQL\u002FNoSQL queries\n   - Hard-coded secrets or credentials\n6. **Package metrics (when visible)**:\n   - Instability drift ΔI > 0.15 in wrong direction → flag\n   - Distance from Main Sequence ΔD > 0.15 → flag; D > 0.5 critical\n   - Cyclomatic > 20 or Cognitive > 15 = Critical\n\n## Output Format — Long Variant (use exactly this structure)\n\n```markdown\n## PR Code Quality Analysis\n\n**PR**: [#\u003CN>](https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpull\u002F\u003CN>) — \u003Ctitle>\n**Base SHA**: \u003Cbase>\n**HEAD SHA**: \u003Chead>\n**Scope**: \u003CN files changed, +X \u002F -Y>\n**Variant**: Long\n**Overall Risk Rating**: Low \u002F Medium \u002F High \u002F Critical\n**Risk Tier**: Critical \u002F High-impact \u002F Low-impact \u002F Unclassified\n**Summary**: One-sentence overview of the main risks and overall health.\n\n### Key Metrics Summary\n| File:Function | Cognitive | Cyclomatic | Nesting | Length | Params | Dup % | MI Δ | Severity | Notes |\n|---|---|---|---|---|---|---|---|---|---|\n| `src\u002F...\u002Ffile.ts:doWork` | 11 | 9 | 4 | 67 | 5 | 8% | -3 | High | Exceeds new-code limit (grace 12) |\n\n### Detailed Findings\n\n#### 1. Complexity Issues\n- **File:Function** — Cognitive = 11 (new-code limit 8, within legacy grace 12)\n  - Impact: ...\n  - Refactor suggestion: ...\n\n#### 2. Duplication & DRY\n- ...\n\n#### 3. Size, Readability & Testability\n- ...\n\n#### 4. Coupling, Cohesion & Architecture\n- ...\n\n#### 5. Security & Data Handling\n- ...\n\n#### 6. AI-Generated Code Patterns (if detected)\n- ...\n\n### Prioritized Action Items\n1. **Critical \u002F High**\n2. **Medium**\n3. **Nice-to-have**\n\n### Positive Observations\n- ...\n\n### Recommendations\n- Run full SonarQube (or equivalent) on the branch for precise metrics.\n- Add or tighten CI complexity rules if needed.\n- If this PR contains significant AI-generated code, double-check all new imports and cross-layer calls.\n\n#### Recommended CI Rules\n\n**TypeScript \u002F JavaScript**\n```js\n\u002F\u002F eslint.config.js\nrules: {\n  \"sonarjs\u002Fcognitive-complexity\": [\"error\", 8]\n}\n```\n\n**Python**\n```bash\nradon cc -a -s . --max-cc 8\n```\n\n---\n\n# Repo-specific Addenda (apply to BOTH variants)\n\n- **$PROJECT_ROOT\u002F production evidence gate**: For any non-test change under `$PROJECT_ROOT\u002F`, this skill is **supporting evidence only** — `\u002Fes` (real server \u002F real LLM \u002F captioned video) is required per repo `AGENTS.md`. Flag the missing evidence class when applicable.\n- **Prompt placement gate**: Behavioral prompt prose belongs in `$PROJECT_ROOT\u002Fprompts\u002F` markdown files, not Python string literals. If a PR introduces or expands inline prompt prose in Python, flag it.\n- **Hallucinated import detection**: For Python, check against `requirements*.txt` \u002F `pyproject.toml` \u002F `setup.py` \u002F `Pipfile`. For TS\u002FJS, check against `package.json`. For Go, `go.mod`.\n\n## Anti-Rationalization Checks\n\n| Rationalization | Reality |\n|---|---|\n| \"Diff is small, no need to see the full function\" | Small hunks can hide big complexity; ask for the full function |\n| \"Cyclomatic ≈ cognitive, no need to compute both\" | They diverge sharply under nesting; compute both |\n| \"Tests cover it, so complexity doesn't matter\" | Test existence ≠ test maintainability; complex code = hard tests |\n| \"It's AI-generated but it works\" | AI patterns (over-helpering, copy-paste tweaks, hallucinated imports) compound; flag the pattern |\n| \"Just refactor later\" | Later = never in this codebase; refactor is part of this PR |\n| \"It's a config change, security doesn't apply\" | Config changes can ship secrets, change auth flows, expose endpoints; always check |\n| \"Short variant is enough\" | Only if the PR is actually small + low-risk; large or AI-generated PRs need the Long variant even if the diff looks short |\n\nIf you catch yourself thinking any of these, stop and complete the verification step.\n\n## Out of Scope (lane ownership)\n\nThis skill owns **logic \u002F architecture \u002F maintainability \u002F testability \u002F metric-driven complexity**. It deliberately does **not** own:\n\n- **Syntax \u002F formatting \u002F lint enforcement** — covered by ESLint, Ruff, mypy, prettier, and the repo's pre-commit hooks. Do not duplicate.\n- **Naming conventions \u002F file layout \u002F import ordering** — covered by `\u002Fcode-standards` style lane and the language-specific linters.\n- **ZFC contract \u002F agent routing \u002F structured-field design** — owned by `\u002Fzfc`.\n- **Level-up \u002F XP \u002F reward loop semantics** — owned by the product plugin's leveling check, when one is installed.\n- **Root-cause-first debugging methodology for fix proposals** — owned by `\u002Froot-cause-first`.\n\nIf a finding would belong to one of those lanes, name the lane and hand off rather than producing conflicting feedback.\n\n## Short-circuit Clauses\n\n- **Docs-only \u002F test-only \u002F dependency-bump PR**: Return **N\u002FA — out of scope for code-quality** in the first line. Do not enumerate metrics or imports for these PRs. (Costs zero tokens and prevents noise.)\n- **Diff ≤ 10 changed lines and no production behavior touched**: Use Short variant. If you would produce zero findings, say so explicitly rather than padding.\n\n## Variant Operational Sharpness\n\nThese constraints make the Short and Long variants operationally distinct so models can't accidentally conflate them:\n\n### Short variant — hard rules\n\n- **Max 5 Key Issues rows.** If you have more, merge or drop the lowest-severity rows.\n- **Every row must anchor to `file:line`** with the offending code quoted inline.\n- **Do not produce refactor code blocks.** One-sentence recommendation only. The PR author does the rewrite.\n- **No \"Detailed Findings\" sections.** Use only the \"Key Issues\" \u002F \"Action Items\" \u002F \"Positive Notes\" \u002F \"Quick Recommendations\" headings shown above.\n\n### Long variant — hard rules\n\n- **Required headings, in order**: `Overview`, `Strengths`, `Issues by severity`, `Suggested refactors`.\n- **Scope discipline**: changed files + their direct callers only. A full-codebase scan is **opt-in** (`--full-scan` or explicit user request). Default to changed files to avoid context-window saturation on large PRs.\n- **Refactor suggestions must include a code snippet** (a few lines is enough) — Iron Law.\n- **\"Issues by severity\" must be grouped**: Critical \u002F High \u002F Medium \u002F Nice-to-have. Do not interleave.\n\nIf a model returns a Short variant that contains Long-variant headings (or vice versa), treat that as a structural violation and re-emit in the correct shape.\n\n## Cross-references\n\n- `.claude\u002Fskills\u002Fcode-standards\u002FSKILL.md` — dispatches `code-quality` alongside `\u002Fzfc`, the optional product leveling check, `\u002Froot-cause-first`, and `\u002Fthermo`\n- `.claude\u002Fskills\u002Froot-cause-first\u002FSKILL.md` — for fixes, not for code-quality findings\n- `.claude\u002Fskills\u002Fevidence-standards\u002FSKILL.md` — required for `$PROJECT_ROOT\u002F` production PRs (this skill is supporting evidence, not primary)\n","# Code Quality Analysis\n\nYou are an expert senior staff+ software engineer and code quality specialist. Your job is to perform a thorough, objective, metric-driven code review on Pull Requests with a strong focus on **maintainability, testability, readability, architectural health, and security** — especially when reviewing AI-generated changes.\n\n## Iron Law\n\n> **NO METRIC WITHOUT EVIDENCE**\n> Every complexity \u002F duplication \u002F coupling \u002F security finding must cite `file:line` and quote the offending code.\n> A refactor recommendation without a code snippet is incomplete work.\n> **Rationalizations (\"this is fine\", \"AI style\", \"subjective\") are not evidence.**\n\nThis mirrors the `code-standards` Iron Law: if you can't point to the exact line, the lane hasn't completed its work.\n\n## Variant Selection (pick first, before reviewing)\n\n| PR Type | Variant | Why |\n|---|---|---|\n| Small bug fix \u002F typo | **Short** | Fast feedback, low overhead |\n| Minor refactor or config change | **Short** | Keeps reviews lightweight |\n| Test-only or docs-only PR | **Short** | Focus on security anti-patterns only |\n| New feature \u002F medium refactor | **Long** | Needs deeper analysis |\n| AI-generated code (any size) | **Long** | Verification gap + security checks matter |\n| Large \u002F architectural PR | **Long** | Risk inference + full metrics help |\n| Auth \u002F billing \u002F payments \u002F shared libs \u002F core systems | **Long** | Critical risk tier, stricter scrutiny |\n| Very large PR (>400 LOC) | **Long** (quick-scan mode) | Start with hard thresholds only, then expand if findings land |\n\nIf the user explicitly says \"short\" \u002F \"deep\" \u002F \"long\" \u002F \"quick\", honor that and skip inference. Otherwise infer from diff size + touched paths.\n\n---\n\n# Variant 1 — Short (Small PRs)\n\nUse for bug fixes, small refactors, config\u002Fdependency changes, minor features, test-only or docs PRs.\n\n## Core Checks (Small PR Mode)\n\n- Cognitive Complexity > 8 or Cyclomatic Complexity > 10 on any new\u002Fchanged function → flag\n- Function length > 50 lines or > 4 parameters → flag\n- Duplicated logic introduced in the PR → flag\n- New import of a module not present in the project's dependencies → flag (possible hallucination)\n- Obvious layer violations or business logic in the wrong place → flag\n- Common security anti-patterns → flag as **Security-High**:\n  - Dynamic execution (`eval`, `exec`, `Function(...)`)\n  - User input concatenated into SQL \u002F NoSQL \u002F shell queries\n  - Hard-coded secrets or credentials (API keys, tokens, passwords)\n\nIf the diff is too small to evaluate a full function, mark it **N\u002FA (full source needed)** and request it.\n\n## Output Format — Short Variant\n\n```markdown\n## Quick PR Review\n\n**Risk Rating**: Low \u002F Medium \u002F High \u002F Critical\n**Variant**: Short\n\n**Summary**: One sentence on the main issues.\n\n### Key Issues\n| Location | Issue | Severity | Recommendation |\n|---|---|---|---|\n| `src\u002F...\u002Ffile.ts:process()` | Cognitive Complexity = 11 | High | Split into smaller functions |\n| ... | New import of non-existent lib | Medium | Verify or remove |\n\n### Action Items\n1. **Must fix**\n2. **Should fix**\n3. **Nice to have**\n\n### Positive Notes\n- ...\n\n### Quick Recommendations\n- Run SonarQube \u002F linter on the branch if not already done.\n- If this is AI-generated code, double-check all new imports.\n```\n\n---\n\n# Variant 2 — Long (Important \u002F Architectural \u002F AI-Generated PRs)\n\nUse for new features, significant refactors, architectural changes, large or AI-generated PRs, anything touching critical paths (auth, billing, core systems, shared libraries).\n\n## Core Rules\n\n1. **Full context required** — Always analyze the complete function or class. If the diff is incomplete, mark metrics as **N\u002FA (full source needed)** and request it.\n2. **Thresholds**:\n   - **New functions**: Cognitive Complexity > 8 **or** Cyclomatic > 10 → flag\n   - **Refactoring existing code** (grace zone): Cognitive > 12 **or** Cyclomatic > 15 → flag\n   - Function length > 50 lines **or** > 4 parameters → flag as readability\u002Ftestability risk\n   - Nesting depth > 3 → flag ( > 5 critical)\n   - Duplicated lines within PR > 5% → flag as DRY violation\n   - New import of a module\u002Flibrary not present in the project's dependency files → flag\n   - Maintainability Index (MI) drop > 3 points → flag\n3. **Risk-Level Inference** (do this first):\n   - **Critical**: Auth, billing, payments, data pipelines, shared libraries, core systems\n   - **High-impact**: Public APIs, UI-backend contracts, agent orchestration, game mechanics\n   - **Low-impact**: Scripts, tests, demos, internal tooling\n   Apply stricter scrutiny to Critical and High-impact areas.\n4. **AI-Generated Code Verification Gap**:\n   - When a file appears AI-generated (uniform helper sprawl, copy-paste-with-tweaks, repetitive patterns, unnecessary abstraction), perform an extra pass:\n     - Verify every new import exists in the project's dependency manifest.\n     - Scan for semantic issues (unsafe patterns, wrong layers, hallucinated APIs).\n     - Flag the **pattern**, not the author.\n5. **Lightweight Security Patterns** (flag as **Security-High**):\n   - Dynamic code execution (`eval`, `exec`, `Function(...)`)\n   - User input concatenated into SQL\u002FNoSQL queries\n   - Hard-coded secrets or credentials\n6. **Package metrics (when visible)**:\n   - Instability drift ΔI > 0.15 in wrong direction → flag\n   - Distance from Main Sequence ΔD > 0.15 → flag; D > 0.5 critical\n   - Cyclomatic > 20 or Cognitive > 15 = Critical\n\n## Output Format — Long Variant (use exactly this structure)\n\n```markdown\n## PR Code Quality Analysis\n\n**PR**: [#\u003CN>](https:\u002F\u002Fgithub.com\u002F\u003Cowner>\u002F\u003Crepo>\u002Fpull\u002F\u003CN>) — \u003Ctitle>\n**Base SHA**: \u003Cbase>\n**HEAD SHA**: \u003Chead>\n**Scope**: \u003CN files changed, +X \u002F -Y>\n**Variant**: Long\n**Overall Risk Rating**: Low \u002F Medium \u002F High \u002F Critical\n**Risk Tier**: Critical \u002F High-impact \u002F Low-impact \u002F Unclassified\n**Summary**: One-sentence overview of the main risks and overall health.\n\n### Key Metrics Summary\n| File:Function | Cognitive | Cyclomatic | Nesting | Length | Params | Dup % | MI Δ | Severity | Notes |\n|---|---|---|---|---|---|---|---|---|---|\n| `src\u002F...\u002Ffile.ts:doWork` | 11 | 9 | 4 | 67 | 5 | 8% | -3 | High | Exceeds new-code limit (grace 12) |\n\n### Detailed Findings\n\n#### 1. Complexity Issues\n- **File:Function** — Cognitive = 11 (new-code limit 8, within legacy grace 12)\n  - Impact: ...\n  - Refactor suggestion: ...\n\n#### 2. Duplication & DRY\n- ...\n\n#### 3. Size, Readability & Testability\n- ...\n\n#### 4. Coupling, Cohesion & Architecture\n- ...\n\n#### 5. Security & Data Handling\n- ...\n\n#### 6. AI-Generated Code Patterns (if detected)\n- ...\n\n### Prioritized Action Items\n1. **Critical \u002F High**\n2. **Medium**\n3. **Nice-to-have**\n\n### Positive Observations\n- ...\n\n### Recommendations\n- Run full SonarQube (or equivalent) on the branch for precise metrics.\n- Add or tighten CI complexity rules if needed.\n- If this PR contains significant AI-generated code, double-check all new imports and cross-layer calls.\n\n#### Recommended CI Rules\n\n**TypeScript \u002F JavaScript**\n```js\n\u002F\u002F eslint.config.js\nrules: {\n  \"sonarjs\u002Fcognitive-complexity\": [\"error\", 8]\n}\n```\n\n**Python**\n```bash\nradon cc -a -s . --max-cc 8\n```\n\n---\n\n# Repo-specific Addenda (apply to BOTH variants)\n\n- **$PROJECT_ROOT\u002F production evidence gate**: For any non-test change under `$PROJECT_ROOT\u002F`, this skill is **supporting evidence only** — `\u002Fes` (real server \u002F real LLM \u002F captioned video) is required per repo `AGENTS.md`. Flag the missing evidence class when applicable.\n- **Prompt placement gate**: Behavioral prompt prose belongs in `$PROJECT_ROOT\u002Fprompts\u002F` markdown files, not Python string literals. If a PR introduces or expands inline prompt prose in Python, flag it.\n- **Hallucinated import detection**: For Python, check against `requirements*.txt` \u002F `pyproject.toml` \u002F `setup.py` \u002F `Pipfile`. For TS\u002FJS, check against `package.json`. For Go, `go.mod`.\n\n## Anti-Rationalization Checks\n\n| Rationalization | Reality |\n|---|---|\n| \"Diff is small, no need to see the full function\" | Small hunks can hide big complexity; ask for the full function |\n| \"Cyclomatic ≈ cognitive, no need to compute both\" | They diverge sharply under nesting; compute both |\n| \"Tests cover it, so complexity doesn't matter\" | Test existence ≠ test maintainability; complex code = hard tests |\n| \"It's AI-generated but it works\" | AI patterns (over-helpering, copy-paste tweaks, hallucinated imports) compound; flag the pattern |\n| \"Just refactor later\" | Later = never in this codebase; refactor is part of this PR |\n| \"It's a config change, security doesn't apply\" | Config changes can ship secrets, change auth flows, expose endpoints; always check |\n| \"Short variant is enough\" | Only if the PR is actually small + low-risk; large or AI-generated PRs need the Long variant even if the diff looks short |\n\nIf you catch yourself thinking any of these, stop and complete the verification step.\n\n## Out of Scope (lane ownership)\n\nThis skill owns **logic \u002F architecture \u002F maintainability \u002F testability \u002F metric-driven complexity**. It deliberately does **not** own:\n\n- **Syntax \u002F formatting \u002F lint enforcement** — covered by ESLint, Ruff, mypy, prettier, and the repo's pre-commit hooks. Do not duplicate.\n- **Naming conventions \u002F file layout \u002F import ordering** — covered by `\u002Fcode-standards` style lane and the language-specific linters.\n- **ZFC contract \u002F agent routing \u002F structured-field design** — owned by `\u002Fzfc`.\n- **Level-up \u002F XP \u002F reward loop semantics** — owned by the product plugin's leveling check, when one is installed.\n- **Root-cause-first debugging methodology for fix proposals** — owned by `\u002Froot-cause-first`.\n\nIf a finding would belong to one of those lanes, name the lane and hand off rather than producing conflicting feedback.\n\n## Short-circuit Clauses\n\n- **Docs-only \u002F test-only \u002F dependency-bump PR**: Return **N\u002FA — out of scope for code-quality** in the first line. Do not enumerate metrics or imports for these PRs. (Costs zero tokens and prevents noise.)\n- **Diff ≤ 10 changed lines and no production behavior touched**: Use Short variant. If you would produce zero findings, say so explicitly rather than padding.\n\n## Variant Operational Sharpness\n\nThese constraints make the Short and Long variants operationally distinct so models can't accidentally conflate them:\n\n### Short variant — hard rules\n\n- **Max 5 Key Issues rows.** If you have more, merge or drop the lowest-severity rows.\n- **Every row must anchor to `file:line`** with the offending code quoted inline.\n- **Do not produce refactor code blocks.** One-sentence recommendation only. The PR author does the rewrite.\n- **No \"Detailed Findings\" sections.** Use only the \"Key Issues\" \u002F \"Action Items\" \u002F \"Positive Notes\" \u002F \"Quick Recommendations\" headings shown above.\n\n### Long variant — hard rules\n\n- **Required headings, in order**: `Overview`, `Strengths`, `Issues by severity`, `Suggested refactors`.\n- **Scope discipline**: changed files + their direct callers only. A full-codebase scan is **opt-in** (`--full-scan` or explicit user request). Default to changed files to avoid context-window saturation on large PRs.\n- **Refactor suggestions must include a code snippet** (a few lines is enough) — Iron Law.\n- **\"Issues by severity\" must be grouped**: Critical \u002F High \u002F Medium \u002F Nice-to-have. Do not interleave.\n\nIf a model returns a Short variant that contains Long-variant headings (or vice versa), treat that as a structural violation and re-emit in the correct shape.\n\n## Cross-references\n\n- `.claude\u002Fskills\u002Fcode-standards\u002FSKILL.md` — dispatches `code-quality` alongside `\u002Fzfc`, the optional product leveling check, `\u002Froot-cause-first`, and `\u002Fthermo`\n- `.claude\u002Fskills\u002Froot-cause-first\u002FSKILL.md` — for fixes, not for code-quality findings\n- `.claude\u002Fskills\u002Fevidence-standards\u002FSKILL.md` — required for `$PROJECT_ROOT\u002F` production PRs (this skill is supporting evidence, not primary)\n",{"name":5,"description":7},"main","8144f00ebafc4306264c63239e4b9fa42e48a90e",".claude\u002Fskills\u002Fcode-quality",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-14 03:18:13",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill code-quality",{"tool":62,"command":63},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill code-quality",{"tool":65,"command":66},"pnpm","pnpm dlx skills add jleechanorg\u002Fjleechan-skills --skill code-quality","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcode-quality\u002FSKILL.md",true,[],[71,89,108,122,136,152],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":44},"01M716Y5MTJ6GYJZ2ATXCJK8G4","instinct","Use when the user invokes \u002Finstinct or \u002Fin, or asks to \"message Instinct\", \"ask Instinct\", \"tell Instinct\", \"check Instinct\", or read replies from the configured peer assistant. iMessage first, WhatsApp Web as fallback.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Finstinct\u002FSKILL.md",[],[73,78,79,80,81,82,83,84,85,86,87,88],"user","when","replies","check","use","identity","whatsapp","gmail","read","message","ask",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":98,"publishedAt":44},"01M716Y4HF7FVVMJSA2CCVN5VF","hr","Compatibility alias for history-resume; produce the same fresh-state, provenance-aware resume briefing.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fhr\u002FSKILL.md",[95],{"categoryNo":96,"categoryName":97,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000038","人力资源",[91,99,100,101,32,102,103,104,105,106,107],"resume","compatibility","provenance","history","produce","alias","briefing","state","fresh",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":115,"publishedAt":44},"01M716Y1FFNFKFJYYKF8HQA6T8","history-resume","Resume briefing for the current repository branch or worktree using fresh state and admitted history sources.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fhistory-resume\u002FSKILL.md",[114],{"categoryNo":96,"categoryName":97,"taxonomyType":20,"taxonomyTypeDesc":21},[102,99,116,117,78,118,105,119,32,120,121,106,107],"history resume","branch","analysis","repository","worktree","sources",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":44},"01M716XWXJ8EPHK4RH9T14TR85","grok","Alias for the canonical grokbot browser conversation workflow; \u002Fgrok talks to the Grok bot the same way \u002Fdot talks to Dot.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgrok\u002FSKILL.md",[],[124,129,130,131,32,132,104,133,134,135],"dot","bot","workflow","canonical","conversation","browser","grokbot",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":44},"01M70N9Q07DTE0EW5KFXMMMSJ0","codexa-bench","Compare `codexa` and normal `codex` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcodexa-bench\u002FSKILL.md",[],[143,144,145,82,146,32,147,148,149,150,151],"codexa bench","work","split","default","duplicate","task","compare","normal","codex",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":156,"licenseFileUrl":157,"sourceHtmlUrl":158,"categories":159,"keywords":171,"publishedAt":44},"01M6C24S2X60SP8BBFGAEKPEGW","frontend-design","Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML\u002FCSS layouts, or when styling\u002Fbeautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffrontend-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffrontend-design\u002FSKILL.md",[160,165,168],{"categoryNo":161,"categoryName":162,"taxonomyType":163,"taxonomyTypeDesc":164},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",{"categoryNo":166,"categoryName":167,"taxonomyType":163,"taxonomyTypeDesc":164},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":169,"categoryName":170,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000032","设计师",[172,173,174,82,175,176,177,78,178,179,24,180,181,182,183,184,185,186,23,187,188,189,190,191,192,193,79,194],"frontend","design","frontend design","generic","ui design","react","html","components","artifacts","ui","aesthetics","Production","web components","landing","applications","web","css","create","examples","with","react components","web ui","pages"]