Agent skill

Improve Codebase Architecture

by ProgrammerAnthony in ProgrammerAnthony/Expert-Coding-Harness

在代码库中发现架构"深化"机会——将浅模块变成深模块的重构,提升可测试性和 AI 可导航性。与 architecture-advisor 互补:architecture-advisor 设计新架构,本技能改善现有代码库结构。触发词:改进代码库架构、架构深化、找重构机会、模块耦合太紧、难以测试、代码难以理解、架构改进、improve architecture、refactor…

MITAuto-check passedDevelopment

Install Improve Codebase Architecture

skills CLI
$ npx skills add ProgrammerAnthony/Expert-Coding-Harness --skill improve-codebase-architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ProgrammerAnthony/Expert-Coding-Harness improve-codebase-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ProgrammerAnthony/Expert-Coding-Harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/improve-codebase-architecture .claude/skills/improve-codebase-architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
improve-codebase-architecture
GitHub stars
235
Token cost
~444 tokens
SKILL.md length
77 words
Files
4 (incl. references)
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

在代码库中发现架构"深化"机会——将浅模块变成深模块的重构,提升可测试性和 AI 可导航性。与 architecture-advisor 互补:architecture-advisor 设计新架构,本技能改善现有代码库结构。触发词:改进代码库架构、架构深化、找重构机会、模块耦合太紧、难以测试、代码难以理解、架构改进、improve architecture、refactor…

  • Works in 4 steps: 探索 → 提出候选项 → 为选定候选项设计接口(可选) → …
  • Development work in your project
  • SKILL.md covers 核心词汇(速查), 流程 and 参考文档
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Improve Codebase Architecture is an agent skill from ProgrammerAnthony/Expert-Coding-Harness. 在代码库中发现架构"深化"机会——将浅模块变成深模块的重构,提升可测试性和 AI 可导航性。与 architecture-advisor 互补:architecture-advisor 设计新架构,本技能改善现有代码库结构。触发词:改进代码库架构、架构深化、找重构机会、模块耦合太紧、难以测试、代码难以理解、架构改进、improve architecture、refactor opportunities。

Its SKILL.md is about 440 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/DEEPENING.md`, `references/INTERFACE-DESIGN.md` and `references/LANGUAGE.md`).

It sits in Development. The repository describes itself as: 生产级 AI Agent 技能集,辅助AI Harness应用于企业开发,覆盖代码审查、代码安全审计、TDD、需求工程、实施计划与子代理编排、架构设计、调试、前端开发与技能创建全流程。 The licence is MIT.

When your agent uses it

  • Development work in your project

Example prompts

  • “/improve-codebase-architecture”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. 探索
  2. 提出候选项
  3. 为选定候选项设计接口(可选)
  4. 实施

What it can do on your machine

Read from SKILL.md and the folder at commit ab0b827. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Improve Codebase Architecture loads about 444 tokens when it runs, and up to ~2.6k if it reads all its reference files. Until then it costs about 58 tokens; SKILL.md has 77 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~444
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ProgrammerAnthony/Expert-Coding-Harness at commit ab0b827, republished under its MIT licence (© ProgrammerAnthony). 77 words, ~444 tokens.

Download SKILL.mdSave it as .claude/skills/improve-codebase-architecture/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
improve-codebase-architecture
description
在代码库中发现架构"深化"机会——将浅模块变成深模块的重构,提升可测试性和 AI 可导航性。与 architecture-advisor 互补:architecture-advisor 设计新架构,本技能改善现有代码库结构。触发词:改进代码库架构、架构深化、找重构机会、模块耦合太紧、难以测试、代码难以理解、架构改进、improve architecture、refactor opportunities。

改进代码库架构

发现架构摩擦点,提出深化机会——将浅模块变为深模块的重构。目标:可测试性与 AI 可导航性。

使用 references/LANGUAGE.md 中的词汇表,所有建议中严格使用这些术语。

核心词汇(速查)

  • 模块(Module):有接口和实现的任何东西(函数、类、包、切片)。
  • 接口(Interface):调用者需要了解的一切:类型、不变量、错误模式、顺序、配置。不只是类型签名。
  • 深度(Depth):接口背后的杠杆——大量行为隐藏在小接口后面是深,接口复杂度接近实现复杂度是浅。
  • 接缝(Seam):可以不编辑内部代码而改变行为的地方。
  • 适配器(Adapter):在接缝处满足接口的具体实现。
  • 删除测试(Deletion test):想象删掉这个模块。复杂度消失了?那它是透传层。复杂度在 N 个调用者处重新出现?那它值得存在。

流程

1. 探索

先读取项目的领域词汇表(CONTEXT.md、UBIQUITOUS_LANGUAGE.md 等)和相关 ADR。

使用 Explore 子代理遍历代码库。有机探索,记录摩擦点:

  • 理解一个概念需要在多个小模块间来回跳转的地方?
  • 接口复杂度接近实现的浅模块?
  • 为可测试性提取出来的纯函数,但真正的 Bug 隐藏在调用方式中(无局部性)?
  • 紧耦合模块跨接缝泄漏的地方?
  • 未测试或难以通过当前接口测试的代码?

对可疑的浅模块做删除测试:删掉它会集中复杂度,还是只是移动了它?"集中"是你要找的信号。

2. 提出候选项

呈现编号的深化机会列表。每个候选项包含:

  1. 模块标识:名称 + 文件路径
  2. 浅度诊断:为什么它是浅的(接口太多、散布在 N 个调用者、透传层、测试只能通过实现细节)
  3. 深化思路:合并哪些模块、接缝放哪里、哪些依赖需要端口
  4. 可测试性收益:深化后如何改善测试(更少 Mock、直接可测接口、局部性更好)
  5. 工作量估算:小/中/大(不做具体行数预估)

在提出候选项时停下,等待用户选择。 不要直接开始重构。

3. 为选定候选项设计接口(可选)

若用户想要对选定候选项探索多种接口设计,使用并行子代理模式——详见 references/INTERFACE-DESIGN.md。

4. 实施

用户选定候选项并批准接口设计后:

  1. 参考 references/DEEPENING.md 制定具体深化策略
  2. 编写新的集成测试,通过新接口测试行为
  3. 合并模块,删掉旧的浅层测试(它们已成废代码)
  4. 确认所有测试通过,删除任何遗留的原型代码

参考文档

© ProgrammerAnthony, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/improve-codebase-architecture of ProgrammerAnthony/Expert-Coding-Harness.

  • SKILL.md
  • references/DEEPENING.md
  • references/INTERFACE-DESIGN.md
  • references/LANGUAGE.md

Open the folder on GitHubat commit ab0b827

Compare with similar skills

Improve Codebase Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Improve Codebase Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Improve Codebase Architecture this skillProgrammerAnthony/Expert-Coding-Harness235—~444Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k24 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Greplooponyx-dot-app/onyx32k4 repos~3.3kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 24 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed
  • Guidelines

    akash-network/node

    Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.

    1.1k GitHub starsUsed in 22 repos~577 tokens
    DevelopmentAuto-check passed

More from ProgrammerAnthony/Expert-Coding-Harness

All 23 skills in this repo
  • Architecture Advisor

    ProgrammerAnthony/Expert-Coding-Harness

    A skill your agent uses when 用户需要设计新系统架构、评审或优化已有系统架构、选择技术方案时。触发场景:架构分析、架构设计、系统设计、architecture、架构优化、系统架构、架构评审、架构咨询、技术方案、技术设计、如何组织代码结构、模块划分、服务拆分、数据库选型、微服务设计。

    235 GitHub stars~673 tokensUpdated 4 mo ago
    Auto-check passed
  • Code Review Expert

    ProgrammerAnthony/Expert-Coding-Harness

    A skill your agent uses when 用户要求审查代码、评估代码质量、提交 PR 前检查、发现代码有潜在问题时。触发场景:代码审查、code review、审查代码、review、检查代码、代码检查、代码质量、代码评审、这段代码有问题吗、帮我看看代码、合并前检查。

    235 GitHub stars~806 tokensUpdated 4 mo ago
    Auto-check passed
  • Code Security Audit

    ProgrammerAnthony/Expert-Coding-Harness

    A skill your agent uses when 用户需要对代码进行安全审计、发现安全漏洞、上线前安全评估、检查代码是否存在安全风险时。触发场景:代码安全审计、安全审计、白盒审计、安全扫描、漏洞检测、漏洞挖掘、SQL注入、命令注入、XSS、SSRF、反序列化、认证绕过、越权、代码安全检查、security audit、code…

    235 GitHub stars~1.6k tokensUpdated 4 mo ago
    Auto-check passed
  • Debug Expert

    ProgrammerAnthony/Expert-Coding-Harness

    A skill your agent uses when 程序出现错误、异常、崩溃,或行为与预期不符,或测试失败,或无法定位问题根因时。触发场景:调试、debug、报错、错误、异常、bug、问题排查、故障排查、不工作、崩溃、无法运行、出错了、为什么不生效、运行报错、跑不起来、程序挂了。

    235 GitHub stars~986 tokensUpdated 4 mo ago
    Auto-check passed
  • Frontend Code Review

    ProgrammerAnthony/Expert-Coding-Harness

    A skill your agent uses when 用户需要审查前端代码(React/Vue/Next.js/TypeScript/Tailwind等)、检查代码质量、性能问题、可维护性、安全漏洞、最佳实践落地时。触发场景:前端代码评审、前端代码优化、React/Vue代码检查、TypeScript代码审查、前端性能优化、前端安全审计、前端代码规范检查。

    235 GitHub stars~614 tokensUpdated 4 mo ago
    Auto-check passed
  • Frontend Performance Optimization

    ProgrammerAnthony/Expert-Coding-Harness

    A skill your agent uses when 用户需要优化前端性能、提升页面加载速度、减少白屏时间、优化交互流畅度、进行性能排查时。触发场景:前端性能优化、页面加载慢、白屏时间长、卡顿、LCP/FID/CLS指标优化、前端性能分析、打包体积优化。

    235 GitHub stars~701 tokensUpdated 4 mo ago
    Auto-check passed

Categories

Questions about Improve Codebase Architecture

What does Improve Codebase Architecture do?

在代码库中发现架构"深化"机会——将浅模块变成深模块的重构,提升可测试性和 AI 可导航性。与 architecture-advisor 互补:architecture-advisor 设计新架构,本技能改善现有代码库结构。触发词:改进代码库架构、架构深化、找重构机会、模块耦合太紧、难以测试、代码难以理解、架构改进、improve architecture、refactor…. Improve Codebase Architecture is an agent skill from ProgrammerAnthony/Expert-Coding-Harness.

When should I use Improve Codebase Architecture?

Improve Codebase Architecture fits situations like: development work in your project.

How do I install Improve Codebase Architecture in Claude Code?

Run `npx skills add ProgrammerAnthony/Expert-Coding-Harness --skill improve-codebase-architecture -a claude-code`. Or copy the skill folder (skills/improve-codebase-architecture in ProgrammerAnthony/Expert-Coding-Harness) into .claude/skills/improve-codebase-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Improve Codebase Architecture in Codex?

Run `npx skills add ProgrammerAnthony/Expert-Coding-Harness --skill improve-codebase-architecture -a codex`. Or copy the skill folder (skills/improve-codebase-architecture in ProgrammerAnthony/Expert-Coding-Harness) into .agents/skills/improve-codebase-architecture in your project. Codex loads it when a task matches its description.

Can I use Improve Codebase Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ProgrammerAnthony/Expert-Coding-Harness --skill improve-codebase-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/improve-codebase-architecture, .gemini/skills/improve-codebase-architecture, .github/skills/improve-codebase-architecture and .opencode/skills/improve-codebase-architecture in your project.

What does Improve Codebase Architecture need to run?

SKILL.md names no scripts, command-line tools or credentials: Improve Codebase Architecture is instructions for the agent only.

Does Improve Codebase Architecture access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Improve Codebase Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Improve Codebase Architecture use?

Improve Codebase Architecture is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Improve Codebase Architecture use?

About 444 tokens (SKILL.md is roughly 1.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.2k tokens, read only when the agent opens those files.

What are the alternatives to Improve Codebase Architecture?

Skills that share tags, products or a category with Improve Codebase Architecture: Finishing a Development Branch (obra/superpowers, 296k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars), PR Babysitter (openinterpreter/openinterpreter, 69k stars) and Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Improve Codebase Architecture?

ProgrammerAnthony (a GitHub user) maintains it in ProgrammerAnthony/Expert-Coding-Harness, which has 235 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on May 11, 2026.

Source: ProgrammerAnthony/Expert-Coding-Harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.