analyze
Analyze an existing CLAUDE.md against all 7 Claude Code source leak findings and produce a detailed gap report showing which limitations are mitigated, partially addressed, or completely unaddressed. Use when the user says "fixclaude analyze", "analyze claude md", "check claude md coverage", "audit claude directives", or "what's missing from my claude md".
What this skill does
# Fix Claude -- Analyze
Analyze an existing CLAUDE.md file against the 7 structural bottlenecks
discovered in the Claude Code source code leak. Produce a gap report explaining
what each issue is, why it matters, and whether the current directives mitigate it.
## Workflow
### Step 1: Resolve and Read Target
```bash
TARGET="CLAUDE.md"
if [ -L "$TARGET" ]; then
TARGET=$(readlink -f "$TARGET")
echo "Resolved symlink to: $TARGET"
fi
```
Read the full target file. If it doesn't exist, tell the user to run
`fixclaude:init` first and stop.
### Step 2: Load the Findings
Read the source leak findings reference:
```
${CLAUDE_PLUGIN_ROOT}/skills/analyze/references/source-leak-findings.md
```
This contains all 7 findings with their source locations, problems, check
criteria, and overrides.
### Step 3: Analyze Each Finding
For each of the 7 findings, evaluate the existing CLAUDE.md using the
**"What to check"** criteria from the reference. Rate each finding:
- **MITIGATED** -- The CLAUDE.md contains a directive that fully addresses this issue
- **PARTIAL** -- The CLAUDE.md touches on this but is missing key aspects
- **UNADDRESSED** -- The CLAUDE.md does not address this issue at all
### Step 4: Produce the Report
Present the analysis inline (never hide behind a file path). Use this format:
```
# CLAUDE.md Gap Analysis
Analyzed: <file path>
Lines: <line count>
Date: <today>
## Summary
<X>/7 findings mitigated | <Y>/7 partial | <Z>/7 unaddressed
## Findings
### 1. Employee-Only Verification Gate
**Status: <MITIGATED|PARTIAL|UNADDRESSED>**
**The issue:** Claude Code's success metric for file writes is: did bytes hit
disk? Anthropic's internal verification loop (compile check, linter, test suite)
is gated behind `process.env.USER_TYPE === 'ant'`. Their own docs cite a
29-30% false-claims rate.
**Source:** `services/tools/toolExecution.ts`
**Your coverage:** <Explain what the CLAUDE.md does or doesn't do. Quote
relevant lines if present. Be specific about what's missing.>
**Recommended override:** <If not fully mitigated, provide the specific
directive text they should add.>
---
### 2. Context Death Spiral
**Status: <MITIGATED|PARTIAL|UNADDRESSED>**
**The issue:** Auto-compaction fires at ~167K tokens. Keeps 5 files (5K tokens
each), compresses everything else into a 50K-token summary. Every file read,
reasoning chain, and intermediate decision is destroyed. Dead code in the
project accelerates this.
**Source:** `services/compact/autoCompact.ts`
**Your coverage:** <...>
**Recommended override:** <...>
---
### 3. The Brevity Mandate
**Status: <MITIGATED|PARTIAL|UNADDRESSED>**
**The issue:** System prompt contains: "Try the simplest approach first,"
"Don't refactor code beyond what was asked," "Three similar lines of code is
better than a premature abstraction." These fight user intent when structural
fixes are needed.
**Source:** `constants/prompts.ts`
**Your coverage:** <...>
**Recommended override:** <...>
---
### 4. The Agent Swarm Nobody Told You About
**Status: <MITIGATED|PARTIAL|UNADDRESSED>**
**The issue:** Sub-agents run in isolated AsyncLocalStorage with own memory,
compaction cycle, and token budget. No MAX_WORKERS limit. One agent = ~167K
tokens. Five parallel agents = 835K. Users default to single-agent sequential
processing.
**Source:** `utils/agentContext.ts`
**Your coverage:** <...>
**Recommended override:** <...>
---
### 5. The 2,000-Line Blind Spot
**Status: <MITIGATED|PARTIAL|UNADDRESSED>**
**The issue:** File reads hard-capped at 2,000 lines / 25,000 tokens.
Everything past that is silently truncated. The agent hallucinates the rest.
**Source:** `tools/FileReadTool/limits.ts`
**Your coverage:** <...>
**Recommended override:** <...>
---
### 6. Tool Result Blindness
**Status: <MITIGATED|PARTIAL|UNADDRESSED>**
**The issue:** Tool results exceeding 50,000 characters are persisted to disk
and replaced with a 2,000-byte preview. The agent works from the preview and
doesn't know results were truncated.
**Source:** `utils/toolResultStorage.ts`
**Your coverage:** <...>
**Recommended override:** <...>
---
### 7. grep Is Not an AST
**Status: <MITIGATED|PARTIAL|UNADDRESSED>**
**The issue:** GrepTool is raw text matching. It can't distinguish function
calls from comments or differentiate identically named imports from different
modules. Renames that rely on grep miss dynamic imports, re-exports, and
string references.
**Source:** GrepTool implementation
**Your coverage:** <...>
**Recommended override:** <...>
```
### Step 5: Recommend Next Steps
Based on the gap count:
- **0 unaddressed:** "Your CLAUDE.md covers all known issues. Run `fixclaude:update` if you want to strengthen any partial mitigations."
- **1-3 unaddressed:** "Run `fixclaude:update` to add the missing directives."
- **4+ unaddressed:** "Run `fixclaude:update` for a comprehensive upgrade, or `fixclaude:init` to start fresh with the full template (backs up your existing file first)."
## Important Rules
- Always show the full report inline. Never write it to a file and point to it.
- Quote specific lines from the user's CLAUDE.md when rating coverage.
- Be honest about partial coverage -- don't inflate ratings.
- The analysis must be useful to someone who has never heard of the source leak.
Each finding section should be self-contained and educational.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.