Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

prd-to-engineering-specPRD 至工程规范

Agent Skill

prd-to-engineering-spec 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,011

周安装

43

GitHub Stars

47

下载量

354
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:prd-to-engineering-spec(PRD 至工程规范)
来源仓库:https://github.com/okwinds/miscellany
仓库路径:skills/prd-to-engineering-spec
安装命令:
npx skills add https://github.com/okwinds/miscellany --skill prd-to-engineering-spec
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/okwinds/miscellany --skill prd-to-engineering-spec

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。

  • 适用于需要查询项目状态、整理变更、辅助创建或检查协作事项的场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装使用。
  • 涉及写入操作时应确认 token 权限、目标仓库范围和用户授权。
  • prd-to-engineering-spec 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

PRD to Engineering Spec

Overview

Transform product requirements into engineering specifications so complete that developers can implement the entire system step-by-step without ambiguity, and the resulting system can be replicated or migrated without information loss.

Skill Workflow Context

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│ prd-writing-    │────►│ prd-to-         │     │ reverse-        │
│ guide           │     │ engineering-    │     │ engineering-    │
│ Write PRD       │     │ spec            │     │ spec            │
│                 │     │ [THIS SKILL]   │     │ Code→Spec       │
└─────────────────┘     └─────────────────┘     └─────────────────┘
         │
         ▼  For AI Agent products:
┌─────────────────┐
│ ai-agent-prd    │────► This skill handles Agent PRD conversion too
└─────────────────┘

Input: Complete PRD (from prd-writing-guide or ai-agent-prd) Output: Engineering specifications at replicability-grade detail

Core Principle: Validate PRD first, design second. Incomplete requirements → incomplete specs.

Quick Start

  1. Validate PRD against prd-validation-checklist.md
  2. For Agent systems, also validate with agent-system-spec.md
  3. Generate defect report; do NOT proceed until all ❌ resolved
  4. Run bash scripts/generate_spec_skeleton.sh
  5. Apply the Engineering Lenses to every component
  6. Fill specs using spec-templates.md
  7. Validate with bash scripts/validate_spec.sh

The Engineering Lenses

Apply these seven lenses to every component during Phases 2-3. They are the engineering equivalent of prd-writing-guide's Seven Lenses.

┌──────────────────────────────────────────────────────────────────┐
│                    The Engineering Lenses                         │
├──────────────────────────────────────────────────────────────────┤
│                                                                  │
│  1. ARCHITECTURE  How does it fit? Layers, modules, comms.       │
│  2. DATA          How modeled, validated, stored, migrated?      │
│  3. CONTRACT      Interfaces? Versioning? What breaks?           │
│  4. FAILURE       How does it fail? Detect, recover, cascade?    │
│  5. SECURITY      Auth, authz, encryption, audit, secrets?       │
│  6. OPERATIONS    Deploy, configure, monitor, scale, rollback?   │
│  7. REPLICABILITY All configs, deps, assumptions documented?     │
│                                                                  │
└──────────────────────────────────────────────────────────────────┘

For every major component (service, module, API, data store, integration):

LensKey QuestionSpec Output
ArchitectureWhere does it sit? What depends on it?Module diagram, dependency graph
DataWhat data does it own? Shape? Consistency?Entity definitions, schemas
ContractWhat's the interface? What can't change?API specs, event schemas
FailureWhat can go wrong? What then?Error catalog, retry policies
SecurityWho accesses? How protected?Auth rules, encryption spec
OperationsHow deployed and observed?Config, metrics, alerts
ReplicabilityAny implicit knowledge not captured?Env setup, all dependencies

Workflow

Phase 0: PRD Validation ──────► Defect Report ──────► PRD Complete
         ↓
Phase 1: Decomposition ──► User Stories, Requirements Matrix
         ↓
Phase 2: Technical Design (Interactive) ──► Decision Log
         ↓
Phase 3: Detailed Specs ──► Engineering Lenses on every component
         ↓
Phase 4: Test Specs ──► Unit, Integration, E2E, Acceptance
         ↓
Phase 5: Task Breakdown ──► Tasks, Milestones, Risks
         ↓
Phase 6: Assembly & Replicability Review

Phase 0: PRD Validation

Goal: Ensure PRD completeness before technical work begins.

  1. Review against prd-validation-checklist.md
  2. Agent systems: Also validate against agent-system-spec.md §PRD Validation
  3. Mark: ✅ Present | ⚠️ Unclear | ❌ Missing
  4. Do NOT proceed until all ❌ resolved

Defect Report Template

