improve-codebase
Find deepening opportunities in a codebase — surface architectural friction and propose refactors that make it more testable and AI-navigable.
Skill by atalariq
Chalk Labs
Need help deploying improve-codebase?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/atalariq-improve-codebase
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/improve-codebase
What's inside
- Skill name
improve-codebase- Description
- Find deepening opportunities in a codebase — surface architectural friction and propose refactors that make it more testable and AI-navigable. Use when the user wants to improve architecture, find refactoring opportunities, or consolidate tightly-coupled modules.
- License
- MIT
- Instructions
- 76 lines in SKILL.md · view on GitHub
Files (6)
- DEEPENING.md
- INTERFACE-DESIGN.md
- REPORT-FORMAT.md
- SKILL.md
- ADR-FORMAT.md · references/
- CONTEXT-FORMAT.md · references/
SKILL.md (first lines)
# 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.
## Glossary
Use these terms exactly in every suggestion. Consistent language is the point — don't drift into "component," "service," "API," or "boundary."
- **Module** — anything with an interface and an implementation (function, class, package, slice).
- **Interface** — everything a caller must know to use the module: types, invariants, error modes, ordering, config. Not just the type signature.
- **Implementation** — the code inside.
- **Depth** — leverage at the interface: a lot of behaviour behind a small interface. **Deep** = high leverage. **Shallow** = interface nearly as complex as the implementation.
- **Seam** — where an interface lives; a place behaviour can be altered without editing in place. (Use this, not "boundary.")
- **Adapter** — a concrete thing satisfying an interface at a seam.
- **Leverage** — what callers get from depth.
- **Locality** — what maintainers get from depth: change, bugs, knowledge concentrated in one place.
Key principles:
- **Deletion test**: imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
- **The interface is the test surface.**
- **One adapter = hypothetical seam. Two adapters = real seam.**
This skill is _informed_ by the project's domain model. The domain language gives names to good seams; ADRs record decisions the skill should not re-litigate.
## Process
### 1. Explore
Read the project's domain glossary and any ADRs in the area you're touching first. The domain glossary layout is defined by `setup-workflow` — check `docs/agents/domain.md` for the exact paths (typically `CONTEXT.md` at the repo root for single-context repos, or `CONTEXT-MAP.md` for multi-context repos).
Then walk the codebase to identify friction. Explore organically — don't follow rigid heuristics:
- Where does understanding one concept require bouncing between many small modules?
- Where are modules **shallow** — interface nearly as complex as the implementation?
- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)?
- Where do tightly-coupled modules leak across their seams?
- Which parts of the codebase are untested, or hard to test through their current interface?
Apply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.
### 2. Present candidates as a Markdown report
Write the report directly in the conversation (or save to a temp file if the user prefers). Use the format in [REPORT-FORMAT.md](REPORT-FORMAT.md).
Each candidate gets a section with:
- **Files** — which files/modules are involved
- **Problem** — why the current architecture is causing friction
- **Solution** — plain English description of what would change
- **Benefits** — explained in terms of locality and leverage, and how tests would improve
- **Before / After diagram** — Mermaid or ASCII, side by side, illustrating the shallowness and the deepening
- **Recommendation strength** — one of `Strong`, `Worth exploring`, `Speculative`
End with a **Top recommendation** section: which candidate you'd tackle first and why.
**Use CONTEXT.md vocabulary for the domain, and Glossary vocabulary for the architecture.** If `CONTEXT.md` defines "Order," talk about "the Order intake module" — not "the FooBarHandler," and not "the Order service."
**ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly in the card (e.g. a warning callout: _"contradicts ADR-0007 — but worth reopening because…"_). Don't list every theoretical refactor an ADR forbids.
See [REPORT-FORMAT.md](REPORT-FORMAT.md) for the full format, diagram patterns, and example.
Do NOT propose interfaces yet. After presenting the report, ask the user: "Which of these would you like to explore?"
### 3. Grilling loop
Once the user picks a candidate, drop into a grilling conversation. Walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
Side effects happen inline as decisions crystallize:
- **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md` — same discipline as `grill-plan` (see [CONTEXT-FORMAT.md](references/CONTEXT-FORMAT.md)). Create the file lazily if it doesn't exist.
- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there.
- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons ("not worth it right now") and self-evident ones. See [ADR-FORMAT.md](references/ADR-FORMAT.md).
- **Want to explore alternative interfaces for the deepened module?** See [INTERFACE-DESIGN.md](INTERFACE-DESIGN.md).From atalariq/skills, MIT.
More from atalariq/skills
- 0.502score
tdd
atalariq
Test-driven development with red-green-refactor cycles and vertical slices.
SkillCFreshness: C★ 1Claude Code +9 - 0.502score
implement
atalariq
Execute a validated issue or plan — write code against acceptance criteria, run tests continuously, cross-check ACs, self-review, and commit.
SkillCFreshness: C★ 1Claude Code +9 - 0.499score
setup-workflow
atalariq
Scaffolds per-repo multi-agent collaboration framework + tool configuration — AGENTS.md, docs/adr/, PLAN.md, issue tracker, triage labels, domain docs.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
grill-plan
atalariq
Stress-test your plan against the existing domain model — sharpens terminology, validates assumptions, updates CONTEXT.md and ADRs inline as decisions…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
note-review
atalariq
Review one markdown note through retrieval practice — quiz the user from memory first, then reveal what their recall and the note itself are missing.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
code-review
atalariq
Review agent-generated code for spec compliance, test quality, architectural alignment, and agent anti-patterns.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
dispatch
atalariq
Dispatch multiple issues in parallel via subagents — each subagent runs implement on one issue independently.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
session-load
atalariq
Load a handoff document and resume context from a previous session.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
session-save
atalariq
Save the current session state to a handoff file so work can resume later.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
feynman
atalariq
Explain any concept in the simplest possible terms, then surface exactly where understanding is still fuzzy.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
flashcard-draft
atalariq
Turn a markdown note into an Anki-import-ready flashcard file — tab-separated text with Anki file headers, importable with zero hand-editing.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
worktree
atalariq
Manage git worktrees — create isolated feature branches, list active worktrees, clean up after merge.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jun 10, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/atalariq/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from atalariq
- 0.502score
implement
atalariq
Execute a validated issue or plan — write code against acceptance criteria, run tests continuously, cross-check ACs, self-review, and commit.
SkillCFreshness: C★ 1Claude Code +9 - 0.502score
tdd
atalariq
Test-driven development with red-green-refactor cycles and vertical slices.
SkillCFreshness: C★ 1Claude Code +9 - 0.499score
setup-workflow
atalariq
Scaffolds per-repo multi-agent collaboration framework + tool configuration — AGENTS.md, docs/adr/, PLAN.md, issue tracker, triage labels, domain docs.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
grill-plan
atalariq
Stress-test your plan against the existing domain model — sharpens terminology, validates assumptions, updates CONTEXT.md and ADRs inline as decisions…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
dispatch
atalariq
Dispatch multiple issues in parallel via subagents — each subagent runs implement on one issue independently.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
code-review
atalariq
Review agent-generated code for spec compliance, test quality, architectural alignment, and agent anti-patterns.
SkillCFreshness: C★ 1Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get improve-codebase running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
improve-codebase skill. Agent Mart. https://agentmart.dev/skills/atalariq-improve-codebase (last updated 2026-10-24)