knowledge

$npx mdskill add Kastalien-Research/thoughtbox/knowledge

Unified cross-store knowledge query for user tasks

  • Searches MEMORY.md, Thoughtbox knowledge graph, git history, and assumption registry in parallel to find relevant information.
  • Depends on Grep, ToolSearch, Read, Glob, Bash, and Git commands for data retrieval.
  • Decides relevance based on query match, freshness of results, and cross-references across stores.
  • Delivers the found knowledge with provenance details directly to the user or agent.

SKILL.md

.github/skills/knowledgeView on GitHub ↗
---
name: knowledge
description: Unified cross-store knowledge query. Searches MEMORY.md, Thoughtbox knowledge graph, git history, and assumption registry in parallel, returning results with provenance.
argument-hint: <search query>
user-invocable: true
allowed-tools: Read, Glob, Grep, Bash, ToolSearch
---

Search all knowledge stores for: $ARGUMENTS

## Workflow

### Phase 1: Parallel Search (Observe)

Execute all searches in parallel:

1. **MEMORY.md**: Search the auto memory file at `.claude/projects/*/memory/MEMORY.md` for the query terms using Grep
2. **Thoughtbox Knowledge Graph**: Use ToolSearch to load `thoughtbox_execute`, then search entities and observations matching the query via `tb.knowledge.listEntities({ name_pattern: "..." })` and `tb.knowledge.queryGraph(...)`
3. **Git History**: Run `git log --all --oneline --grep="$ARGUMENTS" -20` for commit history
4. **Assumption Registry**: Search `.assumptions/*.jsonl` for matching assumption records using Grep
5. **DGM Patterns**: Search `.dgm/fitness.json` for patterns matching the query using Grep
6. **Session Handoffs**: Search `.sessions/handoff-*.json` for relevant context using Grep

### Phase 2: Collate and Rank (Orient)

For each result found:
1. Note the **source store** (provenance)
2. Note the **freshness** (when was this last updated/verified)
3. Note the **relevance** (how closely does it match the query)
4. Check for **cross-references** (does this result reference other stores)

### Phase 3: Present Results (Act)

Present results grouped by relevance, with provenance:

```
## Knowledge Query: "{query}"

### High Relevance
- [MEMORY.md] {finding} (line {N}, updated {date})
- [Thoughtbox] Entity: {name} — {observation} (created {date})

### Medium Relevance
- [Git] {commit-hash}: {message} ({date})

### Low Relevance
- [Assumptions] {assumption} (confidence: {N}%, last verified: {date})

### Cross-References
- Thoughtbox entity "{name}" relates to git commit {hash}

### Gaps
- No results found in: {store1}, {store2}
- Consider adding knowledge about "{query}" to {suggested_store}
```

## Notes

- If a store doesn't exist yet (e.g., `.dgm/fitness.json` not created), skip it silently
- If Thoughtbox MCP tools aren't available, skip the knowledge graph search
- Always show which stores were searched and which returned nothing — gaps are informative
- If the query is broad, suggest more specific sub-queries

More from Kastalien-Research/thoughtbox

SkillDescription
assumptionsManage the assumption registry — track, verify, and query assumptions about external dependencies and system behavior. Prevents costly rediscovery of known failures.
capture-learningCapture significant learnings from the current work session. Structures insights for future sessions and updates agent memory.
claude-opus-4-6-prompting>
claude-promptWrite or improve prompts for Claude using Anthropic's official best practices. Creates system prompts, agent prompts, tool descriptions, and MCP resource templates. Pass an existing prompt to improve it, or describe what you need to create one from scratch.
coolify-composeConvert Docker Compose files to Coolify templates. Use when creating Coolify services, converting docker-compose.yml for Coolify deployment, working with SERVICE_URL/SERVICE_PASSWORD magic variables, or troubleshooting Coolify compose errors.
crafting-effective-readmesUse when writing or improving README files. Not all READMEs are the same — provides templates and guidance matched to your audience and project type.
diagramGenerate architecture diagrams for a codebase subsystem or module. Explores source files and produces Mermaid diagrams in docs/.
diataxisStructure, classify, and write documentation using the Diátaxis framework. Use when writing docs, README files, guides, tutorials, how-to guides, API references, or organizing documentation architecture. Also use when asked to improve documentation, restructure docs, decide what type of doc to write, or classify existing content. Covers tutorials, how-to guides, reference, and explanation.
escalateFormat a structured escalation to the human decision-maker (Chief Agentic). Use when hitting an escalation threshold.
frontend-design-principlesCreate polished, intentional frontend interfaces. Use this skill when building any UI — dashboards, admin panels, landing pages, marketing sites, or web applications. Routes to specialized guidance based on context.