Agent skill

Synapse Usage

by S1LV4 in S1LV4/th0th

Use the th0th Synapse cognitive modulation layer to get focused, low-noise retrieval during multi-step coding tasks.

MITAuto-check passedDevelopment

Install Synapse Usage

skills CLI
$ npx skills add S1LV4/th0th --skill synapse-usage -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install S1LV4/th0th synapse-usage --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/S1LV4/th0th.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/synapse-usage .claude/skills/synapse-usage && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
synapse-usage
GitHub stars
136
Token cost
~2.9k tokens
SKILL.md length
847 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Use the th0th Synapse cognitive modulation layer to get focused, low-noise retrieval during multi-step coding tasks.

  • Works in 5 steps: Open a session at task start → Pass synapseSessionId to every search → Update task context when the focus shifts → …
  • Tasks involving repeated searches in the same context (debugging
  • SKILL.md covers When to Apply, Interface, Lifecycle (the five moves) and Reading the pipeline output, plus 6 more sections
  • Calls curl and jq

What it does

Synapse Usage is an agent skill from S1LV4/th0th. Use the th0th Synapse cognitive modulation layer to get focused, low-noise retrieval during multi-step coding tasks. Open a session, prime the buffer with known-relevant memories, pass synapseSessionId on every search, and prefetch when opening a file. Triggers on tasks involving repeated searches in the same context (debugging, code review, refactor, onboarding) where retrieval quality matters more than one-shot speed.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Refactoring, Code review and Debugging. The repository describes itself as: 🏛️ Ancient knowledge keeper for modern code. Semantic search with 98% token reduction for AI assistants. Features: hybrid search, context compression, persistent memory. The licence is MIT.

When your agent uses it

  • Tasks involving repeated searches in the same context (debugging
  • Onboarding) where retrieval quality matters more than one-shot speed

Example prompts

  • “/synapse-usage”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Open a session at task start
  2. Pass synapseSessionId to every search
  3. Update task context when the focus shifts
  4. Prefetch when opening a file
  5. Close the session at task end

What it can do on your machine

Read from SKILL.md and the folder at commit 7936342. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Synapse Usage loads about 2.9k tokens when it runs. Until then it costs about 109 tokens; SKILL.md has 847 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~109
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from S1LV4/th0th at commit 7936342, republished under its MIT licence (© S1LV4). 847 words, ~2,909 tokens.

Download SKILL.mdSave it as .claude/skills/synapse-usage/SKILL.md (or your agent's skills folder).
name
synapse-usage
description
Use the th0th Synapse cognitive modulation layer to get focused, low-noise retrieval during multi-step coding tasks. Open a session, prime the buffer with known-relevant memories, pass synapseSessionId on every search, and prefetch when opening a file. Triggers on tasks involving repeated searches in the same context (debugging, code review, refactor, onboarding) where retrieval quality matters more than one-shot speed.
license
MIT
metadata.author
S1LV4
metadata.version
1.0.0

synapse-usage Skill

Use the th0th Synapse cognitive modulation layer to get focused, low-noise retrieval during multi-step coding tasks. Synapse does not replace th0th_search or th0th_optimized_context — it modulates which results survive and in what order based on session context, task alignment, agent affinity, intent, recency, and result diversity.

When to Apply

Activate Synapse whenever the same task will issue more than one search in the same conversation:

  • Multi-step debugging (error → handler → config)
  • Code review (PR → history → tests)
  • Refactor across files (usages → definitions → tests)
  • Onboarding to a new module (entry point → calls → decisions)
  • Any prolonged session where the same files/concepts will reappear

Skip Synapse for one-shot lookups; the overhead does not pay back.

Interface

Synapse is exposed via the tools-API at http://localhost:3333/api/v1/synapse/... (no MCP tools yet). All interaction is curl against six endpoints:

EndpointPurpose
POST /api/v1/synapse/sessionCreate a session, returns sessionId
GET /api/v1/synapse/session/:idInspect session state
PATCH /api/v1/synapse/session/:idUpdate task context (refreshes TTL)
DELETE /api/v1/synapse/session/:idEnd session
POST /api/v1/synapse/session/:id/primeSeed buffer with known-relevant entries
POST /api/v1/synapse/session/:id/accessRecord access for agent-affinity scoring
POST /api/v1/synapse/session/:id/prefetchPlan + execute prefetch on file open
GET /api/v1/synapse/sessionsList active session count (debug)

Search integration: pass synapseSessionId on POST /api/v1/search/project (the th0th_search MCP tool maps to this endpoint).

Lifecycle (the five moves)

1. Open a session at task start
bash
SID=$(curl -sS -X POST http://localhost:3333/api/v1/synapse/session \
  -H 'Content-Type: application/json' \
  -d '{
    "agentId":"claude-code",
    "taskContext":"investigating ECONNRESET errors in auth middleware under load",
    "enableBuffer":true
  }' | jq -r .data.sessionId)
  • agentId — stable identifier for which agent is calling. Used by agent-affinity. Keep it the same across calls.
  • taskContext — 1-2 sentences describing what you are doing. Feeds the task-alignment signal of the attention scorer.
  • enableBuffer: true — activates the working-memory cache (top-20 warm hits, TTL 15min).

When using th0th_search (or POSTing directly to /api/v1/search/project):

th0th_search({
  query: "where does the timeout get applied?",
  projectId: "my-project",
  synapseSessionId: "syn_mp16isfr_nvfo1g7c"
})

That is the only integration point on the search side. Synapse does the rest:

  • Buffer hits from previous queries surface automatically
  • Attention re-ranking (opt-in) uses the task context
  • Chain inhibition boosts results aligned with detected intent (decision, debug, pattern, symbol)
  • Diversity penalty stops the top-5 being five chunks of one file
  • Confidence gate cuts noise relative to raw cosine, not RRF-inflated score
3. Update task context when the focus shifts

When the agent moves from "investigate" to "fix", update the context. It changes what attention considers aligned.

bash
curl -sS -X PATCH http://localhost:3333/api/v1/synapse/session/$SID \
  -H 'Content-Type: application/json' \
  -d '{"taskContext":"implementing a configurable timeout in auth middleware"}'

Update when the kind of work changes, not after every query.

4. Prefetch when opening a file

Right after deciding to read a specific file, fire a prefetch so the buffer is warm before the next search.

bash
curl -sS -X POST http://localhost:3333/api/v1/synapse/session/$SID/prefetch \
  -H 'Content-Type: application/json' \
  -d '{
    "filePath":"src/auth/middleware.ts",
    "symbols":[{"name":"verifyJwt"},{"name":"tokenTimeout"}],
    "entries":[
      {"id":"mem-1","content":"decided to use jwt with 15min expiry","score":0.9},
      {"id":"mem-2","content":"ECONNREFUSED workaround in prod deploy","score":0.85}
    ]
  }'

entries are memories you (typically from a prior th0th_recall) believe will be relevant. The endpoint can also be called with just filePath/symbols and no entries — Synapse then builds a prefetch plan (returned in the response) which you can execute with th0th_recall and POST back as entries.

5. Close the session at task end
bash
curl -sS -X DELETE http://localhost:3333/api/v1/synapse/session/$SID

Optional — sessions auto-expire after 1h (TTL slides forward on every get/recordAccess). Closing explicitly frees memory immediately.

Show full SKILL.md (385 more words)Show less

Reading the pipeline output

When synapseSessionId is provided and the server logs at LOG_LEVEL=debug, one structured log fires per query:

json
{
  "before": 16, "after": 14,
  "queryClass": "specific",
  "intent": "decision",
  "appliedFilters": ["buffer-hit","pre-gate","attention","chain","diversity","temporal","confidence-gate","spectrum","buffer-put"],
  "flags": {
    "lowConfidence": false,
    "noStrongMatch": false,
    "definitiveMatch": true,
    "spread": 0.31, "mean": 0.78, "confidence": 0.24
  }
}
SignalReading
appliedFilters contains buffer-hitBuffer had warm results — priming/prefetch is paying off
appliedFilters contains pre-gateEarly raw-score filter cut noise before attention
queryClass = "specific"Symbol-like query; gate at 0.55 threshold
queryClass = "focused"Tech terms; gate at 0.40
queryClass = "broad"Exploratory; gate at 0.25
intent != "general"Chain inhibition modulated results by Memory.type
flags.definitiveMatch = trueA dominant hit; trust the top-1
flags.lowConfidence = trueResults clustered; query is ambiguous, refine it
flags.noStrongMatch = trueNothing crossed threshold; answer probably not in corpus

Practical patterns

Debugging session
1. CREATE session   taskContext = "investigating <error> in <area>"
2. th0th_search     for the error message  (pass synapseSessionId)
3. PREFETCH         on the file that owns the failing code
4. th0th_search     for context (config, related handlers, recent changes)
5. UPDATE context   "applying fix for <root cause>"
6. th0th_search     for affected tests
7. DELETE session
Code review
1. CREATE session   taskContext = "reviewing PR #N about <feature>"
2. th0th_search     each touched file's history
3. PREFETCH         on each touched file
4. th0th_search     tests covering the change
5. DELETE
Refactor across files
1. CREATE session   taskContext = "renaming X to Y across the codebase"
2. th0th_search     references — wide net first
3. POST /access     on each true hit (agent-affinity boost for next iteration)
4. PREFETCH         per file as you decide which to edit
5. th0th_search     again later for the same X — buffer surfaces prior hits
6. DELETE
Priming with domain knowledge

If certain memories will always matter for the task (architectural decisions, recent incidents, project idioms), seed the buffer upfront:

bash
curl -sS -X POST http://localhost:3333/api/v1/synapse/session/$SID/prime \
  -H 'Content-Type: application/json' \
  -d '{"entries":[
    {"id":"ad-001","content":"auth uses jwt with 15min expiry by design","score":0.9},
    {"id":"ad-002","content":"chose pgvector over chromadb for HNSW","score":0.9}
  ]}'

