Skip to main content
skill CX Codex

code-analyzer — Claude Code skill: what it does, how to install

code-analyzer measures cyclomatic complexity, lines of code, maintainability and duplicates, then points at the files worth touching first.

no license 138 installs ★ 45 updated 2026-07-14

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add oimiragieo/agent-studio --skill code-analyzer -a claude-code
Open on GitHub

What code-analyzer does

The skill runs a static pass over a repository and reports cyclomatic complexity, lines of code, a maintainability index and duplicated blocks. The work happens through one Node script kept in the project at .claude/tools/analysis/project-analyzer/analyzer.mjs, driven by Bash; files are read with Read, Glob and Grep. Actions are split by job: analyze-file and analyze-project for scope, complexity, loc, cyclomatic, maintainability and duplicates for numbers, summary, hotspots and trends on top.

Start project-wide, narrow down to hotspots, and only then refactor or add tests. It is built to sit beside code-reviewer and c4-code as primary partners, with developer and qa in support; a pre-commit or CI gate goes through project-analyzer/doctor. Results are meant to land in .claude/context/memory/learnings.md, issues.md and decisions.md.

You need Node.js v18+ and the analyzer script present in the project, since that is what gets called. On thresholds the skill is blunt: keep the ESLint complexity rule at 15 or below and never let it pass 20. A one-off snapshot tells you little, so the trend across runs is the number that counts.

What it helps with

  • find the most tangled files before a refactor
  • get LOC and maintainability figures for the whole repo
  • spot duplicated blocks across the codebase
  • catch complexity creeping up between runs
  • add a complexity gate to pre-commit or CI

Example prompts for the agent

  • Analyze the whole project and list the complexity hotspots.
  • Run the cyclomatic check on src/parser.ts and tell me what to simplify.
  • Compare this week's metrics with the last run and flag what got worse.

How to install code-analyzer

1Skills CLI (Vercel)

npx skills add oimiragieo/agent-studio --skill code-analyzer -a claude-code

2Manually: put the files in place

~/.claude/skills/code-analyzer/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/code-analyzer/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about code-analyzer

How do I install code-analyzer in Claude Code?

Run npx skills add oimiragieo/agent-studio --skill code-analyzer -a claude-code. The skill lands at ~/.claude/skills/code-analyzer/SKILL.md.

What does code-analyzer do?

It measures code metrics: cyclomatic complexity, LOC, maintainability index and duplicates. It also returns a summary, complexity hotspots and metric trends.

Do I need anything besides the skill?

Node.js v18+ and the in-repo analyzer at .claude/tools/analysis/project-analyzer/analyzer.mjs. The skill calls that script, so nothing runs without Node.

Similar skills

All skills for Code review and refactoring →

From the same set8

pyqt6-ui-development-rules The pyqt6-ui-development-rules skill guides agents working on PyQt6 desktop interfaces, from UI-to-logic wiring to background work and layout. Use it when building or refactoring a Qt app. CX Codex +1 1,200installs slack-notifications The slack-notifications skill lets an agent work with Slack messages, channels, users, files, and reactions. Use it for team updates, incident notices, and workflow alerts. CX Codex +1 289installs context-compressor context-compressor compresses large text files, chat histories, and RAG payloads before sending to the model while preserving evidence for correct answers. Reduces token spend when context balloons. CX Codex +1 274installs text-to-sql text-to-sql turns a plain-language request into a SQL query, checked against your database schema and built with placeholders instead of inlined values. CX Codex +1 158installs diagram-generator diagram-generator turns code and docs into Mermaid diagrams: architecture, schemas, data flows. Any diagram can come out as one standalone HTML page. CX Codex +1 146installs docker-compose Orchestrates multi-container applications and networks via Docker Compose V2. Helpful for local service development, testing, and debugging. CX Codex +1 145installs interactive-requirements-gathering interactive-requirements-gathering runs a structured questionnaire for requirements: one question at a time, A–E options, answers saved as you go. Useful before the first line of code. CX Codex +1 103installs

Project sponsors

Companies that keep this analytics open