improve-codebase-architecture

improve-codebase-architecture is a skill for Claude Code from HigorAlves/orc. It costs 17 tokens per session (1,700 once invoked), scanned A, original, MIT.

A codebase architecture review guide that finds tangled modules and suggests refactors. Architecture is the way a codebase is divided and connected.

In plain words
What is it for?
Use it to inspect a codebase, identify refactoring opportunities, consolidate coupled modules, and improve testability.
Why use it?
It helps reveal structural problems that make code hard to test, change, or understand, including for AI coding tools.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: mentions subagents.

Part of the orc plugin — 88 skills, 30 commands, 14 agents, 6 hooks shipped together

Good fit Use it to inspect a codebase, identify refactoring opportunities, consolidate coupled modules, and improve testability.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/higoralves/orc/improve-codebase-architecture
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 HigorAlves/orc --skill improve-codebase-architecture
Clone the repo
git clone --depth 1 https://github.com/HigorAlves/orc

Made for: Claude Code.

Or install orc, the plugin that ships this one along with the rest of its 88 skills, 30 commands, 14 agents, 6 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/higoralves/orc/improve-codebase-architecture/github.svg)](https://agentmods.dev/skills/higoralves/orc/improve-codebase-architecture)
Your own site
<a href="https://agentmods.dev/skills/higoralves/orc/improve-codebase-architecture"><img src="https://agentmods.dev/badge/skills/higoralves/orc/improve-codebase-architecture/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 improve-codebase-architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/higoralves/orc/improve-codebase-architecture"><img src="https://agentmods.dev/badge/skills/higoralves/orc/improve-codebase-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,700 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.00017 $0.01700
Opus 5.5 $0.00007 $0.00680
Sonnet 5.5 $0.00003 $0.00340
Haiku 4.5 $0.00002 $0.00170

Measured 4d ago against content hash 525185dc4c69, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 4d 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.

orc/skills/improve-codebase-architecture/SKILL.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 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 skill is informed by the project's domain model and built on a shared design vocabulary:

  • Use orc: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 GLOSSARY.md gives names to good seams; ADRs in docs/adr/ record decisions this skill does not re-litigate.

Delegation in an orc session

When running inside an orc session, the codebase SCAN phase (step 1 below) is delegated to the orc-refactor-architect agent — /orc:plan dispatches it when the input is refactor-shaped (refactor, architecture, tech debt, cleanup). This skill remains the interactive walkthrough layer: render the report and grill through the candidates. If the agent has already run, start from its findings instead of re-scanning — treat them as the raw material for step 2.

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 (GLOSSARY.md) and any ADRs in the area you're touching first.

Read the full file on GitHub · 81 lines

Files

What ships with it

1 file 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. 4d ago Changed · +1 lines · -32 tokens per session 525185dc4c69
  2. 1mo ago First seen · 80 lines · 49 tokens per session scan A e381739cfc5c

Subscribe to this mod's changes

improve-codebase-architecture is a skill published in the GitHub repository HigorAlves/orc (7 stars, last pushed today), licensed MIT. It adds 17 tokens to every session and 1,700 once invoked, about $0.0001 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-09-03.