brain-process
Skill1 starsChanged 5 months agoMITView on GitHub
Process everything in brain/inbox/. Classifies, extracts, files, and links each item. Produces a daily digest. Also runs as a daily scheduled task.
In this repository14 other files it gives its agents.
- brain-addSkill
- brain-add-videoSkill
- brain-checkSkill
- brain-digestSkill
- brain-saveSkill
- brain-searchSkill
- client-onboardSkill
- consulting-deckSkill
- good-morningSkill
- harvestSkill
- logSkill
- taskSkill
- weekly-reviewSkill
- wrap-sessionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. About 0 are common, 20 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈20
Distinctive · estimate
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
- Distinctive: line 16
If inbox is empty, report "Inbox is empty — nothing to process." and stop immediately (do NOT read brain-config.md, index.md, or any other …
- Very specific: line 39
For
.mdfiles (Web Clipper clips): Before processing as text, read the file and check: - Very specific: line 42
If yes → extract the video URL and process using the video pipeline (see brain-config.md video rules): extract transcript via yt-dlp, …
- Distinctive: line 43
If no → process as normal text/article.
- Very specific: line 45
For
links.txt: When processing each URL line, check if the URL matches a video pattern: - Very specific: line 46
If video URL → process using the video pipeline (yt-dlp transcript extraction, video template, type: video)
- Distinctive: line 47
If non-video URL → fetch via WebFetch, process as article (unchanged)
- Distinctive: line 57
Add frontmatter + inline [[wiki-links]]
- Distinctive: line 68
Read image (multimodal — Claude can see it)
- Distinctive: line 70
Create note with description + extracted info
- Distinctive: line 74
Read file, split by newline (skip empty lines)
- Distinctive: line 78
Create one note per URL
- Very specific: line 85
Check for related existing notes, update related: fields bidirectionally
- Distinctive: line 92
After all items processed, scan for ghost links with 3+ references
- Very specific: line 93
If any found, create MOCs in mocs/ per brain-config.md MOC rules
- Very specific: line 94
Update mocs/_Index.md with new MOCs
- Distinctive: line 97
If new tags were introduced, they should already be added during processing
- Distinctive: line 98
If a new subcategory seems warranted (5+ notes that don't fit existing subcategories), note this in the digest as a suggestion
- Very specific: line 101
Check line count of brain/meta/log.md using Bash (wc -l)
- Very specific: line 102
If >100 entries: archive to meta/log-archive/YYYY-QN.md (create directory if needed), then start fresh log.md with just the header
- Distinctive: line 153
Add ALL newly created notes in the appropriate category sections
- Distinctive: line 155
If a new category section is needed (e.g., first note in admin/), add the section header
- Distinctive: line 156
Update the "Total: X notes" count in the header
- Distinctive: line 157
Update "Last updated: YYYY-MM-DD"
- Distinctive: line 174
Keep it under ~500 words
- Distinctive: line 188
If a file can't be processed (corrupt PDF, empty file, etc.), leave it in inbox/ and note it in the digest under "Pending"
- Very specific: line 189
If WebFetch fails for a URL, create a seed note with just the URL and mark status as seed with a note that fetching failed
- Distinctive: line 190
If category is truly ambiguous for an item, file in the closest match and flag in digest
- Distinctive: line 195
Always read brain-config.md after confirming inbox has items (step 1 checks inbox first)
- Distinctive: line 196
Do not create duplicate notes — search before creating
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/brain-process
Inbox processing pipeline. Iterates all unprocessed files in brain/inbox/, processes each one, and produces a daily digest.
Steps
- Scan
brain/inbox/for all files (excluding.processed/subdirectory and hidden files).- If inbox is empty, report "Inbox is empty — nothing to process." and stop immediately (do NOT read brain-config.md, index.md, or any other files).
- List all found files with types.
- Read
brain-config.mdto load current taxonomy, filing signals, tags, and processing rules. Also readbrain-config-rules.mdif it exists (processing rules, MOC rules, digest format). For each file in inbox/, process sequentially:
Detect file type
.md,.txt→ text processing (but check for Web Clipper / video URL first — see below).pdf→ PDF processing.png,.jpg,.jpeg,.gif,.webp→ image processinglinks.txt→ special: one URL per line, process each separately (with video detection — see below)- Other → attempt text read, fall back to noting as unprocessable
Video URL detection (applies to .md files and links.txt)
These URL patterns indicate video content:
youtube.com/watchyoutu.be/youtube.com/shorts/youtube.com/live/vimeo.com/
For
.mdfiles (Web Clipper clips): Before processing as text, read the file and check:- Does it have a
source:frontmatter field containing a video URL pattern? - Does the body contain a video URL as primary content?
If yes → extract the video URL and process using the video pipeline (see brain-config.md video rules): extract transcript via
yt-dlp, create atype: videonote with channel/duration/published frontmatter fields. If no → process as normal text/article.
For
links.txt: When processing each URL line, check if the URL matches a video pattern:- If video URL → process using the video pipeline (yt-dlp transcript extraction, video template,
type: video) - If non-video URL → fetch via WebFetch, process as article (unchanged)
Process content (per brain-config.md processing rules)
Text files (.md, .txt):
- Read content
- Analyze: is this a thought, meeting notes, transcript, article, snippet, list of items?
- Clean up formatting
- Extract key points and structure into appropriate note type
- Determine category via filing signals
- Add frontmatter + inline [[wiki-links]]
PDF files:
- Read PDF content
- Extract title, author, structure
- Summarize each major section
- Extract key data points
- Create comprehensive note
- Determine category via filing signals
Images:
- Read image (multimodal — Claude can see it)
- Describe content, extract visible text
- Create note with description + extracted info
- Determine category based on content
links.txt:
- Read file, split by newline (skip empty lines)
- For each URL: check if it matches a video URL pattern (youtube.com/watch, youtu.be/, youtube.com/shorts/, youtube.com/live/, vimeo.com/)
- Video URL → process using video pipeline: extract metadata + transcript via
yt-dlp, createtype: videonote with channel/duration/published fields, use video template from brain-config.md - Non-video URL → fetch via WebFetch, process as article (unchanged)
- Video URL → process using video pipeline: extract metadata + transcript via
- Create one note per URL
File the processed note
- Path:
brain/{category}/{subcategory}[/{subsubcategory}]/{kebab-case-title}.md - Subsubcategory routing (when present in
brain-config.md): If the chosen subcategory hassubsubcategories:defined (e.g.personal/health-fitness/{endurance,strength,technique,nutrition-recovery}), match the content/tags against the subsubcategorysignals:and file one level deeper. If the item has asubcategory:frontmatter field set to a path-like value (e.g."health-fitness/endurance"), honor it directly as a hint rather than re-deriving. - Full YAML frontmatter
- Structured body with inline [[wiki-links]] (3-8 per note)
- Check for related existing notes, update
related:fields bidirectionally
Archive original
- Move original file to
brain/inbox/.processed/YYYY-MM-DD-{original-filename} - Never delete originals
- Check for new MOC opportunities:
- After all items processed, scan for ghost links with 3+ references
- If any found, create MOCs in
mocs/per brain-config.md MOC rules - Update
mocs/_Index.mdwith new MOCs
- Check if brain-config.md needs updates:
- If new tags were introduced, they should already be added during processing
- If a new subcategory seems warranted (5+ notes that don't fit existing subcategories), note this in the digest as a suggestion
- Rotate log.md if oversized:
- Check line count of
brain/meta/log.mdusing Bash (wc -l) - If >100 entries: archive to
meta/log-archive/YYYY-QN.md(create directory if needed), then start fresh log.md with just the header
- Check line count of
Generate daily digest at
brain/meta/digests/YYYY-MM-DD.md:--- title: "Brain Digest — YYYY-MM-DD" type: digest created: YYYY-MM-DD --- ## Processed Today | Source | → | Destination | Type | Tags | |--------|---|-------------|------|------| | inbox/filename.pdf | → | admin/tax-finance/vat-rules.md | reference | #vat #taxation | ## Filed In - professional: X notes - admin: X notes - personal: X notes - creative: X notes ## New Tags Added - #new-tag (added because: reason) ## Links Created - [[Topic A]] now referenced by X notes - Connected: note-a.md ↔ note-b.md (shared topic: [[Topic]]) ## New MOCs Created - mocs/Topic Name.md (X referencing notes) ## Pending - inbox/unprocessable-file.xyz (reason: unsupported format) ## Brain Stats - Total notes: X - By category: professional (X), personal (X), admin (X), creative (X) - MOCs: X - Inbox remaining: X- Update index.md (ONCE for entire batch):
- Read
brain/index.mdonce - Add ALL newly created notes in the appropriate category sections
- Entry format:
- [[note-name]](category/subcategory[/subsubcategory]/note-name.md) — One-line summary. Tags: tag1, tag2 - If a new category section is needed (e.g., first note in admin/), add the section header
- Update the "Total: X notes" count in the header
- Update "Last updated: YYYY-MM-DD"
- Write back once
- Read
- Append to log.md (do NOT read the file — append only):
- For each processed item, use Bash to append directly:
echo '## [YYYY-MM-DD] ingest | {note-title} Filed to: {category}/{subcategory}. Source: {source type}. {X} wiki-links created. ' >> brain/meta/log.md - Batch all entries into a single append command
- For each processed item, use Bash to append directly:
- Update hot cache (ONCE for entire batch):
- Rewrite
brain/meta/hot.mdwith:- Summary of this processing batch (what was processed, where it was filed)
- Current brain shape (note counts, strongest clusters, growing edges)
- Current themes based on recent additions
- Keep it under ~500 words
- Rewrite
- Report completion:
📦 Processed {count} items from inbox Filed: {breakdown by category} New links: {count} Digest: meta/digests/YYYY-MM-DD.md Index: updated ({count} new entries) Log: {count} entries appended
Error handling
- If a file can't be processed (corrupt PDF, empty file, etc.), leave it in inbox/ and note it in the digest under "Pending"
- If WebFetch fails for a URL, create a seed note with just the URL and mark status as
seedwith a note that fetching failed - If category is truly ambiguous for an item, file in the closest match and flag in digest
Important
- Process items one at a time, completing each before starting the next
- Always read brain-config.md after confirming inbox has items (step 1 checks inbox first)
- Do not create duplicate notes — search before creating
- Batch all file updates (index.md, log.md, hot.md) — read/write each ONCE at the end, not per item
- This skill is also run by the daily cron job. When run via cron, skip the interactive report and just produce the digest
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
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.

