skills/development-workflows/code-quality-review/SKILL.md
Run a code quality review focused on maintainability, structure, abstraction quality, file growth, branching complexity, boundary cleanliness, and refactoring opportunities. Use when the user asks for code quality review, code review, maintainability review, architecture quality review, PR code quality feedback, 代码质量审查, 代码质量 review, 可维护性审查, 架构质量审查, or review comments about code structure. Do not use for pure security review, formatting-only review, performance profiling, or implementation tasks unless the user also asks for a code quality review.
npx skillsauth add bahayonghang/my-claude-code-settings code-quality-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to perform a strict, evidence-based review of code quality and maintainability. Focus on whether the change keeps the codebase easier to understand, modify, test, and extend.
Prioritize structural concerns over style nits: abstraction quality, branching complexity, file growth, boundary cleanliness, canonical-layer ownership, duplication, orchestration complexity, and refactoring opportunities that preserve behavior while simplifying the implementation.
Use this skill when the user asks for:
code quality review, code review, maintainability review, or architecture quality review代码质量审查, 代码质量 review, 可维护性审查, or 架构质量审查Do not use this skill as the primary guide for:
If the user asks to implement fixes after the review, switch from review mode to an explicit implementation plan before editing files.
This skill is deliberately the focused structural and maintainability lens. If the user actually wants a broad, full-spectrum audit spanning correctness, security, performance, and test coverage, that is a wider and different scope — prefer a general-purpose code auditor for that, and keep this skill for judging whether the change keeps the code easy to understand, modify, test, and extend.
code_review/ and never touches product code.main...HEAD, preferring a merge-base comparison.main → try master...HEAD.CLAUDE.md, AGENTS.md, or contributor guide, and search for existing canonical helpers, similar patterns, and established abstractions.| Area | Flag when | Prefer |
| --------------------------- | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- |
| Structural simplification | The change preserves incidental complexity or adds concepts without clear leverage. | Reframe the flow so branches, modes, helpers, or layers disappear. |
| Branching complexity | New conditionals, flags, modes, or special cases are scattered through unrelated paths. | Move policy into a focused helper, explicit model, state machine, or owned module. |
| File growth | A file grows past a healthy size boundary, especially near or beyond 1000 lines. | Split focused modules, helpers, components, or orchestration layers. |
| Abstraction quality | Wrappers, generic mechanisms, or pass-through helpers add indirection without reducing cognitive load. | Inline thin wrappers or deepen the abstraction so it hides real complexity. |
| Boundary and type contracts | any, unknown, casts, optionality, or silent fallback hide the real invariant. | Make the boundary explicit with a typed model, shared contract, or validated input shape. |
| Canonical ownership | Feature logic leaks into shared paths or duplicates existing utilities. | Reuse canonical helpers and move logic to the layer that owns the concept. |
| Orchestration and atomicity | Independent work is serialized needlessly, or related updates can leave half-applied state. | Simplify orchestration, parallelize independent work when clearer, and keep related updates atomic. |
Blocker: Clear structural regression that should not merge without redesign, such as major complexity growth, wrong-layer feature leakage, a file crossing a major size threshold without justification, or a contract that makes future changes unsafe.High: Maintainability degradation that is likely to spread or make future work harder, with a concrete remediation path.Medium: Local design smell or missed simplification worth addressing, but not necessarily merge-blocking.Low: Minor readability or organization issue. Include only when it is useful and does not distract from larger findings.Do not escalate speculative preferences. If evidence is incomplete, label the uncertainty and ask for missing context instead of presenting a guess as a finding.
Return the review in this structure. Number findings with stable IDs (CQ-001, CQ-002, …) so each can be referenced later — for example, when the user picks specific findings to fix.
## Verdict
REQUEST CHANGES | COMMENT ONLY | NEEDS SCOPE | NO MAJOR FINDINGS
One-sentence rationale.
## Findings
### CQ-001 [Severity] Short finding title
- Location: path:line or file-level / architecture-level
- Evidence: quote or concise description of the relevant code/diff
- Why it matters: maintainability, abstraction, boundary, or complexity impact
- Recommended remediation: concrete structural alternative or next step
- Confidence: High | Medium | Low
## Checked but not flagged
- Major areas inspected that did not produce findings.
## Scope limitations
- Missing files, diff context, tests, or repository state that limited confidence.
If there are no meaningful findings, use NO MAJOR FINDINGS and still summarize what was checked. If the target is unclear, use NEEDS SCOPE and ask for the exact files, diff, PR, or subsystem.
This calibrates the bar. A real finding names a concrete structural cost and a remediation that removes it — not a style preference.
Input (excerpt under review):
// services/user.ts — new code
export function getUser(id: any): any {
const row = repo.find(id);
return row ?? {}; // silent empty-object fallback
}
Output finding:
getUser discards its type contract and hides "not found"any, and a missing row silently becomes {}.id: UserId, return User | null) and let callers handle null explicitly.code_review/<feature>/quality-review.md using assets/templates/quality-review.md. Infer <feature> from the branch name, PR title, or changed package, and keep the filename stable so the folder stays easy to scan.
code_review/ holds review process files that usually should not be committed — recommend adding it to .gitignore. Do not edit .gitignore yourself unless the user asks.tools
文献深度解读助手,像研究生导师一样交互式解读 Zotero 库中的学术论文,面向计算机科学、深度学习、自动化等方向(个人向)。当用户提供文献题目、DOI、PDF 或要求解读某篇论文时触发,通过 Zotero MCP 优先获取全文,并根据用户意图自动选择快速筛选、导师深读或研究复盘模式。完整深读时先完成叙事类型判断、阅读前预检、novelty 校准和作者思考路径重建,再整体概览,并基于图例、正文和表格逐图详细解读(Zotero MCP 无法提取 PDF 图片,解读基于文字信息,必要时提醒上传图片)。适用于:(1)快速判断文献是否值得深读 (2)深入理解某篇论文 (3)学习文章中的方法和技术 (4)批判性分析研究设计 (5)寻找研究灵感。需要多篇论文综合、对比或找研究空白,或 arXiv/DOI 批量规范化时,改用 paper-workbench。
development
Review Codex, Claude, OpenAI, or other agent skill directories as reusable capability packages. Use when asked to audit, review, improve, score, rewrite, debrand, package, or document a SKILL.md, skill package, marketplace skill, or agent skill directory, especially when the user wants a comprehensive findings-first report with concrete patch recommendations and validation steps.
development
Turn vague or complex Codex tasks into strong `/goal` commands with outcome, verification, constraints, boundaries, iteration policy, completion evidence, and pause/block conditions. Use when the user asks for Codex goal instructions, Goal 指令, 目标指令, `/goal` prompts, 中文 Goal 模板, plan-to-goal interviews, success criteria, verification commands, or bounded agent work definitions.
tools
Write, debug, and validate ast-grep structural code search rules. Use this skill when the user needs syntax-aware code search, AST pattern matching, structural refactor discovery, language-construct queries, or searches that plain text tools like rg can miss, such as finding functions with particular descendants, calls inside specific contexts, missing error handling, React hook shapes, decorators, or other Tree-sitter-backed code structures.