AgentSkillsCN

implement-feature

按照“探索 > 计划 > 实施 > 验证”的流程实现新功能。当需要新增功能、构建新特性,或用户提出实现某项功能的需求时,可使用此功能。

SKILL.md
--- frontmatter
name: implement-feature
description: Implement a new feature following the Explore > Plan > Implement > Verify workflow. Use when adding new functionality, building a feature, or when the user asks to implement something.
disable-model-invocation: true

Implement Feature: $ARGUMENTS

Follow this structured workflow. Do not skip phases.

Phase 1: Explore

  • Read the feature description carefully: $ARGUMENTS
  • Search the codebase for related modules, utilities, and patterns
  • Identify existing code that can be reused or extended
  • Check for similar features already implemented — learn from their patterns
  • List all files you expect to modify or create

Phase 2: Plan

  • Outline your implementation approach
  • Break the feature into small, sequential steps
  • Identify potential risks and edge cases
  • Consider how this feature interacts with existing modules
  • Verify your approach follows the architecture rules in CLAUDE.md
  • Present your plan and wait for approval before proceeding

Phase 3: Implement

For each step in your plan:

  1. Make the change (one logical change per edit)
  2. Ensure imports are correct and no circular dependencies are introduced
  3. Follow the coding conventions in CLAUDE.md
  4. Write tests alongside the implementation — not as an afterthought
  5. Keep functions small (max 50 lines) and files manageable (max 300 lines)

Phase 4: Verify

  • All new code has corresponding tests
  • All tests pass: {{TEST_COMMAND}}
  • Linting passes: {{LINT_COMMAND}}
  • Build succeeds: {{BUILD_COMMAND}}
  • No circular dependencies introduced
  • No duplicate functionality created
  • Public API changes are documented
  • Error handling is comprehensive — no silent failures