# PRD Validation Report
**PRD:** [title] | **Status:** [PASS / NEEDS REVISION]

## Critical Gaps (Must Fix)
| # | Category | Issue | Impact | Resolution |
|---|----------|-------|--------|------------|

## Warnings (Should Clarify)
## Assumptions (Document explicitly with risk-if-wrong)

Phase 1: Requirements Decomposition

Goal: Break PRD into structured, implementable requirements.

User Story Format

## US-001: [Title]
**Priority:** P0/P1/P2
As a [role], I want [action], so that [benefit].
**Acceptance Criteria:** (Given/When/Then)
**Business Rules:** BR-001, BR-002
**Dependencies:** US-002

Requirements Matrix

IDRequirementSourceTypePriority
FR-001[description]US-001CRUD/LogicP0
NFR-001API response <200ms P95PRD §7PerformanceP0

Phase 2: Technical Design (Interactive)

Goal: Make architectural decisions with explicit user confirmation.

Decision Process

For each significant decision:

  1. Present 2-3 options with pros, cons, effort, risk, and operational cost
  2. Recommend with rationale
  3. Wait for user confirmation
  4. Record in Decision Log

Decision Log

IDDecisionOptionsChosenRationaleTrade-offsDate
D-001DatabasePG, MongoPostgreSQLACID, JSON supportHigher ops complexity[date]

Tech Stack

ComponentChoiceVersionRationaleAlternatives
Language
Framework
Database
Cache
Queue
Infra

Phase 3: Detailed Specification

Goal: Specs detailed enough for implementation without questions. Apply Engineering Lenses to every component.

Templates: spec-templates.md, feature-spec-template.md

3.1 Data Model

Per entity: purpose, all fields (type, nullable, default, constraints, description), indexes with rationale, relationships with cascade rules, validation rules, lifecycle (create/update/delete behavior).

3.2 API Specification

Per endpoint: method + path, auth/authz, request (params, body, validation rules), response (structure, all status codes with conditions), business logic steps, side effects, rate limits, idempotency.

3.3 Business Logic

Per complex rule: interface (inputs/outputs/errors), algorithm in pseudocode, decision table for branching, concrete edge case examples, transaction boundaries, rollback behavior.

3.4 Security Architecture ⭐

See security-spec-guide.md. Specify:

AreaMust Document
AuthenticationProtocol (OAuth2/JWT/session), token lifecycle, refresh flow, MFA
AuthorizationPermission model (RBAC/ABAC), role-permission matrix, enforcement points
Data SecurityClassification levels, encryption (at-rest, in-transit), PII handling
Input SecurityValidation strategy, injection prevention, file upload rules
AuditEvents to log, format, retention period, tamper protection
SecretsStorage method, rotation policy, access control

3.5 Operations & Deployment ⭐

See operations-spec.md. Specify:

AreaMust Document
EnvironmentsDev, staging, prod differences; how to provision
DeploymentCI/CD pipeline, container spec, rollout strategy
ConfigurationEvery env var / config param with type, default, description, allowed values
MonitoringKey metrics, alert thresholds, dashboard definitions
LoggingFormat, levels, correlation IDs, PII redaction
ScalingTriggers, resource limits, auto-scale rules
RecoveryBackup schedule, RTO/RPO, failover procedure, data restore process

3.6 AI/Agent Components

For AI features: ai-feature-spec.md For Agent systems: agent-system-spec.md, covering:

  • Agent orchestration (reasoning loop, tool dispatch, state management)
  • System prompt as versioned artifact (with testing strategy)
  • Skills/Tools registration and dispatch mechanism
  • Memory system (working, session, long-term storage design)
  • RAG pipeline (embedding → chunking → indexing → retrieval → reranking)
  • Evaluation infrastructure and continuous feedback loops
  • Cost model per interaction

3.7 Migration & Compatibility

If replacing existing system. See spec-templates.md §Migration:

  • Data migration strategy (ETL pipeline, validation steps, rollback)
  • API backward compatibility (versioning scheme, deprecation timeline)
  • Feature parity matrix (old → new mapping, intentional gaps)
  • Cutover plan (strategy, rollback trigger, coexistence period)

Phase 4: Test Specification

Goal: Tests that verify all requirements are met.

Traceability Matrix

RequirementUnitIntegrationE2EAcceptancePerformanceSecurity
FR-001UT-001IT-001E2E-001AT-001--
NFR-001----PERF-001-

Test Types

