Improve Codebase Architecture logo

Improve Codebase Architecture

Community
ProgrammerAnthony
improve-codebase-architecture

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

Overview

PublisherProgrammerAnthony
RepositoryExpert-Coding-Harness
Skill nameimprove-codebase-architecture
Stars
236
Forks
77
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ProgrammerAnthony on GitHub. Read the source before you install it.

Installation

Install the Improve Codebase Architecture AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ProgrammerAnthony/Expert-Coding-Harness.git /tmp/Expert-Coding-Harness
mkdir -p .claude/skills
cp -r /tmp/Expert-Coding-Harness/skills/improve-codebase-architecture .claude/skills/improve-codebase-architecture
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Improve Codebase Architecture in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Improve Codebase Architecture on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Improve Codebase Architecture is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

改进代码库架构

发现架构摩擦点,提出深化机会——将浅模块变为深模块的重构。目标:可测试性与 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. 确认所有测试通过,删除任何遗留的原型代码

参考文档

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Improve Codebase Architecture AI skill do?

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

Why use Improve Codebase Architecture on TypingMind?

Because you install it once and use it with any model. Improve Codebase Architecture is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Improve Codebase Architecture in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ProgrammerAnthony/Expert-Coding-Harness/tree/master/skills/improve-codebase-architecture. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Improve Codebase Architecture?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Improve Codebase Architecture?

As many as you like. As long as a model supports skills, you can use Improve Codebase Architecture with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Improve Codebase Architecture AI skill free?

Yes. It is published on GitHub by ProgrammerAnthony under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