Agent skill

Improve Codebase Architecture

by ProgrammerAnthony in ProgrammerAnthony/Anything-Extract

探索代码库以发现架构改进机会,重点让代码库更容易测试:通过“加深浅模块(deepening shallow modules)”的方式重构模块结构。适用于用户想改善架构、寻找可重构机会、整合强耦合模块、或让代码库更便于 AI 导航与理解。

MITAuto-check passed

Install Improve Codebase Architecture

skills CLI
$ npx skills add ProgrammerAnthony/Anything-Extract --skill improve-codebase-architecture -a claude-code

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

GitHub CLI
$ gh skill install ProgrammerAnthony/Anything-Extract 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/Anything-Extract.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/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
139
Token cost
~535 tokens
SKILL.md length
134 words
Files
2
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

探索代码库以发现架构改进机会,重点让代码库更容易测试:通过“加深浅模块(deepening shallow modules)”的方式重构模块结构。适用于用户想改善架构、寻找可重构机会、整合强耦合模块、或让代码库更便于 AI 导航与理解。

  • Works in 7 steps: 探索代码库 → 给出候选项 → 用户选择候选项 → …
  • Calls gh

What it does

Improve Codebase Architecture is an agent skill from ProgrammerAnthony/Anything-Extract. 探索代码库以发现架构改进机会,重点让代码库更容易测试:通过“加深浅模块(deepening shallow modules)”的方式重构模块结构。适用于用户想改善架构、寻找可重构机会、整合强耦合模块、或让代码库更便于 AI 导航与理解。

Its SKILL.md is about 540 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `REFERENCE.md`).

It works with GitHub. The repository describes itself as: 高效文档识别&知识库&本地启动,前后端;整合QAnything、dify等思想和源码,快速批量可靠提取文档关键信息并导出. The licence is MIT.

Example prompts

  • “加深浅模块(deepening shallow modules)”
  • “/improve-codebase-architecture”

Workflow steps

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

  1. 探索代码库
  2. 给出候选项
  3. 用户选择候选项
  4. 刻画问题空间
  5. 设计多个接口方案
  6. 用户选择接口(或接受推荐)
  7. 创建 GitHub issue

What it can do on your machine

Read from SKILL.md and the folder at commit f1ed557. 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

    Shell commands in SKILL.md call:

    • gh

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

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    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 535 tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 134 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~37
When it runs · the whole SKILL.md, loaded when a task matches
~535

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/Anything-Extract at commit f1ed557, republished under its MIT licence (© ProgrammerAnthony). 134 words, ~535 tokens.

Download SKILL.mdSave it as .claude/skills/improve-codebase-architecture/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
improve-codebase-architecture
description
探索代码库以发现架构改进机会,重点让代码库更容易测试:通过“加深浅模块(deepening shallow modules)”的方式重构模块结构。适用于用户想改善架构、寻找可重构机会、整合强耦合模块、或让代码库更便于 AI 导航与理解。

改进代码库架构

像 AI 一样探索一整个代码库:暴露架构摩擦点(architectural friction),发现提升可测试性的机会,并以 GitHub issue/RFC 的形式提出“模块加深(module-deepening)”的重构建议。

所谓深模块(deep module)(John Ousterhout,《A Philosophy of Software Design》)具有“小接口(small interface)+ 大量实现隐藏”的特征。深模块更容易测试、更便于 AI 导航,并能让你在边界处测试,而不是在内部内部测。

流程(Process)

1. 探索代码库

使用 Agent 工具(subagent_type=Explore)自然地浏览代码库。不要使用僵硬的启发式规则(heuristics)——要“有机探索”,并记录你在理解过程中感受到的摩擦:

  • 理解一个概念往往需要在很多很小的文件之间来回跳转,这种情况在哪里?
  • 哪些模块过于“浅”(shallow)导致接口几乎和实现一样复杂?
  • 是否曾经抽出了纯函数让它们更易测试,但真正的 bug 藏在“它们如何被调用”之中?
  • 哪些强耦合模块在彼此的缝隙(seams)处制造了集成风险?
  • 代码库中哪些部分没有被测试,或者很难测试?

你遇到的摩擦点就是信号(the friction IS the signal)。

2. 给出候选项

