$npx -y skills add NicholasSpisak/second-brain --skill second-brain-ingestProcess raw source documents into wiki pages. Use when the user adds files to raw/ and wants them ingested, says "process this source", "ingest this article", "I added something to raw/", or wants to incorporate new material into their knowledge base.
| 1 | # Second Brain — Ingest |
| 2 | |
| 3 | Process raw source documents into structured, interlinked wiki pages. |
| 4 | |
| 5 | ## Identify Sources to Process |
| 6 | |
| 7 | Determine which files need ingestion: |
| 8 | |
| 9 | 1. If the user specifies a file or files, use those |
| 10 | 2. If the user says "process new sources" or similar, detect unprocessed files: |
| 11 | - List all files in `raw/` (excluding `raw/assets/`) |
| 12 | - Read `wiki/log.md` and extract all previously ingested source filenames from `ingest` entries |
| 13 | - Any file in `raw/` not listed in the log is unprocessed |
| 14 | 3. If no unprocessed files are found, tell the user |
| 15 | |
| 16 | ## Process Each Source |
| 17 | |
| 18 | For each source file, follow this workflow: |
| 19 | |
| 20 | ### 1. Read the source completely |
| 21 | |
| 22 | Read the entire file. If the file contains image references, note them — read the images separately if they contain important information. |
| 23 | |
| 24 | ### 2. Discuss key takeaways with the user |
| 25 | |
| 26 | Before writing anything, share the 3-5 most important takeaways from the source. Ask the user if they want to emphasize any particular aspects or skip any topics. Wait for confirmation before proceeding. |
| 27 | |
| 28 | ### 3. Create source summary page |
| 29 | |
| 30 | Create a new file in `wiki/sources/` named after the source (slugified). Include: |
| 31 | |
| 32 | --- |
| 33 | tags: [relevant, tags] |
| 34 | sources: [original-filename.md] |
| 35 | created: YYYY-MM-DD |
| 36 | updated: YYYY-MM-DD |
| 37 | --- |
| 38 | |
| 39 | # Source Title |
| 40 | |
| 41 | **Source:** original-filename.md |
| 42 | **Date ingested:** YYYY-MM-DD |
| 43 | **Type:** article | paper | transcript | notes | etc. |
| 44 | |
| 45 | ## Summary |
| 46 | |
| 47 | Structured summary of the source content. |
| 48 | |
| 49 | ## Key Claims |
| 50 | |
| 51 | - Claim 1 |
| 52 | - Claim 2 |
| 53 | - ... |
| 54 | |
| 55 | ## Entities Mentioned |
| 56 | |
| 57 | - [[Entity Name]] — brief context |
| 58 | - ... |
| 59 | |
| 60 | ## Concepts Covered |
| 61 | |
| 62 | - [[Concept Name]] — brief context |
| 63 | - ... |
| 64 | |
| 65 | ### 4. Update entity and concept pages |
| 66 | |
| 67 | For each entity (person, organization, product, tool) and concept (idea, framework, theory, pattern) mentioned in the source: |
| 68 | |
| 69 | **If a wiki page already exists:** |
| 70 | - Read the existing page |
| 71 | - Add new information from this source |
| 72 | - Add the source to the `sources:` frontmatter list |
| 73 | - Update the `updated:` date |
| 74 | - Note any contradictions with existing content, citing both sources |
| 75 | |
| 76 | **If no wiki page exists:** |
| 77 | - Create a new page in the appropriate subdirectory: |
| 78 | - `wiki/entities/` for people, organizations, products, tools |
| 79 | - `wiki/concepts/` for ideas, frameworks, theories, patterns |
| 80 | - Include YAML frontmatter with tags, sources, created, and updated fields |
| 81 | - Write a focused summary based on what this source says about the topic |
| 82 | |
| 83 | ### 5. Add wikilinks |
| 84 | |
| 85 | Ensure all related pages link to each other using `[[wikilink]]` syntax. Every mention of an entity or concept that has its own page should be linked. |
| 86 | |
| 87 | ### 6. Update wiki/index.md |
| 88 | |
| 89 | For each new page created, add an entry under the appropriate category header: |
| 90 | |
| 91 | - [[Page Name]] — one-line summary (under 120 characters) |
| 92 | |
| 93 | ### 7. Update wiki/log.md |
| 94 | |
| 95 | Append: |
| 96 | |
| 97 | ## [YYYY-MM-DD] ingest | Source Title |
| 98 | Processed source-filename.md. Created N new pages, updated M existing pages. |
| 99 | New entities: [[Entity1]], [[Entity2]]. New concepts: [[Concept1]]. |
| 100 | |
| 101 | ### 8. Report results |
| 102 | |
| 103 | Tell the user what was done: |
| 104 | - Pages created (with links) |
| 105 | - Pages updated (with what changed) |
| 106 | - New entities and concepts identified |
| 107 | - Any contradictions found with existing content |
| 108 | |
| 109 | ## Conventions |
| 110 | |
| 111 | - Source summary pages are **factual only**. Save interpretation and synthesis for concept and synthesis pages. |
| 112 | - A single source typically touches **10-15 wiki pages**. This is normal and expected. |
| 113 | - When new information contradicts existing wiki content, **update the wiki page and note the contradiction** with both sources cited. |
| 114 | - **Prefer updating existing pages** over creating new ones. Only create a new page when the topic is distinct enough to warrant its own page. |
| 115 | - Use `[[wikilinks]]` for all internal references. Never use raw file paths. |
| 116 | |
| 117 | ## What's Next |
| 118 | |
| 119 | After ingesting sources, the user can: |
| 120 | - **Ask questions** with `/second-brain-query` to explore what was ingested |
| 121 | - **Ingest more sources** — clip another article and run `/second-brain-ingest` again |
| 122 | - **Health-check** with `/second-brain-lint` after every 10 ingests to catch gaps |