Unit: Per function—happy path, validation, edge cases, error handling. Integration: Module interactions—API contracts, DB operations, external services. E2E: Complete user journeys—critical paths with variations. Acceptance: Given/When/Then—maps to acceptance criteria. Performance: Load/stress under specified conditions—verify NFRs. Security: Auth bypass, injection, permission escalation—verify security spec.

Templates in spec-templates.md.


Phase 5: Task Breakdown

Task Template

## TASK-001: [Title]
**Implements:** FR-001, US-001 | **Estimate:** 4h
**Description:** [what to do]
**Done Criteria:** [how to verify]
**Dependencies:** TASK-000 | **Blocks:** TASK-002

Milestones

MilestoneTasksTargetDeliverableVerification
M1: Data001-003[date]Schema + migrationsRuns clean
M2: API004-008[date]Endpoints + testsIntegration tests pass
M3: Security009-011[date]Auth + auditSecurity review pass
M4: Deploy012-014[date]CI/CD + monitoringHealth checks green

Risk Register

RiskProbImpactMitigationContingency
[risk]H/M/LH/M/L[prevent][if happens]

Phase 6: Assembly & Replicability Review ⭐

Cross-Reference Check

  • Every user story → functional requirement(s)
  • Every requirement → technical spec section(s)
  • Every spec → test case(s)
  • Every test → traces back to requirement
  • All external dependencies documented with versions

Replicability Verification

The bar: Could a competent team rebuild this system from the spec alone?

  • Environment: All dependencies listed with pinned versions. Build + run commands.
  • Configuration: Every env var, feature flag, config param documented (type, default, range).
  • Data: Schema definitions, seed data specs, migration scripts referenced.
  • Infrastructure: Deploy architecture, container specs, resource requirements.
  • Integrations: Every external dep has connection details, auth, failure handling.
  • Business Logic: No implicit knowledge—every "obvious" rule written down.
  • Security: Auth flow, permissions, encryption, secrets handling fully specified.
  • Monitoring: Metrics, alerts, dashboards defined—operable from day one.
  • No TODOs/TBDs: Every placeholder resolved.

Run: bash scripts/validate_spec.sh <spec_root>


Output Structure

engineering-spec/
├── 00_Overview/
│   ├── SUMMARY.md, REQUIREMENTS_MATRIX.md, DECISION_LOG.md, TECH_STACK.md
├── 01_Requirements/
│   ├── USER_STORIES.md, FUNCTIONAL_REQS.md, NON_FUNCTIONAL_REQS.md
├── 02_Technical_Design/
│   ├── ARCHITECTURE.md, DATA_MODEL.md, API_SPEC.md
│   ├── BUSINESS_LOGIC.md, AI_COMPONENTS.md (if applicable)
├── 03_Security/
│   ├── AUTH_DESIGN.md, DATA_SECURITY.md, AUDIT_SPEC.md
├── 04_Operations/
│   ├── DEPLOYMENT.md, CONFIGURATION.md, MONITORING.md, RUNBOOK.md
├── 05_Testing/
│   ├── TEST_PLAN.md, ACCEPTANCE_TESTS.md
├── 06_Implementation/
│   ├── TASK_BREAKDOWN.md, MILESTONES.md, RISKS.md, MIGRATION.md
└── SPEC_INDEX.md

Resources

  • scripts/generate_spec_skeleton.sh - Create output structure
  • scripts/validate_spec.sh - Validate spec completeness
  • references/prd-validation-checklist.md - PRD validation checklist
  • references/spec-templates.md - Specification templates
  • references/feature-spec-template.md - Feature spec template
  • references/ai-feature-spec.md - AI feature specification
  • references/agent-system-spec.md - Agent system engineering spec ⭐
  • references/security-spec-guide.md - Security architecture spec ⭐
  • references/operations-spec.md - Operations & deployment spec ⭐
  • references/worked-example.md - End-to-end worked example (HelpBot PRD→Spec) ⭐

Critical Reminders

  1. Validate PRD first — Incomplete requirements = incomplete specs
  2. Apply Engineering Lenses — Every component through all 7 lenses
  3. Confirm decisions — Document rationale, not just choices
  4. Trace everything — Requirement → Spec → Test → Requirement
  5. Security is architecture — Not a checkbox; design it explicitly
  6. Operations from day one — Deploy/monitor/debug specs are not optional
  7. Replicability is the bar — If it can't be rebuilt from the spec, it's incomplete

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.94%
按下载量换算134

Claude

31.5%
按下载量换算112

Cursor

18.86%
按下载量换算67

Gemini CLI

9.02%
按下载量换算32

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills