用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/diegosouzapw/awesome-omni-skill --skill write-beads命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | write-beads |
| description | Convert a Technical Design Document into a BEADS.md file for agent implementation |
Convert a Technical Design Document (TDD) into a BEADS.md markdown file containing atomic implementation beads.
This skill outputs a markdown file only. To create actual beads in bd, use /create-beads after review.
Use when you have:
You are a task decomposition engine preparing work for autonomous coding agents.
A bead is the smallest unit of work that:
Before writing a bead's Context and Specification sections, verify the following. If you cannot verify, mark with UNVERIFIED.
Output a SINGLE markdown file (BEADS.md) that can be directly imported into bd:
bd create -f docs/plans/<project>/BEADS.md
The output file MUST have these sections in order:
bd dep add commands## section per beadEach bead MUST use an H2 title plus H3 metadata sections that bd create -f can reliably ingest.
## {ID}: {Title}
### Priority
P0|P1|P2
### Type
task|bug|feature|decision
### Labels
{project-label}, {phase-label}
### Blocked by
{ID}, {ID} (optional; informational only)
### Parallelism
parallelizable|requires-sequence|decision-gated
(Optional. Hints for swarm orchestrator: can this run with other beads?)
### Confidence
verified|assumed|unverified
(Optional. How confident is this specification? Unverified = likely needs iteration)
### Context
Why this exists, what already exists, what this creates/modifies.
### Specification
Exact requirements, inputs, outputs, interface contracts, error handling.
### Files (optional but recommended)
- Create: {filepaths}
- Modify: {filepaths}
- Reference: {filepaths}
### Common Failure Modes (optional)
What implementers commonly get wrong.
### Acceptance Criteria
- [ ] Specific verifiable condition
- [ ] Passes: {test command}
CRITICAL FORMAT RULES:
## (H2) anywhere except bead titles - bd create -f treats EVERY H2 as a bead--- block at top) - the plan validator rejects it**Blocked by:** for bd dependencies (bd cannot resolve symbolic deps during batch creation)bd dep add scriptbd update --blocked-by (unsupported by bd CLI)COMMON MISTAKES TO AVOID:
# WRONG - Will create unwanted beads and fail validation:
---
schemaVersion: 1
artifactType: beads
---
# Project Name
## Summary <-- WRONG: H2 creates a bead named "Summary"
## Dependency Graph <-- WRONG: H2 creates a bead named "Dependency Graph"
## CORE-01: Real bead
...
# CORRECT - Only beads use H2:
# Project Name
**Summary:** Brief description here.
### Dependency Graph <-- H3 is safe, not parsed as bead
\`\`\`mermaid
...
\`\`\`
---
## CORE-01: Real bead <-- Only beads get H2
...
After the summary tables, include a complete executable script that adds all dependencies.
bd cannot resolve symbolic dependencies during batch creation, so dependencies MUST be added after beads are created.
## Add Dependencies
After creating beads, run this script to add all dependencies:
\`\`\`bash
#!/bin/bash
# Auto-generated dependency script for {project-name}
# Usage: bd create -f BEADS.md && bash add-deps.sh
set -e
# Get bead ID mapping
echo "Fetching bead IDs..."
declare -A IDS
while IFS=': ' read -r key value; do
IDS[$key]=$value
done < <(bd list -l {label} --json | jq -r '.[] | "\(.title | split(":")[0]): \(.id)"')
# Add dependencies (child depends on parent)
bd dep add ${IDS[CHILD-01]} ${IDS[PARENT-01]}
bd dep add ${IDS[CHILD-02]} ${IDS[PARENT-01]}
bd dep add ${IDS[CHILD-02]} ${IDS[PARENT-02]}
# ... continue for all dependencies
echo "Dependencies added. Syncing..."
bd sync
\`\`\`
The script MUST be complete and runnable - include every dependency from the graph.
Use category prefixes:
SETUP-NN - Foundation/configurationSCHEMA-NN - Database schemas/migrationsCORE-NN - Core logic/utilitiesJOB-NN - Background jobsAPI-NN - API endpointsUI-NN - User interfaceTEST-NN - TestsINTEG-NN - Integration workDOCS-NN - DocumentationCLEAN-NN - Cleanup/refactoringDECISION-NN - Decisions requiring input (see DECISION Beads section)CRITICAL: Unresolved decisions MUST NOT be left implicit in implementation beads.
When to create a DECISION bead:
DECISION bead structure:
## DECISION-NN: {Decision Title}
### Priority
P0 (decisions are always high priority - they block work)
### Type
decision
### Labels
{project-label}, decision-gate
### Options
1. **Option A**: Description, pros, cons
2. **Option B**: Description, pros, cons
3. **Option C**: Description, pros, cons
### Recommendation
Recommended option with rationale (if any)
### Decision Needed By
Who/what role needs to make this decision
### Blocks
List of bead IDs that cannot proceed until this is resolved:
- CORE-02
- API-01
### Acceptance Criteria
- [ ] Decision documented in TDD/ADR
- [ ] Dependent beads updated with decision outcome
Gating rule: Any bead that references an unresolved decision MUST have that DECISION bead as a blocker. Agents CANNOT proceed with implementation until the DECISION bead is closed.
Assign phase labels based on category:
phase-0: SETUP, SCHEMA (foundation)phase-1: CORE (infrastructure)phase-2: JOB (background processing)phase-3: API (endpoints)phase-4: UI (user interface)phase-5: TEST (testing)phase-6: CLEAN, DOCS (polish)# Project Name - Implementation Beads
Derived from [TECHNICAL_DESIGN.md](./TECHNICAL_DESIGN.md).
### Dependency Graph
\`\`\`mermaid
graph TD
SETUP-01 --> DECISION-01
DECISION-01 --> CORE-01
CORE-01 --> API-01
API-01 --> UI-01
\`\`\`
### Summary
| ID | Title | Priority | Dependencies | Parallelism |
|----|-------|----------|--------------|-------------|
| SETUP-01 | Add provider constant | P0 | - | parallelizable |
| DECISION-01 | Choose caching strategy | P0 | SETUP-01 | decision-gated |
| CORE-01 | Implement client | P0 | DECISION-01 | requires-sequence |
| API-01 | Create endpoint | P1 | CORE-01 | parallelizable |
| UI-01 | Build picker UI | P1 | API-01 | parallelizable |
### Dependency Commands
After `bd create -f BEADS.md`, add dependencies:
\`\`\`bash
bd list -l my-project --json | jq -r '.[] | "\(.title | split(":")[0]): \(.id)"' | sort
# Then for each dependency:
# bd dep add <DECISION-01-id> <SETUP-01-id>
# bd dep add <CORE-01-id> <DECISION-01-id>
# bd dep add <API-01-id> <CORE-01-id>
# bd dep add <UI-01-id> <API-01-id>
\`\`\`
---
## SETUP-01: Add provider constant
### Priority
P0
### Type
task
### Labels
my-project, phase-0
### Parallelism
parallelizable
verified
All providers must be declared in a central constant before use.
Add to the PROVIDERS object in .
Modify: src/constants.ts
[ ] PROVIDERS.MYprovider'
[ ] Passes: pnpm typecheck
P0
decision
my-project, decision-gate
: Fast, distributed, but requires infrastructure
: Simple, no external deps, but no persistence
: Persistent, no infrastructure, but slower for high-throughput
Redis is recommended for production scalability, but in-memory LRU is acceptable for MVP.
Tech lead or architect
CORE-01 (client implementation depends on caching choice)
[ ] Decision documented in TDD/ADR
[ ] Dependent beads updated with decision outcome
P0
task
my-project, phase-1
DECISION-01
requires-sequence
verified
Need a typed client to interact with the external API.
Create with methods for list, get, create operations.
Handle rate limiting with exponential backoff.
Use the caching strategy chosen in DECISION-01.
Create: src/lib/my-client.ts
Reference: src/lib/other-client.ts
[ ] Client handles rate limits
[ ] All methods return typed responses
[ ] Passes: pnpm typecheck
After creating beads, run this script:
```bash #!/bin/bash set -e
declare -A IDS while IFS=': ' read -r key value; do IDS[$key]=$value done < <(bd list -l my-project --json | jq -r '.[] | "(.title | split(":")[0]): (.id)"')
bd dep add ${IDS[CORE-01]} ${IDS[SETUP-01]}
bd dep add ${IDS[API-01]} ${IDS[CORE-01]}
bd dep add ${IDS[UI-01]} ${IDS[API-01]}
bd sync echo "Done!" ```
Before finalizing, verify:
# Title, not ---###)parallelizable| TDD Section/Requirement | Covered by Bead(s) | Status |
|---|---|---|
This table should appear as an H3 section (### Coverage Matrix) after the Summary Tables. |
pnpm validate:plans --path docs/plans/<project> passesToken-efficient tracking for AI orchestration. CLI-first for status updates (~50 tokens), agent fallback for complex ops (~1KB). Use when: updating task status, querying blockers, creating progress files, validating phases.
AshAi extension guidelines for integrating AI capabilities with Ash Framework. Use when implementing vectorization/embeddings, exposing Ash actions as LLM tools, creating prompt-backed actions, or setting up MCP servers. Covers semantic search, LangChain integration, and structured outputs.
This skill should be used when solving hard questions, complex architectural problems, or debugging issues that benefit from GPT-5 Pro or GPT-5.1 thinking models with large file context. Use when standard Claude analysis needs deeper reasoning or extended context windows.
基于 SOC 职业分类