Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/kastalien-research/thoughtbox/thoughtbox-knowledge-querynpx skills add Kastalien-Research/thoughtbox --skill thoughtbox-knowledge-querygit clone --depth 1 https://github.com/Kastalien-Research/thoughtboxWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kastalien-research/thoughtbox/thoughtbox-knowledge-query)<a href="https://agentmods.dev/skills/kastalien-research/thoughtbox/thoughtbox-knowledge-query"><img src="https://agentmods.dev/badge/skills/kastalien-research/thoughtbox/thoughtbox-knowledge-query.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00102 | $0.00917 |
| Opus 5 | $0.00051 | $0.00458 |
| Sonnet 5 | $0.00020 | $0.00183 |
| Haiku 4.5 | $0.00010 | $0.00092 |
Grade A, and why
thoughtbox:knowledge-query scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 hops
Check 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 state
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 129 lines · 102 tokens per session scan A 39b715fb7c45
thoughtbox:knowledge-query is a skill published in the GitHub repository Kastalien-Research/thoughtbox (64 stars, last pushed 1mo ago), licensed MIT. It adds 102 tokens to every session and 917 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
forget
Delete specific observations from agentmemory after showing them and getting explicit confirmation. Use when the user says "forget this", "delete memory", "remove that note", or wants to scrub specific data for privacy.
handoff
Resume the most recent agent session for the current working directory, leading with any unanswered question. Use when the user says "where were we", "resume", "handoff", "pick up where I left off", or starts a session with no fresh context.
agentmemory-hooks
The agentmemory plugin hooks that capture observations automatically across the agent session lifecycle. Use when explaining how memory gets captured without manual saves, when debugging missing observations, or when tuning what gets recorded.
session-history
Show what happened in recent past sessions on this project as a clean timeline. Use when the user asks "what did we do last time", "session history", "past sessions", or wants an overview of previous work.
agentmemory-agents
How agentmemory wires into host coding agents via the connect command. Use when installing agentmemory into a specific agent, when asked which agents are supported, or when a connect adapter writes the wrong config path.
agentmemory-config
Skill "agentmemory-config" from rohitg00/agentmemory, covering quick start, defaults worth knowing, ports, see also and reference.