second-brain: Command for Claude Code

.claude/commands/ingest.md

ingest is a command for Claude Code from slowww-ai/second-brain. It costs 15 tokens per session (966 once invoked), scanned A, original, MIT.

A command for turning new files in a wiki's raw folder into shorter, connected notes. It handles Markdown, images, and PDFs, preserving the original files while adding descriptions or transcriptions when needed.

In plain words
What is it for?
Use it to find unprocessed captures, transcribe image or PDF content, create companion notes, and distill raw Markdown into linked wiki notes.
Why use it?
It reduces the work of organizing saved material and helps prevent raw captures from remaining unreadable or disconnected from the rest of the wiki.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

This is slowww-ai/second-brain's own configuration. It tells Claude Code how to work on second-brain itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything second-brain configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python scripts/ingest.py record <raw-filename> <note1,note2,...>.

Reuse

Borrowing it

Nothing to install: this file belongs to slowww-ai/second-brain. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/slowww-ai/second-brain/main/.claude/commands/ingest.md
Clone the repo
git clone --depth 1 https://github.com/slowww-ai/second-brain

Made for: Claude Code.

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 ingest

README.md
[![agentmods](https://agentmods.dev/badge/commands/slowww-ai/second-brain/ingest/github.svg)](https://agentmods.dev/commands/slowww-ai/second-brain/ingest)
Your own site
<a href="https://agentmods.dev/commands/slowww-ai/second-brain/ingest"><img src="https://agentmods.dev/badge/commands/slowww-ai/second-brain/ingest/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ingest

Your own site · 80×15
<a href="https://agentmods.dev/commands/slowww-ai/second-brain/ingest"><img src="https://agentmods.dev/badge/commands/slowww-ai/second-brain/ingest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 966 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00015 $0.00966
Opus 5.5 $0.00006 $0.00386
Sonnet 5.5 $0.00003 $0.00193
Haiku 4.5 $0.00002 $0.00097

Measured 1mo ago against content hash f79d5b536f43, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ingest 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 1mo 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.

.claude/commands/ingest.md · 37 lines

What it actually says

Your job is to turn new raw captures into clean, linked wiki notes.

Steps:

  1. Run python scripts/ingest.py list-new to find raw files not yet referenced by any note. Also list any images or PDFs in wiki/raw/ that don't yet have a companion .md file — those need to be processed too.
  2. Non-text captures first. For every image or PDF in raw/ without a companion .md:
    • Read the file directly (Claude can see images and PDFs natively).
    • Create raw/<same-name>.md with frontmatter, a description, a full transcription of any visible text/tables, and an image: or pdf: reference line.
    • Do NOT modify or delete the original binary file.
    • Treat the new companion .md as a raw capture and continue with the normal flow below.
  3. For each new raw markdown file (including companions just created): a. Read it according to its length. First check line count (wc -l <path> or the file header from Read). Then:
    • Under 500 lines — read the entire file in one pass. No shortcuts.
    • 500–2000 lines — read the entire file, in sequential chunks if needed. Distill aggressively into short notes, but do not skip sections.
    • Over 2000 lines — read the first ~200 lines to get structure and thesis, scan the table of contents / headers, then read in full the sections most relevant for distillation and linking. It's fine to skip appendices, repetitive examples, or sections clearly tangential to the core concepts.
    • Always report read-coverage in your final summary as read X/Y lines of <file> so shallow reads are never silent. If coverage is under 100%, note which sections you skipped and why, so the user can request a follow-up deep pass. b. Run python scripts/ingest.py stamp <path> if it has no frontmatter yet. c. Identify the 1–3 core concepts in the file. d. For each concept, decide: does a matching note already exist in wiki/notes/? Use python scripts/search.py "<concept>" to check. e. If yes → append a distilled paragraph to that note and cite the raw file (see raw/<filename>). f. If no → create a new note in wiki/notes/<slug>.md with proper frontmatter, a short summary, and [[wikilinks]] to any related existing notes. If the source was an image or PDF, embed it inline with ![](../raw/<name>.png). g. Tag framework notes. If the note captures a reusable mental model / analytical lens / decision tool you'd apply across many topics (e.g. strategy-vs-planning, revenue-models) — not just facts about one thing — make framework its first tag so it joins the framework library (queryable via the tag). This is only for knowledge frameworks, which stay searchable. Production frameworks (templates / rubrics / playbooks that a content skill applies when generating — e.g. the SNS hook playbook) do NOT belong in wiki/notes/; they live in .claude/skills/_shared/ so they stay out of semantic search and are referenced by skills.
  4. Add backlinks: if note A now references note B, make sure B has an entry pointing back to A when it's meaningful.
  5. Never modify or delete original files in wiki/raw/ (companion .md files you just created are fine to edit).
  6. Record each processed raw file in the ledger. After you finish distilling a raw file, run:
    python scripts/ingest.py record <raw-filename> <note1,note2,...>
    
    where the second argument is a comma-separated list of note IDs (filenames without .md) produced or updated from that raw file. This is how the ledger tracks what's been ingested — without it, the file will show up as "new" on every run.
  7. At the end, print a short summary: how many raw files processed, how many notes created, how many notes updated, and which decisions you're least sure about so the user can correct you.

Remember: small, focused notes are better than big ones. Split when in doubt.

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. 1mo ago Changed · +1 lines f79d5b536f43
  2. 2mo ago First seen · 36 lines · 15 tokens per session scan A f1373ae27032

Subscribe to this mod's changes

ingest is a command published in the GitHub repository slowww-ai/second-brain (10 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 966 once invoked, about $0.0001 per session on Opus 5.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

ingest compared with commands from other repositories

ingest next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ingestslowww-ai/second-brainCommand101mo agoMITA15Claude Code
brand-generateferdinandobons/brand-docsCommand2913mo agoMITA0Claude Code
cti-report7onez/cti-expertCommand62215d agononeA45Claude Code
render-figuresbraininahat/brains-in-a-hatCommand418d agoMITA17Claude Code
ppt-image2-editable-rebuildwwe-dog/ppt-image2-editable-rebuildCommand2045mo agoUnlicenseA15Claude Code
publish-api-docsnavraj007in/architecture-cowork-pluginCommand34mo agoApache-2.0A17Claude Code
write-patentjiutuhky/my-super-capsuleCommand118mo agoMITA48Claude Code