Expert-Coding-Harness: Skill for Cursor

.cursor/skills/improve-codebase-architecture/SKILL.md

improve-codebase-architecture is a skill for Cursor from ProgrammerAnthony/Expert-Coding-Harness. It costs 114 tokens per session (999 once invoked), scanned A, original, MIT.

A code-architecture review process that finds places where a codebase can be reorganized into clearer modules with simpler interfaces. A module is a piece of code with an outside-facing way to use it, such as a function, class, package, or subsystem.

In plain words
What is it for?
It helps inspect a codebase, identify shallow or pass-through modules, propose ways to combine or separate them, improve testing boundaries, and design and implement an approved refactoring.
Why use it?
It helps locate tightly connected, hard-to-test, or hard-to-understand code before changing it, and requires the developer to choose and approve a refactoring opportunity first.

Skill for Cursor

Written for Cursor: installed under .cursor/.

This is ProgrammerAnthony/Expert-Coding-Harness's own configuration. It tells Cursor how to work on Expert-Coding-Harness itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Expert-Coding-Harness configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ProgrammerAnthony/Expert-Coding-Harness. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ProgrammerAnthony/Expert-Coding-Harness/master/.cursor/skills/improve-codebase-architecture/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ProgrammerAnthony/Expert-Coding-Harness

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for improve-codebase-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/programmeranthony/expert-coding-harness/improve-codebase-architecture/github.svg)](https://agentmods.dev/skills/programmeranthony/expert-coding-harness/improve-codebase-architecture)
Your own site
<a href="https://agentmods.dev/skills/programmeranthony/expert-coding-harness/improve-codebase-architecture"><img src="https://agentmods.dev/badge/skills/programmeranthony/expert-coding-harness/improve-codebase-architecture/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for improve-codebase-architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/programmeranthony/expert-coding-harness/improve-codebase-architecture"><img src="https://agentmods.dev/badge/skills/programmeranthony/expert-coding-harness/improve-codebase-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 999 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00114 $0.00999
Opus 5.5 $0.00046 $0.00400
Sonnet 5.5 $0.00023 $0.00200
Haiku 4.5 $0.00011 $0.00100

Measured 2mo ago against content hash d97445fcb6e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

improve-codebase-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/skills/improve-codebase-architecture/SKILL.md · 67 lines

What it actually says

改进代码库架构

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

参考文档

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 67 lines · 114 tokens per session scan A d97445fcb6e7

Subscribe to this mod's changes

improve-codebase-architecture is a skill published in the GitHub repository ProgrammerAnthony/Expert-Coding-Harness (246 stars, last pushed 5mo ago), licensed MIT. It adds 114 tokens to every session and 999 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

openclaw/clawhub · 17 tokens

omh-code-review

This is an OMH code-review workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 48 tokens

revdiff-plan

Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…

umputun/revdiff · 84 tokens

explore-unknowns

Guide the user through a quadrant walk that maps the unknowns of a task — open by listing the known knowns, then work through known unknowns, unknown knowns, and unknown unknowns one stage at a time, ending with a complete four-quadrant map in the user's hands. Use when a request is ambiguous or underspecified, the…

dzhng/skills · 162 tokens

re0-merge

Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…

LilMGenius/paperthin · 70 tokens

asplos-writing-style

Use when drafting or revising ASPLOS prose — engineering the first two pages that rapid review actually reads, stating the cross-layer insight as one quotable sentence, structuring per-layer mechanism sections, writing bounded claims, and fitting everything into 11 self-contained pages that include figures and…

brycewang-stanford/Awesome-Journal-Skills · 65 tokens