source-analysis

source-analysis is a skill for Claude Code from prime-radiant-inc/greenfield. It costs 52 tokens per session (10,265 once invoked), scanned A, original, Apache-2.0.

A method for examining source code, packaged application files, or decompiled programs to determine how they behave. It breaks the target into smaller parts and records findings with evidence showing where each claim came from.

In plain words
What is it for?
Use it to map source trees, inspect JavaScript or Electron bundles, analyze decompiled binaries, and document what individual components do across supported programming languages.
Why use it?
It provides a repeatable way to understand unfamiliar or bundled code instead of relying on guesses. It also keeps behavioral conclusions tied to specific files or code locations.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node /tmp/extract_funcs.js "$TARGET" workspace/raw/source/functions.

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

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/prime-radiant-inc/greenfield
agentmods
npx agentmods add skills/prime-radiant-inc/greenfield/source-analysis

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 source-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/prime-radiant-inc/greenfield/source-analysis.svg)](https://agentmods.dev/skills/prime-radiant-inc/greenfield/source-analysis)
Your own site
<a href="https://agentmods.dev/skills/prime-radiant-inc/greenfield/source-analysis"><img src="https://agentmods.dev/badge/skills/prime-radiant-inc/greenfield/source-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,265 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.1 $0.00052 $0.10265
Opus 5 $0.00026 $0.05132
Sonnet 5 $0.00010 $0.02053
Haiku 4.5 $0.00005 $0.01026

Measured 7d ago against content hash 6dbb3abafc4b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

source-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 7d 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.

skills/source-analysis/SKILL.md · 1,052 lines

How it starts

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

Source Analysis Methodology

Extract behavioral intelligence from source code. Decompose the codebase into analyzable units, then systematically analyze each unit for behavioral claims with full provenance.

When to Use This Mode

Source analysis activates when:

  • The discovery inventory identifies source code files at the target path
  • Any source code needs behavioral analysis (any language, bundled or not)
  • Decompiled output exists at workspace/raw/source/decompiled/

General Approach

Source analysis takes three shapes depending on what the target looks like:

  • Source tree — a repository with a package manifest and conventional directory layout (Python, Rust, Go, Swift, Java, Node/TS, C++, etc.). Follow the Source Tree Pipeline below.
  • Bundle — a single-file minified or packed artifact (JavaScript bundle, Electron asar, webpack/esbuild output). Follow the Bundle Pipeline below.
  • Decompiled binary — a compiled artifact where source isn't directly available. Decompile first via the Decompilation Path, then analyze the decompiled output using whichever of the above shapes fits.

Regardless of shape, the pipeline follows the same logical steps:

  1. Assess the source. What language? How is it organized? How large is it?
  2. Decompose into analyzable units. Use the language's natural boundaries (modules, packages, files) when they exist. Split bundled artifacts into chunks when they don't.
  3. Analyze each unit exhaustively. Read every line. Identify every function, method, class. Understand what each does behaviorally.
  4. Extract behavioral specifications. Write what the code DOES (observable behavior), not how it's structured (implementation details). Every claim gets a provenance citation.

Phases 6-8 (per-unit analysis, per-function deep analysis, targeted extraction) are shape-agnostic and apply to all three paths.

Decompilation Path

When source code isn't directly available, decompile binaries into structured source before analysis.

Read the full file on GitHub · 1,052 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. 7d ago First seen · 1,052 lines · 52 tokens per session scan A 6dbb3abafc4b

Subscribe to this mod's changes

source-analysis is a skill published in the GitHub repository prime-radiant-inc/greenfield (271 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 52 tokens to every session and 10,265 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-30.

Related

Other skills, from other repositories

release-it

Build production-ready systems with stability patterns: circuit breakers, bulkheads, timeouts, and retry logic. Use when the user mentions "production outage", "circuit breaker", "deployment pipeline", "chaos engineering", "retry storm", "health checks", "my service keeps crashing", "prevent cascading failures", or…

wondelai/skills · 131 tokens

tidewave-integration

Tidewave MCP runtime tools — debugging, smoke testing, live state inspection, SQL queries, hex docs. Use when evaluating code in a running Phoenix app.

oliver-kriska/claude-elixir-phoenix · 38 tokens

Reverse Engineering & Binary Analysis

Binary analysis, assembly interpretation, disassembly, decompilation, firmware RE, and protocol reverse engineering.

Masriyan/Claude-Code-CyberSecurity-Skill · 26 tokens

debug

Interactive debugging workflow with hypothesis-driven probe loop. Use when: unknown bugs, script errors, silent failures, troubleshooting. Not for: known bugs (use bug-fix), GitHub issue analysis (use issue-analyze), code understanding (use code-explore). Output: debug report with probe journal + root cause + fix.

sd0xdev/sd0x-harness · 67 tokens

git-investigate

Git history investigation. Use when: tracking code changes, finding where bugs were introduced, root cause analysis. Not for: code exploration (use code-explore), issue analysis (use issue-analyze). Output: history trace + root cause report.

sd0xdev/sd0x-harness · 53 tokens

simplify

Wrap-up refactoring — simplify code, eliminate duplication, preserve behavior.

sd0xdev/sd0x-harness · 16 tokens