Communitygithub.com

ComeOnOliver/skillshub

将 PRD 转换为 beads(史诗 + 子任务),用于 ralph-tui 基于 beads-rust(`br` CLI)的自主执行。当你有一份 PRD 并希望使用 ralph-tui 配合 beads-rust 作为任务源时使用。触发关键词:创建 beads、将 PRD 转换为 beads、用于 ralph 的 beads、ralph beads、br beads。

skillshub 是什么?

该技能为 AI 助手提供了一套系统化的工作流程,能将产品需求文档(PRD)自动分解为可执行的、依赖关系清晰的子任务(beads),并直接集成到 ralph-tui 与 beads-rust 生态中。它首先从 PRD 中提取质量门禁(Quality Gates),然后为每个用户故事创建独立的任务 bead,并将质量门禁追加到验收标准中,确保每个任务都满足测试与检查要求。技能特别强调任务粒度的合理性——每个用户故事必须能在单个代理上下文窗口中完成,避免过大的任务导致执行失败。此外,它强制要求按依赖顺序(如 schema → 后端 → UI)排列任务,并使用 `br dep add` 命令建立显式依赖链,确保 ralph-tui 在多轮迭代中按正确顺序执行。输出结果会同步至 `.beads/` 目录,支持 Git 追踪。该技能主要面向 Claude Code 等 Agent 平台,适用于需要将高层的 PRD 转化为可追踪、可自动化执行的细粒度任务列表的开发场景。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/subsy/ralph-tui-create-beads-rust

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Ralph TUI - 创建 Beads(beads-rust)

将 PRD 转换为 beads(史诗 + 子任务),用于 ralph-tui 基于 beads-rust(br CLI)的自主执行。

注意: 本技能使用 beads-rust 的 br 命令。如果你安装的是原始 beads(bd),请改用 ralph-tui-create-beads 技能。


任务概述

获取一份 PRD(markdown 文件或文本),并使用 br 命令创建 beads:

  1. 从 PRD 中提取质量门禁
  2. 为该功能创建一个 epic bead
  3. 为每个用户故事创建 子 beads(附带质量门禁)
  4. 设置 beads 之间的 依赖关系(schema → 后端 → UI)
  5. 输出准备就绪,供 ralph-tui run --tracker beads-rust 使用

步骤 1:提取质量门禁

在 PRD 中查找“质量门禁”部分:

## 质量门禁

以下命令必须在每个用户故事中通过:
- `pnpm typecheck` - 类型检查
- `pnpm lint` - 代码检查

对于 UI 故事,还需包含:
- 使用 dev-browser 技能在浏览器中验证

提取:

  • 通用门禁: 适用于所有故事的命令(例如 pnpm typecheck)
  • UI 门禁: 仅适用于 UI 故事的命令(例如浏览器验证)

如果没有质量门禁部分: 询问用户哪些命令应该通过,或使用合理的默认值,如 npm run typecheck。


输出格式

Beads 使用 br create 命令配合 HEREDOC 语法 来安全处理特殊字符:

# 创建 epic(链接回原始 PRD)
br create --type=epic \
  --title="[功能名称]" \
  --description="$(cat <<'EOF'
[来自 PRD 的功能描述]
EOF
)" \
  --external-ref="prd:./tasks/feature-name-prd.md"

# 创建子 bead(在验收标准中附带质量门禁)
br create \
  --parent=EPIC_ID \
  --title="[故事标题]" \
  --description="$(cat <<'EOF'
[故事描述,包括包含质量门禁的验收标准]
EOF
)" \
  --priority=[1-4]

关键: 始终使用 <<'EOF'(单引号)作为 HEREDOC 分隔符。这可以防止 shell 解释描述中的反引号、$variables 和 ()。


故事大小:第一条规则

每个故事必须能在一次 ralph-tui 迭代中完成(大约一个代理上下文窗口)。

ralph-tui 每次迭代都会启动一个全新的代理实例,且没有之前工作的记忆。如果故事太大,代理会在完成前耗尽上下文。

大小合适的故事:

  • 添加数据库列 + 迁移
  • 在现有页面上添加 UI 组件
  • 使用新逻辑更新服务器动作
  • 在列表中添加筛选下拉菜单

太大的故事(请拆分):

  • "构建整个仪表盘" → 拆分为:schema、查询、UI 组件、筛选器
  • "添加认证" → 拆分为:schema、中间件、登录 UI、会话处理
  • "重构 API" → 按端点或模式拆分为每个故事一个

