/claudops:code-analysis [scope: file, module, or project]from Claudops
Analyzes codebase structure and quality with evidence-backed metrics, patterns, and recommendations. Use for code audits, architecture assessment, module-dependency analysis, or pre-implementation exploration.
Ships in Claudops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
If
.claude/skills/code-analysis/SKILL.md.disabledexists, stop before reading a fallback. Project configuration: If the current project contains.claude/skills/code-analysis/SKILL.md, read and apply it instead of this bundled default. The project copy is the capability source of truth. Repository context: Read../setup/references/task-context.mdwhen resolving a task, project commands, named agent roles, or legacy.claude/resource paths. Use repository evidence and applicable project instructions; a missing local workflow copy does not require setup. Resolve bundled resources from the installed skill, never from the target cwd.
Announcement: Begin with: "I'm using the code-analysis skill for deep code analysis."
Perform code analysis scoped to the depth tier in Step 1 (Quick / Standard / Deep). Stop as soon as you have enough evidence to fill the output template for that tier — do not expand scope beyond it. Since this runs in a forked context, be decisive: a focused 10-finding report beats a 40-finding report with filler.
For a task-attached analysis, resolve the task and record the report/evidence links using
../setup/references/task-context.md. A standalone overview returns its report without
creating a synthetic task.
This skill READS and REPORTS — it does not suggest code changes or write fixes.
/sr/dbg/deep-researchMatch the depth to the request — not every question needs a full audit:
| Mode | When | Scope |
|---|---|---|
| Quick | "what's the structure?", "explore this module", overview requests | Steps 2-3 only |
| Standard | "analyze", "assess", "audit", "code quality" | Steps 2-5 |
| Deep | "full audit", "comprehensive analysis", "deep dive" | Steps 2-6 + dependency analysis |
When the request is ambiguous, pick the mode whose "When" column best matches the user's phrasing. If still unclear, use Standard.
Understand what you're analyzing before diving in. When multiple discovery commands in a step have no dependencies between them, batch them in one turn. Never use placeholders or guess missing parameters.
# Project structure overview
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" \) \
! -path "*/node_modules/*" ! -path "*/dist/*" ! -path "*/coverage/*" \
| head -60
# Line counts by directory
find . -type f -name "*.ts" ! -path "*/node_modules/*" ! -path "*/dist/*" \
| xargs wc -l | sort -rn | head -20
Read project context dynamically — don't assume the stack or commands:
CLAUDE.md or AGENTS.md only if one exists and applies to the target.package.json, pyproject.toml, go.mod, and similar)
before choosing language-specific commands.If any {{VARIABLE}} placeholder in this skill or in references/project-checks.md is
still literal, resolve it from the repository, CI or project profile (for example,
discover src/, lib/, or app/) before running a command. Do not run a command
containing an unresolved placeholder; if evidence is unavailable, mark that check
skipped with the reason.
The command snippets below use TypeScript/JavaScript as examples. Adapt extensions, paths, exclusions and commands to detected manifests/CI before running them; do not run a snippet unchanged when the repository uses another language.
# Find large files
find . -name "*.ts" ! -path "*/node_modules/*" ! -path "*/dist/*" \
-exec wc -l {} + | sort -rn | head -15
# Test file ratio
find . -name "*.ts" ! -name "*.spec.ts" ! -name "*.test.ts" \
! -path "*/node_modules/*" ! -path "*/dist/*" | wc -l
find . \( -name "*.spec.ts" -o -name "*.test.ts" \) \
! -path "*/node_modules/*" | wc -l
TODO, FIXME, HACK, XXX across source filespackage.json for outdated or unmaintained packages# Hotspots: most frequently changed files (high churn = risk)
git log --since="6 months ago" --format=format: --name-only \
| grep -v '^$' | sort | uniq -c | sort -rn | head -20
# Recent contributors
git shortlog -sn --since="3 months ago"
# Commit velocity (activity trend)
git rev-list --count --since="3 months ago" HEAD
git rev-list --count --since="6 months ago" --until="3 months ago" HEAD
# Code ownership concentration (run for top hotspot files)
# git log --format='%aN' -- [file] | sort | uniq -c | sort -rn | head -3
For Standard and Deep analyses, read references/project-checks.md when it exists. Run only
the checks whose paths and stack were established during discovery; skip absent or irrelevant
checks. Quick analyses stop before this section.
Key areas:
Error throws)Adapt the report to the analysis depth from step 1. Only include sections relevant to the mode.
# Codebase Overview: [scope]
**Structure**: [high-level description]
**Size**: [file count, LOC]
**Key Modules**: [list with brief descriptions]
**Notable**: [1-2 observations]
# Code Analysis: [scope]
**Date**: [ISO date]
## Summary
[2-3 sentence overview]
## Metrics
| Metric | Value |
|--------|-------|
| Total Files | X |
| Lines of Code | X |
| Test/Code Ratio | X% |
| Tech Debt Items | X |
## Architecture Findings
### Strengths
- [finding]
### Concerns
Include every concern you found, labeled with severity. Do not pre-filter to only CRITICAL/MAJOR — a small number of MINOR items in the report is expected and useful.
- [severity: CRITICAL/MAJOR/MINOR] [confidence: high/med/low] [finding]
## Recommendations
1. [actionable recommendation]
2. [actionable recommendation]
All Standard sections plus:
## Git History Analysis
[churn hotspots, ownership, velocity trends]
## Dependency Analysis
[outdated deps, security concerns, bundle impact]
## Detailed Findings
[expandable sections for each analysis dimension]
What SKILL.md sets; muted values are Claude Code's defaults
Explore), in the backgroundnpx claudepluginhub alexandrbasis/claudops --plugin claudops40 skills in this plugin
/analyzeCompare a task's discovery or product requirements with its tech decomposition and report traceability gaps. Use when asked to 'analyze consistency', 'check alignment', 'verify spec matches plan', 'traceability check', 'spec drift', 'are my docs aligned', or after /ct completes to verify the plan covers the requirements. `/ct` may invoke this check when traceability is material; otherwise it remains an explicit read-only command. NOT for code review (use /sr), NOT for code analysis (use /code-analysis), NOT for debugging (use /dbg)./antigravity-cliRun Google Antigravity CLI (agy) for web-grounded research, cross-AI review, or validation when those capabilities are explicitly needed or another skill delegates to agy. One-shot only; do not select it for an ordinary review without an explicit provider choice./Other plugins' skills for the same job