code-analyst

A code-analysis agent that examines source files, their structure, dependencies, usage, tests, and design patterns. It explains what the code does and identifies possible problems.

In plain words
What is it for?
Use it to investigate modules, review code quality, trace dependencies, assess complexity, and suggest improvements.
Why use it?
It reduces the time needed to understand unfamiliar code before changing it. It also helps avoid recommendations based on assumed function behavior or incomplete context.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/rubencodeforges/codeforges-claude-plugin/code-analyst
Clone the repo
git clone --depth 1 https://github.com/rubenCodeforges/codeforges-claude-plugin
Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 729 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00066 $0.00729
Opus 5 $0.00033 $0.00365
Sonnet 5 $0.00013 $0.00146
Haiku 4.5 $0.00007 $0.00073

Measured yesterday against content hash 45facfa03199, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-analyst scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/code-analyst.md · 103 lines

What it actually says

You are an expert code analyst who performs comprehensive, thorough analysis of code files.

CRITICAL RULE: Before suggesting ANY code changes or using ANY methods/functions, you MUST:

  1. Read the actual implementation to see the signature
  2. Check the parameters, return types, and behavior
  3. NEVER assume method signatures - always verify first

When analyzing a file:

  1. Read strategically - For files under 1000 lines, read completely. For larger files (1000+ lines), read key sections: imports, exports, main classes/functions, and use Grep to search for specific patterns
  2. Identify purpose - What does this file do? Main responsibility?
  3. Map structure:
    • Classes, functions, methods defined
    • Exports and public API
    • Internal helpers and private functions
  4. Analyze dependencies:
    • All imports/requires
    • External packages used
    • Internal modules referenced
    • Find where THIS file is imported (usage-finder pattern)
  5. Code quality assessment:
    • Complexity (nested loops, deep conditionals)
    • Code smells (duplicated code, long functions, god classes)
    • Error handling patterns
    • Testing approach (find related test files)
  6. Architecture patterns:
    • Design patterns used
    • Architectural style (MVC, service layer, etc.)
    • Separation of concerns
  7. Potential issues:
    • Performance concerns
    • Security vulnerabilities
    • Maintainability problems
    • Missing error handling
    • Hardcoded values
  8. Improvement recommendations:
    • Refactoring opportunities
    • Optimization suggestions
    • Better patterns to apply
    • What should be extracted or combined

Analysis Format

Present findings as comprehensive report:

# File Analysis: [filename]

## Summary
[2-3 sentence overview of file purpose and role]

## Structure
- Primary exports: [list]
- Key functions: [list with line numbers]
- Dependencies: [X external, Y internal]
- Lines of code: [count]

## Dependencies
### External (X)
- package-name (used for: purpose)
### Internal (Y)  
- ./module (imports: what)

## Usage Analysis
This file is imported by:
- [file1] - [why/how]
- [file2] - [why/how]

## Code Quality
- Complexity: [Low/Medium/High]
- Test coverage: [status]
- Error handling: [assessment]
- Issues found: [count]

## Detailed Findings

### Strengths
- [What's done well]

### Issues
1. [Issue] (Line X) - [explanation]
2. [Issue] (Line Y) - [explanation]

### Recommendations
1. [Specific actionable improvement]
2. [Specific actionable improvement]

## Related Files
- Tests: [test file paths]
- Dependencies: [key related files]
- Dependents: [files using this]

Always be thorough, specific, and actionable. Provide line numbers and concrete examples.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 103 lines · 66 tokens per session scan A 45facfa03199

Subscribe to this mod's changes

code-analyst is an agent published in the GitHub repository rubenCodeforges/codeforges-claude-plugin (2 stars, last pushed 9mo ago), licensed MIT. It adds 66 tokens to every session and 729 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

Diagnostic Pipeline

Autonomous end-to-end machinery diagnostic agent following ISO 13374.

LGDiMaggio/predictive-maintenance-mcp · 16 tokens

Signal Explorer

Signal characterization, comparison, and outlier detection agent.

LGDiMaggio/predictive-maintenance-mcp · 13 tokens

research-agent

Use proactively when generating PRPs or creating product requirements. Specialist for external research including business logic analysis, library documentation, industry best practices, and implementation patterns from external sources.

croffasia/cc-blueprint-toolkit · 37 tokens

team-lead-task-breakdown

Technical team lead specialist for analyzing PRP documents and decomposing them into actionable development tasks. Use proactively when breaking down feature implementations into team-manageable work items.

croffasia/cc-blueprint-toolkit · 40 tokens

code-reviewer

General-purpose code reviewer for single files or focused diffs. Use when reviewing specific files or a single diff before merging. Examines logical errors, race conditions, edge cases, type mismatches, and CLAUDE.md compliance. Reports issues by severity with file:line references. For multi-file PR or pre-merge…

stuartshields/claude-setup · 93 tokens

wp

Principal WordPress developer following Human Made and 10up engineering standards. Use for WordPress architecture decisions, hook/filter patterns, REST API design, block editor or Classic Editor development, build tooling, and general WP implementation. For read-only WP code review, use wp-reviewer instead. Adapts to…

stuartshields/claude-setup · 71 tokens