一键导入
complexity-report
Reports cyclomatic complexity hotspots and refactoring suggestions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Reports cyclomatic complexity hotspots and refactoring suggestions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyzes the current session's token usage, pinpoints where tokens were wasted, and produces concrete optimization actions
Generates API documentation from route definitions (Express, Fastify, Hono, etc.)
Adds caching to expensive operations - Redis, in-memory, HTTP cache headers
Staged değişiklikleri analiz edip Conventional Commits formatında commit mesajı oluşturur
Finds unused functions, variables, exports, and dependencies across the codebase
Hata mesajı veya stack trace alır, kök nedeni bulur ve düzeltir
| name | complexity-report |
| description | Reports cyclomatic complexity hotspots and refactoring suggestions |
| argument-hint | ["directory"] |
| user-invocable | true |
| allowed-tools | Bash Grep Read |
| effort | medium |
Directory: $1 (or src/ if not specified)
# Functions longer than 50 lines
grep -n "^function \|^ [a-z].*(.*) {" ${1:-src}/**/*.ts 2>/dev/null | head -30
Read the top 10 largest files and functions.
For each file over 300 lines or function over 40 lines:
Rank by complexity and report:
Top 5 Complexity Hotspots:
src/auth/middleware.ts:handleRequest() CC: 18 Lines: 87
src/api/router.ts:routeRequest() CC: 14 Lines: 120
...
Refactoring recommendations:
1. handleRequest() - extract 3 auth validation blocks into separate functions
2. ...