Capture

From ignromanov/llm-obsidian-wiki · View interactive version

Capture is an AI agent skill from the GitHub repository ignromanov/llm-obsidian-wiki. This skill should be used when an agent needs to ingest a source (URL, YouTube, GitHub, PDF, clipboard, session log) into the vault. Triggers when wiki-scribe or wiki-researcher needs to "capture", "save source", "intake", "file URL", or "hash and store".

How to use this skill

Skill file

Capture — Universal Source Intake

Purpose

Ingest one source into raw/<type>/<slug>.<ext> (immutable, SHA-256 hashed) and create wiki/sources/<slug>.md (source-summary with key_claims[]).

Used by wiki-scribe (primary, passive intake) and wiki-researcher (via research workflow).

Trigger phrases (agent perspective)

Inputs

One of:

Outputs

Two files per capture:

  1. raw/<type>/<slug>.<ext> — immutable, SHA-256 in frontmatter, full content
  2. wiki/sources/<slug>.md — source-summary with key_claims: [{quote, anchor, confidence}], quality, captured_by

Workflow

  1. Detect source type from URL or path:
  1. Invoke the appropriate script with --vault $VAULT_PATH and --source $INPUT. Scripts handle SHA-256 and frontmatter.
  1. Extract key_claims for source-summary:
  1. Set quality field in source-summary:
  1. Set captured_by to invoking agent name (wiki-scribe or wiki-researcher).

Web→MD stack (for capture-url.sh)

The script tries three extractors in order:

  1. defuddle (Node CLI, MIT, local) — primary
  2. trafilatura (Python CLI, Apache-2.0, local) — fallback if defuddle fails OR content <500 chars
  3. r.jina.ai (cloud) — opt-in via env WIKI_ALLOW_CLOUD=1

If all three fail, exit 3 and tell user to provide content via capture-text.sh (manual clipboard).

Quality gate

Scripts used

Anti-patterns

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.