ingest

ingest is a skill for Claude Code, Codex from lululu811/init-knowledge-base. It costs 92 tokens per session (2,837 once invoked), scanned A, original, MIT.

A knowledge-base importer that turns raw reference files into organized wiki pages. It treats the raw folder as an inbox and the wiki folder as the compiled result.

In plain words
What is it for?
Use it to scan or process selected Markdown, paper, transcript, meeting-note, or web-captured files, creating summaries and pages for sources, concepts, entities, and analyses.
Why use it?
It keeps source material from being processed repeatedly and separates new files from already archived material.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/lululu811/init-knowledge-base/ingest
Any agent
npx skills add lululu811/init-knowledge-base --skill ingest
Clone the repo
git clone --depth 1 https://github.com/lululu811/init-knowledge-base

Made for: Claude Code, Codex.

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 ingest

README.md
[![agentmods](https://agentmods.dev/badge/skills/lululu811/init-knowledge-base/ingest.svg)](https://agentmods.dev/skills/lululu811/init-knowledge-base/ingest)
Your own site
<a href="https://agentmods.dev/skills/lululu811/init-knowledge-base/ingest"><img src="https://agentmods.dev/badge/skills/lululu811/init-knowledge-base/ingest.svg" alt="Measured on agentmods" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,837 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00092 $0.02837
Opus 5 $0.00046 $0.01418
Sonnet 5 $0.00018 $0.00567
Haiku 4.5 $0.00009 $0.00284

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

Security

Grade A, and why

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.

_templates/.claude/skills/ingest/SKILL.md · 295 lines

How it starts

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

ingest 技能

核心工作流:Inbox & Archive

你正在维护一个 LLM Wiki(Obsidian 知识库)。raw/ 目录是"待处理收件箱",wiki/ 是"编译输出层"。

目录结构约定:

  • raw/01-articles/ — 网页剪藏的 Markdown 文章
  • raw/02-papers/ — 论文和 PDF 文献
  • raw/03-transcripts/ — 视频转录文案
  • raw/04-meeting_notes/ — 会议/课堂笔记
  • raw/09-archive/已处理文件的归档目录,禁止读取
  • wiki/sources/ — 资料摘要
  • wiki/entities/ — 实体(人物、公司、工具、产品)
  • wiki/concepts/ — 概念(框架、方法论、理论)
  • wiki/syntheses/ — 综合分析报告

状态追踪机制(增量 Ingest)

系统通过 .claude/ingest-state.json 追踪处理状态,避免重复编译:

{
  "version": 1,
  "last_full_scan": "2026-05-01T10:00:00",
  "files": {
    "raw/01-articles/xxx.md": {
      "hash": "a3f2c1d4",
      "status": "archived",
      "ingested_at": "2026-05-01T10:30:00",
      "outputs": [
        "wiki/sources/摘要-xxx.md",
        "wiki/concepts/YYY.md",
        "wiki/entities/ZZZ.md"
      ]
    }
  }
}

状态规则

状态 含义 处理方式
pending 从未处理过 完整编译
modified 文件内容有变更(哈希不同) 重新编译,更新关联页面
archived 已处理且源文件未变更 跳过
failed 上次处理失败 重新尝试

哈希计算

对文件内容计算简单哈希(如 MD5 或 SHA-256),用于检测变更。

触发逻辑

  1. 用户执行 /ingest:扫描 raw/ 所有子目录(排除 09-archive/),找出待处理文件。
  2. 用户执行 /ingest <path>:仅处理指定文件。
  3. 用户执行 /ingest <url>:URL 摄入模式(见下方"URL 摄入"章节)。
  4. 隐式触发:用户说"把这个资料摄入知识库"、"导入这篇文章"时,自动执行 ingest。

URL 摄入模式

/ingest 的参数以 http://https:// 开头时,触发 URL 摄入流程:

步骤 0:网页抓取与存储

  1. 抓取网页内容:使用 WebFetch 或等效工具获取 URL 指向的页面内容,提取正文文本
  2. 转换为 Markdown:将 HTML 内容转换为 Markdown 格式,保留标题层级、链接、图片引用
  3. 生成本地文件名:从 URL 提取域名和页面标题,生成 kebab-case 文件名
    • 格式:{域名}-{页面slug}.md
    • 示例:https://example.com/article/transformer-explainedexample-com-transformer-explained.md
  4. 存储到 raw/:将转换后的 Markdown 保存到 raw/01-articles/ 目录
  5. 在文件头部添加元信息
    ---
    source_url: <原始URL>
    fetched_at: YYYY-MM-DDTHH:MM:SS
    ---
    
    # <页面标题>
    
    <正文内容>
    
  6. 进入正常编译流水线:从步骤 1 开始处理该文件

注意:URL 摄入模式下,步骤 7(归档)仍然执行,源文件移动到 raw/09-archive/。 如果抓取失败(网络错误、页面不存在),向用户报告失败原因,不创建任何文件。

Read the full file on GitHub · 295 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 · 295 lines · 92 tokens per session scan A 74654c103624

Subscribe to this mod's changes

ingest is a skill published in the GitHub repository lululu811/init-knowledge-base (23 stars, last pushed 21d ago), licensed MIT. It adds 92 tokens to every session and 2,837 once invoked, about $0.0005 per session on Opus 5. 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-08-30.

Related

Other skills, from other repositories

orbit-notion

Open Orbit briefing skill — selected by the Orbit pipeline when Notion is the user's only connected connector, or when the user explicitly scopes their daily digest to Notion. Pulls the past 24 hours of document edits, comments, mentions, and database row changes from the user's authenticated Notion connection and…

nexu-io/open-design · 117 tokens

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…

anthropics/knowledge-work-plugins · 123 tokens

baoyu-youtube-transcript

Downloads YouTube video transcripts/subtitles and cover images by URL or video ID. Supports multiple languages, translation, chapters, and speaker identification. Caches raw data for fast re-formatting. Use when user asks to "get YouTube transcript", "download subtitles", "get captions", "YouTube字幕", "YouTube封面"…

JimLiu/baoyu-skills · 107 tokens

feishu

Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.

Hmbown/CodeWhale · 33 tokens

gog-slides

Google Slides operations through gog.

openclaw/gogcli · 11 tokens

read

Reads URLs and PDFs by fetching source content, defaulting to concise summaries for plain read requests and clean Markdown when asked to convert, save, quote, cite, or feed downstream work. Use when users ask in any language to read, fetch, check, summarize, quote, cite, convert, or save a URL or PDF. Not for local…

tw93/Waza · 78 tokens