arbe-improve-codebase

Identify shallow modules across a repository and design deeper interfaces using deletion and knob tests.

Updated May 16, 2026
One-click install
npx skills add https://github.com/oskarrough/robots --skill arbe-improve-codebase-oskarrough
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: arbe-improve-codebase
Source: https://github.com/oskarrough/robots/tree/main/skills/improve-codebase
Command: npx skills add https://github.com/oskarrough/robots --skill arbe-improve-codebase-oskarrough

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate shallow modules whose interfaces are nearly as complex as their implementations, causing scattered logic, disproportionate test wiring, and per-entity module proliferation. This Skill finds those modules and guides their consolidation into deep modules with small interfaces and high leverage. ## Core Features & Use Cases - Repo-wide shallow module detection: Spawns an Explore subagent with a structured brief to surface 5-10 strong refactoring candidates, each validated with the deletion test, knob test, and layer check. - Structured candidate review: Presents numbered candidates with per-file line counts, layer classification, preserve cross-checks against already-deep modules, and leverage/locality/test-surface analysis. - Parallel interface design: Optionally runs multiple subagents with different constraints (minimal interface, maximal flexibility, common-caller default) to compare seam designs before committing. - Use Case: When unit tests require excessive mocking and wiring relative to what they verify, run this Skill to find the misplaced seams, consolidate pass-through modules, and move tests to the deepened module's interface. ## Quick Start Ask the assistant to run the improve-codebase skill to find shallow modules in this repository that should be deepened.

Frequently Asked Questions about arbe-improve-codebase

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find shallow modules in a codebase?▼

Spawn an Explore subagent with a brief containing the glossary, principles, and a numbered hit-list of paths to inspect. It returns 5-10 candidates, each validated with the deletion test (does complexity vanish or disperse?) and the knob test (do unified signatures stay flat as callers grow?).

What is the deletion test for module depth?▼

The deletion test imagines removing a module: if the complexity vanishes, it was a pass-through; if the complexity reappears across many callers, the module earned its keep. It distinguishes real abstraction from indirection that only moves code around.

When should I use repo-wide architecture review instead of a code review?▼

Use this Skill for whole-repo refactoring aimed at testability or decoupling, not for single diffs or individual call paths. Skip it during incidents or under deadline pressure, since deepening modules is deliberate design work.

When should I not consolidate duplicated code into one module?▼

Do not consolidate when the knob test fails: if unifying callers forces nullable parameters, mode flags, or pluggable hooks to grow faster than boilerplate shrinks, the result is a shallow module wearing a deep module's coat. Also avoid ports with only one adapter.

How should tests change after deepening a module?▼

Replace old unit tests on shallow modules rather than layering new ones on top. New tests sit at the deepened module's interface and assert observable outcomes; tests that break when the implementation changes are testing past the interface.