Write an Architecture Decision Record (ADR) document for a technical decision. Use when documenting a technical choice, architectural decision, or design decision.
中文简介正在准备中。当前显示原文说明。
Find overly complex code: files over 300 lines, functions over 50 lines, deeply nested conditions (4+ levels), and magic numbers. Use for code quality reviews, pre-release checks, or when asked to assess code maintainability.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Check the codebase for complexity violations.
!git diff --name-only HEAD~1 2>/dev/null || git diff --name-only origin/main...HEAD 2>/dev/null || echo "all"
Focus on the changed files listed above. If "all", check the entire codebase.
Find source files over 300 lines (exclude node_modules, dist, .git, vendor, coverage, build):
find . \( -name "*.py" -o -name "*.ts" -o -name "*.js" -o -name "*.tsx" -o -name "*.jsx" -o -name "*.go" -o -name "*.rb" \) \
-not -path "*/node_modules/*" \
-not -path "*/dist/*" \
-not -path "*/.git/*" \
-not -path "*/vendor/*" \
-not -path "*/coverage/*" \
-not -path "*/build/*" \
| xargs wc -l 2>/dev/null | sort -rn | head -20
Flag any file with more than 300 lines.
Read each changed source file (or sample the largest files if "all"). Scan for function or method definitions and estimate the line count between consecutive definitions. Flag any function that appears to span more than 50 lines.
Look for these definition patterns:
def or async def function , async function , => {, ): void {, ): Promise<func def If a definition is followed by the next definition more than 50 lines later, flag the first function.
Search changed files for lines with 4 or more levels of indentation inside conditional or loop structures. Use these grep patterns (adjust for tab vs space indentation):
For 4-space indentation (16+ spaces):
grep -n "^ " <file>
For tab indentation (4+ tabs):
grep -n "^\t\t\t\t" <file>
Flag files where deeply nested lines appear inside if, for, while, or switch blocks.
Search changed files for numeric literals (other than 0, 1, -1, 2, 100, 1000) used directly in conditions or calculations without a named constant. Look for patterns like:
if x > 42:* 3600% 7 ==timeout = 30Exclude test files and configuration files where literal values are expected.
Output exactly:
COMPLEXITY FINDINGS:
- <file>:<line> — <description>
Examples:
COMPLEXITY FINDINGS:
- src/auth/handler.ts:1 — file is 412 lines (limit: 300)
- src/auth/handler.ts:87 — function processLogin is approximately 63 lines (limit: 50)
- src/utils/parser.py:145 — 5 levels of nesting detected
- src/config.ts:23 — magic number 86400 (consider: SECONDS_PER_DAY)
If no findings: output exactly COMPLEXITY FINDINGS: none
Do not add any prose before or after the findings block.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Write an Architecture Decision Record (ADR) document for a technical decision. Use when documenting a technical choice, architectural decision, or design decision.
中文简介正在准备中。当前显示原文说明。
REST API design conventions for this codebase. Use when writing or reviewing API endpoints, route definitions, response formatting, or client code that calls the API.
中文简介正在准备中。当前显示原文说明。
Automatically format code files after every edit using Prettier and ESLint. Active in the background whenever Claude edits a file. Formatting is silent — no prompts, no output unless a formatter fails. Use when you want consistent formatting enforced automatically during a coding session.
中文简介正在准备中。当前显示原文说明。
Create a git branch named after a GitHub issue.
中文简介正在准备中。当前显示原文说明。
Draft the changelog entry for all unreleased commits in Keep a Changelog format. Groups commits into Added, Changed, Fixed, Removed, and Security. Use before releasing a new version or when updating CHANGELOG.md.
中文简介正在准备中。当前显示原文说明。
Draft a CHANGELOG.md entry for the current changes in Keep a Changelog format. Use when releasing, tagging a version, or updating CHANGELOG.md.
中文简介正在准备中。当前显示原文说明。