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 commands/mrboups/xbrain/threadgit clone --depth 1 https://github.com/mrboups/xbrainWrote 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/commands/mrboups/xbrain/thread)<a href="https://agentmods.dev/commands/mrboups/xbrain/thread"><img src="https://agentmods.dev/badge/commands/mrboups/xbrain/thread.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.00013 | $0.01873 |
| Opus 5 | $0.00006 | $0.00937 |
| Sonnet 5 | $0.00003 | $0.00375 |
| Haiku 4.5 | $0.00001 | $0.00187 |
Grade A, and why
gsd:thread 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 yesterday.
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.
This is a copy
98% identical to gsd:thread — 20 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Parse $ARGUMENTS to determine mode:
"list"or""(empty) → LIST mode (show all, default)"list --open"→ LIST-OPEN mode (filter to open/in_progress only)"list --resolved"→ LIST-RESOLVED mode (resolved only)"close <slug>"→ CLOSE mode; extract SLUG = remainder after "close " (sanitize)"status <slug>"→ STATUS mode; extract SLUG = remainder after "status " (sanitize)- matches existing filename (
.planning/threads/{arg}.mdexists) → RESUME mode (existing behavior) - anything else (new description) → CREATE mode (existing behavior)
Slug sanitization (for close and status): Strip any characters not matching [a-z0-9-]. Reject slugs longer than 60 chars or containing .. or /. If invalid, output "Invalid thread slug." and stop.
<mode_list> LIST / LIST-OPEN / LIST-RESOLVED mode:
ls .planning/threads/*.md 2>/dev/null
For each thread file found:
- Read frontmatter
statusfield via:gsd-sdk query frontmatter.get .planning/threads/{file} status - If frontmatter
statusfield is missing, fall back to reading markdown heading## Status: OPEN(or IN PROGRESS / RESOLVED) from the file body - Read frontmatter
updatedfield for the last-updated date - Read frontmatter
titlefield (or fall back to first# Thread:heading) for the title
SECURITY: File names read from filesystem. Before constructing any file path, sanitize the filename: strip non-printable characters, ANSI escape sequences, and path separators. Never pass raw filenames to shell commands via string interpolation.
Apply filter for LIST-OPEN (show only status=open or status=in_progress) or LIST-RESOLVED (show only status=resolved).
Display:
Context Threads
─────────────────────────────────────────────────────────
slug status updated title
auth-decision open 2026-04-09 OAuth vs Session tokens
db-schema-v2 in_progress 2026-04-07 Connection pool sizing
frontend-build-tools resolved 2026-04-01 Vite vs webpack
─────────────────────────────────────────────────────────
3 threads (2 open/in_progress, 1 resolved)
If no threads exist (or none match the filter):
No threads found. Create one with: /gsd-thread <description>
STOP after displaying. Do NOT proceed to further steps. </mode_list>
<mode_close> CLOSE mode:
When SUBCMD=close and SLUG is set (already sanitized):
-
Verify
.planning/threads/{SLUG}.mdexists. If not, printNo thread found with slug: {SLUG}and stop. -
Update the thread file's frontmatter
statusfield toresolvedandupdatedto today's ISO date:gsd-sdk query frontmatter.set .planning/threads/{SLUG}.md status resolved gsd-sdk query frontmatter.set .planning/threads/{SLUG}.md updated YYYY-MM-DD -
Commit:
gsd-sdk query commit "docs: resolve thread — {SLUG}" --files ".planning/threads/{SLUG}.md" -
Print:
Thread resolved: {SLUG} File: .planning/threads/{SLUG}.md
STOP after committing. Do NOT proceed to further steps. </mode_close>
<mode_status> STATUS mode:
When SUBCMD=status and SLUG is set (already sanitized):
-
Verify
.planning/threads/{SLUG}.mdexists. If not, printNo thread found with slug: {SLUG}and stop. -
Read the file and display a summary:
Thread: {SLUG} ───────────────────────────────────── Title: {title from frontmatter or # heading} Status: {status from frontmatter or ## Status heading} Updated: {updated from frontmatter} Created: {created from frontmatter} Goal: {content of ## Goal section} Next Steps: {content of ## Next Steps section} ───────────────────────────────────── Resume with: /gsd-thread {SLUG} Close with: /gsd-thread close {SLUG}
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.
- yesterday First seen · 228 lines · 13 tokens per session scan A 43f2c6758075
gsd:thread is a command published in the GitHub repository mrboups/xbrain (2 stars, last pushed 20d ago), licensed MIT. It adds 13 tokens to every session and 1,873 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 98% identical to gsd:thread, differing in 20 lines, and is treated as a copy.
Other commands, from other repositories
using-pensyve
Show available Pensyve memory tools, skills, and commands.
pensyve
Route explicit Pensyve memory requests through the bundled MCP server; supports recall, remember, observe, inspect, status, review, forget, and mention-style guidance.
consolidate
Run memory consolidation to promote, decay, and archive memories.
inspect
View all memories stored for an entity in Pensyve.
memory-status
Show Pensyve memory namespace statistics and health overview.
recall
Search Pensyve memory by semantic similarity and text matching.