← 返回 Skills 市场
xiluoduyu

implementation-self-review

作者 xiluoduyu · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
119
总下载
1
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install implementation-self-review
功能描述
Use when reviewing a new or changed implementation for responsibility boundaries, file organization, overengineering, defensive branches, naming clarity, rep...
使用说明 (SKILL.md)

Implementation Self Review

Purpose

Run this skill after the first implementation pass, before final delivery, or when the user questions code organization, necessity, naming, defensive checks, iteration scope, or repeated rework. Treat it as a compact engineering self-review, not a broad rewrite mandate.

Review Workflow

  1. Identify the changed behavior and the files touched.
  2. Compare the change against the repo's active architecture and collaboration rules.
  3. Review the implementation with the gates below.
  4. Report concrete findings first; if there are no issues, say that clearly and list residual risks.
  5. Fix issues only when the user asked for implementation or the current task is already an implementation task.

Gates

Placement Gate

Ask:

  1. Does adding this code to the current file make the file's responsibility unclear?
  2. Does splitting it into new files make the feature harder to review, trace, or delete?
  3. Can the behavior be read from the local structure without jumping across many thin files?

Prefer existing local patterns and compact organization. Add a new file only when it clarifies a real responsibility boundary or avoids meaningful crowding.

Necessity Gate

For each new type, field, interface, config, abstraction, helper, and state value, ask:

  1. Is it needed by the current accepted contract?
  2. Is it only a future-facing placeholder?
  3. Can it be removed, merged, or expressed by an existing name or field?

Flag overdesign explicitly. Prefer removing unused structure over documenting why it might be useful later.

Boundary And Defense Gate

For each nil, empty, default, fallback, or defensive branch, ask:

  1. Is this a real boundary where untrusted or optional input enters?
  2. Is this masking a constructor or caller contract that should be strict?
  3. Would failing fast at setup make the invariant clearer?

Keep defenses at entry/configuration boundaries. Avoid internal defensive checks that make ownership unclear.

Naming Gate

For long names or repeated terms, ask:

  1. Does the surrounding type/file already provide part of the meaning?
  2. Is the name describing implementation mechanics rather than domain intent?
  3. Can the term be shortened without losing review clarity?

Prefer clean domain names over stacked qualifiers.

Error Semantics Gate

For each error path, ask:

  1. Does the error category match the actual failure: invalid input, authentication failure, authorization denial, business rejection, conflict/idempotency, dependency failure, or internal error?
  2. Does the caller receive enough information to recover or debug without exposing sensitive internals?
  3. Are expected denials represented as expected outcomes rather than unexpected exceptions?
  4. Is there any hidden fail-open or silent fallback behavior?
  5. Are retries safe, explicitly discouraged, or bounded by idempotency?

Prefer explicit error semantics over catch-all internal errors.

Observability Gate

For important state changes, security boundaries, external calls, and failure paths, ask:

  1. Is there enough logging or telemetry at the boundary where the failure can be understood?
  2. Does the log include useful correlation context, such as request id, actor id, resource id, route/action, external dependency name, and sanitized error reason?
  3. Is sensitive data excluded or redacted, such as tokens, secrets, credentials, authorization headers, personal data, and raw payloads?
  4. Is logging placed at the ownership boundary instead of duplicated across every helper?
  5. Are expected business denials distinguishable from unexpected system failures?

Prefer concise boundary logs over noisy internal logs.

Configuration And Secret Gate

For each new configuration or secret, ask:

  1. Is this configuration required by the current contract, or can the behavior be fixed and simpler?
  2. Is the default behavior explicit and safe for production?
  3. If a required value is missing, should the system fail closed, fail open, or start disabled? Is that choice documented near the boundary?
  4. Are secrets provided through environment or secret management placeholders rather than committed plaintext?
  5. Are secrets excluded from logs, errors, tests, snapshots, and generated docs?
  6. Is rotation or revocation relevant now, or intentionally out of scope?

Prefer fewer configuration knobs. Add configuration only when deployment variance is real.

State And Concurrency Gate

When the change introduces state transitions, one-time use, creation, exchange, or idempotency, ask:

  1. What is the source of truth for the state?
  2. What are the allowed states and transitions?
  3. What happens on duplicate requests, concurrent requests, retries, and partial failures?
  4. Is idempotency handled at the business boundary, storage boundary, or both?
  5. Are race-sensitive invariants covered by tests or constrained by storage primitives?
  6. Is time read from the correct source for this layer?

Prefer explicit state transitions and tested invariants over implicit best-effort behavior.

Test Intent Gate

For tests added or changed, ask:

  1. Does each important contract have a direct test, including rejection and edge paths?
  2. Does the test name describe the behavior or invariant, not only the function under test?
  3. Did user-reported concerns become regression tests when practical?
  4. Are tests scoped to the risk of the change without overfitting implementation details?
  5. Are mocks/fakes asserting meaningful boundary data rather than only returning success?

Prefer behavior-focused tests that explain why the rule exists.

Same-Class Scan Gate

When the user points out one issue, scan for the same class before editing:

  1. Similar redundant fields or concepts.
  2. Similar over-defensive branches.
  3. Similar naming or terminology drift.
  4. Similar documentation/test/proto inconsistencies.

Tell the user what same-class scan was done, then make one coherent pass where possible.

