turnstile-brain-init

turnstile-brain-init is a skill for Claude Code, Codex from febradc-github/turnstile. It costs 65 tokens per session (1,159 once invoked), scanned A, original, MIT.

A skill that bulk-creates one linked note for each eligible source file in turnstile/code/. The normal process is lazy, meaning it documents only files touched by a ticket after review; this skill is the opt-in bulk alternative.

In plain words
What is it for?
Use it to bootstrap code notes across a repository, excluding generated files, dependencies, build output, and unsupported file types.
Why use it?
It can fill an empty or incomplete code knowledge vault, while its warning and confirmation steps help prevent an unexpected large operation.

Skill for Claude CodeCodex

Part of the turnstile plugin — 24 skills, 23 commands, 5 agents, 3 hooks, 1 MCP server shipped together

Install

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.

agentmods
npx agentmods add skills/febradc-github/turnstile/turnstile-brain-init
Any agent
npx skills add febradc-github/turnstile --skill turnstile-brain-init
Clone the repo
git clone --depth 1 https://github.com/febradc-github/turnstile

Made for: Claude Code, Codex.

Or install turnstile, the plugin that ships this one along with the rest of its 24 skills, 23 commands, 5 agents, 3 hooks, 1 MCP server.

Wrote 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.

agentmods badge for turnstile-brain-init

README.md
[![agentmods](https://agentmods.dev/badge/skills/febradc-github/turnstile/turnstile-brain-init.svg)](https://agentmods.dev/skills/febradc-github/turnstile/turnstile-brain-init)
Your own site
<a href="https://agentmods.dev/skills/febradc-github/turnstile/turnstile-brain-init"><img src="https://agentmods.dev/badge/skills/febradc-github/turnstile/turnstile-brain-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,159 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00065 $0.01159
Opus 5 $0.00032 $0.00580
Sonnet 5 $0.00013 $0.00232
Haiku 4.5 $0.00006 $0.00116

Measured 4d ago against content hash 79a687304a1a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

turnstile-brain-init 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 4d 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.

skills/turnstile-brain-init/SKILL.md · 33 lines

How it starts

The opening of the file, as written. The whole thing — 33 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Brain Init

Process

  1. Deliver the vault-size and staleness warning above and get the explicit opt-in confirmation. Declined: point at the lazy default (review keeps touched files' notes current) and stop.
  2. Verify the turnstile-brain MCP tools respond (any search_notes call). Unavailable: tell the user to reload the session so .mcp.json registers the server, and stop. No turnstile/ directory: create nothing; suggest running a turnstile command (or /turnstile:install-obsidian) first, and stop.
  3. Build the source file list:
    • In a git repo: git ls-files (respects .gitignore). Otherwise: a Glob sweep.
    • Keep only these extensions: .js .mjs .cjs .ts .tsx .jsx .py .rb .go .rs .java .kt .c .h .cpp .hpp .cs .php .swift .sh .ps1 .psm1 .sql .vue .svelte .lua .r .scala .ex .exs
    • Always exclude: turnstile/, node_modules/, vendor/, dist/, build/, .git/, lockfiles, minified files (.min.), generated files.
    • Nothing left after filtering: say so and stop.
  4. List existing code notes and their path aliases -- grep the aliases: frontmatter line of each note in turnstile/code/ rather than reading whole notes (a missing code/ folder means no existing notes). Drop every file whose path matches an existing alias. Build one path -> slug map across ALL remaining files at once (lowercase; every run of characters outside a-z0-9 becomes one -, trimmed at both ends). Resolve collisions -- against existing notes AND between new files -- by appending -2, -3, ... in path-sorted order.
  5. Identify stale notes: every code note whose aliased path no longer exists in the repo. Do not delete anything yet.
  6. Plan the batches: group by top-level directory, about 15 files per batch (split large directories, merge tiny ones).
  7. Report the plan -- N files in M batches, K skipped as already documented, S stale notes to remove, each stale note named -- and confirm once with the user (AskUserQuestion). After confirmation: delete the stale note files, then dispatch brain-curator once per batch with model: sonnet, at most 4 dispatches in flight. Each dispatch prompt carries: the batch's file paths with slugs, the full linkable-slugs list (every path -> slug in this run plus every existing code note), and the statement that this is bulk code documentation mode.
  8. After all batches return, dispatch brain-curator once more (default model) to stitch: for each top-level source directory, create or extend turnstile/architecture/AR-.md (root-level files: AR-root.md) with a ## Files section linking that directory's file notes in [[slug|path]] form (extend an existing AR note covering the area rather than creating a parallel one); run MOC upkeep for this run's file notes (shared top-level tag code, so moc-code is created or extended once 5+ file notes exist); fix every unresolved link this run introduced, including ones the batch dispatches left behind -- the stitch prompt explicitly authorizes this, overriding the curator's report-don't-fix default; include the slugs of the stale notes deleted in step 6 so the curator runs list_backlinks on each and removes dangling references; finish with list_changed_notes acknowledge: true.
  9. Report: notes written, AR notes created or extended, files skipped or failed (a failed batch's files are listed and picked up by a rerun -- they have no notes, so the skip check passes them through), and that /turnstile:obsidian-graph shows the result.

Read the full file on GitHub · 33 lines

Changes

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.

  1. 4d ago First seen · 33 lines · 65 tokens per session scan A 79a687304a1a

Subscribe to this mod's changes

turnstile-brain-init is a skill published in the GitHub repository febradc-github/turnstile (1 stars, last pushed 1mo ago), licensed MIT. It adds 65 tokens to every session and 1,159 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

self-service-and-knowledge

Builds the help center, in-product guidance, and knowledge base that let customers resolve problems without contacting anyone — content, findability, maintenance, and deflection measurement. Use this to build or fix a help center, reduce support volume, write documentation for customers, improve findability, or decide…

cbrock84/headcount · 75 tokens

agent-memory

3-tier markdown memory protocol (shared/agent/conversation) for cross-session knowledge. TRIGGER when: reading or writing agent memory files, choosing which memory tier an insight belongs in, or starting a task needing prior context. SKIP: vector recall (use semantic-memory-mcp); distilling conversations into…

komluk/scaffolding · 70 tokens

memory

Unified memory CRUD: write/update/delete/query file-based markdown entries and sync to MCP semantic store. TRIGGER when: saving a new memory entry, updating or deleting an existing entry, querying stored memories, or deduplicating before write. SKIP: 3-tier agent memory (use agent-memory); in-task vector recall (use…

komluk/scaffolding · 73 tokens

semantic-memory-mcp

Proactive use of semantic-memory MCP tools (semanticsearch, semanticrecall). TRIGGER when: an agent should search vector memory for prior insights mid-task. SKIP: file-based 3-tier memory (use agent-memory); storing a new memory (use semantic-memory-store).

komluk/scaffolding · 61 tokens

distill

Knowledge distillation methodology: candidate extraction, confidence scoring, tier routing, conversation-scoped mode. TRIGGER when: running /learn or /distill, deciding if an insight is memory-worthy, or scoring a knowledge candidate. SKIP: ad-hoc memory reads/writes (use agent-memory); vector storage (use…

komluk/scaffolding · 71 tokens

operate-hermes-agent

Install, update, migrate to, configure, run, secure, and troubleshoot Hermes Agent across its CLI, TUI, desktop, dashboard, profiles, tools, skills, memory, models, goals, voice, sessions, worktrees, and terminal backends.

gaelic-ghost/socket · 57 tokens