经验法则: 如果你不能用 2-3 句话描述变更,那它就太大了。


故事排序:依赖优先

故事按依赖顺序执行。较早的故事不能依赖于较晚的故事。

正确顺序:

  1. Schema/数据库变更(迁移)
  2. 服务器动作 / 后端逻辑
  3. 使用后端的 UI 组件
  4. 聚合数据的仪表盘/摘要视图

错误顺序:

  1. ❌ UI 组件(依赖于尚不存在的 schema)
  2. ❌ Schema 变更

使用 br dep add 添加依赖

使用 br dep add 命令指定哪些 beads 必须首先完成:

# 先创建 beads
br create --parent=epic-123 --title="US-001: 添加 schema" ...
br create --parent=epic-123 --title="US-002: 创建 API" ...
br create --parent=epic-123 --title="US-003: 构建 UI" ...

# 然后添加依赖(issue 依赖于 blocker)
br dep add ralph-tui-002 ralph-tui-001  # US-002 依赖于 US-001
br dep add ralph-tui-003 ralph-tui-002  # US-003 依赖于 US-002

语法: br dep add <issue> <depends-on> — issue 依赖于(被阻塞于)depends-on。

ralph-tui 会:

  • 在依赖项完成前,将阻塞的 beads 显示为“已阻塞”
  • 当依赖项未关闭时,永远不会选择该 beads 执行
  • 在处理一个 beads 时,在提示中包含依赖上下文

正确的依赖顺序:

  1. Schema/数据库变更(无依赖)
  2. 后端逻辑(依赖于 schema)
  3. UI 组件(依赖于后端)
  4. 集成/打磨(依赖于 UI)

验收标准:质量门禁 + 故事特定要求

每个 beads 的描述应包含验收标准,包括:

  1. PRD 中的故事特定标准(此故事要完成的内容)
  2. 来自 PRD 质量门禁部分的质量门禁(追加到末尾)

好的标准(可验证):

  • "向 investor 表添加 investorType 列,默认值为 'cold'"
  • "筛选下拉菜单包含选项:全部、Cold、Friend"
  • "点击切换按钮显示确认对话框"

不好的标准(模糊):

  • ❌ "能正常工作"
  • ❌ "用户可以轻松地执行 X"
  • ❌ "良好的用户体验"
  • ❌ "处理边缘情况"

转换规则

  1. 首先从 PRD 中提取质量门禁
  2. 每个用户故事 → 一个 beads
  3. 第一个故事: 无依赖(创建基础)
  4. 后续故事: 依赖于它们的前置故事(UI 依赖于后端等)
  5. 优先级: 基于依赖顺序,然后是文档顺序(0=关键,2=中等,4=积压)
  6. 所有故事: status: "open"
  7. 验收标准: 故事标准 + 追加的质量门禁
  8. UI 故事: 还追加 UI 特定门禁(浏览器验证)

拆分大型 PRD

如果 PRD 中包含大型功能,请拆分它们:

原始:

"添加好友外展追踪功能,支持不同消息"

拆分为:

  1. US-001: 向数据库添加 investorType 字段
  2. US-002: 在投资者列表 UI 中添加类型切换
  3. US-003: 创建好友特定阶段推进逻辑
  4. US-004: 创建好友消息模板
  5. US-005: 为好友生成任务
  6. US-006: 按类型添加筛选
  7. US-007: 更新新投资者表单
  8. US-008: 更新仪表盘计数

每个都是一个可以独立完成并验证的专注变更。


示例

输入的 PRD:

# PRD: 好友外展

添加将投资者标记为“好友”以进行友好外展的功能。

## 质量门禁

以下命令必须在每个用户故事中通过:
- `pnpm typecheck` - 类型检查
- `pnpm lint` - 代码检查

对于 UI 故事,还需包含:
- 使用 dev-browser 技能在浏览器中验证

## 用户故事

### US-001: 向 investor 表添加 investorType 字段
**描述:** 作为开发者,我需要将投资者分类为 'cold' 或 'friend'。

**验收标准:**
- [ ] 添加 investorType 列:'cold' | 'friend'(默认 'cold')
- [ ] 生成并成功运行迁移

### US-002: 在投资者列表行中添加类型切换
**描述:** 作为 Ryan,我想直接从列表中切换投资者类型。