Primed entries surface only when their content tokens overlap with the new query — they don't pollute unrelated searches.

Things to avoid

  • Reusing one mega-session across unrelated tasks. Signals (taskAlign, agentAffinity, buffer) drift into noise. Open a fresh session per task.
  • Updating taskContext after every query. Defeats the purpose; the signal must mean something.
  • Calling prime with hundreds of entries. Buffer is capped at 20 by default; flood eviction wastes the priming work.
  • Treating flags.lowConfidence as "search failed". It means the corpus had no clear winner — usually a hint to refine the query, not abort.
  • Sending synapseSessionId on a stateless one-shot call. No benefit; same overhead.
  • Sending a different agentId per call. Agent-affinity needs a stable identity.

Minimal happy path

bash
# Once per task
SID=$(curl -sS -X POST http://localhost:3333/api/v1/synapse/session \
  -H 'Content-Type: application/json' \
  -d '{"agentId":"claude-code","taskContext":"add retry to auth client","enableBuffer":true}' \
  | jq -r .data.sessionId)

# Every search (or use th0th_search with synapseSessionId param)
curl -sS -X POST http://localhost:3333/api/v1/search/project \
  -H 'Content-Type: application/json' \
  -d "{\"query\":\"auth client retry\",\"projectId\":\"my-project\",\"synapseSessionId\":\"$SID\"}"

