improve-codebase-architecture

A guide for finding structural problems in a software project when its modules, connections, or tests make changes difficult.

In plain words
What is it for?
It is for examining module boundaries, callers, collaborators, and tests, then choosing a concrete refactoring direction.
Why use it?
It helps distinguish a local code cleanup from a deeper architecture problem that needs careful redesign.

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

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,305 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.01305
Opus 5 $0.00021 $0.00652
Sonnet 5 $0.00008 $0.00261
Haiku 4.5 $0.00004 $0.00130

Measured 3d ago against content hash 67147ce81c25, 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 3d 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/development/improve-codebase-architecture/SKILL.md · 152 lines

How it starts

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

Improve Codebase Architecture

Use this skill when local cleanup is not enough and the problem is architectural shape: too many shallow modules, leaky seams, or a design that is hard to test through the public interface.

When to Use

  • The codebase is correct enough to run, but hard to extend safely
  • Understanding one concept requires bouncing across too many tiny modules
  • Tests are brittle because the interesting behavior leaks across current seams
  • A refactor candidate needs architectural reasoning before code changes start

When NOT to Use

Instead of improve-codebase-architecture Use
You only need a bigger-picture map of one area zoom-out
The architecture is fine and you just need safe cleanup refactor-clean
You are defining a new feature before coding spec-driven-development

Prerequisites

  • Access to the project's README, architecture docs, glossary, ADRs, or equivalent guidance
  • Enough codebase access to inspect callers, collaborators, and tests
  • Willingness to stop at a candidate list first instead of jumping straight into rewrites

Working Vocabulary

Use these terms consistently while reviewing the design:

Term Meaning
Module Any unit with an interface and implementation: function, class, package, or slice
Interface Everything a caller must know: types, invariants, ordering, config, and error modes
Depth How much behavior a module hides behind a small interface
Seam The place where behavior can change without editing every caller

Workflow

1. Load the project's language first

Read the domain vocabulary and architecture decisions before suggesting anything. Prefer the project's own names for subsystems and workflows instead of inventing new terminology.

1-A. Decide where to look before scanning

Read the full file on GitHub · 152 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. 3d ago First seen · 152 lines · 42 tokens per session scan A 67147ce81c25

Subscribe to this mod's changes

improve-codebase-architecture is a skill published in the GitHub repository drvoss/everything-copilot-cli (45 stars, last pushed 6d ago), licensed MIT. It adds 42 tokens to every session and 1,305 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

winui-ui-testing

Automated UI testing for Windows desktop apps — generate a batch test script with the winapp ui UI Automation harness, run all tests in one pass, read results. Covers element assertions, interactions, value checking (TextBox, ComboBox, ToggleSwitch), keyboard shortcuts and typing (send-keys), hover, drag-and-drop…

microsoft/win-dev-skills · 122 tokens

pr-review

Multi-dimensional review of a PR or feature branch in microsoft/win-dev-skills. Activate on "review my PR / changes / branch", "vet before pushing", "PR review", "is this ready to merge". Fans out parallel sub-agents over skill content, the skill-vs-tool boundary (solution hierarchy), tool correctness…

microsoft/win-dev-skills · 98 tokens

winui-packaging

MSIX packaging, code signing, and distribution for WinUI 3 apps — build for release, certificate generation (winapp cert generate), certificate trust, code signing (winapp sign), self-contained deployment, CI/CD with GitHub Actions, and Microsoft Store submission. Use when preparing for release, creating MSIX…

microsoft/win-dev-skills · 86 tokens

winui-session-report

Analyze the current or a recent agent session (GitHub Copilot CLI or Claude Code) and generate a diagnostic report. Use only when the user explicitly asks for session feedback, agent debugging, or a review of what happened during a build session. Do not inspect session data automatically.

microsoft/win-dev-skills · 61 tokens

winui-wpf-migration

Migrate WPF applications to WinUI 3 — namespace replacement (System.Windows → Microsoft.UI.Xaml), control mapping (DataGrid→ListView, WrapPanel→ItemsRepeater, TabControl→TabView), threading (Dispatcher→DispatcherQueue), imaging (System.Drawing→BitmapImage), MVVM conversion to CommunityToolkit.Mvvm, and…

microsoft/win-dev-skills · 100 tokens

copilotd-e2e-verification

Perform real end-to-end validation of copilotd issue and pull request orchestration using live GitHub artifacts.

DamianEdwards/copilotd · 31 tokens