Agent SkillsTerry-Mao/AICodingFlow › write-product-spec

write-product-spec

GitHub

用于为重大或模糊功能编写行为导向的产品规格说明书,明确可观察的用户交互、状态转换及验收标准,以减少实现歧义。

.agents/skills/write-product-spec/SKILL.md Terry-Mao/AICodingFlow

Trigger Scenarios

需要定义新功能的行为契约 功能范围或风险较大需明确验收标准 存在用户交互或状态转换需规范化

Install

npx skills add Terry-Mao/AICodingFlow --skill write-product-spec -g -y
More Options

Non-standard path

npx skills add https://github.com/Terry-Mao/AICodingFlow/tree/main/.agents/skills/write-product-spec -g -y

Use without installing

npx skills use Terry-Mao/AICodingFlow@write-product-spec

指定 Agent (Claude Code)

npx skills add Terry-Mao/AICodingFlow --skill write-product-spec -a claude-code -g -y

安装 repo 全部 skill

npx skills add Terry-Mao/AICodingFlow --all -g -y

预览 repo 内 skill

npx skills add Terry-Mao/AICodingFlow --list

SKILL.md

Frontmatter
{
    "name": "write-product-spec",
    "description": "Write a behavior-focused product spec for a significant or ambiguous feature in this repository."
}

write-product-spec

Write the product contract an implementer and reviewer can use to agree on observable behavior. This is a local shared skill; wrappers may provide exact inputs and output paths that take precedence.

Decide and prepare

Use it when behavior, scope, risk, or user impact is substantial enough that a checked-in spec will reduce ambiguity. Skip it for small fixes, straightforward refactors, and narrow low-risk changes.

Specs normally live under specs/. Without an explicit wrapper or prompt path, use specs/<topic>/product.md; preserve this repository's lowercase filenames and issue-backed layout. Do not create an issue or other tracker item unless the user explicitly asks.

Gather only the feature summary, affected users/consumers, desired behavior, edge cases, validation needs, and relevant issue context. Here, “user” may be an end user, maintainer, operator, API caller, contributor, or agent consuming the designed surface. Ask about missing product decisions instead of guessing.

For UI or interaction work, ask whether a Figma mock exists before drafting behavior. Include its link, or explicitly write Figma: none provided; skip this for non-visual features.

Write the spec

Keep the spec implementation-light. Required sections are:

  1. Summary — the feature and desired outcome in 1–3 sentences.
  2. Problem — the user or product problem when it is not already obvious.
  3. Goals — observable outcomes the change must achieve.
  4. Non-goals — adjacent work that is intentionally out of scope.
  5. Figma / design references — only for visual work; include the link or explicit absence.
  6. User experience — the main contract. Prefer numbered, testable behavior invariants covering defaults, inputs, state transitions, loading/empty/error states, cancellation, stale or missing data, permissions, races, and keyboard/accessibility expectations when relevant.
  7. Success criteria — concrete outcomes a reviewer can observe; do not duplicate the behavior section with generic quality claims.
  8. Validation — how the behavior will be checked with tests or manual evidence. Keep implementation-specific test design in the tech spec too.
  9. Open questions — unresolved product decisions, preferably next to the behavior they affect.

The wrapper may require all sections above even when a standalone spec could omit an empty optional section. Do not add implementation details, file plans, or architecture here; those belong in write-tech-spec.

Right-size and maintain

Keep framing thin and spend detail on behavior. A small feature is often about 30–60 lines, a medium feature about 80–150 lines, and a complex feature may be longer when its edge cases earn the space. Length is a heuristic, not a target.

When implementation changes user-facing behavior, update the checked-in product.md in the same change when practical. An optional DECISIONS.md can record major product decisions for large features, but is not required.

Related skills: write-tech-spec, spec-driven-implementation, and implement-specs.

Version History

  • d3fef11 Current 2026-09-03 03:52

    精简本地开发与 spec 工作流指引,优化结构清晰度

  • e53c5ac 2026-07-24 11:36

Same Skill Collection

.agents/skills/bootstrap-issue-config/SKILL.md
.agents/skills/create-issue/SKILL.md
.agents/skills/create-pr/SKILL.md
.agents/skills/diagnose-ci-failures/SKILL.md
.agents/skills/git-branch/SKILL.md
.agents/skills/git-commit/SKILL.md
.agents/skills/git-push/SKILL.md
.agents/skills/git-worktree/SKILL.md
.agents/skills/pr-walkthrough/SKILL.md
.agents/skills/resolve-merge-conflicts/SKILL.md
.agents/skills/review-pr-local/SKILL.md
.agents/skills/review-spec-local/SKILL.md
.agents/skills/spec-driven-implementation/SKILL.md
.agents/skills/write-tech-spec/SKILL.md
.github/skills/check-impl-against-spec/SKILL.md
.github/skills/create-product-spec/SKILL.md
.github/skills/create-tech-spec/SKILL.md
.github/skills/dedupe-issue-repo/SKILL.md
.github/skills/dedupe-issue/SKILL.md
.github/skills/implement-issue/SKILL.md
.github/skills/implement-specs/SKILL.md
.github/skills/product-change-report/SKILL.md
.github/skills/product-docs-sync/SKILL.md
.github/skills/product-wiki/SKILL.md
.github/skills/review-pr-repo/SKILL.md
.github/skills/review-pr/SKILL.md
.github/skills/review-spec-repo/SKILL.md
.github/skills/review-spec/SKILL.md
.github/skills/security-review-pr/SKILL.md
.github/skills/security-review-spec/SKILL.md
.github/skills/triage-issue-repo/SKILL.md
.github/skills/triage-issue/SKILL.md
.github/skills/update-dedupe/SKILL.md
.github/skills/update-pr-review/SKILL.md
.github/skills/update-triage/SKILL.md

Metadata

Files
0
Version
d3fef11
Hash
1db722c2
Indexed
2026-07-24 11:36

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-10 02:09
浙ICP备14020137号-1 $お客様$