# At cleanup
curl -sS -X DELETE http://localhost:3333/api/v1/synapse/session/$SID

That is the entire surface area. Everything else (attention, chain inhibition, diversity, gate, spectrum, buffer eviction) is automatic when Synapse is enabled in the server config.

Decision Flow

Starting a multi-step task?
  → POST /api/v1/synapse/session   (open session, get sessionId)
  → th0th_recall                   (collect known-relevant memories for the task)
  → POST /session/:id/prime        (seed buffer with those memories)

Running a search inside the task?
  → th0th_search  with synapseSessionId param
  → (server applies the full pipeline automatically)

Opening a file the agent will dig into?
  → POST /session/:id/prefetch     (warms buffer with related decisions/code)

Task focus shifted (investigate → fix)?
  → PATCH /session/:id             (update taskContext)

Found an important hit?
  → POST /session/:id/access       (record for agent-affinity)

Task done?
  → DELETE /session/:id            (free resources)

Configuration

Synapse is enabled by default in the server config. To toggle:

Env varDefaultEffect
SYNAPSE_ENABLEDtrueMaster kill switch; false bypasses the entire pipeline
SYNAPSE_ATTENTION_ENABLEDfalseEnables the multi-signal attention re-ranker (opt-in until validated per project)
LOG_LEVELinfoSet to debug to see the Synapse pipeline applied log line per query

Reference

  • Endpoints documented in Swagger: http://localhost:3333/swagger — filter by synapse tag.
  • Source: packages/core/src/services/synapse/ (manager, buffer, session, scoring, inhibition, metacognition, plasticity, prefetch).
  • Route: apps/tools-api/src/routes/synapse.ts.
  • Design rationale: docs/rfc-venvanse-for-agents.md, docs/synapse-dev-plan.md.

This skill is about using Synapse from the agent side. To diagnose retrieval quality regressions or measure pipeline behavior, see the project's benchmark scripts at scripts/synapse-benchmark-v2.sh and scripts/synapse-bench-analyze-v2.py.