**验收标准:**
- [ ] 每行有 Cold | Friend 切换按钮
- [ ] 切换显示确认对话框
- [ ] 确认后:更新数据库中的类型

### US-003: 按类型筛选投资者
**描述:** 作为 Ryan,我想筛选列表以仅查看好友或 cold 投资者。

**验收标准:**
- [ ] 筛选下拉菜单:全部 | Cold | Friend
- [ ] 筛选条件持久化在 URL 参数中

输出的 beads:

# 创建 epic(链接回原始 PRD)
br create --type=epic \
  --title="好友外展追踪" \
  --description="$(cat <<'EOF'
针对 Deck 反馈的友好外展
EOF
)" \
  --external-ref="prd:./tasks/friends-outreach-prd.md"

# US-001: 无依赖(第一个 - 创建 schema)
br create --parent=ralph-tui-abc \
  --title="US-001: 向 investor 表添加 investorType 字段" \
  --description="$(cat <<'EOF'
作为开发者,我需要将投资者分类为 'cold' 或 'friend'。

## 验收标准
- [ ] 添加 investorType 列:'cold' | 'friend'(默认 'cold')
- [ ] 生成并成功运行迁移
- [ ] pnpm typecheck 通过
- [ ] pnpm lint 通过
EOF
)" \
  --priority=1

# US-002: UI 故事(也获得浏览器验证)
br create --parent=ralph-tui-abc \
  --title="US-002: 在投资者列表行中添加类型切换" \
  --description="$(cat <<'EOF'
作为 Ryan,我想直接从列表中切换投资者类型。

## 验收标准
- [ ] 每行有 Cold | Friend 切换按钮
- [ ] 切换显示确认对话框
- [ ] 确认后:更新数据库中的类型
- [ ] pnpm typecheck 通过
- [ ] pnpm lint 通过
- [ ] 使用 dev-browser 技能在浏览器中验证
EOF
)" \
  --priority=2

# 添加依赖:US-002 依赖于 US-001
br dep add ralph-tui-002 ralph-tui-001

# US-003: UI 故事
br create --parent=ralph-tui-abc \
  --title="US-003: 按类型筛选投资者" \
  --description="$(cat <<'EOF'
作为 Ryan,我想筛选列表以仅查看好友或 cold 投资者。

## 验收标准
- [ ] 筛选下拉菜单:全部 | Cold | Friend
- [ ] 筛选条件持久化在 URL 参数中
- [ ] pnpm typecheck 通过
- [ ] pnpm lint 通过
- [ ] 使用 dev-browser 技能在浏览器中验证
EOF
)" \
  --priority=3

# 添加依赖:US-003 依赖于 US-002
br dep add ralph-tui-003 ralph-tui-002

同步更改

创建 beads 后,同步以导出为 JSONL(用于 git 追踪):

br sync --flush-only

这将 SQLite 数据库导出到 .beads/issues.jsonl 以进行版本控制。


输出位置

Beads 存储在:.beads/ 目录(SQLite 数据库 + JSONL 导出)

创建后,运行 ralph-tui:

# 处理特定 epic
ralph-tui run --tracker beads-rust --epic ralph-tui-abc

# 或让它自动选择最佳任务
ralph-tui run --tracker beads-rust

ralph-tui 会:

  1. 处理指定 epic 中的 beads(或选择最佳可用任务)
  2. 每个 bead 完成后关闭它
  3. 所有子任务完成后关闭 epic
  4. 当 epic 完成时输出 <promise>COMPLETE</promise>

创建 Beads 前的检查清单

  • 从 PRD 中提取了质量门禁(如果缺失则询问了用户)
  • 每个故事可在一次迭代中完成(足够小)
  • 故事按依赖顺序排序(schema → 后端 → UI)
  • 质量门禁已追加到每个 beads 的验收标准中
  • UI 故事包含浏览器验证(如果质量门禁中指定了)
  • 验收标准是可验证的(不模糊)
  • 没有故事依赖于较晚的故事(仅依赖于较早的故事)
  • 创建 beads 后使用 br dep add 添加了依赖
  • 运行了 br sync --flush-only 以导出供 git 追踪

与 beads(Go 版本)的差异

命令beads (bd)beads-rust (br)
创建bd createbr create
依赖bd dep addbr dep add
同步bd syncbr sync --flush-only
关闭bd closebr close
存储.beads/beads.jsonl.beads/*.db + JSONL 导出

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

相关技能