AgentSkillsCN

post-edit-checks

在代码修改完成后,为 cork-core 仓库运行编辑后静态分析与测试。当完成一项修改代码的任务后,您需要运行 AGENTS.md 检查任务(格式化、 lint、测试、构建),修复所有失败项,并持续运行直至达到干净状态。

SKILL.md
--- frontmatter
name: post-edit-checks
description: Run post-edit static analysis and tests for the cork-core repo after code changes. Use when a code-modifying task is finished and you need to run AGENTS.md check tasks (make fmt, lint, test, build), fix any failures, and rerun until clean.

Post Edit Checks

Overview

Enforce the cork-core post-edit checklist by running the required cargo/make checks in a deterministic order and addressing any failures.

Workflow

  1. Confirm you are at the repository root (where Cargo.toml and Makefile exist).
  2. Run the checks in this order:
    • make fmt - Format code with cargo fmt
    • make lint - Check formatting and run clippy
    • make test - Run all tests
    • make build - Build release binary
  3. If any step fails:
    • Read the error output.
    • Fix the underlying issue.
    • Re-run the failed command, then continue with the remaining steps.
  4. Report results and any fixes applied.
  5. Update task list (docs/tasks.md) if a task was completed.

Definition of Done

Per docs/dod.md, all tasks must satisfy:

  • cargo build passes (stable)
  • cargo fmt is applied
  • cargo clippy -- -D warnings passes
  • Relevant unit/integration tests added and cargo test passes
  • Public API changes documented in docs/

Resources

scripts/

Use scripts/run_checks.sh to run the standard sequence.