codebase-context

A codebase analysis guide that examines a software project to identify its technologies, folder layout, important files, and development conventions.

In plain words
What is it for?
Use it to document the technology stack, summarize project structure and patterns, and prepare planning documents such as product requirements or design specifications.
Why use it?
It gives a coding agent enough background to plan changes without guessing how the project is built or organized.

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/jsegov/shipspec-claude-code-plugin/codebase-context
Any agent
npx skills add jsegov/shipspec-claude-code-plugin --skill codebase-context
Clone the repo
git clone --depth 1 https://github.com/jsegov/shipspec-claude-code-plugin

Made for: Claude Code, Codex.

Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,172 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.00060 $0.01172
Opus 5 $0.00030 $0.00586
Sonnet 5 $0.00012 $0.00234
Haiku 4.5 $0.00006 $0.00117

Measured 2d ago against content hash b094a2cf3915, 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 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.

skills/codebase-context/SKILL.md · 160 lines

How it starts

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

Codebase Context Extraction

Extract and summarize codebase context for planning purposes. This skill provides quick analysis approaches for different project types and standardized output formats.

Quick Analysis Approach

1. Detect Tech Stack

JavaScript/TypeScript Projects:

cat package.json 2>/dev/null | head -60

Identify from output:

  • dependencies / devDependencies for frameworks
  • scripts for build/test commands
  • type: "module" for ESM

Python Projects:

cat pyproject.toml 2>/dev/null || cat requirements.txt 2>/dev/null | head -30

Go Projects:

cat go.mod 2>/dev/null | head -15

Rust Projects:

cat Cargo.toml 2>/dev/null | head -30

2. Map Project Structure

# Get directory tree (excluding noise)
find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/__pycache__/*' -not -path '*/target/*' | sort | head -40
# Count files by type
find . -type f -name "*.ts" -o -name "*.tsx" | wc -l
find . -type f -name "*.py" | wc -l
find . -type f -name "*.go" | wc -l

3. Find Key Documentation

# Project docs
ls -la README* CLAUDE* AGENTS* CONTRIBUTING* 2>/dev/null
# Config files
ls -la *.json *.yaml *.toml .env* 2>/dev/null

4. Identify Patterns

API Structure:

# REST endpoints
grep -r "app\.\(get\|post\|put\|delete\)" --include="*.ts" --include="*.js" | head -10

Component Patterns:

# React components
find . -path '*/components/*' -name "*.tsx" | head -10

Database Models:

# Schema definitions
find . -name "schema*" -o -name "*model*" | grep -v node_modules | head -10

Output Format

Structure codebase context summaries as:

## Technology Stack

**Language:** [e.g., TypeScript 5.x]
**Runtime:** [e.g., Node.js 20, Bun 1.x]
**Framework:** [e.g., Next.js 14 (App Router), FastAPI]
**Database:** [e.g., PostgreSQL with Drizzle ORM]
**Styling:** [e.g., Tailwind CSS]
**Testing:** [e.g., Vitest, Playwright]

## Project Structure

- `src/` - Main source code
  - `components/` - React components
  - `lib/` - Utility functions
  - `app/` - Next.js app router pages
- `tests/` - Test files

## Key Patterns

- [Pattern 1: e.g., "Server components by default, client components marked explicitly"]
- [Pattern 2: e.g., "API routes use zod for validation"]
- [Pattern 3: e.g., "Error handling uses Result types"]

## Conventions

- Package manager: [pnpm/npm/yarn/bun]
- Code style: [ESLint + Prettier config]
- Commit style: [Conventional commits]
- Branch strategy: [main + feature branches]

## Existing Documentation

- README.md: [brief summary]
- CLAUDE.md: [if exists, key points]
- AGENTS.md: [if exists, key points]

Read the full file on GitHub · 160 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 · 160 lines · 60 tokens per session scan A b094a2cf3915

Subscribe to this mod's changes

codebase-context is a skill published in the GitHub repository jsegov/shipspec-claude-code-plugin (20 stars, last pushed 7mo ago), licensed MIT. It adds 60 tokens to every session and 1,172 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

gsd-audit-milestone

Audit milestone completion against original intent before archiving.

open-gsd/gsd-core · 17 tokens

spec-kitty-charter-doctrine

Run charter interview, generation, context, and sync workflows for project governance in Spec Kitty 3.x. Access doctrine artifacts programmatically via DoctrineService. Resolve agent profiles. Load action-scoped governance context iteratively, not all at once. Triggers: "interview for charter", "generate charter"…

Priivacy-ai/spec-kitty · 135 tokens

spec-kitty-spdd-reasons

Drive REASONS Canvas authoring and review for Spec Kitty missions that opted in to Structured-Prompt-Driven Development (SPDD) via charter selection. Triggers: "use SPDD", "use REASONS", "generate a REASONS canvas", "apply structured prompt driven development", "make this mission SPDD". Does NOT handle: enforcing SPDD…

Priivacy-ai/spec-kitty · 118 tokens

spec-kitty-runtime-review

Review runtime-owned outputs using the Spec Kitty review workflow surface, then direct approval or rejection with structured feedback. Triggers: "review this work package", "check runtime output", "approve this step", "review WP", "is this WP ready to approve", "check this implementation". Does NOT handle: setup-only…

Priivacy-ai/spec-kitty · 85 tokens

dependency-upgrade

Plan, batch, and verify dependency upgrades safely. Triages outdated packages into risk tiers, upgrades in order (dev/minor/patch first, runtime majors last), verifies each batch, and produces an auditable commit sequence. Use when asked to "upgrade deps", "bump packages", "update nodemodules", "fix vulnerabilities"…

open-gsd/gsd-pi · 90 tokens

forensics

Post-mortem a failed GSD auto-mode run. Traces symptom to root cause via .gsd/ activity, journal, metrics, and lock artifacts, producing a filing-ready bug report with file:line refs and a fix suggestion. Use when asked to "forensics", "post-mortem", "why did auto-mode fail", "trace the stuck loop", "debug the crash"…

open-gsd/gsd-pi · 112 tokens