code-review-and-qualit…
Reviews a code change for correctness, security, maintainability, architecture, performance, and verification gaps, or performs a…
Decides whether a PRD is needed, drafts one from a product problem, repairs an existing PRD, or judges its split/merge boundary. Use for PRDs, product requirements, requirement specs, scope, user-visible behavior, and acceptance criteria(写 PRD、需求文档、PRD 拆分或打磨). Use hai-goal for
$ npx -y skills add hylarucoder/hai-stack --skill hai-prd --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/hai-prdContext preview
The summary Claude sees to decide when to auto-load this skill.
Decides whether a PRD is needed, drafts one from a product problem, repairs an existing PRD, or judges its split/merge boundary. Use for PRDs, product requirements, requirement specs, scope, user-visible behavior, and acceptance criteria(写 PRD、需求文档、PRD 拆分或打磨). Use hai-goal for
name: hai-prd description: | Decides whether a PRD is needed, drafts one from a product problem, repairs an existing PRD, or judges its split/merge boundary. Use for PRDs, product requirements, requirement specs, scope, user-visible behavior, and acceptance criteria(写 PRD、需求文档、PRD 拆分或打磨). Use hai-goal for execution phases, hai-architecture for technical design, entity-model-auditor for field placement, and document-audit skills when the task is consistency diagnosis rather than product shaping.
For Chinese readers, see `SKILL.zh_CN.md`. The English `SKILL.md` is the execution source of truth.
Handle all PRD-related work: deciding whether a PRD is even needed, choosing PRD granularity, splitting or merging PRDs, drafting a PRD from a product problem, and refining an existing one.
The non-obvious framing: a PRD is not the default artifact. Not every idea, field, API, configuration change, or technical decision earns one. Pick the mode that fits the request and do not wrap work in a PRD when there is no product boundary or acceptance to prove.
A PRD is a product argument with verifiable acceptance — not a feature list. Three rules carry the rest:
or product boundary, and acceptance criteria that prove it shipped.
independent acceptance — not technical layers, teams, or files.
it before polishing local sentences; edit an existing PRD as a system where goal, scope, behavior, acceptance, risks, and rollout must agree.
First decide the artifact type — a PRD is one option among several:
| Situation | Better artifact | |-----------|-----------------| | User or business behavior changes and goal, scope, and acceptance need alignment | PRD | | Execution goal, phases, and verification are the main need | `hai-goal` | | Architecture, module boundaries, or technical tradeoffs are the main need | `hai-architecture` | | The main question is whether the idea is worth doing at all | `hai-idea` | | The work is a code task, bugfix, or test-first implementation | `hai-tdd` or task note | | The work is documentation consistency auditing | `hai-audit-docs` |
Ask:
If most answers are no, do not force a PRD. When auditing a *set* of PRDs, also check for duplicate boundaries, circular dependencies, or broken user journeys across them.
Turn a feature idea or product problem into PRD-level requirements:
1. **Gather context.** Target user, product surface, current behavior, desired outcome, constraints, assumptions; plus existing PRDs, docs, screenshots, user flows, issues, data, or adjacent specs. 2. **Frame the requirement.** Write the problem in product language; define the target outcome and non-goals; identify the user journey or workflow boundary; separate facts, assumptions, and open questions. 3. **Shape scope.** Decide what belongs in this PRD versus another PRD, design doc, goal, or task. Do not bundle unrelated cleanup, platform work, or refactors unless they directly affect product behavior or acceptance. 4. **Define behavior and acceptance.** Describe expected behavior by scenario; add observable acceptance criteria; include edge cases, failure states, permissions, empty states, data dependencies, and rollout only when relevant.
Refine an existing PRD as a whole product argument:
1. **Read the full document first.** Identify title, target user, goal, journey, scope, non-goals, acceptance, risks, and open questions; mark contradictions, duplication, stale sections, local patches, and unreasonable content. 2. **Diagnose document drift** using this taxonomy:
3. **Reframe before rewriting.** State the corrected target outcome and the PRD boundary; decide whether to preserve, reorganize, split, merge, or rewrite. 4. **Craft the document.** Edit directly when the user provides a file; preserve useful content but move it to the right section; remove unsupported, duplicated, obsolete, or out-of-scope content; explain why removal beats rewriting or moving when content is deleted.
Judge PRD granularity by user mental model and independent acceptance, not technical modules or teams. Run the six tests — this is the decision core:
| Test | Question | Signal | |------|----------|--------| | Press Release | Can one sentence express one clear user value? | Multiple unrelated values lean split | | Independent Value | Does this PRD deliver value on its own? | Independent value can split; no value leans merge | | Independent Acceptance | Can it be accepted independently? | Independent acceptance can split | | Domain Language | Does it share the same core entity, terminology, and lifecycle? | Same entity leans merge; different contexts lean split | | User Journey | Does splitting break the user journey? | Broken jou
让 Coding Agent 把软件迭代做对:从真实问题出发,完成改动,用证据确认结果。 支持:大多数能读取 Skills(SKILL.md)的 Coding Agent,例如 Claude Code、Codex。 hai-stack 由 @海拉鲁编程客 创建。它把一次软件迭代拆成判断、设计、动手、确认、沉淀五步,每一步都有对应的技能。
Reviews a code change for correctness, security, maintainability, architecture, performance, and verification gaps, or performs a…
Audits an entity model field by field: what should exist, what exists now, where each value belongs (column, config, computed…
Challenges an overly conservative, incremental, or compatibility-led proposal with a bold target model, a concrete…
Pressure-tests an ambitious proposal and returns a landing judgment, one minimum viable proof, explicit cuts, success/failure…
Investigates architecture and change complexity from repository runtime paths to bounded modules, React components, and shared…
Produces a ready-to-run ast-grep command or reusable YAML lint/codemod rule, validated against positive and negative fixtures.…