improve-codebase-architecture

A codebase review and questioning workflow that looks for ways to make modules easier to change, test, and understand. It presents possible improvements in an HTML report and then examines the option you choose.

In plain words
What is it for?
Use it to inspect a codebase, identify refactoring opportunities, and evaluate one selected improvement. It uses the project's domain notes and recorded architecture decisions as context.
Why use it?
It helps reveal architectural friction in recently changed or troublesome parts of a codebase. The questioning stage helps clarify whether a proposed refactor addresses the real problem.

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/frostney/gocciascript/improve-codebase-architecture
Any agent
npx skills add frostney/GocciaScript --skill improve-codebase-architecture
Clone the repo
git clone --depth 1 https://github.com/frostney/GocciaScript

Made for: Claude Code, Codex.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,342 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 95% copy Near-identical to another mod 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.00032 $0.01342
Opus 5 $0.00016 $0.00671
Sonnet 5 $0.00006 $0.00268
Haiku 4.5 $0.00003 $0.00134

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

Security

Grade A, and why

improve-codebase-architecture 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.

Origin

This is a copy

95% identical to improve-codebase-architecture — 40 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/improve-codebase-architecture/SKILL.md · 72 lines

How it starts

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

Improve Codebase Architecture

Surface architectural friction and propose deepening opportunities — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.

This command is informed by the project's domain model and built on a shared design vocabulary:

  • Call the Skill tool with "codebase-design" for the architecture vocabulary (module, interface, depth, seam, adapter, leverage, locality) and its principles (the deletion test, "the interface is the test surface", "one adapter = hypothetical seam, two = real"). Use these terms exactly in every suggestion — don't drift into "component," "service," "API," or "boundary."
  • The domain language in CONTEXT.md gives names to good seams; ADRs in docs/adr/ record decisions this command should not re-litigate.

Process

1. Explore

Scope before you scan — YAGNI. Deepening a module pays off by making future changes to it easier, so put extra weight on the parts of the codebase that have recently changed. Decide where to look before you look:

  • If the user named a direction — a module, a subsystem, a pain point — take it, and skip the inference below.
  • Otherwise, walk back a good stretch of the commit history (git log --oneline) to find the codebase's hot spots — the files and areas that keep coming up — and let those paths pull your attention first. If the changes are scattered with no clear hot spot, widen the net.

Read the project's domain glossary (CONTEXT.md) and any ADRs in the area you're touching first.

Then spawn a sub-agent to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:

  • Where does understanding one concept require bouncing between many small modules?
  • Where are modules shallow — interface nearly as complex as the implementation?
  • Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no locality)?
  • Where do tightly-coupled modules leak across their seams?
  • Which parts of the codebase are untested, or hard to test through their current interface?

Read the full file on GitHub · 72 lines

Files

What ships with it

2 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. 2d ago First seen · 72 lines · 32 tokens per session scan A 387f38d21367

Subscribe to this mod's changes

improve-codebase-architecture is a skill published in the GitHub repository frostney/GocciaScript (20 stars, last pushed 6d ago), licensed MIT. It adds 32 tokens to every session and 1,342 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to improve-codebase-architecture, differing in 40 lines, and is treated as a copy.

Related

Other skills, from other repositories

qcad

Use when editing DXF files with a professional open-source 2D CAD application — CAM output, part libraries, isometric projection. QCAD: open-source 2D CAD with DXF as native format, scriptable via ECMAScript.

znlgis/opengis-skills · 53 tokens

oxc-docs

Comprehensive reference for the JavaScript Oxidation Compiler (Oxc) — a collection of high-performance JavaScript tools written in Rust. Covers parser design (lexer, AST, parser, errors, semantic analysis), architecture (parser, linter, test infrastructure, AST tools), ECMAScript specification and grammar, performance…

pledgeandgrow/pledge-skills · 131 tokens

git-step-commit

Analyze Git changes, split them into coherent commits, infer message language and format, optionally close supplied GitHub issues, and execute safely. Manage persistent global or repository preferences for review versus direct submission and automatic or specified commit-message language through native Git config.…

bosens-China/tc39-atlas · 134 tokens

manage-prd-docs

Automatically manage product requirements across current decisions in docs/PRD.md and docs/prd/, mature future plans under docs/plans/, and active implementation under docs/work/. Use whenever the conversation discusses, clarifies, versions, plans, implements, completes, splits, or migrates a product requirement or…

bosens-China/tc39-atlas · 132 tokens

modernize-ecmascript

当 Agent 编写或修改 JavaScript、TypeScript,用户要求按指定环境、输出版本、ES20xx 或具体语法编写代码,询问某项 ECMAScript 语法、标准内置 API 或提案能否采用,或者要求审查仓库中可简化、可现代化的写法时,应使用本 Skill。围绕目标文件真实经过的解析器、转换器和输出目标判断新语法能否安全采用,并按需读取 TC39 Atlas 的提案阶段、官方仓库、polyfill 与实现线索。.

bosens-China/tc39-atlas · 130 tokens

codebase-audit

Audits the current repository for systemic correctness, architecture, churn, simplification, clarity, test value, and operational risks using current source and reproducible probes. It can delegate evidence gathering across bounded capability and perspective lanes. Use when the user runs /codebase-audit or asks for an…

frostney/pascal-mcp-sdk · 70 tokens