improve-architecture

improve-architecture is a skill for Claude Code from Rune-kit/rune. It costs 61 tokens per session (3,316 once invoked), scanned A, original, MIT.

A codebase analysis tool that identifies architectural friction and suggests refactoring opportunities. Refactoring means restructuring existing code without changing its intended behaviour, with emphasis on making modules easier to test and understand.

In plain words
What is it for?
Use it to find refactor candidates, consolidate shallow modules, improve testability, and produce proposals that other code-review or refactoring tools can use.
Why use it?
It helps reveal scattered wrappers, weak module boundaries, and structures that make testing or future changes unnecessarily difficult.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rune plugin — 66 skills, 1 command, 66 agents, 6 hooks shipped together

Good fit Use it to find refactor candidates, consolidate shallow modules, improve testability, and produce proposals that other code-review or refactoring tools can use.

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

Made for: Claude Code.

Or install rune, the plugin that ships this one along with the rest of its 66 skills, 1 command, 66 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-architecture

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/rune-kit/rune/improve-architecture"><img src="https://agentmods.dev/badge/skills/rune-kit/rune/improve-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,316 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.00061 $0.03316
Opus 5.5 $0.00024 $0.01326
Sonnet 5.5 $0.00012 $0.00663
Haiku 4.5 $0.00006 $0.00332

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

Security

Grade A, and why

improve-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-architecture/SKILL.md · 276 lines

How it starts

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

improve-architecture

Purpose

Surface architectural friction in a codebase and propose deepening opportunities — refactors that turn shallow modules into deep ones. Output is structured (numeric scores + JSON proposal payloads) so surgeon, review, and audit can consume it programmatically without re-reading the codebase.

The goal is testability and AI-navigability: a deep module presents a small interface that hides large machinery, so tests target one surface and future agents can reason about the system without traversing N small wrappers.

Vocabulary (controlled — use exactly)

These eight terms have precise meanings. Banned aliases: "boundary" (overloaded with DDD), "component" (UI-specific), "service" (microservice-specific), "layer" (too generic). See references/language.md for full definitions.

  • Module — anything with an interface and an implementation (function, class, package, slice).
  • Interface — everything a caller must know to use the module: types, invariants, ordering, error modes, config.
  • Implementation — the code inside.
  • Depth — leverage at the interface; large behavior behind a small interface.
  • Seam — where an interface lives; place behavior can be altered without editing in place.
  • Adapter — concrete thing satisfying an interface at a seam.
  • Leverage — what callers get from depth.
  • Locality — what maintainers get from depth.

Triggers

  • Called by cook Phase 5 (quality gate) when refactor signals appear in scout output
  • Called by surgeon before any deepening session — produces the proposal surgeon executes
  • Called by audit to compute the architecture sub-score
  • Called by review when a reviewer flag mentions "shallow", "wrapper", "indirection"
  • Manual: /rune improve-architecture <module-path>

Calls (outbound)

  • scout (L2): re-scan target module + callers when input context is stale
  • brainstorm (L2): when the deepened module needs a new interface, hand off in design-it-twice mode (see brainstorm v0.6+)
  • journal (L3): record an ADR if the user rejects a candidate with a load-bearing reason

Read the full file on GitHub · 276 lines

Files

What ships with it

5 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. 8d ago First seen · 276 lines · 61 tokens per session scan A 38ac9cd63755

Subscribe to this mod's changes

improve-architecture is a skill published in the GitHub repository Rune-kit/rune (96 stars, last pushed 2d ago), licensed MIT. It adds 61 tokens to every session and 3,316 once invoked, about $0.0002 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-11-22.

Related

improve-architecture compared with skills from other repositories

improve-architecture next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
improve-architectureRune-kit/runeSkill962d agoMITA61Claude Code
criticism-self-criticismHughYau/qiushi-skillSkill4.0k2d agoMITA197Claude Code
fix-pr-review-looprichkuo/rk-skillsSkill50todayMITA90Claude Code
validate-issuerichkuo/rk-skillsSkill50todayMITA55Claude Code
fable-validate-looprichkuo/rk-skillsSkill50todayMITA102Claude Code
refactorsmallnest/goal-workflowSkill3032mo agoMITA71Claude Code
walkthroughsmallnest/goal-workflowSkill3032mo agoMITA131Claude Code