agentleFS
agamaroraagamarora/second-brain/.claude/skills/ingest/SKILL.md

ingest

Skill2 starsChanged 7 months agoMITView on GitHub

First-class ingest of a source into the brain. Extracts entities, updates affected wiki pages, writes 3-layer provenance (forward + reverse + inline), appends to log.md. Fails if no wiki pages are touched. Use when a new source arrives — inbox note, PDF in raw/, article, meeting transcript.

88 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use daily-arxiv, exp-eval and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • LambenthanSkill

    daily-arxiv

    每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新

    Also in 5 projects that use this

  • LambenthanSkill

    exp-eval

    实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges

    Also in 5 projects that use this

  • phanghonghaoSkill

    poster

    HTML/CSS A4 海报生成。从沙龙/活动 Markdown 文件生成科技风 A4 海报 PDF/PNG。Use when user mentions: poster, 海报, 海报生成, make poster, generate poster, 活动海报, 沙龙海报.

    Also in 5 projects that use this

  • skyllwtSkill

    exp-pilot-eval

    Pilot result evaluation — read pilot results, apply success criteria, update idea page (pilot_result, failure_reason if failed), generate PILOT_VERDICT_REPORT. Called by /ideate Phase 5 after /exp-pilot-run.

    Also in 4 projects that use this

  • skyllwtSkill

    exp-pilot-run

    Pilot experiment execution — read Pilot Spec YAML, write pilot code, run experiment(Confirm with the user before operation and require the applicant to conduct manual inspection), return results. Called by /ideate Phase 5. Does NOT modify wiki pages or judge pass/fail.

    Also in 4 projects that use this

  • +6 more from Lambenthan
  • +1 more from skyllwt

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 6 are distinctive, and 10 are very specific to this project.

  • 0

    Common

    Most of the 72 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No wiki page was touched (touched: [] on source frontmatter)

    line 19
  2. Distinctive:

    If any gate fails, the skill prints the failure and does NOT commit changes.

    line 23
  3. Distinctive:

    Use Read. For PDFs and DOCX, Claude Code reads them natively.

    line 29
  4. Very specific:

    If existing_page != null → call /absorb <entity> <source>

    line 38
  5. Very specific:

    If existing_page == null → auto-create: call /new-page <kind> <slug>, then /absorb.

    line 39
  6. Very specific:

    Low-confidence guard: if extract-entities returned an entity with kind=concept AND the surrounding context gives < 10 words of signal about …

    line 43
  7. Distinctive:

    Add or update frontmatter on the source file:

    line 47
  8. Very specific:

    If source is binary, create a companion <source>.meta.md alongside it with the same frontmatter.

    line 61
  9. Very specific:

    Read wiki/index.md. If it has a ## Page catalog section, for each page touched:

    line 73
  10. Distinctive:

    If the page has an existing row: update the "Last enriched" column to today's date

    line 74
  11. Very specific:

    If the page is new (just created by /new-page in this ingest): append a new row

    line 75
  12. Very specific:

    If ## Page catalog section doesn't exist (template prior to v0.1.1), append it at the end of wiki/index.md:

    line 83
  13. Distinctive:

    If any gate fails: roll back changes (git checkout .) and print the failure using this template:

    line 102
  14. Distinctive:

    Never leave a partial ingest.

    line 116
  15. Very specific:

    When the source is a binary in raw/ (or dropped into inbox/ as a binary):

    line 132
  16. Very specific:

    If the binary is large (>5 MB), ingest a human-written summary note in inbox/ that references the binary rather than ingesting the binary …

    line 139

“Common” is measured: kept by at least 6 in 10 of the 72 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Ingest a source file into the brain. Source can be a markdown note or a binary (PDF, DOCX, etc.).

Usage

/ingest inbox/2026-04-23-karpathy-note.md
/ingest raw/meeting-2026-04-20.pdf

Compounding gate (non-negotiable)

The skill fails if after the run:

  • No wiki page was touched (touched: [] on source frontmatter)
  • Any page listed in touched: does not contain an inline [Source: <source-basename>] marker
  • log.md does not have a new ingest row

If any gate fails, the skill prints the failure and does NOT commit changes. Partial ingests are not allowed.

Steps

1. Read the source

Use Read. For PDFs and DOCX, Claude Code reads them natively. Extract: title, key claims, people mentioned, organizations mentioned, concepts introduced, decisions stated, constraints, dates.