以“编号列表”的形式呈现深化(deepening)的机会。对每个候选项,展示:

  • 聚类(Cluster):涉及哪些模块/概念
  • 为什么耦合:共享类型、调用模式、对某一概念的共同所有(co-ownership)
  • 依赖类别(Dependency category):依赖类别的划分见 REFERENCE.md 的四种分类
  • 测试影响(Test impact):哪些现有测试会被边界测试(boundary tests)替代

目前不要提出具体接口设计。先问用户:你想要进一步探索这些候选项里的哪一个?

3. 用户选择候选项
4. 刻画问题空间

在启动子 agent 之前,先给出一个面向用户的问题空间说明(user-facing explanation),用于所选候选项:

  • 新接口需要满足的约束条件
  • 新接口需要依赖的内容
  • 一个粗略的示意代码草图,用来把约束落到具体形态上——这不是提案,只是为了让约束更具体

把这些内容展示给用户,然后立刻进入第 5 步:让用户阅读并思考的同时,子 agent 会并行工作。

5. 设计多个接口方案

使用 Agent 工具并行启动 3 个以上的子 agent。每个子 agent 都必须为“深模块(deepened module)”输出一种**根本不同(radically different)**的接口设计。

为每个子 agent 提供独立的技术简报(文件路径、耦合细节、依赖类别、需要隐藏的复杂度等)。该简报与第 4 步面向用户的解释互相独立。并确保每个 agent 的设计约束不同:

  • Agent 1:尽量缩小接口——目标是最多 1-3 个入口点
  • Agent 2:尽量提升灵活性——支持尽可能多的用例与扩展
  • Agent 3:优化最常见的调用者——让默认场景变得非常简单
  • Agent 4(若适用):围绕 ports & adapters 模式为跨边界依赖进行设计

每个子 agent 的输出应包含:

  1. 接口签名(types、方法、参数)
  2. 使用示例(展示调用方如何使用)
  3. 内部隐藏了哪些复杂度
  4. 依赖策略(如何处理依赖——见 REFERENCE.md)
  5. 方案的取舍(trade-offs)

把这些设计方案按顺序呈现,然后用文字进行对比分析。

对比之后,给出你自己的推荐:你认为哪一种设计最强,并说明原因。如果不同设计的要素有组合空间,可以提出混合方案。要“有主见”——用户想要的是有分量的判断,而不只是菜单式列举。

6. 用户选择接口(或接受推荐)
7. 创建 GitHub issue

使用 gh issue create 把一次“重构 RFC(refactor RFC)”创建成 GitHub issue。并使用 REFERENCE.md 中的模板。

不要要求用户在创建之前先审核——直接创建并把 URL 发给用户。

© 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 1 other file in .agents/skills/improve-codebase-architecture of ProgrammerAnthony/Anything-Extract.

  • SKILL.md
  • REFERENCE.md

Open the folder on GitHubat commit f1ed557

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/Anything-Extract139—~535Automated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Diagnosing Superpowers Sessionsobra/superpowers296k3 repos~1.7kAutomated safety check: PassMIT
GitHub Deep Researchbytedance/deer-flow83k5 repos~1.3kAutomated safety check: PassMIT
Greplooponyx-dot-app/onyx32k4 repos~3.3kAutomated safety check: PassMIT
Update V8 Versionopeninterpreter/openinterpreter69k2 repos~845Automated safety check: PassApache-2.0

Similar skills

  • 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
  • Investigates a session where Superpowers went wrong, reads the transcripts on disk and produces an evidence-cited report, optionally prepared as a bug report for the maintainers.

    296k GitHub starsUsed in 3 repos~1.7k tokens
    Agent WorkflowsAuto-check passed
  • GitHub Deep Research

    bytedance/deer-flow

    Researches a GitHub repository over four rounds using the GitHub API and web search, then writes a structured markdown report with timeline, metrics and Mermaid diagrams.

    83k GitHub starsUsed in 5 repos~1.3k tokens
    Research & ScienceAuto-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
  • Update V8 Version

    openinterpreter/openinterpreter

    Bumps the pinned v8 and rusty_v8 versions in Codex, validates the release-candidate path with the v8-canary check, and traces failures to upstream build changes.

    69k GitHub starsUsed in 2 repos~845 tokens
    DevOps & CloudAuto-check passed
  • Last30days

    mvanhorn/last30days-skill

    Research what people actually say about any topic in the last 30 days.

    64k GitHub stars~7.8k tokensUpdated today
    Research & ScienceAuto-check: notes

