create-codebase-analysis

create-codebase-analysis is a skill for Claude Code from tomzx/agents. It costs 48 tokens per session (1,655 once invoked), scanned A, original, MIT.

An analysis of the existing code and architecture that a planned feature may change, extend, or replace. It assesses whether each relevant part should be reused, extended, refactored, or replaced.

In plain words
What is it for?
Use it to map affected components, evaluate how safely they can be changed, and prepare migration considerations for an approved feature plan.
Why use it?
It reveals dependencies, coupling, risks, and the likely impact of a change before implementation begins.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents; positional $N argument.

Good fit Use it to map affected components, evaluate how safely they can be changed, and prepare migration considerations for an approved feature plan.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tomzx/agents/create-codebase-analysis
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.

Any agent
npx skills add tomzx/agents --skill create-codebase-analysis
Clone the repo
git clone --depth 1 https://github.com/tomzx/agents

Made for: Claude Code.

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 create-codebase-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/tomzx/agents/create-codebase-analysis/github.svg)](https://agentmods.dev/skills/tomzx/agents/create-codebase-analysis)
Your own site
<a href="https://agentmods.dev/skills/tomzx/agents/create-codebase-analysis"><img src="https://agentmods.dev/badge/skills/tomzx/agents/create-codebase-analysis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for create-codebase-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/tomzx/agents/create-codebase-analysis"><img src="https://agentmods.dev/badge/skills/tomzx/agents/create-codebase-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,655 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.00048 $0.01655
Opus 5.5 $0.00019 $0.00662
Sonnet 5.5 $0.00010 $0.00331
Haiku 4.5 $0.00005 $0.00166

Measured 22d ago against content hash 7ab9ea31329a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create-codebase-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 22d 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/create-codebase-analysis/SKILL.md · 104 lines

How it starts

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

Create Codebase Analysis

Analyzes the existing internal code and architecture that a feature will rely on, change, or replace, and assesses each relevant part's changeability before the design is committed. The goal is to understand the existing code before specifying how to change it: what exists today, how it is coupled, what can be touched safely, and what must stay stable.

This is the internal counterpart to create-existing-solutions. create-existing-solutions surveys external prior art (libraries, OSS, products) and checks for cheap internal reuse. This skill goes deeper into the internal architecture you are about to modify: it maps components, coupling, and blast radius, and decides a change disposition for each part (reuse as-is, extend, refactor, or replace).

Prerequisites

  • Apply the shared SDLC conventions in skills/sdlc/references/shared.md.
  • If no argument is provided, locate the feature directory under .sdlc/features/ whose frontmatter issue field references $ISSUE_NUMBER.
  • .sdlc/features/N-<slug>/requirements.md (must have passed review with findings verdict approved), or a requirements document provided in context or as a file path ($1)
  • .sdlc/features/N-<slug>/existing-solutions.md (optional): carry forward any internal reuse candidates it already identified so they are not re-discovered
  • Read any files present under .sdlc/context/ (project-overview.md, architecture.md, conventions.md, vocabulary.md, schema.dbml) for project-level context
  • Apply any artifact style rules found in conventions.md to the produced document

Steps

  1. Read the requirements document and extract the functional and non-functional requirements that imply changes to existing code.
  2. Read .sdlc/context/architecture.md (if present) to ground the analysis in the documented system topology, and read the existing solutions survey if one was produced.
  3. Determine the analysis scope: which parts of the codebase this feature will touch, integrate with, or replace. Trace inward from the requirements to concrete modules, services, data stores, and interfaces.
  4. Locate the relevant code by searching the codebase. Record the entry points used (queries, paths) so the search is auditable.
  5. For each relevant component, capture its name, location (file or module path), current responsibility, and how the feature interacts with it (reads, writes, extends, replaces).
  6. Map dependencies and coupling between the relevant components and any external systems as a Mermaid flowchart LR with one node per component and class assignments matching the change dispositions (reuse / extend / refactor / replace). Call out shared state, synchronous vs. asynchronous boundaries, and the blast radius of changing each part in the accompanying prose. The diagram makes unintended coupling visible; the prose carries what the diagram cannot.
  7. For each component, decide a change disposition and justify it:
    • Reuse as-is — the component already does what is needed; do not modify it.
    • Extend — add to the component along its existing seams (new method, new config, new consumer) without altering current behavior.
    • Refactor — restructure the component's internals to accept the change, while preserving its observable behavior.
    • Replace — supersede the component (or a path through it) with a new implementation.
  8. For every Refactor or Replace disposition, outline migration and impact: the path from current to target behavior, backward compatibility, rollout strategy, what else breaks, and how to de-risk (feature flag, dual-run, shadow comparison).
  9. Record assumptions about existing behavior that the analysis relies on but has not fully verified. Promote any that carry meaningful risk via /create-assumption, and log architectural choices via /create-decision.
  10. Flag open questions where the changeability of a part cannot be decided without more investigation.
  11. Write the output to .sdlc/features/N-<slug>/codebase-analysis.md.

Read the full file on GitHub · 104 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. 22d ago Changed · +8 lines 7ab9ea31329a
  2. 24d ago Changed 57f1658f258c
  3. 2mo ago First seen · 96 lines · 48 tokens per session scan A 0ee8fe1513fc

Subscribe to this mod's changes

create-codebase-analysis is a skill published in the GitHub repository tomzx/agents (13 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 1,655 once invoked, about $0.0002 per session on Opus 5.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-31.

Related

Other skills, from other repositories

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens