agentleFS
spence-growsspence-grows/claude-skills/skills/ingest-document/SKILL.md

ingest-document

Skill0 starsChanged 5 months agoMITView on GitHub

Ingest a document (or a folder of them) into your searchable knowledge base with visual understanding — render each slide/page/frame to an image, have Claude describe the visual (diagrams, flows, layouts), and store it plus any extracted text so it's searchable. Use when you want to capture the thinking in a deck, PDF, exported Figma frame, screenshot, or a whole folder of design exports. Triggers: 'ingest document', 'ingest this deck/file/folder', 'capture this into the knowledge base', 'add this with vision', 'vision ingest', pointing at a .pptx/.pdf/.png/.jpg or a folder and asking to bring it into the knowledge base.

  • Reads credentials
  • Installs packages

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run via uv with --directory so you don't need to change the working directory:

    line 34
  2. Distinctive:

    Resolve the path: If the file/folder was named loosely, confirm the absolute path.

    line 53
  3. Very specific:

    Decide the project: If the path is under a known watch-folder, omit -p (let it infer).

    line 55
  4. Very specific:

    Run the command: Use a generous timeout: vision makes one model call per slide/page/frame, so a large deck can take a minute or more.

    line 58
  5. Distinctive:

    After ingesting, confirm retrieval with:

    line 74

≈ “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

Ingest Document (with visual understanding)

Wraps a vision-ingest CLI command that renders each slide/page/frame of a document to an image, asks Claude to describe the visual, and stores that description plus any extracted text in your vector knowledge base. This is what makes diagram-only slides and Figma frames searchable, not just their text.

Requirements / adapt this

This skill assumes a local knowledge-base CLI that exposes a vision <path> command (renders → describes → embeds). The reference backend is the copilot local-first KB tool, run via uv. Swap the command for your own KB backend — the pattern (render every page to an image, caption it with a model, store caption + text) is the reusable part.

Set the path to your KB repo once:

COP="$HOME/path/to/copilot"   # the KB CLI repo (its .env is cwd-relative)

When to use

You point at a file (.pdf, .pptx, .png, .jpg/.jpeg) or a folder of them and want the thinking in them captured and searchable. Works for decks, exported Figma frames, screenshots, and PDF exports of Keynote/Google Slides.

How to run

Run via uv with --directory so you don't need to change the working directory:

uv --directory "$COP" run copilot vision "<PATH>"

<PATH> is the file or folder. Options:

  • -p, --project <id> — target project. Omit it when the path is inside a registered watch-folder (the command infers the project automatically). Pass it explicitly for files outside any watch-folder.
  • --force — re-ingest even if the file is unchanged.

List registered projects (to pick -p) with:

uv --directory "$COP" run copilot projects

Steps

  1. Resolve the path. If the file/folder was named loosely, confirm the absolute path. If it doesn't exist, say so rather than guessing.
  2. Decide the project. If the path is under a known watch-folder, omit -p (let it infer). Otherwise run projects, pick the right one, and pass -p <id>. If no project fits, ask which project — or whether to create one.
  3. Run the command. Use a generous timeout: vision makes one model call per slide/page/frame, so a large deck can take a minute or more. A 50-page deck ≈ 50 calls.
  4. Report the N docs / M chunks result. Re-running is cheap — unchanged files are skipped by content hash (0 docs / 0 chunks means nothing changed, not a failure). If a file was already ingested without vision (e.g. by a plain folder sync), the byte-identical file will be skipped — add --force to apply vision to it now.

Notes & gotchas

  • .pptx needs LibreOffice (soffice) installed to render. Without it, the deck falls back to text-only with a logged warning — in that case, export the deck to PDF and re-run, or brew install --cask libreoffice.
  • .pdf, .png, .jpg need no system dependency (rendering uses the bundled pymupdf).
  • Rendered page images are kept for provenance under ~/.copilot/raw/renders/<doc_id>/.
  • A harmless MuPDF error: ... structure tree line may print to stderr on some PDFs; the render still succeeds — ignore it.
  • After ingesting, confirm retrieval with:
    uv --directory "$COP" run copilot query "<something visual from the file>" -p <project>
  • For Figma, prefer a dedicated sync-figma command (pulls frames over the API automatically). Use this skill for Figma only when frames have already been exported to image/PDF files.

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.