More from ProgrammerAnthony/Anything-Extract

All 13 skills in this repo
  • Backend Code Review

    ProgrammerAnthony/Anything-Extract

    指导在项目(python项目)中队后端代码进行质量、安全、可维护性与最佳实践审查,基于既定规则清单。适用于用户请求对 backend/ 下后端文件(如 .py)进行审查、分析或改进。不用于前端文件(如 .tsx、.ts、.js)。支持待提交变更审查、代码片段审查、按文件审查。

    139 GitHub stars~791 tokensUpdated 4 mo ago
    Auto-check passed
  • Frontend Code Review

    ProgrammerAnthony/Anything-Extract

    指导在项目中对前端代码(Next.js/React/TypeScript/Tailwind 等)进行结构、可维护性、性能与一致性审查,基于既定规则清单。适用于用户请求审查 .tsx/.ts/.js/.jsx 等前端文件或前端目录下的页面与组件。不用于后端代码(如 .py)。

    139 GitHub stars~957 tokensUpdated 4 mo ago
    Auto-check passed
  • Design An Interface

    ProgrammerAnthony/Anything-Extract

    使用并行子 agent 为某个模块生成多个根本不同的接口设计。适用于用户希望设计某个 API、探索接口选项、对比模块形状(module shapes),或提到“design it twice(把它设计两遍)”。

    139 GitHub stars~448 tokensUpdated 4 mo ago
    Auto-check passed
  • TDD

    ProgrammerAnthony/Anything-Extract

    使用 RED-GREEN-重构(red-green-refactor)循环进行测试驱动开发。适用于用户希望用 TDD 构建新功能或修复 bug,提到 “red-green-refactor”,希望使用集成测试,或询问“test-first development(先写测试)”。

    139 GitHub stars~572 tokensUpdated 4 mo ago
    Auto-check passed
  • Ubiquitous Language

    ProgrammerAnthony/Anything-Extract

    从当前对话中抽取 DDD 风格的“统一语言”术语表(ubiquitous language glossary),标记歧义,并提出规范的术语选择。保存为 UBIQUITOUSLANGUAGE.md。适用于用户希望定义领域术语、构建术语表、固化用词并强化术语一致性,或提到 “domain model” / “DDD”(领域模型与 DDD)。

    139 GitHub stars~647 tokensUpdated 4 mo ago
    Auto-check passed
  • Write A Skill

    ProgrammerAnthony/Anything-Extract

    以正确的技能结构、渐进式披露与打包资源来创建新的 agent 技能。适用于用户希望创建、编写或构建新的技能. An agent skill from ProgrammerAnthony/Anything-Extract.

    139 GitHub stars~407 tokensUpdated 4 mo ago
    Auto-check passed

Works with

Questions about Improve Codebase Architecture

What does Improve Codebase Architecture do?

探索代码库以发现架构改进机会,重点让代码库更容易测试:通过“加深浅模块(deepening shallow modules)”的方式重构模块结构。适用于用户想改善架构、寻找可重构机会、整合强耦合模块、或让代码库更便于 AI 导航与理解。. Improve Codebase Architecture is an agent skill from ProgrammerAnthony/Anything-Extract.

How do I install Improve Codebase Architecture in Claude Code?

Run `npx skills add ProgrammerAnthony/Anything-Extract --skill improve-codebase-architecture -a claude-code`. Or copy the skill folder (.agents/skills/improve-codebase-architecture in ProgrammerAnthony/Anything-Extract) 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/Anything-Extract --skill improve-codebase-architecture -a codex`. Or copy the skill folder (.agents/skills/improve-codebase-architecture in ProgrammerAnthony/Anything-Extract) 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/Anything-Extract --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?

Going by SKILL.md and its folder, Improve Codebase Architecture needs the command-line tools its instructions call (gh).

Does Improve Codebase Architecture access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. 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 535 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Improve Codebase Architecture?

Skills that share tags, products or a category with Improve Codebase Architecture: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Diagnosing Superpowers Sessions (obra/superpowers, 296k stars), GitHub Deep Research (bytedance/deer-flow, 83k stars) and Greploop (onyx-dot-app/onyx, 32k 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/Anything-Extract, which has 139 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on May 13, 2026.

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