codebase-context-extractor

A context-extraction tool for studying a large codebase: its files, dependencies, structure, and links between parts. A codebase is the complete collection of source files and related project code.

In plain words
What is it for?
Use it to map project structure, find entry points, follow data flow, inspect dependencies, document modules, or prepare focused context for debugging and code changes.
Why use it?
It helps developers understand an unfamiliar project without manually tracing every file and relationship.

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/lofcz/llmtornado/codebase-context-extractor
Any agent
npx skills add lofcz/LLMTornado --skill codebase-context-extractor
Clone the repo
git clone --depth 1 https://github.com/lofcz/LLMTornado

Made for: Claude Code, Codex.

Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,280 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.00042 $0.01280
Opus 5 $0.00021 $0.00640
Sonnet 5 $0.00008 $0.00256
Haiku 4.5 $0.00004 $0.00128

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

Security

Grade A, and why

codebase-context-extractor 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 3d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (context_extractor.py, examples/example_usage.sh, examples/sample_project.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/LlmTornado.Demo/Static/Files/Skills/codebase-context-extractor/SKILL.md · 171 lines

How it starts

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

Codebase Context Extractor Skill

Overview

This skill provides a comprehensive context extraction system for large codebases. It intelligently analyzes code structure, dependencies, and relationships to extract relevant context for understanding, debugging, or modifying code.

Trigger Words

  • "extract context"
  • "codebase context"
  • "code context"
  • "analyze codebase"
  • "codebase analysis"
  • "code structure"
  • "dependency analysis"
  • "code relationships"
  • "understand codebase"
  • "map codebase"

When to Use This Skill

Use this skill when you need to:

  • Understand the structure and organization of a large codebase
  • Extract relevant context for a specific function, class, or module
  • Analyze dependencies and relationships between code components
  • Generate documentation or summaries of code sections
  • Prepare context for code modifications or debugging
  • Identify entry points and execution flows
  • Map out API surfaces and public interfaces
  • Understand data flow and state management

Instructions

When this skill is triggered, execute the context_extractor.py script with appropriate parameters.

Basic Usage

python /projects/workspace/codebase-context-extractor/context_extractor.py \
  --target-path <path_to_codebase> \
  --mode <extraction_mode> \
  --output <output_file>

Extraction Modes

  1. full - Complete codebase analysis with all components
  2. targeted - Focus on specific files, functions, or classes
  3. dependency - Map dependencies and imports
  4. flow - Trace execution flows and call chains
  5. api - Extract public interfaces and API surfaces
  6. data - Analyze data structures and models
  7. hierarchy - Show class hierarchies and inheritance
  8. summary - Generate high-level overview

Parameters

  • --target-path (required): Path to the codebase to analyze
  • --mode (required): Extraction mode (see above)
  • --output (optional): Output file path (default: stdout)
  • --focus (optional): Specific file, class, or function to focus on
  • --depth (optional): Maximum depth for traversal (default: unlimited)
  • --include-tests (optional): Include test files in analysis (default: false)
  • --language (optional): Programming language (auto-detected if not specified)
  • --format (optional): Output format (markdown, json, yaml, text) (default: markdown)
  • --exclude (optional): Patterns to exclude (comma-separated)

Read the full file on GitHub · 171 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 171 lines · 42 tokens per session scan A 08efb4843229

Subscribe to this mod's changes

codebase-context-extractor is a skill published in the GitHub repository lofcz/LLMTornado (638 stars, last pushed 16d ago), licensed MIT. It adds 42 tokens to every session and 1,280 once invoked, about $0.0002 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

code-cleanup-audit

Audit a repository for architectural decay, AI-generated code smells, stale compatibility paths, dead abstractions, boundary violations, and cleanup candidates without modifying files. Use when the user asks to review code quality, find bad code, inspect AI-generated code, identify refactoring or cleanup…

pqpo/pragma · 78 tokens

author-pragma-dsl

Create and update validated pragma/v5 Expert, ExpertTeam, Flow, Evaluation, and Automation resources. Use when a user asks Pragma to create, change, configure, test, evaluate, or repair an Expert, team, Flow, Run Dry suite, schedule, trigger, or Automation in the current Pragma project.

pqpo/pragma · 70 tokens

claude-code-review

Delegate code review of current uncommitted repository changes to Claude Code with claude -p, wait up to 10 minutes, then independently verify each finding and fix real issues. Use when the user asks to have Claude Code review a diff, audit uncommitted changes, perform CR/code review, or turn Claude Code review…

pqpo/pragma · 76 tokens

portable-bundle-review

检查并解释 portable Pragma bundle 的内容、依赖和环境绑定。.

pqpo/pragma · 21 tokens

pragma-code-review

按正确性、架构边界、风险和验证四个维度审查代码。.

pqpo/pragma · 24 tokens

agent-orchestrator

Meta-skill que orquestra todos os agentes do ecossistema. Scan automatico de skills, match por capacidades, coordenacao de workflows multi-skill e registry management.

Ghosteken/agent-harness · 41 tokens