代码架构契约重建助手

SKILL开发
开发 未标注权限 许可证不明确 已核验
安装这个技能

Rebuild a project's DESIGN-CONTRACT layer when docs have rotted past sync: re-derive architecture + structure + interface contracts from code, gate-verified. Use-when: "rebuild the contracts from scratch", "从代码重新推导契约", "$reorganize-logic". Do-NOT use for doc sync / cleanup (this REBUILDS and deletes legacy) → neat.

一句话选型结论

按资料字段整理

代码架构契约重建助手是开发类的 Agent Skill,安装方式:ClawHub 市场,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类开发 安装方式ClawHub 市场 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

ClawHub 市场
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_ddfdfa23/reorganize-logic
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

开发
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_ddfdfa23仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式ClawHub 市场安装包 clawhub
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791650543
正文体量8.3 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
写代码与改 bug

按需求补代码、定位并修掉报错。

读仓库与生成改动

让模型读懂项目结构,再给出可落地的改动。

跑测试与排查故障

按现象排查问题,补测试用例并复跑。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 已做过站内核验,页面字段与仓库对得上。
  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在开发场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
代码架构契约重建助手当前 未标注权限 ClawHub 市场 未标注 未标注 有
技能审查员 浏览器控制 ClawHub 市场 877.9 万 OpenClaw 有
Vercel React 最佳实践 浏览器控制 GitHub 仓库 849.1 万 Codex、Claude、Cursor 有
GitHub 代码协作 联网访问 ClawHub 市场 763.3 万 OpenClaw 有
网页设计指南 联网访问 GitHub 仓库 668.6 万 Codex、Claude、Cursor 有
本体论 只读 ClawHub 市场 663.7 万 OpenClaw 有

SKILL.md 全文

8.3 KB
模型实际读到的说明书原文,来自技能仓库

reorganize-logic

Rebuild the design-contract layer of an existing project from the ground up,
with the code as the single source of truth. The old contracts are untrusted
context
— compacted, read, then discarded as a source: the new contracts are
re-derived from the code, never copy-pasted from the legacy docs. Output is
three fresh artifacts (architecture diagram · structure diagram · explicit
interface definitions) plus a review-gated deletion manifest for the stale legacy.

The anchor (read first): a contract is only trustworthy once a runnable check
ties it back to the code. So every documented interface is cross-checked against
the code's public surface by scripts/verify_contracts.mjs, and the new contracts
are written before anything legacy is deleted. A contract the gate can't tie to
real code is a hallucination; the gate rejects it. The gate flags everything
ambiguous for you to reconcile — it never rubber-stamps — and it never rules on
design intent: whether an excluded symbol is really internal is judged by a fresh
reader against the code, not by the gate.

When this fires (vs neat — the key boundary)

  • reorganize-logic = deliberate, heavyweight, ground-up REBUILD. Old contracts
    are untrusted; deleting legacy is a feature. Use when docs have drifted so far
    that syncing is not worth it.
  • neat = incremental sync at session end; keeps what's right, fixes drift,
    non-destructive. Route there for "tidy up / sync the docs / 同步一下".

If the docs are mostly right → neat. If you'd rather throw them out and
re-derive from code → this skill.

Orchestration (the gate stays portable)

The gate is deterministic node (runs anywhere, CI included). The judged work —
derivation, synthesis, faithfulness, exclusion verdicts — runs like this:

  • Fan out the derivation. An Explore subagent maps entry points, then one
    derivation subagent per module in parallel returns its surface + responsibilities.
  • Derivers and readers are non-fork. Spawn every derivation and fresh-reader
    subagent as a fresh subagent that starts from only the prompt you give it — not a
    fork of your context, which inherits the legacy docs and your draft. If the host
    only offers forking, use a separate claude -p session. The reply says how
    isolation was achieved (a self-report, not an enforcement).
  • Raise effort, don't pad. If a contract reads shallow, raise effort for the
    running model rather than padding the prompt; effort names are not equivalent
    across models.
  • Survive compaction from disk. After a compaction, re-read the on-disk artifacts
    (_legacy-context.md, the contracts written so far, _exclusion-review.md) AND
    this skill's Controls — a summary may have evicted a standing constraint.
  • Walk every entry point. The coverage gate and the readers enumerate the
    surface; they never sample it.

Protocol

