code-analysis-flow

code-analysis-flow is a skill for Claude Code, Codex from griddynamics/rosetta. It costs 22 tokens per session (2,460 once invoked), scanned A, original, Apache-2.0.

A structured process for examining an existing codebase and documenting how it works, its requirements, and its architecture.

In plain words
What is it for?
Use it to reverse-engineer a small or large codebase into grounded architecture and requirements documents.
Why use it?
It keeps analysis tied to evidence in the code and records assumptions or unanswered questions instead of silently guessing.

Skill for Claude CodeCodex

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 skills/griddynamics/rosetta/code-analysis-flow
Any agent
npx skills add griddynamics/rosetta --skill code-analysis-flow
Clone the repo
git clone --depth 1 https://github.com/griddynamics/rosetta

Made for: Claude Code, Codex.

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 code-analysis-flow

README.md
[![agentmods](https://agentmods.dev/badge/skills/griddynamics/rosetta/code-analysis-flow.svg)](https://agentmods.dev/skills/griddynamics/rosetta/code-analysis-flow)
Your own site
<a href="https://agentmods.dev/skills/griddynamics/rosetta/code-analysis-flow"><img src="https://agentmods.dev/badge/skills/griddynamics/rosetta/code-analysis-flow.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,460 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.00022 $0.02460
Opus 5 $0.00011 $0.01230
Sonnet 5 $0.00004 $0.00492
Haiku 4.5 $0.00002 $0.00246

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

Security

Grade A, and why

code-analysis-flow 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 2d 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.

plugins/core-antigravity-light/skills/code-analysis-flow/SKILL.md · 170 lines

How it starts

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

<code_analysis_flow>

<description_and_purpose>

Problem: Code analysis degrades into transcription, drifts into suggestions/refactors, or stalls when codebase exceeds single-agent context; assumptions and unknowns are silently adopted. Solution: Thin, sequential workflow that classifies SMALL vs LARGE codebase, delegates analysis to the reverse-engineering skill, must partition LARGE codebases via large-workspace-handling, gates critical/high unknowns through questioning, and optionally extracts requirements via requirements-authoring. Grounded by links, HITL at unknowns and final review. Validation: Output files exist under docs/<feature>/; every claim traces to code/docs; no generated or suggested implementation; open questions and assumptions are documented; state file reflects phase evidence.

</description_and_purpose>

<workflow_phases>

  1. All Rosetta prep steps MUST be FULLY completed
  2. USE SKILL load-project-context, orchestration, hitl
  3. MUST ALWAYS use todo tasks ledger, ASAP. Phases are sequential. Independent tasks can run in parallel. Module analysis in LARGE codebases runs in parallel via SKILL large-workspace-handling.
  4. No rush, take your time, MUST FOLLOW WORKFLOW ENTIRELY, no skipping
  5. Orchestrator trusts skills to own execution internals; coordinates sequence, artifacts, state, and approvals only.
  6. State file: agents/TEMP/<FEATURE>/code-analysis-flow-state.md updated after each phase.
  7. Documentation principle: ground with links; no code generation, no suggestions, no speculation. See best_practices for sizing and diagram rules.
  8. If /goal is set repeat phases 4-8 until goal is met.
  9. If task is to extract/document/reverse engineer requirements or specifications from existing app/code:
    • This is much more intense per subagent: reclassify SMALL if < 10 source files, otherwise LARGE and MUST USE large-workspace-handling.
    • Both orchestrator and subagents MUST USE SKILL requirements-authoring
    • Spawn MULTIPLE subagents with each handling one unit of analysis (one module, one community, one screen, one controller, one endpoint, etc) to effectively prevent hallucinations by narrowing scope down for phases requirements_branch and review (more agents - less scope each).

<context_load phase="1" applies="ALL" subagent="discoverer" role="Context gatherer for analysis scope" subagent_required_model="inherit">

  1. Read all lines of docs/CONTEXT.md, docs/ARCHITECTURE.md, agents/IMPLEMENTATION.md; grep headers of docs/CODEMAP.md, docs/TECHSTACK.md, docs/DEPENDENCIES.md if present.
  2. Input: user analysis request. Output: loaded project context + entry points (APIs, webhooks, CLIs, cron jobs).
  3. Recommended skills: load-project-context
  4. Update code-analysis-flow-state.md.

</context_load>

<scope_and_classify phase="2" applies="ALL" subagent="discoverer" role="Scope and size scanner" subagent_required_model="inherit">

  1. Classify target codebase: LARGE if 100+ files recursively or 4+ modules; otherwise SMALL.
  2. Identify target scope (repo, module, feature, path glob). Record boundaries and non-goals.
  3. Input: user request + loaded context. Output: scope (paths), size (SMALL|LARGE), module-list (LARGE only).
  4. Required skills: reasoning
  5. Update code-analysis-flow-state.md.

</scope_and_classify>

<clarify_unknowns phase="3" applies="ALL" type="HITL">

  1. Surface only critical/high assumptions and unknowns affecting analysis accuracy; skip low and nit-picking.
  2. Ask up to 10 targeted, MECE, one-decision-per-question batch. Include safe default per question.
  3. Record resolved answers and unresolved items as assumptions; both are persisted in final output.
  4. Required skills: questioning
  5. Update code-analysis-flow-state.md.

</clarify_unknowns>

<requirements_branch phase="4" applies="ALL" when="user requested requirements reverse-engineering" subagent="architect" role="Requirements engineer extracting intent from code" subagent_required_model="inherit">

Read the full file on GitHub · 170 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. 2d ago First seen · 170 lines · 22 tokens per session scan A e6ac72f26496

Subscribe to this mod's changes

code-analysis-flow is a skill published in the GitHub repository griddynamics/rosetta (342 stars, last pushed yesterday), licensed Apache-2.0. It adds 22 tokens to every session and 2,460 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-09-03.