2. Call /extract-entities

Pass source content. Receive [{entity, kind, existing_page}, ...]. Kinds: person, product, partner, competitor, concept, decision, organization.

3. Absorb or create per entity

For each entity:

  • If existing_page != null → call /absorb <entity> <source>
  • If existing_page == null → auto-create: call /new-page <kind> <slug>, then /absorb. Do NOT prompt per entity — the source explicitly mentions this entity, that is sufficient signal to create a stub. Pages are cheap; orphans are easy to clean up later with /lint.

Interactive mode (opt-in): if the user invoked /ingest --ask <path>, prompt "Entity '<name>' (kind: <kind>) has no page. Create one? [y/n]" per new entity. Default is auto-create.

Low-confidence guard: if extract-entities returned an entity with kind=concept AND the surrounding context gives < 10 words of signal about it, skip creation. Orphan stubs dilute the brain.

4. Forward provenance (source frontmatter)

Add or update frontmatter on the source file:

---
title: <title>
date: <ISO date>
status: ingested
touched:
  - wiki/people/<Name>.md
  - wiki/concepts/<slug>.md
  - decisions/<date>-<slug>.md
---

If source is binary, create a companion <source>.meta.md alongside it with the same frontmatter.

5. Append to log.md

## [YYYY-MM-DD] ingest: <source-basename>
Touched: [list of pages]
Entities: [comma list]

6. Update global wiki/index.md catalog

Read wiki/index.md. If it has a ## Page catalog section, for each page touched:

  • If the page has an existing row: update the "Last enriched" column to today's date
  • If the page is new (just created by /new-page in this ingest): append a new row

Row format:

| [[<page-slug>]] | <kind> | <created-date> | <YYYY-MM-DD today> | <one-line from page's first body paragraph> |

If ## Page catalog section doesn't exist (template prior to v0.1.1), append it at the end of wiki/index.md:

## Page catalog

Auto-maintained by /ingest and /new-page. One row per wiki page with a one-line summary.

| Page | Kind | Created | Last enriched | One-line |
|------|------|---------|---------------|----------|

Then append the rows. This catalog is Karpathy's navigation spine — the grep target when someone asks "what do I know about X?".

7. Verify all three gates pass

  • Re-read each touched: page. Confirm [Source: <source-basename>] marker exists inline.
  • Confirm each page's ## Sources that shaped this page section was updated.
  • Confirm log.md has the new row.

If any gate fails: roll back changes (git checkout .) and print the failure using this template:

/ingest FAILED — <source-basename>

Gate: <forward|inline|reverse|catalog|log>
Missing: <specific file and what was expected>
State: rolled back via `git checkout .`

Fix: <concrete next action, e.g., "The source mentioned no existing entities.
Either add a narrative claim that links to an existing wiki page, or call
/new-page first to create the target.">

Never leave a partial ingest. Never silently skip a gate.

Entity path lookup

KindPath
personwiki/people/<Name>.md
productwiki/products/<Name>.md
partnerwiki/partners/<Name>.md
competitorwiki/competitors/<Name>.md
conceptwiki/concepts/<slug>.md
organizationwiki/org/<Name>.md
decisiondecisions/<YYYY-MM-DD>-<slug>.md

Binary sources (PDF, DOCX, images, audio, video)

When the source is a binary in raw/ (or dropped into inbox/ as a binary):

  1. Read natively — Claude Code reads PDFs, DOCX, images natively. For audio/video, transcribe first into a sibling .txt and ingest that. Don't attempt to embed binary bytes.
  2. Create a companion .meta.md — for the source file at raw/<name>.pdf, write raw/<name>.pdf.meta.md with the same frontmatter template used in step 4 of /ingest. The .meta.md carries the touched: list. Binaries themselves can't carry frontmatter.
  3. Inline source marker references the binary — use [Source: [[<basename>.pdf]]] or the binary's filename. The .meta.md is metadata; the binary is canonical.
  4. Never commit binaries by default — raw/** is gitignored. The .meta.md can be tracked with git add -f if the provenance chain is worth preserving without the source.

If the binary is large (>5 MB), ingest a human-written summary note in inbox/ that references the binary rather than ingesting the binary directly. This reduces context usage on every future ingest that touches an overlapping page.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.