toolkit/packages/skills/global-learnings/SKILL.md
Manage the global learnings knowledge base - an agent-agnostic system for storing, searching, and retrieving cross-project learnings. Uses GraphRAG for vector + graph-based retrieval and QMD for fast local semantic search. Works with any AI coding agent (Claude, Cursor, Copilot, Codex, etc.).
npx skillsauth add stevengonsalvez/agents-in-a-box global-learningsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides the global learnings knowledge base infrastructure. It is
agent-agnostic -- knowledge is stored at ~/.learnings/ (configurable via
LEARNINGS_HOME env var) and accessible from any AI coding agent or CLI.
Default: ~/.learnings/
Override with the LEARNINGS_HOME environment variable:
export LEARNINGS_HOME="$HOME/.learnings"
~/.learnings/
├── documents/
│ ├── learnings/ # Individual learning documents
│ ├── episodes/ # Session episode summaries
│ └── clusters/ # Clustered pattern documents
├── nano_graphrag_cache/ # GraphRAG index (auto-generated)
├── cli/ # CLI scripts (copied by setup)
├── .venv/ # uv-managed virtualenv (auto-created)
└── .gitignore
The system uses two complementary search backends:
Both backends are queried and results are merged for comprehensive coverage.
The learnings CLI is located at ~/.learnings/cli/learnings.
# Search learnings (GraphRAG)
learnings search "error message" --mode naive --format json
# Add a new learning
learnings add ./my-solution.md
# Add with pre-extracted entities
learnings add ./my-solution.md --entities ./my-solution.entities.yaml
# Get critical patterns
learnings critical-patterns --language rust --domain backend
# Rebuild the graph index
learnings reindex
learnings reindex --force
# Show statistics
learnings stats
# Initialize repository structure
learnings init
# Visualize the knowledge graph (interactive HTML)
learnings visualize
learnings visualize -o my-graph.html
learnings visualize --no-open
naive: Vector similarity only (fast, good for exact error messages)local: Entity neighborhood search (finds related concepts via graph)global: Community-based search (broad patterns across all learnings)See references/setup.md for installation and configuration guide.
scripts/setup-learnings-home.sh - Migration to ~/.learnings/ and directory setupscripts/setup-qmd.sh - QMD installation and collection configurationscripts/learnings - CLI entry point (bash wrapper)scripts/learnings_cli.py - Main CLI implementationscripts/graph_engine.py - GraphRAG enginescripts/entity_store.py - Entity extraction and storagescripts/graspologic_shim.py - Pure networkx shim for graspologicdocumentation
Report reflect drain spend over a time window — tokens split by cached (cache_read), uncached writes (cache_creation), and io (input+output), with a $ estimate, grouped by day / outcome / model / transcript. Reads the drainer's cost log and surfaces outlier runs and cache-reuse health (the 41.5M-token failure mode = low cache reuse + high cache writes). Use to answer "what is reflection costing me" for the last day / week.
development
Show fleet status — every claude session running on the host, merged across ainb + claude-peers broker + background jobs. Use when you need to enumerate sessions before composing an action, see which sessions have a peer registered (broker-routable) vs tmux-only, check the `summary` of each session, or pipe the list into jq for filtering. Default output: text table. Pass --format json for LLM consumption.
testing
Ordered multi-step prompts to fleet targets, ack-gated between steps via JSONL assistant-turn-end detection. Use for cycles like disconnect→reconnect→verify, or any flow where step N+1 requires step N to have completed first. The skill BLOCKS until each target's transcript shows the next assistant turn finishing OR per-step timeout fires (default 300s).
development
Center control panel — enumerate every claude session that is blocked waiting on something: a user answer (AskUserQuestion fired), an API error retry, an idle assistant turn-end with no follow-up, or an explicit WAITING: marker. Returns rich JSON with signal kind + context per session. Use this when you've stepped away from the fleet and want one place to see everything that wants your attention and answer it.