improve-codebase-architecture

improve-codebase-architecture is a skill for Claude Code from allemaar/open-skills. It costs 125 tokens per session (2,072 once invoked), scanned A, original, Apache-2.0.

A codebase review method that finds places where several small modules could become deeper modules: small interfaces that hide more implementation.

In plain words
What is it for?
Use it when improving architecture, finding refactoring opportunities, or making code more testable. It classifies dependencies and proposes refactoring ideas as GitHub issue RFCs.
Why use it?
Shallow, scattered modules make code harder to navigate and test because callers must understand too many separate pieces.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; mentions Claude Code.

Part of the open-skills plugin — 58 skills shipped together

Good fit Use it when improving architecture, finding refactoring opportunities, or making code more testable. It classifies dependencies and proposes refactoring ideas as GitHub issue RFCs.

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

Made for: Claude Code.

Or install open-skills, the plugin that ships this one along with the rest of its 58 skills.

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/allemaar/open-skills/improve-codebase-architecture.svg)](https://agentmods.dev/skills/allemaar/open-skills/improve-codebase-architecture)
Your own site
<a href="https://agentmods.dev/skills/allemaar/open-skills/improve-codebase-architecture"><img src="https://agentmods.dev/badge/skills/allemaar/open-skills/improve-codebase-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,072 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00125 $0.02072
Opus 5 $0.00063 $0.01036
Sonnet 5 $0.00025 $0.00414
Haiku 4.5 $0.00013 $0.00207

Measured 8d ago against content hash 92531ff2788f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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/improve-codebase-architecture/SKILL.md · 155 lines

How it starts

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

/improve-codebase-architecture

Explore a codebase like an AI would, surface architectural friction, and propose module-deepening refactors as GitHub issue RFCs.

Structured execution spec: protocol.yon. Read it for the canonical rules and step sequence; this file is explanation. The two must stay in sync — if you edit one, update the other and refresh the @STAMP date.

A deep module has a small interface hiding a large implementation. Deep modules are more testable, more AI-navigable, and let you test at the boundary instead of inside. (John Ousterhout, A Philosophy of Software Design)

The deepening test: would merging these modules produce a smaller combined interface than they have separately? If no, it's not a deepening opportunity — it's just reorganization.

Reference — Dependency Categories

Classify each candidate's dependencies; the category determines the entire testing strategy.

  1. In-process — pure computation, in-memory state, no I/O. Always deepenable; merge and test directly.
  2. Local-substitutable — dependencies with local test stand-ins (PGLite for Postgres, memfs for filesystem). Deepenable if the stand-in exists; test the merged module with the stand-in running in the suite.
  3. Remote but owned (Ports & Adapters) — your own services across a network boundary. Define a port at the boundary; the deep module owns the logic, transport is injected. Tests use an in-memory adapter; production uses the real one.
  4. True external (Mock) — third-party services you don't control (Stripe, Twilio). Mock at the boundary; the deepened module takes the external dependency as an injected port, tests provide a mock.

Reference — Testing Strategy

Replace, don't layer. Write new tests at the deepened module's interface boundary. Old unit tests on the now-merged shallow modules become redundant — delete them. Tests assert on observable outcomes through the public interface, not internal state, so they survive internal refactors.

Read the full file on GitHub · 155 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. 8d ago First seen · 155 lines · 125 tokens per session scan A 92531ff2788f

Subscribe to this mod's changes

improve-codebase-architecture is a skill published in the GitHub repository allemaar/open-skills (14 stars, last pushed 22d ago), licensed Apache-2.0. It adds 125 tokens to every session and 2,072 once invoked, about $0.0006 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

continual-learning

Nightly refinement of an existing per-repo review-style prompt using this reviewer's own finding outcomes. Read confirmed (resolved-by-commit / thumbs-up) and dismissed (thumbs-down) findings, promote the bug patterns the team actually fixes, demote the false-positive patterns, reconcile against the current prompt…

langchain-ai/open-swe · 89 tokens

security-review

Perform a focused security review of pending git changes to identify high-confidence security vulnerabilities with real exploitation potential. Use this skill when the user asks for a security review, security audit, vulnerability scan, or wants to check pending changes on a branch for security issues before merging.…

waybarrios/opencode-power-pack · 64 tokens

review-work

Post-implementation gate review: run manual QA on the real surface yourself, then launch ONE gate reviewer (never a panel) to audit goal, constraints, code quality, security, missed context, and QA evidence. Use before a PR handoff or when the user explicitly asks to review completed work.

code-yeongyu/oh-my-openagent · 63 tokens

huggingface-llm-trainer

Train or fine-tune language models with TRL or Unsloth on Hugging Face Jobs, including SFT, DPO, GRPO, reward models, and GGUF conversion. Use for cloud LLM training; use huggingface-vision-trainer for vision tasks.

waybarrios/opencode-power-pack · 65 tokens

feature-dev

Guide a feature implementation through a structured seven-phase workflow with deep codebase understanding, clarifying questions, parallel architecture design, and quality review. Use this skill when the user asks to build a new feature, add functionality, or wants a methodical approach to implementation rather than…

waybarrios/opencode-power-pack · 62 tokens

review

Review local code changes for bugs, regressions, missing tests, and pragmatic improvements. Use when the user asks to review the current changes from git status, or to review a specific backlog task by id such as task-65 or TASK-65. Also trigger when the user says things like "review", "review current changes", "check…

devoxx/DevoxxGenieIDEAPlugin · 90 tokens