mk:improve-codebase-architecture

mk:improve-codebase-architecture is a skill for Claude Code from ngocsangyem/MeowKit. It costs 24 tokens per session (1,822 once invoked), scanned A, original, MIT.

An architecture review tool that finds shallow modules—parts of a codebase whose interfaces expose too much of their implementation—and proposes deeper designs with smaller interfaces.

In plain words
What is it for?
Use it during architecture reviews to map dependencies, identify refactoring opportunities, and produce type-safe patch suggestions.
Why use it?
It helps reveal structural friction that makes code harder to test, understand, and navigate.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Good fit Use it during architecture reviews to map dependencies, identify refactoring opportunities, and produce type-safe patch suggestions.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ngocsangyem/meowkit/improve-codebase-architecture"><img src="https://agentmods.dev/badge/skills/ngocsangyem/meowkit/improve-codebase-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,822 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.00024 $0.01822
Opus 5.5 $0.00010 $0.00729
Sonnet 5.5 $0.00005 $0.00364
Haiku 4.5 $0.00002 $0.00182

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

Security

Grade A, and why

mk: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 10d 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.

.claude/skills/improve-codebase-architecture/SKILL.md · 109 lines

How it starts

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

mk:improve-codebase-architecture

Find where existing code is shallow and propose deepening refactors: turn shallow modules into deep ones so the code is easier to test and for an agent to navigate.

Use it for analysis of code that exists. For the ADR lifecycle (recording a decision) use mk:arch. For a system with no code yet, use the consultation in references/system-design-consultation.md (see the end of this file). It emits analysis and a type-safe patch; it writes no presentation markup, so any diagram goes to mk:preview.

Vocabulary

Use these nouns exactly: module, interface, depth (deep = small interface, large implementation; shallow = the reverse), seam, adapter, leverage, locality, deletion test (would deleting this module concentrate its complexity, so it was shallow, or merely move it, so it was load-bearing?). Do not substitute "component", "service", "layer", "wrapper", "API" or "boundary". The full definitions, the forbidden-synonym list and the dependency_category taxonomy are in references/deep-module-design.md, which owns the vocabulary.

Outcome

A run ends with, in order:

  1. Candidates with deletion-test evidence. Read docs/project-context.md (it may be absent; note that) and the ADRs under docs/architecture/adr/ that touch the area; they record decisions you do not re-argue. Use mk:scout (or search inline) and look for friction: one concept needing many small modules, shallow modules, pure functions extracted only for testability while the bugs hide in how they are called, tightly coupled modules leaking across a seam, code hard to test through its interface. Apply the deletion test to each suspect. Write candidates in the findings schema below to tasks/architecture-review/<run-id>-candidates.json. Keep prose sparse; do not propose concrete interfaces yet. If no candidate passes the deletion test, report that and stop: finding nothing is a result.
  2. One user choice. Offer the candidate titles plus "None" (ask the user). To see the candidates drawn, pass the findings file path or a one-line summary as the topic to mk:preview --html --diagram; that skill accepts a topic, so it draws what the topic describes, not a fixed card layout. This is the only mid-run decision.
  3. A grilled design. mk:grill interviews the chosen candidate's design (constraints, dependencies, what sits behind the seam, which tests survive). To compare alternative interfaces ("design it twice"), use mk:party.
  4. A patch that type-checks. Emit the refactor as exact multi-line Edit operations against the live files; never regenerate whole files. Do not introduce any, generic casts (as T, as unknown as T) or new suppressions (@ts-ignore, eslint-disable); .claude/rules/security-rules.md blocks them, because they hide the very type error the refactor must fix. After each patch run the project's type-check or build. A failing check means fix the type, not suppress it; after 3 failed attempts, stop and report BLOCKED with the error.
  5. Records kept current. A new domain term goes into docs/project-context.md by editing that file (mk:project-context generates whole files and has no add-term action). A rejection with a reason a future explorer needs becomes an ADR through mk:arch new; skip "not now" and self-evident reasons. A candidate that contradicts an ADR is surfaced only when the friction warrants reopening it, marked in adr_conflict.

Read the full file on GitHub · 109 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. 10d ago Changed · -112 lines df476950fdc9
  2. 12d ago Changed · -2 tokens per session f047a5131b22
  3. 14d ago Changed c96daf81b958
  4. 15d ago Changed 350a20ed913b
  5. 17d ago Changed · -2 tokens per session 118bb264e9b4
  6. 24d ago Changed · -96 tokens per session 8a6e9a061c6b
  7. 3mo ago First seen · 221 lines · 124 tokens per session scan A e71382dec3a4

Subscribe to this mod's changes

mk:improve-codebase-architecture is a skill published in the GitHub repository ngocsangyem/MeowKit (18 stars, last pushed 2d ago), licensed MIT. It adds 24 tokens to every session and 1,822 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.

Related

mk:improve-codebase-architecture compared with skills from other repositories

mk:improve-codebase-architecture next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mk:improve-codebase-architecturengocsangyem/MeowKitSkill182d agoMITA24Claude Code
brooks-harnesshyhmrright/brooks-lintSkill1.6ktodayMITA271Claude Code
releasehyhmrright/brooks-lintSkill1.6ktodayMITA135Claude Code, Codex
code-review-qualityproffesor-for-testing/agentic-qeSkill539todayMITA33Claude Code
new-skillhyhmrright/brooks-lintSkill1.6ktodayMITA145Claude Code, Codex
brooks-audithyhmrright/brooks-lintSkill1.6ktodayMITA143Claude Code
brooks-sweephyhmrright/brooks-lintSkill1.6ktodayMITA178Claude Code