kb-ingest

kb-ingest is a command for Claude Code from eddiebelaval/squire. It costs 0 tokens per session (736 once invoked), scanned A, original, MIT.

A command for adding local files, web pages, or pasted material to a knowledge base for later use. It keeps an inventory of material that has been processed and material still waiting.

In plain words
What is it for?
Use it to ingest a file, fetch a web page, add pasted text, or check a knowledge base’s source inventory.
Why use it?
It turns scattered source material into organised reference content that other knowledge commands can search or query.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths.

Good fit Use it to ingest a file, fetch a web page, add pasted text, or check a knowledge base’s source inventory.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/eddiebelaval/squire/kb-ingest
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/eddiebelaval/squire

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kb-ingest

README.md
[![agentmods](https://agentmods.dev/badge/commands/eddiebelaval/squire/kb-ingest.svg)](https://agentmods.dev/commands/eddiebelaval/squire/kb-ingest)
Your own site
<a href="https://agentmods.dev/commands/eddiebelaval/squire/kb-ingest"><img src="https://agentmods.dev/badge/commands/eddiebelaval/squire/kb-ingest.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 736 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00736
Opus 5 $0.00000 $0.00368
Sonnet 5 $0.00000 $0.00147
Haiku 4.5 $0.00000 $0.00074

Measured 5d ago against content hash fbd2b6f241cb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

kb-ingest scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/kb-ingest.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/kb-ingest -- Knowledge Base Ingest

You ingest raw source material into an id8Labs knowledge base for later compilation.

Arguments: $ARGUMENTS


Route by Arguments

Parse $ARGUMENTS:

Input Action
<kb-name> <file-path> Ingest a local file
<kb-name> <url> Fetch and ingest a web page (uses defuddle)
<kb-name> --paste Ingest pasted content from the user's next message
<kb-name> status Show raw/ inventory (processed vs unprocessed)
(empty) Show help

Setup

  1. Read ~/Development/id8/knowledge/manifest.json
  2. Locate the target KB
  3. Check KB type: if mirror, reject ingest (read-only). If read_only_raw, reject ingest to raw (suggest manual addition to source repo).
  4. Read ~/.claude/skills/knowledge/SKILL.md for article templates

Ingest Process

For Local Files

  1. Read the source file
  2. Generate a slug from the content title or filename (kebab-case, max 40 chars)
  3. Copy to {kb}/raw/{slug}.md with frontmatter:
---
source_url: "local"
source_path: "{original file path}"
source_type: {article | paper | repo | dataset | image | reference}
ingested: YYYY-MM-DD
processed: false
---

{file contents}

For URLs

  1. Use the defuddle skill to fetch and convert the web page to clean markdown
  2. Generate a slug from the page title
  3. Save to {kb}/raw/{slug}.md with frontmatter:
---
source_url: "{url}"
source_type: article
ingested: YYYY-MM-DD
processed: false
---

{defuddled markdown content}
  1. If the page has images, note their URLs in the frontmatter for potential later download

For Paste

  1. Prompt user: "Paste the content you want to ingest."
  2. Accept the content
  3. Ask for a title if not obvious from content
  4. Save to {kb}/raw/{slug}.md with frontmatter (source_url: "paste")

Post-Ingest

After saving the raw file:

  1. Report: "Ingested {filename} to {kb}/raw/. Source type: {type}."
  2. Quick scan: extract 3-5 key topics/claims from the source
  3. Check against existing wiki/_index.md for overlap: "This relates to existing articles: [[concept-x]], [[concept-y]]"
  4. Suggest: "Run /kb-compile {kb-name} to process this into wiki articles."

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 103 lines · 0 tokens per session scan A fbd2b6f241cb

Subscribe to this mod's changes

kb-ingest is a command published in the GitHub repository eddiebelaval/squire (21 stars, last pushed 23d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 736 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.