analyze

analyze is a command for Claude Code from prime-radiant-inc/greenfield. It costs 15 tokens per session (17,298 once invoked), scanned A, original, Apache-2.0.

A command for examining a codebase and writing specifications that describe its observable behavior, with the source of each claim recorded.

In plain words
What is it for?
It is for reverse-engineering projects, following code paths, reading available documentation, and producing behavior-focused specifications.
Why use it?
It helps document unfamiliar software by tracing what it does rather than merely listing its files or internal names.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions subagents; names the TodoWrite tool.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/jesse/project.

Part of the greenfield plugin — 22 skills, 2 commands, 2 agents shipped together

Good fit It is for reverse-engineering projects, following code paths, reading available documentation, and producing behavior-focused specifications.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add prime-radiant-inc/greenfield
Claude Code
/plugin install greenfield

Made for: Claude Code.

Or install greenfield, the plugin that ships this one along with the rest of its 22 skills, 2 commands, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyze

README.md
[![agentmods](https://agentmods.dev/badge/commands/prime-radiant-inc/greenfield/analyze.svg)](https://agentmods.dev/commands/prime-radiant-inc/greenfield/analyze)
Your own site
<a href="https://agentmods.dev/commands/prime-radiant-inc/greenfield/analyze"><img src="https://agentmods.dev/badge/commands/prime-radiant-inc/greenfield/analyze.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 17,298 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00015 $0.17298
Opus 5 $0.00008 $0.08649
Sonnet 5 $0.00003 $0.03460
Haiku 4.5 $0.00002 $0.01730

Measured 8d ago against content hash a0a9039fb6b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d ago.

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 · 1,397 lines

How it starts

The opening of the file, as written. The whole thing — 1,397 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/analyze - Reverse Engineering

Target: $ARGUMENTS

THE APPROACH

Analyze deeply. Output behaviorally.

  • Analysis: Tear apart the target through every available intelligence source. Trace every code path. Observe every runtime behavior. Read every public document.
  • Output: Write specs using behavioral language. No source identifiers. Every claim carries provenance.

You READ Ab2() and trace what it does. You WRITE "entry point parses arguments and routes to mode handler."

EXHAUSTIVE READING (NON-NEGOTIABLE)

Every line of code must be read. Every routine must be identified.

  • Do NOT skim code. Do NOT skip "boring" sections.
  • Grep patterns are for INDEXING - they are NOT a substitute for reading.
  • If you haven't read a line, you don't know what it does.
  • If you haven't traced a code path, you can't document its behavior.

Agents MUST use the Read tool on every source file. Head/tail samples are not enough.

CLI INTERFACE

/analyze path                              # Discover and consume everything available
/analyze path --exclude source             # Black-box analysis (skip source code)
/analyze path --exclude git-history,tests  # Skip git mining and test suite analysis

EXIT CODES

Code Meaning
0 Success. Analysis completed, all gates passed.
1 Failure. Gate failure, workspace conflict, container unavailable, etc.
2 Invalid arguments. Bad mode name, missing path, etc.

OUTPUT STRUCTURE

workspace/
├── .git/                    # Git repository (initialized by /analyze)
├── .gitignore               # Exclusions
├── workspace.json           # Workspace metadata
├── inventory.md             # Intelligence source inventory (from discovery)
│
├── public/                  # PUBLIC: From public sources only
│   ├── docs/                # Official documentation findings
│   ├── standards/           # RFC/standard mappings
│   ├── ecosystem/           # SDK analysis, test mining
│   ├── community/           # Tutorials, reviews, forums, issues
│   └── contracts/           # Machine-readable contract definitions
│
├── raw/                 # RAW: Source-derived analysis artifacts
│   ├── source/              # Source code analysis artifacts
│   │   ├── chunks/          # Bundle decomposition output
│   │   ├── analysis/        # Per-chunk analysis files
│   │   ├── functions/       # Extracted function analyses
│   │   ├── manifests/       # Bundle manifests
│   │   ├── exploration/     # Targeted-extractor output per focus area
│   │   └── decompiled/      # Decompiled binary/bytecode output
│   │
│   ├── runtime/             # Runtime observation artifacts
│   │   ├── cli/             # CLI interaction transcripts
│   │   ├── web/             # Web UI screenshots, state maps
│   │   ├── behaviors/       # Observed behaviors
│   │   ├── ux/              # UX capture (output formats, errors, prompts)
│   │   └── visual/          # Visual exploration output
│   │       ├── screenshots/ # Key screen captures
│   │       └── flows/       # UI flow sequences
│   │
│   ├── binary/              # Binary analysis artifacts
│   │   ├── survey/          # Initial triage output
│   │   └── analysis/        # Deep analysis output
│   │
│   ├── project-history/     # Git archaeology findings
│   │
│   ├── test-evidence/       # Test suite analysis output
│   │
│   ├── synthesis/           # Layer 2 synthesized findings
│   │   ├── features/        # Aggregated feature inventory
│   │   ├── architecture/    # Synthesized architecture
│   │   ├── api/             # Synthesized API surface
│   │   └── module-map.md    # All modules identified
│   │
│   ├── specs/               # Layer 3+4 raw specs (pre-sanitization)
│   │   ├── modules/         # Per-module behavioral specs (analysis organization)
│   │   ├── journeys/        # End-to-end user flows
│   │   ├── contracts/       # External interfaces
│   │   ├── protocols/       # Wire protocols
│   │   ├── ui/              # User-visible text
│   │   ├── tests/           # Test specifications
│   │   ├── test-vectors/    # Concrete input/output pairs
│   │   └── validation/      # Acceptance criteria
│   │
│   └── audit/               # Detailed per-finding audit reports from Layers 6 and 7
│
├── output/                   # Sanitized specs for the implementer
│   ├── specs/
│   │   ├── domains/         # Behavioral specs merged by domain (NOT original modules)
│   │   ├── journeys/        # Sanitized user journey specs
│   │   └── contracts/       # External contracts + behavioral integration requirements
│   ├── test-vectors/        # Output test vectors
│   ├── validation/          # Output acceptance criteria
│   ├── audit/               # Top-level PASS/FAIL summaries of Layers 6 and 7
│   └── implementation/      # Implementation output
│
└── provenance/              # AUDIT: Trail and citations
    ├── sessions/            # Subagent JSONL copies
    └── audit-log.md         # Human-readable audit log

Read the full file on GitHub · 1,397 lines

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. 8d ago First seen · 1,397 lines · 15 tokens per session scan A a0a9039fb6b4

Subscribe to this mod's changes

analyze is a command published in the GitHub repository prime-radiant-inc/greenfield (273 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 15 tokens to every session and 17,298 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.