© S1LV4, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/synapse-usage of S1LV4/th0th.

Open the folder on GitHubat commit 7936342

Compare with similar skills

Synapse Usage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Synapse Usage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Synapse Usage this skillS1LV4/th0th136—~2.9kAutomated safety check: PassMIT
Code Review Graph Navigatorhandsontable/handsontable22k—~939Automated safety check: PassCustom licence
RoamCranot/roam-code517—~2.4kAutomated safety check: PassApache-2.0
Copilot Code Coachtimothywarner/chatgptclass143—~1.9kAutomated safety check: PassCustom licence
Panel Reviewstacklok/mecatl218—~5.8kAutomated safety check: PassApache-2.0
Julessanjay3290/ai-skills4301 repos~2.1kAutomated safety check: PassApache-2.0

Similar skills

  • Code Review Graph Navigator

    handsontable/handsontable

    Queries a pre-built, Tree-sitter-based code graph of the whole monorepo instead of grepping call chains, for exploring, debugging, refactoring or reviewing code.

    22k GitHub stars~939 tokensUpdated today
    DevelopmentAuto-check passed
  • Roam

    Cranot/roam-code

    Codebase comprehension via roam-code CLI. An agent skill from Cranot/roam-code.

    517 GitHub stars~2.4k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Copilot Code Coach

    timothywarner/chatgptclass

    Socratic coding tutor powered by GitHub Copilot. An agent skill from timothywarner/chatgptclass.

    143 GitHub stars~1.9k tokensUpdated 18 days ago
    DevelopmentAuto-check passed
  • Panel Review

    stacklok/mecatl

    Review completed non-trivial code across four independent axes: Spec, Standards, Test adequacy, and installed Domain specialists.

    218 GitHub stars~5.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Jules

    sanjay3290/ai-skills

    Delegate coding tasks to Google Jules AI agent for asynchronous execution.

    430 GitHub starsUsed in 1 repo~2.1k tokens
    DevelopmentAuto-check passed
  • Software Engineering

    Prism-Shadow/penguin-harness

    Complete software-engineering tasks — investigate and review code, implement bug fixes, features and refactors with minimal scope, validate changes, and report verified outcomes.

    2.5k GitHub stars~758 tokensUpdated today
    DevelopmentAuto-check passed

Categories

Questions about Synapse Usage

What does Synapse Usage do?

Use the th0th Synapse cognitive modulation layer to get focused, low-noise retrieval during multi-step coding tasks. Synapse Usage is an agent skill from S1LV4/th0th. Use the th0th Synapse cognitive modulation layer to get focused, low-noise retrieval during multi-step coding tasks.

When should I use Synapse Usage?

Synapse Usage fits situations like: tasks involving repeated searches in the same context (debugging; onboarding) where retrieval quality matters more than one-shot speed.

How do I install Synapse Usage in Claude Code?

Run `npx skills add S1LV4/th0th --skill synapse-usage -a claude-code`. Or copy the skill folder (skills/synapse-usage in S1LV4/th0th) into .claude/skills/synapse-usage in your project. Claude Code loads it when a task matches its description.

How do I install Synapse Usage in Codex?

Run `npx skills add S1LV4/th0th --skill synapse-usage -a codex`. Or copy the skill folder (skills/synapse-usage in S1LV4/th0th) into .agents/skills/synapse-usage in your project. Codex loads it when a task matches its description.

Can I use Synapse Usage in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add S1LV4/th0th --skill synapse-usage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/synapse-usage, .gemini/skills/synapse-usage, .github/skills/synapse-usage and .opencode/skills/synapse-usage in your project.

What does Synapse Usage need to run?

Going by SKILL.md and its folder, Synapse Usage needs the command-line tools its instructions call (curl and jq).

Does Synapse Usage access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Synapse Usage safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Synapse Usage use?

Synapse Usage is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Synapse Usage use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Synapse Usage?

Skills that share tags, products or a category with Synapse Usage: Code Review Graph Navigator (handsontable/handsontable, 22k stars), Roam (Cranot/roam-code, 517 stars), Copilot Code Coach (timothywarner/chatgptclass, 143 stars) and Panel Review (stacklok/mecatl, 218 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Synapse Usage?

S1LV4 (a GitHub user) maintains it in S1LV4/th0th, which has 136 GitHub stars. The repository was last updated on June 12, 2026.

Source: S1LV4/th0th on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.