AgentSkillsCN

implement

根据提示或方案文件,按照仓库内的操作指引实施功能开发或问题修复,并对改动进行充分验证。

SKILL.md
--- frontmatter
name: implement
description: Implement a feature or fix based on a prompt or a plan file, following repo instructions and validating changes.

Implement

Purpose

Turn a prompt or plan file into a correct, verified implementation.

Input handling

  • Accept either:
    • A direct prompt describing the requested change, or
    • A file path pointing to a plan.
  • If the input is a path and the file exists, read it and treat its contents as the plan.
  • Otherwise, treat the input as a prompt.

Standard implementation workflow

  1. Read repo instructions
  • Check for docs/overview.md and read it if present.
  • Read AGENTS.md and ~/.codex/docs/style-guide.md.
  1. Plan before implementing
  • If given a plan file, summarize the plan and confirm it is executable.
  • If given a prompt, draft a concise plan and confirm it before coding.
  1. Implement
  • Make the minimal correct change set.
  • Follow repo idioms and TypeScript discipline (no any, no unsafe casts).
  • Use function name() {} syntax for named functions.
  1. Tests
  • Add TypeScript tests for happy paths and key edge cases.
  • Reuse existing test setup patterns when possible.
  1. Validate
  • Run linter, typecheck, and tests as required by the repo.
  • Prefer non-watch/CI-safe invocations to avoid hanging:
    • Use CI=1 npm test (or npm test -- --run) for Vitest to run once.
    • Use NODE_ENV=production npm run typescript to keep blueprint watching disabled.
  1. Verify the goal
  • Add an explicit verification step that confirms the requested behavior is achieved.
  • Use tests when possible; otherwise describe a concrete manual or UI-driven verification.
  1. Report
  • Summarize changes, tests run, and any follow-ups.
  • Append a concise summary and actionable notes to factory/context.md.

Output format

  • Short summary of actions taken.
  • List of changes with file paths.
  • Tests run (or "Not run").
  • Any remaining risks or open questions.