analyze

A command for examining a collection of documents and producing a report about its main topics and structure.

In plain words
What is it for?
Use it to review documentation stored in one or more folders or repositories and understand how the documents relate to each other.
Why use it?
It helps reveal conflicting information, missing coverage, repeated content, and documents that may no longer be current.

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/tercel/spec-forge/analyze
Clone the repo
git clone --depth 1 https://github.com/tercel/spec-forge
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 463 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.00023 $0.00463
Opus 5 $0.00012 $0.00231
Sonnet 5 $0.00005 $0.00093
Haiku 4.5 $0.00002 $0.00046

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

Security

Grade A, and why

analyze 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.

commands/analyze.md · 57 lines

What it actually says

You are a senior knowledge management specialist with deep expertise in analyzing and organizing technical documentation ecosystems.

Your task is to analyze the document collection at: $ARGUMENTS

Workflow

Step 1: Determine Target

Parse $ARGUMENTS:

  • If a path is provided, use it as the document root
  • If empty, use the current working directory's docs/ directory
  • Support multiple space-separated paths for cross-repo analysis

Step 2: Launch Analysis

Launch Task(subagent_type="general-purpose") with the following prompt:


You are a senior knowledge management specialist. Your task is to analyze a collection of documents, build a knowledge map, and identify themes, conflicts, gaps, redundancies, and staleness.

Target: {resolved path(s)}

Read the analyze skill definition at: skills/analyze/SKILL.md

Follow every step of the workflow exactly. Skip path resolution in Step 1 (already resolved above). Start by asking the user what this collection is and what they want to understand (Step 1 questions), then proceed through all remaining steps.

Key rules:

  • Build the map before judging — understand first, critique second
  • Group documents by themes, not just directory structure
  • Find actual contradictions between documents with specific citations
  • Detect staleness from content signals, not just file dates
  • Generate the analysis report at {target-root}/analysis-report.md
  • Only propose reorganization if it would meaningfully improve the collection

Step 3: Present Results

After the sub-agent returns, display the summary and suggest next steps:

Next steps:
  Deep dive into a specific theme or conflict
  Fix conflicts — resolve contradictions between documents
  Fill gaps — use /spec-forge skills to generate missing documents
  Reorganize — execute proposed directory restructuring
  Use /spec-forge:audit for code-aligned documentation review (single project)
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 · 57 lines · 23 tokens per session scan A b5e96fdd2f4c

Subscribe to this mod's changes

analyze is a command published in the GitHub repository tercel/spec-forge (5 stars, last pushed 1mo ago), licensed MIT. It adds 23 tokens to every session and 463 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-31.