From claude-commands
Runs multi-layer breadth-first research on a topic, discovers entities and concepts, creates wiki pages, and optionally ingests results.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-commands:wiki-bfsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
```
/wiki-bfs <topic> [--layers N] [--ingest] [--wiki <wiki_dir>]
Performs N-layer breadth-first search on a topic, discovers entities and concepts, creates wiki pages, and optionally triggers wiki-assess.
Default: 2 layers. Use --layers N for N layers.
--wiki <wiki_dir> overrides the default wiki location (~/llm_wiki/wiki). The raw/ directory is derived as $(dirname <wiki_dir>)/raw.
TOPIC = first positional arg (required)N = from --layers N flag, default 2INGEST = present if --ingest flag setWIKI = from --wiki <path> flag, default $HOME/llm_wiki/wiki# Check for local wiki default (project-level override)
if [ -f ".wiki-default" ]; then
WIKI=$(cat .wiki-default)
elif [ -f "$HOME/.wiki-default" ]; then
WIKI=$(cat "$HOME/.wiki-default")
else
WIKI="$HOME/llm_wiki/wiki"
fi
# --wiki flag always wins over .wiki-default
if args contain "--wiki <path>"; then
WIKI="<path>"
fi
mkdir -p "$WIKI/entities" "$WIKI/concepts" "$WIKI/sources"
Launch parallel research agents per layer. Each layer discovers new topics that become the next layer's research targets.
Layer architecture:
Layer 0 (seed): <TOPIC>
Layer 1: Explore <TOPIC>'s primary systems/frameworks/people
Layer 2: Explore Layer 1's supporting infrastructure, alternatives, critics
Layer N: Explore Layer N-1's ecosystem, downstream, upstream
Research areas per topic (auto-detected):
For each layer:
# Check which entities already exist
for entity in "${ENTITIES[@]}"; do
slug=$(echo "$entity" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
if [ -f "$WIKI/entities/$slug.md" ]; then
echo "EXISTS: $entity"
else
echo "NEW: $entity"
fi
done
# Check which concepts already exist
for concept in "${CONCEPTS[@]}"; do
slug=$(echo "$concept" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
if [ -f "$WIKI/concepts/$slug.md" ]; then
echo "EXISTS: $concept"
else
echo "NEW: $concept"
fi
done
Entity page template:
---
title: "<EntityName>"
type: entity
tags: [<topic-area>, <type>]
date: YYYY-MM-DD
---
## Overview
2–3 sentence overview.
## Key Properties
- **Type**:
- **Key features**:
## Connections
- [[RelatedConcept]] — relationship
- [[RelatedEntity]] — relationship
## See Also
- [[RelatedConcept]]
Concept page template:
---
title: "<ConceptName>"
type: concept
tags: [<topic-area>, <pattern-type>]
date: YYYY-MM-DD
---
## Overview
2–3 sentence overview.
## Key Properties
- **What**:
- **Why matters**:
## Related Systems
| System | Type | Relevance |
|--------|------|-----------|
## Connection to <TOPIC>
How this concept relates to the BFS root topic.
## See Also
- [[RelatedEntity]]
- [[RelatedConcept]]
Add new entities and concepts to wiki/index.md under appropriate sections with brief descriptions.
Append to wiki/log.md: ## [YYYY-MM-DD] bfs | <TOPIC> — <N> layers, <X> new entities, <Y> new concepts
If --ingest flag is set, run wiki-assess after all pages created.
| Topic keywords | Layer 1 research areas | Layer 2 research areas |
|---|---|---|
| governance, constraint, fail-closed | policy engines, constitutional AI, OPA, GitOps | stream governance, RBAC, drift detection, value alignment |
| multi-agent, orchestration, coordination | LangGraph, AutoGen, CrewAI, MetaGPT | CAMEL, router-architecture, prompt registry, multi-turn alignment |
| coding agent, SWE, evidence | SWE-bench, OpenHands, Voyager, Devin | AgentBench, skill library, self-verification, iterative prompting |
| workflow, durability, execution | Temporal, Prefect, Archon, Airbyte | event sourcing, durable execution, MCP Server, YAML DAGs |
| policy, ACL, authorization | OPA, Rego, Constitutional AI, RLAIF | CIRL, value alignment, scalable oversight, constitutional classifiers |
Each layer agent returns:
## Entities discovered
- EntityName: type, key properties, source
## Concepts discovered
- ConceptName: definition, key properties, source
## Key quotes
> "Quote" — source
## New topics for next layer
- NextTopicName (reason: discovered in this layer)
npx claudepluginhub jleechanorg/claude-commands --plugin claude-commandsRuns an autonomous iterative research loop: web searches, source fetching, synthesis, and filing structured wiki pages. Useful for deep dives that produce a knowledge base rather than a chat response.
Investigates topics from scratch: web searches sources, captures them, identifies concepts, generates cross-linked wiki pages with confidence scores, detects contradictions.
Builds and maintains an LLM-curated personal knowledge base of markdown files from ingested sources (papers, articles, notes). Compiles sources once into structured, cross-referenced wiki pages to accumulate knowledge over time.