thoughtbox:knowledge-query
Skill64 starsChanged 4 months agoMITView on GitHub
Cross-session knowledge retrieval from the Thoughtbox knowledge graph. Searches entities, traverses relations, retrieves observations, and synthesizes findings from past sessions. Use when you need to recall prior decisions, check what's already known about a topic, find related insights, or build on past work. Triggers on "what do we know about", "have we seen this before", "recall", "prior decisions about", "knowledge graph", or when starting work that might have prior context.
In this repository102 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- assumptionsSkill
- capture-learningSkill
- Codex-opus-4-6-promptingSkill
- Codex-promptSkill
- mcp-code-modeSkill
- deploy-team-hubSkill
- diagramSkill
- distillSkill
- effect-tsSkill
- escalateSkill
- evalSkill
- experimentSkill
- hddSkill
- hub-auditSkill
- hub-collabSkill
- implementSkill
- knowledgeSkill
- peer-notebook-delivery-guardSkill
- research-taskSkill
- session-reviewSkill
- source-command-hdd-decideSkill
- source-command-hdd-hddSkill
- source-command-hdd-researchSkill
- source-command-hdd-stage-adrSkill
- source-command-hdd-validateSkill
- statusSkill
- supabaseSkill
- synthesizeSkill
- tasteSkill
- teamSkill
- test-suiteSkill
- theseus-protocolSkill
- thoughtbox:debugSkill
- thoughtbox:decisionSkill
- thoughtbox:evolutionSkill
- thoughtbox:onboardSkill
- thoughtbox:refactorSkill
- thoughtbox:researchSkill
- thoughtbox:session-reviewSkill
- thoughtbox-teamSkill
- ulc-loopSkill
- ulysses-protocolSkill
- workflow-brainstormingSkill
- workflow-ideationSkill
- workflow-reflectionSkill
- workflow-revisionSkill
- workflows-compoundSkill
- workflowSkill
- workflows-planSkill
- workflows-reviewSkill
- workflows-workSkill
- workflow-tournamentSkill
- assumptionsSkill
- capture-learningSkill
- claude-opus-4-6-promptingSkill
- claude-promptSkill
- mcp-code-modeSkill
- deploy-team-hubSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 58
Check observations for temporal context:
- Distinctive: line 103
If this query reveals connections not yet in the graph, create them:
- Distinctive: line 125
Search broadly first, then narrow — entity names may not match your exact wording
- Distinctive: line 126
Check observation timestamps — old observations may be stale
- Very specific: line 127
Use types filter when you know you're looking for a decision (Insight) vs a concept (Concept)
- Distinctive: line 128
If nothing is found, the gap itself is useful information — consider recording it
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Thoughtbox Knowledge Query
The knowledge graph accumulates insights across sessions. This skill retrieves and synthesizes that accumulated knowledge so you don't rediscover what's already known.
Workflow
Phase 1: Search
Cast a wide net across both sessions and the knowledge graph:
// Search sessions by keyword
async () => {
const sessions = await tb.session.search("authentication", 10);
return sessions;
}// Search entities by name pattern and type
async () => {
const entities = await tb.knowledge.listEntities({
name_pattern: "auth",
types: ["Concept", "Insight"],
limit: 20
});
return entities;
}// Get graph statistics for context
async () => tb.knowledge.stats()Phase 2: Traverse
For relevant entities, explore their neighborhood in the graph:
async () => {
return await tb.knowledge.queryGraph({
start_entity_id: "entity-uuid-here",
max_depth: 2,
relation_types: ["BUILDS_ON", "DEPENDS_ON", "RELATES_TO"]
});
}
// Returns: connected entities and relations within 2 hopsCheck observations for temporal context:
async () => {
return await tb.knowledge.getEntity("entity-uuid-here");
// Includes observations array with timestamps and content
}Phase 3: Retrieve Session Context (If Needed)
For deep dives, retrieve the full session that produced an insight. Use the subagent-summarize pattern to avoid context pollution:
Spawn a subagent with:
"Retrieve and summarize Thoughtbox session [ID].
Call: async () => tb.session.get('[ID]')
Extract only information about [TOPIC].
Return a 3-5 sentence summary. No raw thoughts."This keeps the full session (~800 tokens) in the subagent's context and returns only ~80 tokens to yours. 10x context reduction.
Phase 4: Synthesize
Combine findings from entities, relations, observations, and sessions into a coherent answer:
## Knowledge Query: "[topic]"
### Entities Found
- [Concept] "entity-name" — summary from properties
- Observation (date): "..."
- Related to: entity-B (BUILDS_ON), entity-C (DEPENDS_ON)
### Session Context
- Session "title" (date, N thoughts): [summary from subagent]
### Gaps
- No entities found for [sub-topic] — consider creating one
- Session from [date] may be outdated — verify current statePhase 5: Bridge New Knowledge (Optional)
If this query reveals connections not yet in the graph, create them:
async () => {
// New relation discovered during query
await tb.knowledge.createRelation({
from_id: "entity-a-uuid",
to_id: "entity-b-uuid",
relation_type: "RELATES_TO",
properties: { discovered_via: "knowledge-query", context: "both relate to session management" }
});
}Entity Types and Relations
Types: Concept (technical idea), Insight (learned truth), Workflow (process)
Relations: BUILDS_ON (extends), DEPENDS_ON (requires), RELATES_TO (connected)
Tips
- Search broadly first, then narrow — entity names may not match your exact wording
- Check observation timestamps — old observations may be stale
- Use
typesfilter when you know you're looking for a decision (Insight) vs a concept (Concept) - If nothing is found, the gap itself is useful information — consider recording it
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

