---
name: add-new-resource
description: Ingest an external resource (URL, file, pasted text, or transcript) into the knowledge base — store it verbatim, extract key claims, and update wiki.md. Called by sync-curated-content and voice-dump skills; also invoked directly.
---

# add-new-resource — external-content ingest

This skill is the shared ingest primitive for Andrew's knowledge base. It stores any external resource verbatim, extracts high-signal claims, and keeps wiki.md as the lean source-of-truth index. Call it directly with a URL, a file path, a pasted block of text, or a raw transcript and it handles the rest.

## What it does

1. **Store the raw resource verbatim** — fetch (for URLs) or copy (for files/pasted text) the content exactly as-is into `<your-agent-config> # sanitized<YYYY-MM-DD>-<kebab-slug>.<ext>`. Use `.html` for fetched URLs, `.md` for pasted text or transcripts, `.pdf`/`.txt`/etc. for files passed by path. The slug comes from the title or first meaningful phrase — lowercase, hyphens, no punctuation.

2. **Summarize and type-detect** — read the raw file and produce:
   - **Type** — one of: `article`, `newsletter`, `call-transcript`, `voice-dump`, `life-story`, `research-paper`, `thread`, `video-transcript`, `doc`, `other`
   - **Key claims** — 3–8 bullets, high-signal only. No fluff, no summaries of summaries. Each bullet is a concrete claim, decision, number, or named insight from the source. If there's nothing worth extracting, say so in one line and stop.

3. **Update wiki.md** — add (or update if slug already exists) an entry in `<your-agent-config> # sanitized` using this format:

   ```markdown
   ## <Title>
   **Type:** <type> | **Date ingested:** <YYYY-MM-DD> | **Raw:** `raw/<filename>`
   <One-line hook — the sharpest claim or why it matters to Andrew.>

   **Key claims:**
   - <bullet>
   - <bullet>
   - …

   **Related:** [[<wiki-entry-title>]], [[<private-recall> # sanitized<file.md>]]
   ```

   For `[[links]]`: scan existing wiki.md headings and `<your-agent-config> # sanitized` for titles that share a topic, person, project, or technology with the new resource. Link by exact heading/filename. Omit if nothing is genuinely related — don't invent connections.

4. **Flag durable rules/preferences — never auto-write them** — if the resource implies something about how Andrew works, what he values, a standing constraint, a tooling preference, or a recurring process, emit a clearly delimited `NEED-SIGNOFF` block at the end of your response:

   ```
   NEED-SIGNOFF
   Source: raw/<filename>
   Candidate rule: "<the rule in one sentence>"
   Evidence: "<exact quote or paraphrase from the source>"
   Route: improve-system → <private-recall> # sanitized or CLAUDE.md
   ```

   Do NOT write anything to `<your-agent-config> # sanitized` or `CLAUDE.md` — flag only. The improve-system skill handles routing and approval.

## File layout

```
<your-agent-config> # sanitized
├── raw/
│   ├── 2026-06-28-some-article-title.html   # fetched URL
│   ├── 2026-06-28-voice-dump-morning.md     # pasted transcript
│   └── 2026-06-29-research-paper.pdf        # file passed by path
├── context/                                 # (other tooling; not written by this skill)
└── wiki.md                                  # THE index — this skill maintains it
```

## When this skill is invoked directly

Triggers: user says "ingest this", "add this to the KB", "save this resource", "log this transcript", passes a URL and says "save it", or another skill calls this one explicitly.

Action: run all four steps above in order. Report back:
- What was stored (`raw/<filename>`)
- Type detected
- Number of key claims extracted
- Whether wiki.md was added or updated
- Any `NEED-SIGNOFF` blocks, at the end

Do not produce a long recap of the resource content — the wiki entry is the summary.

## Troubleshooting

- **URL fetch fails** — note the error, ask Andrew to paste the content instead; store pasted version as `.md`.
- **Slug collision in raw/** — append `-2`, `-3`, etc. rather than overwriting.
- **wiki.md heading already exists for this slug** — update the entry in place (replace the whole block between the heading and the next `##`); do not duplicate.
- **Voice dump is raw/unedited** — still store verbatim; key-claims extraction is where you apply judgment. If the dump is low-signal, say so and produce 0 claims rather than padding.
