deep-code-analysis

A structured codebase investigation that examines a project's design, data flow, security, performance, and use of common code patterns. It also researches documentation for the technologies it finds and produces a report.

In plain words
What is it for?
Use it to map a project, understand how its parts work together, check common vulnerabilities, find inefficient code, and document the results.
Why use it?
It helps make sense of unfamiliar or complex software and brings possible security, performance, and design problems into one review.

Command

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 commands/fusengine/agents/deep-code-analysis
Clone the repo
git clone --depth 1 https://github.com/fusengine/agents
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 500 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.00028 $0.00500
Opus 5 $0.00014 $0.00250
Sonnet 5 $0.00006 $0.00100
Haiku 4.5 $0.00003 $0.00050

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

Security

Grade A, and why

deep-code-analysis 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.

plugins/ai-pilot/commands/deep-code-analysis.md · 76 lines

What it actually says

Deep Code Analysis

Perform comprehensive codebase investigation:

  1. Initial Exploration:

    Use explore-codebase to map the project structure and identify key components

    Wait for exploration results.

  2. Documentation Research:

    Use research-expert to find official documentation for [detected frameworks/libraries]

    Focus on:

    • Architecture patterns used
    • Best practices for detected tech stack
    • Common pitfalls to avoid
  3. Pattern Analysis:

    • Identify design patterns (MVC, Repository, Factory, etc.)
    • Analyze data flow and state management
    • Map component relationships
    • Detect code smells and anti-patterns
  4. Security Review:

    • Check for common vulnerabilities (SQL injection, XSS, CSRF)
    • Validate input sanitization
    • Review authentication/authorization
    • Analyze dependency security
  5. Performance Assessment:

    • Identify N+1 query problems
    • Check for memory leaks
    • Analyze algorithm efficiency
    • Review caching strategies
  6. Generate Report:

    ## 🔍 Deep Code Analysis: [Project Name]
    
    ### Architecture Overview
    - **Pattern**: [Detected pattern]
    - **Tech Stack**: [Technologies]
    - **Structure**: [Organization approach]
    
    ### Strengths
    - ✅ [Positive aspect 1]
    - ✅ [Positive aspect 2]
    
    ### Areas for Improvement
    - ⚠️  [Issue 1]: [Impact] → [Recommendation]
    - ⚠️  [Issue 2]: [Impact] → [Recommendation]
    
    ### Security Findings
    - 🔒 [Finding 1]
    - 🔒 [Finding 2]
    
    ### Performance Opportunities
    - ⚡ [Optimization 1]
    - ⚡ [Optimization 2]
    
    ### Recommendations
    1. **[Priority 1]**: [Action]
    2. **[Priority 2]**: [Action]
    

Arguments:

  • $ARGUMENTS specifies focus area (security/performance/architecture)

Example Usage:

  • /deep-code-analysis security → Focus on security review
  • /deep-code-analysis → Comprehensive analysis
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 · 76 lines · 28 tokens per session scan A ac2e42081e16

Subscribe to this mod's changes

deep-code-analysis is a command published in the GitHub repository fusengine/agents (25 stars, last pushed 28d ago), licensed MIT. It adds 28 tokens to every session and 500 once invoked, about $0.0001 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-30.