Iteration Scope Gate

When the repository has its own documented feature-planning convention, follow that convention first. If the repository has no explicit convention, use this default cross-project structure:

docs/plans/\x3Cfeature>/
  README.md
  design.md
  implementation-plan.md
  iterations/
    01-initial.md
  review*.md

Default file responsibilities:

  1. README.md: the single entry point for the feature docs; records current status, timeline, document navigation, and maintenance rules.
  2. design.md: the current effective design only; do not stack rejected proposals, old configs, or historical alternatives here.
  3. implementation-plan.md: current implementation state, remaining gaps, tasks, acceptance criteria, and executable verification.
  4. iterations/: historical evolution records; use numbered files such as 01-initial.md, 02-*.md, 03-*.md.
  5. review*.md: review records and quality context; useful history, but not the current design source of truth.

Before adding a new feature iteration document, ask:

  1. Has the current iteration already been submitted or stabilized?
  2. Does the change alter a settled capability boundary, responsibility boundary, default behavior, or configuration contract?
  3. Is this just a correction to the current unsubmitted iteration?

If the current iteration is still in progress, treat most contract wording or rule changes as adjustments to that iteration rather than creating a new iteration. Do not let rejected temporary designs pollute current design.md.

Add a new iteration when the change alters a settled capability boundary, responsibility boundary, algorithm, configuration semantics, or default behavior. Do not add a new iteration for ordinary bug fixes, test additions, local renames, or corrections to an unsubmitted/current iteration unless they change the current contract.

When an iteration changes the active contract, update all current-fact documents together: README.md, design.md, and implementation-plan.md. Keep rejected or superseded approaches in iterations/, and mark them as not adopted if they are listed in the timeline.

Before delivery, scan current-fact docs for stale wording in the language used by the project. Include at least these meaning groups:

  1. Unresolved status: 待确认, to be confirmed, TBD, open question, pending confirmation.
  2. Legacy configuration or behavior: 旧配置, legacy config, old config, previous behavior, legacy behavior.
  3. Deprecated or removed facts: 已废弃, deprecated, removed, obsolete, no longer used.
  4. Future-tense implementation language in current facts: 后续实现应, should implement later, future implementation should, to be implemented.
  5. Obsolete API names, obsolete config names, and rejected terminology from the just-finished iteration.

Rework Stop Gate

If the same concern has been revised five or more times, pause and tell the user:

This point has been revised at least five times. The contract still looks unstable; I recommend pausing implementation and realigning responsibility boundary, necessity, and acceptance criteria before more edits.

Do not keep pushing through by inventing more implementation changes.

Output Shape

Use this order:

  1. Findings by severity, with file references when reviewing code.
  2. Same-class scan result.
  3. Required fixes or proposed simplifications.
  4. Norms checked.
  5. Verification already run or still needed.

Keep the report concise. Do not turn this skill into a full code review unless the user asked for a review.

安全使用建议
Treat this as an incomplete review: VirusTotal telemetry was clean, but the workspace inspection commands failed with a sandbox error, so installation should wait for a successful artifact review.
能力评估
Purpose & Capability
No supplied artifact evidence was available to show a purpose mismatch or unsafe capability.
Instruction Scope
No supplied artifact evidence was available to show hidden, overriding, or unsafe runtime instructions.
Install Mechanism
No supplied artifact evidence was available to show a risky install mechanism.
Credentials
No supplied artifact evidence was available to show disproportionate environment access.
Persistence & Privilege
No supplied artifact evidence was available to show persistence, privilege abuse, or credential misuse.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install implementation-self-review
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /implementation-self-review 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
This update adds new review gates for error semantics, observability, configuration handling, state/concurrency, and detailed planning convention. - Introduced Error Semantics, Observability, Configuration & Secret, State/Concurrency, and Test Intent gates for more thorough implementation self-reviews. - Expanded Iteration Scope Gate with a default documentation directory structure and clarified design history handling. - Outlined explicit documentation file roles for planning and reviewing features. - Retained all previous review gates and the step-by-step review workflow. - No code or functional changes; documentation update only.
v1.0.0
Initial release of the implementation-self-review skill. - Provides a structured self-review process for new or changed implementations, focusing on responsibility boundaries, necessity, file organization, defensive coding, naming clarity, iteration discipline, and rework patterns. - Includes clear review gates covering placement, necessity, boundaries/defense, naming, same-class scan, iteration scope, and rework stop checks. - Outlines concise output expectations: list concrete findings, scan for similar issues, propose fixes/simplifications, confirm norms checked, and note verification needs. - Ensures rework is paused after repeated revisions and steers users toward responsibility boundary realignment when contracts remain unstable.
元数据
Slug implementation-self-review
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

implementation-self-review 是什么?

Use when reviewing a new or changed implementation for responsibility boundaries, file organization, overengineering, defensive branches, naming clarity, rep... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 119 次。

如何安装 implementation-self-review?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install implementation-self-review」即可一键安装,无需额外配置。

implementation-self-review 是免费的吗?

是的,implementation-self-review 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

implementation-self-review 支持哪些平台?

implementation-self-review 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 implementation-self-review?

由 xiluoduyu(@xiluoduyu)开发并维护,当前版本 v1.0.1。

💬 留言讨论