Preflight: confirm REBUILD (not sync), resolve scope (whole project | a named
module/dir). Then the 6 steps (detail in references/protocol.md):

  1. Compact old contracts → read-only, gitignored docs/contracts/_legacy-context.md
    headed "CONTEXT ONLY — DO NOT COPY".
  2. Re-derive from the code — read structure + public surface; build a fresh
    model. Code wins every disagreement. No copying from legacy.
  3. Author docs/contracts/architecture.md — Mermaid architecture diagram +
    components/responsibilities/data+control flow/boundaries.
  4. Author docs/contracts/structure.md (Mermaid + module map) and
    docs/contracts/interfaces.md in the strict gate-parseable format
    (references/contract-format.md).
  5. Gate — node scripts/verify_contracts.mjs <root> [--scope <dir>]. FAIL and
    FLAG block: fix every FAIL, reconcile every FLAG (open the cited code, fix the
    contract, re-run). REVIEW lines don't block, but every STRONG_EXPORT_EXCLUDED
    item goes through the fresh-reader exclusion card before you report. A line
    clearable only by an untrue statement or by editing code/the gate, one surviving
    two fix attempts, or a language with no matcher → escalate (protocol step 5).
  6. Emit docs/contracts/deletion-manifest.md — stale legacy to delete/overwrite,
    one reason each. Never delete anything; the human approves and applies.

Verify (eat the dogfood)

Run the gate on the produced interfaces.md before reporting:

node scripts/verify_contracts.mjs <project-root> [--scope <subdir>]

A PASS with exit 0 is PASS (structural): the gate proves doc-vs-code
structure — not prose faithfulness, and not whether an excluded symbol is
really internal. Any FAIL [tag] / FLAG [tag] line means the contract is not yet
tied to the code — fix and re-run. The final word needs the fresh-reader pass
and the exclusion card verdicts (references/protocol.md): non-fork readers
check the diagrams, responsibilities and signatures against the code, and
adjudicate every STRONG_EXPORT_EXCLUDED item.

Controls

  • Code is the only source of truth. Old contracts inform context, never content.
    No copy-paste from legacy into the new artifacts.
  • Review-gated deletion. Write the new contracts first; emit the manifest; never
    delete/overwrite legacy without explicit human approval. Nothing is auto-deleted;
    git is the safety net.
  • Strict gate, judged exclusions. Return contracts only after
    verify_contracts.mjs PASSes: FAIL and FLAG block. REVIEW items are adjudicated
    by a non-fork fresh reader with the exclusion card. The gate proves structure,
    not publicness. The reply names the gate command it ran (the shipped skill path).
  • Never edit the checks mid-task. Never edit, patch, copy-modify, or run a
    modified copy of scripts/verify_contracts.mjs or evals/ during a user task.
    An unrecognized export form or unsupported language goes to the owner as a
    proposal (form, example line, file) — and the run escalates.
  • No untrue contract for a green gate. Never write a contract statement you
    believe untrue, and never edit product code, to clear a gate line — escalate.
  • These controls are a rule layer: no sandbox or hook ships; the host's permission
    mode is the only enforcement, git the recovery net.
  • Scopable. Whole project by default; --scope <dir> for cheap re-runs;
    coverage is scoped accordingly.

Modules

File When to load
references/protocol.md Read at the start of every rebuild, after preflight: the 6-step runbook, the fresh-reader pass and the exclusion judgment card (paste the card section verbatim into each exclusion reader's prompt).
references/contract-format.md Read at step 4 before writing interfaces.md, and when the gate prints FLAG [EXCLUSION_NEEDS_REASON]: the gate-parseable format, the exclusion reason rule, the Mermaid conventions.
references/gate-design.md Read when a FAIL/FLAG/REVIEW tag needs interpreting, or when deciding whether a language/form is supported (escalate): the verdict table with its Plane column and the judgment ledger.
scripts/verify_contracts.mjs Executed at step 5 — never read into context, never edited during a task. Pure validate({contractText, files, scope, exclusions}) + CLI.
evals/run_all.mjs Dev-time only, local (gitignored), 37 cases over the real validate and the CLI walk; never run or edited during a user task.
assets/golden/ Copy from when authoring interfaces.md; smoke-test the CLI (pass/, and fail/: orphan + coverage hole).

Lifecycle

  • version: see frontmatter metadata.version.
  • Breaking change = any change to the gate's input format or the interfaces.md
    gate-parseable schema (downstream contracts must be re-authored).
  • Rollback = git restore docs/contracts/; the deletion-manifest is never
    auto-applied, so a bad run leaves the legacy intact.
  • Superseded by neat for the lighter keep-and-sync path.

常见问题

5 问
答案由本站依据条目字段整理
代码架构契约重建助手怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_ddfdfa23/reorganize-logic。安装方式为ClawHub 市场。装完刷新技能列表或重开客户端。

代码架构契约重建助手支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

代码架构契约重建助手权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

代码架构契约重建助手收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

代码架构契约重建助手用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。