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

write-product-spec

GitHub

用于为仓库中重要的用户面向功能编写产品规格说明书。聚焦于行为、UX和验证,确保需求无歧义以指导实现。包含摘要、问题、目标、非目标及详细用户体验描述等结构,并规范了Figma参考的引用方式。

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

触发场景

用户请求编写产品规格书或PRD 在实现前定义功能行为 功能重大或行为模糊需要书面规范

安装

npx skills add Terry-Mao/AICodingFlow --skill write-product-spec -g -y
更多选项

非标准路径

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

不安装直接使用

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 product spec for a significant user-facing feature in this repository, focused on detailed behavior and validation. Use when the user asks for a product spec, desired behavior doc, or PRD, wants to define feature behavior before implementation, or when the feature is substantial or behaviorally ambiguous enough that a written spec would improve implementation or review."
}

write-product-spec

Write a product spec for a significant feature in this repository.

Overview

This skill is the local shared product-spec workflow for this repository. Local wrappers and workflows depend on it directly as the canonical product-spec contract.

The product spec should make the desired behavior unambiguous enough that an agent can implement it correctly and avoid regressions while making changes. Focus on product behavior, UX, invariants, and validation rather than implementation details.

Write specs into source control under a repository-appropriate path within specs/.

If a repo-specific wrapper skill or explicit prompt provides an exact output path, follow that path. Otherwise prefer a clear structure such as:

  • specs/<topic>/product.md

Before writing

Gather the minimum context needed to write the spec:

  • the feature summary
  • target users or workflow
  • key user-facing behaviors and constraints
  • known edge cases
  • expected verification plan
  • any tracker or issue identifier when the surrounding workflow depends on one

When the request leaves important details unspecified, use ask_user_question to gather the missing context instead of guessing.

If the feature includes UI or interaction changes, ask whether there is a Figma mock.

Figma guidance

If a Figma mock exists, include a link to it in the spec.

If the user does not provide one and the session is interactive, ask whether a mock exists. Otherwise, note the absence and continue. Do not silently omit design context.

For example, include a short note such as:

  • Figma: <link>
  • Figma: none provided

No Figma mock is acceptable, but the absence should be explicit.

What to write

Use the following structure:

1. Summary

Describe the feature in a few sentences and state the desired outcome.

2. Problem

Explain what user or product problem is being solved.

3. Goals

List the outcomes this change must achieve.

4. Non-goals

List adjacent ideas or follow-ups that are explicitly out of scope.

5. Figma / design references

Link the Figma mock if it exists, or explicitly note that none was provided.

6. User experience

Describe expected behavior in concrete, exhaustive, testable terms. Aim for a complete textual description of the user-visible behavior that reviewers can verify through tests, screenshots, videos, and code review. Be explicit about:

  • default behavior
  • state transitions
  • edge cases
  • empty states
  • error states
  • keyboard or interaction expectations when relevant

When useful, write this section as a list of invariants or behavior rules rather than broad prose. Prefer too much relevant detail over vague summary language.

7. Success criteria

Define in high detail what will be true if the feature works correctly. Each criterion should map to observable user behavior and be specific enough that an implementer or reviewer can verify it with tests and by inspecting the code. Prefer concrete, observable outcomes over vague quality claims, and include important states, transitions, and edge cases when they matter to correctness.

8. Validation

Describe how the behavior should be verified. Prefer checks that can map cleanly to tests, videos, screenshots, or manual validation steps.

9. Open questions

Call out unresolved product decisions rather than burying them in the narrative.

Writing guidance

  • Prefer concrete behavior over aspirational wording.
  • Write for the implementer and reviewer, not for marketing.
  • Make the spec precise enough that an agent can follow it.
  • Capture invariants that must not regress.
  • Include edge cases that are easy to miss in implementation.
  • Avoid implementation details unless they are unavoidable for understanding the UX.

When to avoid this skill

Skip the product spec when the change is small enough that the overhead outweighs the value. As a rough guideline, specs are most useful for significant features rather than small edits.

Keep the spec current

If the implementation changes the intended product behavior, update the checked-in product spec so it still matches what ships.

Approved specs may be implemented in the same PR as the code. As implementation evolves, keep updates to the product spec, tech spec, and code in that same PR when practical.

Update the product spec when any of these change:

  • user-facing behavior
  • UX details
  • success criteria
  • validation expectations

For large features, the implementer may optionally keep a DECISIONS.md file that summarizes concrete product and technical decisions made during spec and implementation work. This is optional and should be offered when it would help keep the work coherent.

Related Skills

  • implement-specs
  • write-tech-spec
  • spec-driven-implementation

版本历史

  • e53c5ac 当前 2026-07-24 11:36

同 Skill 集合

.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

元信息

文件数
0
版本
e53c5ac
Hash
b4e2d8ce
收录时间
2026-07-24 11:36

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-07 18:09
浙ICP备14020137号-1 $访客地图$