bb-search-cbb

SkillSearch

Searches wiki/cbb/ for reusable Common Building Blocks (sync-fifo / 2ff-sync / clock-gate, etc.) and returns matching template paths. Called by bba-architect when identifying reusable components in MAS. Trigger scenarios: (1) bba-architect identifies CBBs when breaking down submodules; (2) explicit

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the bb-search-cbb skill

What this skill tells your AI

The instructions your AI receives, as published by amoslee2026/babel in .claude/skills/bb-search-cbb/SKILL.md and read by ahel’s review.

职责

按 pattern 搜索 wiki/cbb/ 目录,输出可复用 CBB 列表。调用方据匹配进一步获取接口模板。

  • 调用者:bba-architect
  • 关联:bb-get-interface-template(获取详细接口)
  • 禁止使用:Task / Agent / Skill

Input Args

argtyperequired默认说明
patternstringtrueCBB 关键词(sync-fifo / 2ff / clock-gate
max_resultsintfalse10最多返回条数

Output Contract

field
artifact_path
matches[{cbb_name:str, file:path}]
countint
validbool

4-Phase 执行

Phase 1 — render_search_cmd

rg -i "<pattern>" wiki/cbb/ --include="*.md" -l --max-count=<max_results>

Phase 2 — run_search

scripts/run_search.pytimeout 30 bash -c "<cmd>" > <out> 2>&1

Phase 3 — parse_cbb_list

scripts/parse_cbb_list.py

  • 每行一条文件路径 → 提取 basename 去 .md 作为 cbb_name
  • 排序去重

Phase 4 — return

返回 JSON。bba-architectcbb_namebb-get-interface-template 取接口表。

收敛 / 失败

状态行动
count>0调用方进入接口模板提取
count==0该子模块在 MAS 中标 reuse: none,需从头实现

MVP CBB 覆盖

wiki/cbb/
├── sync-fifo.md
├── 2ff-sync.md
└── clock-gate.md

资源索引

  • scripts/render_search.pyscripts/run_search.pyscripts/parse_cbb_list.py
  • references/cbb_catalog.md — CBB 一览(含参数/适用场景)

Signals

GitHub stars
42
Forks
10
Last commit
Aug 2026
Advanced
Catalog kind
skill
Gateway key
bb-search-cbb
Source
github.com/amoslee2026/babel