agentleFS
naman10parikhnaman10parikh/wikimem/skills/wikimem-ingest-pipeline/SKILL.md

wikimem-ingest-pipeline

Skill8 starsChanged 26 days agoMITView on GitHub

Turn raw sources (files, folders, URLs, 13 formats) into linted, wikilinked WikiMem pages, and keep a changing folder in sync incrementally. Use WHEN the user says "add/save/import this to my wiki", drops a PDF/DOCX/MD/audio/video, points at a folder that changes daily, or asks to re-ingest only what's new. This is the ingestion + pipeline job (Automations 1+2): detect raw → extract → dedup → lint → save as page. Do NOT use for one-off scratch notes or for querying existing knowledge (use the wikimem skill's ask flow for that).

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not invoke for: ephemeral chat memory, scratch work, or answering a question from already-saved knowledge.

    line 21
  2. Distinctive:

    If there is no vault yet, create one (from the source folder when onboarding):

    line 29
  3. Very specific:

    After the first full ingest, use add-source for daily folders.

    line 57
  4. Distinctive:

    Always end by stating: pages added, any dedup/merge, new orphan count, and the single best next command.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

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

WikiMem Ingest Pipeline — Raw In, Wiki Page Out

What this skill does

WikiMem's ingestion turns any source into a linted, categorized, wikilinked markdown page in a vault. The pipeline is: detect raw → extract text → dedup against existing pages → lint → write page + update index + append log. For folders that change over time, add-source re-runs the pipeline on ONLY the new/changed files using an mtime+sha256 manifest, so repeat ingests stay cheap.

13 supported input formats: md, txt, html, pdf, docx, xlsx, csv, pptx, mp3, mp4, png, jpg, webp.

Trigger — invoke this skill when

  • "Add / save / import / remember this <file | folder | URL>"
  • The user drops a PDF, DOCX, XLSX, audio, or video to keep
  • "Re-ingest my Downloads folder" / "only ingest what changed" / "keep this folder in sync"
  • "Organize these documents into a wiki" / "build a knowledge base from this folder"

Do not invoke for: ephemeral chat memory, scratch work, or answering a question from already-saved knowledge.

Steps

  1. Confirm a vault exists. Resolve it:
    VAULT=$(find . -name "AGENTS.md" -maxdepth 3 | head -1 | xargs dirname 2>/dev/null || echo ".")
    If there is no vault yet, create one (from the source folder when onboarding):
    wikimem init "$VAULT"                          # fresh empty vault
    wikimem init --from-folder ~/Documents/research # seed from an existing folder
    wikimem init --from-repo https://github.com/user/repo  # seed from a git repo
  2. Pick the right command for the source shape:

    SourceCommand
    One file or folder, first timewikimem ingest <path> --vault "$VAULT" --verbose
    A URL (untrusted remote HTML)wikimem scrape <url> --vault "$VAULT", then wikimem ingest
    A folder that changes over timewikimem add-source <path> --vault "$VAULT" (incremental)
    Untrusted URL you want isolatedwikimem sandbox-run --vault "$VAULT" --url <url> (fetch+clean in an E2B microVM), then wikimem ingest
  3. Let the pipeline run. It extracts text (format-aware), dedups against existing pages, lints, and writes one or more wiki pages into the correct category directory, then updates index.md and appends log.md. Editable pipeline prompts live in config.yaml / Settings → Automations → Pipeline.
  4. Verify the vault grew, then lint:
    wikimem status --vault "$VAULT"   # pages, words, sources, wikilinks, orphans
    wikimem lint --vault "$VAULT"     # catch orphan pages the ingest may have created
  5. Suggest the next move: wikimem query "..." to ask about the new content, or /wikimem-improve to let the Observer raise its quality.

Incremental sync (the cheap repeat path)

After the first full ingest, use add-source for daily folders. It reads .wikimem-manifest.json (mtime + sha256 per file) and processes ONLY new or changed files:

wikimem add-source ~/Downloads/ --vault "$VAULT"
# → "3 new, 1 changed, 240 unchanged (skipped)"

This is what to schedule on a cron — full re-ingest of a stable folder is wasteful.

Expected output

A short report the user can act on:

Ingested: report.pdf → 3 pages (research/, decisions/)
Dedup:    1 near-duplicate merged into existing "Observer Budget" page
Vault:    47 → 50 pages · 12,931 words · 2 new orphans
Next:     `wikimem lint --fix` to wire the orphans, or `/wikimem-improve`

Always end by stating: pages added, any dedup/merge, new orphan count, and the single best next command.

Anti-patterns

  • Ingesting a remote URL's raw HTML on the host when it's untrusted — prefer wikimem scrape (markup-stripped) or wikimem sandbox-run (isolated microVM).
  • Re-running full ingest on a folder that only changed by one file — use add-source.
  • Declaring success without running wikimem status to confirm the vault actually grew.

Related

ResourcePath
Ingest commandsrc/cli/commands/ingest.ts → src/core/ingest.ts
Incrementalsrc/cli/commands/add-source.ts → src/core/source-manifest.ts
Sandboxed scrapesrc/cli/commands/sandbox-run.ts → src/core/sandbox-scrape.ts
Lintsrc/cli/commands/lint.ts → src/core/lint.ts
Slash commandtemplates/claude-commands/wikimem-ingest.md

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.