
- Installs
- 138
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/oimiragieo/agent-studio --skill code-analyzer- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads code-analyzer automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Code Analyzer Skill
Installation
No separate download: the skill runs the in-repo tool .claude/tools/analysis/project-analyzer/analyzer.mjs.
- Ensure Node.js (v18+) is installed: nodejs.org or
winget install OpenJS.NodeJS.LTS(Windows),brew install node(macOS). - From the project root, the script is invoked automatically; no extra install steps.
Cheat Sheet & Best Practices
Metrics: Focus on cyclomatic complexity (decision paths), LOC, maintainability index, and duplicate blocks. Use ESLint complexity rule (e.g. "complexity": ["error", 15]) for JS/TS; optional chaining and default params add branches.
Process: Analyze before refactoring; run project-wide then drill into hotspots. Track trends over time (not one-off). Use max-depth, max-lines, max-nested-callbacks, max-params, max-statements alongside complexity.
Hacks: Start with project-analyzer output; filter by file type and threshold. Prioritize files with high complexity and high churn. Disable complexity rule only if you cannot set a sensible limit; prefer lowering the threshold over disabling.
Certifications & Training
No single cert; aligns with static analysis and ESLint complexity. ESLint: complexity rule, max-depth, max-lines, max-params. Skill data: Cyclomatic complexity, LOC, maintainability, duplicates; analyze before refactor; track hotspots and trends.
Hooks & Workflows
Suggested hooks: Pre-commit or CI: run project-analyzer/doctor for health; optional complexity gate. Use with developer (secondary), qa (secondary), code-reviewer (primary).
Workflows: Use with code-reviewer (primary), developer/ qa (secondary), c4-code (primary). Flow: run analyzer → filter hotspots → refactor or add tests. See code-review-workflow.md.
Overview
Static code analysis and metrics. 90%+ context savings.
Tools (Progressive Disclosure)
Analysis
| Tool | Description |
|---|---|
| analyze-file | Analyze single file |
| analyze-project | Analyze entire project |
| complexity | Calculate complexity metrics |
Metrics
| Tool | Description |
|---|---|
| loc | Lines of code |
| cyclomatic | Cyclomatic complexity |
| maintainability | Maintainability index |
| duplicates | Find duplicate code |
Reporting
| Tool | Description |
|---|---|
| summary | Get analysis summary |
| hotspots | Find complexity hotspots |
| trends | Analyze metric trends |
Agent Integration
- code-reviewer (primary): Code review
- refactoring-specialist (primary): Tech debt analysis
- architect (secondary): Architecture assessment
Iron Laws
- ALWAYS run project-wide analysis before drilling into individual files — local analysis without context misses which files are actually the highest-priority hotspots; start broad, then focus.
- ALWAYS focus on high-complexity AND high-churn files — a complex but rarely-changed file is lower priority than a moderately complex but frequently-changed one; intersection matters most.
- NEVER set complexity thresholds above 20 — cyclomatic complexity >20 is demonstrably correlated with defects; teams that allow >20 accumulate unmaintainable code without noticing.
- ALWAYS track metrics over time, not just once — a single analysis snapshot is meaningless; track trends weekly to detect gradual degradation before it becomes a crisis.
- NEVER report metrics without actionable next steps — complexity numbers without refactoring targets provide no value; every high-complexity finding must include a specific suggested improvement.
Anti-Patterns
| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
| Analyzing only changed files | Misses cross-file complexity accumulation | Run project-wide then filter to changed hot spots |
| Ignoring high-complexity files over time | Gradual degradation invisible in point-in-time analysis | Track weekly trends; alert on any increase |
| Complexity threshold >20 | Research shows defect rate spikes sharply above 20 | Set ESLint complexity rule to ≤15 for enforcement |
| Reporting metrics without action items | Metrics without remediation don't reduce complexity | Attach specific refactoring suggestion per hotspot |
| Running analysis once and ignoring results | Technical debt silently accumulates | Schedule automated weekly analysis with trend reports |
Memory Protocol (MANDATORY)
Before starting:
Read .claude/context/memory/learnings.md
After completing:
- New pattern ->
.claude/context/memory/learnings.md - Issue found ->
.claude/context/memory/issues.md - Decision made ->
.claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.
FAQ
What does the code-analyzer skill do?
Static code analysis and complexity metrics
How do I install code-analyzer?
Run npx skills add https://github.com/oimiragieo/agent-studio --skill code-analyzer in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/code-analyzer/ (personal) or .claude/skills/code-analyzer/ (project).
Which AI agents can use code-analyzer?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is code-analyzer safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains code-analyzer?
It is published by oimiragieo in oimiragieo/agent-studio. It has 138 recorded installs.
More from oimiragieo/agent-studio
pyqt6-ui-development-rules
oimiragieo/agent-studio
PyQt6 desktop GUI development rules -- signal/slot architecture, QSS theming, QThread concurrency, layout management, and cross-platform rendering. Enforces MVC separation and responsive UI patterns.
filesystem
oimiragieo/agent-studio
File system operations guidance - read, write, search, and manage files using Claude Code's built-in tools.
chrome-browser
oimiragieo/agent-studio
Open the skill to read its SKILL.md instructions.
slack-notifications
oimiragieo/agent-studio
Open the skill to read its SKILL.md instructions.
context-compressor
oimiragieo/agent-studio
Open the skill to read its SKILL.md instructions.
nodejs-expert
oimiragieo/agent-studio
Open the skill to read its SKILL.md instructions.
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.