ingest-reference
Manage the lifecycle of agent skill references. Use when adding external docs to a skill's references/ directory, formatting raw content into structured references, adding citation metadata, or auditing/pruning stale references.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ingest-reference
- description
- Manage the lifecycle of agent skill references. Use when adding external docs to a skill's references/ directory, formatting raw content into structured references, adding citation metadata, or auditing/pruning stale references.
02 资源文件 7
- 其他CITATION.cff1.2 KB
- 参考文档evals/ingest-reference.yaml2.2 KB
- 参考文档references/agentskills/docs/skill-creation/best-practices.mdx14.5 KB
- 参考文档references/agentskills/docs/specification.mdx7.1 KB
- 参考文档references/agentskills/SUMMARY.md773 B
- 参考文档references/citation-file-format.md5.0 KB
- 参考文档references/okf-0.2.0-spec.md2.2 KB
03 SKILL.md 正文
Ingest Reference
Manage the lifecycle of reference materials for agent skills: decision, ingestion, formatting, attribution, and maintenance.
Use this skill for
- adding external documentation or specifications to a skill's
references/directory - copying or adapting selected shared repository resources into a target skill's own
references/directory so the skill is self-contained - converting raw text or web content into structured, agent-friendly markdown references
- adding or updating
CITATION.cfffiles for provenance and attribution - auditing a skill's references for staleness, bloat, or duplication
- pruning references that no longer improve skill decision quality
Toolchain
- Git Submodule: Preferred as an acquisition source for external repos, not as a runtime dependency of the installed skill. Copy needed content into the skill's
references/. - Firecrawl: Use
firecrawl scrapefor one-offs orcrawlfor site-wide ingestion. - Docling: Preferred for PDF and Word document extraction to high-quality Markdown.
- OKF (Open Knowledge Format): Use version
0.2.0for per-document frontmatter.
Workflow
-
Decide Ingestion Method and Destination.
- Identify the target skill directory and which selected material its executing agent actually needs. Shared repository references and the skill's own spec are authoring inputs, not runtime resources merely because they are available in the checkout.
- Local Material: Copy or adapt needed shared material into
<target-skill>/references/. Reuse the selected source without repeating research. Keep required behavior inline inSKILL.md; do not bundle an entire spec merely to avoid implementing its instructions. - Controlled Inclusion: Use Git Submodules as version-pinned acquisition sources for external repositories. A checkout under
vendor/is not a delivered reference; copy the required material into the target skill'sreferences/rather than requiring submodule initialization at runtime. - Dynamic Scrape: Use Firecrawl for web docs. Leverages
onlyMainContentto achieve up to 93% token reduction vs raw HTML. Validate URLs against authoritative domains (e.g.,*.atlassian.com,*.github.io). - High-Fidelity Extraction: Use Docling for PDF/Word documents. Preserves semantic structures (tables, formulas, reading order) to minimize hallucinations.
-
Structure with OKF Frontmatter.
-
Wrap every ingested
.mdfile in OKF0.2.0frontmatter immediately after extraction. -
OKF Template (v0.2.0):
--- okf_version: '0.2.0' type: [e.g., Web Scrape, PDF Conversion, Git Submodule] title: "Canonical Title" description: "What this document provides." sources: - id: source-id resource: "https://example.com/source.md" title: "Original Title" last_modified: 'YYYY-MM-DD' author: "human:AAID or org:Name" generated: by: agent:rovo # or Tool/Version at: '2026-07-28T09:04:42Z' license: "Apache-2.0" # Optional: if different from root CITATION.cff ---
-
-
Apply the 5/5000 Rule (Progressive Disclosure).
- If a doc set exceeds 5 files or 5,000 tokens, create a
SUMMARY.md(wrapped in OKF) to act as a context map. - List sub-documents in a table format:
| Source | Purpose | Loading Trigger |. - This prevents "context rot" and ensures the agent loads detailed context only when intent-based triggers are met.
- If a doc set exceeds 5 files or 5,000 tokens, create a
-
Dual-Layer Attribution.
- Global (CITATION.cff): Provenance at the target skill's root for authors, primary repositories, and top-level licenses; do not rely solely on the toolkit root's metadata. Preserve upstream attribution and license notices when copying or adapting material.
- Document (OKF 0.2.0): Per-file extraction metadata (exact source, timestamp, specific author).
-
Link with Intent-Based Triggers.
- In
SKILL.md, add a "Reference load triggers" section pointing to the target skill's bundledreferences/files, with paths relative to the skill directory. - Rewrite required links inside copied references to bundled destinations too. Include necessary linked material or remove irrelevant links; do not leave required reads pointing to shared directories, sibling skills, absolute checkout paths, or symlinks escaping the package. Retain source paths or URLs only as provenance, clearly separate from runtime load instructions.
- Target the
SUMMARY.mdfirst for sets exceeding 5 files or 5,000 tokens to enable hierarchical exploration. - Trigger phrases must match user intent: "Read
references/api/SUMMARY.mdwhen the user asks for auth endpoint details."
- In
-
Maintain and Audit.
- Update submodule SHAs monthly or upon upstream release.
- Conduct a 90-day provenance audit of OKF
timestampand CFFdate-releasedto detect stale content.
Reference Load Triggers
- Read
references/citation-file-format.mdwhen adding or updating rootCITATION.cffmetadata. - Read
references/okf-0.2.0-spec.mdfor the definitive Open Knowledge Format v0.2.0 specification. - Read
references/agentskills/SUMMARY.mdwhen the user asks about the structure or management of references in agent skills.
Guardrails
- No Mystery Docs: Every file in
references/MUST have OKF frontmatter or be indexed in an OKF-wrappedSUMMARY.md. - Semantic Chunking: Do not split documents at arbitrary token boundaries. Extraction tools should preserve logical section/paragraph boundaries.
- Provenance Parity: Ensure root
CITATION.cffand document OKF metadata remain in sync regarding sources and authors. - Validation: Validate that extracted tables and formulas (LaTeX) maintain structural integrity before finalizing ingestion. Trace required loads from the target
SKILL.mdthrough the copied references and confirm they exist inside the skill directory without access to the authoring checkout. Report missing material or licensing restrictions as blockers; do not silently substitute an external runtime dependency. - Ownership:
develop-skillowns self-contained instruction authoring and routine copying of selected local references. This skill owns substantial reference acquisition, adaptation, and localization.manage-skillsowns standalone package portability review; successful structural validation alone is insufficient.
04 同仓库更多 Skills
develop-skill
Author or revise agent skill instructions from a spec or clear intent. Use for initial authoring, evidence-led instruction repair, or restructuring. Redirect specialist-only research, activation repair, citation, eval, and management tasks.
capture-microskill
Encode human-selected CLI or MCP tool lessons into single-file Agent Skills. Use when asked to capture lessons or merge them into a microskill. Not for discovering lessons, diagnosing failures, or documenting general practices.
write-citations
Create or update a CITATION.cff for a skill or repo from provenance-backed references under references/. Use when adding, updating, or maintaining citations, citable metadata, preferred citation, authors, DOI, or attribution.
new-skill
A sample skill for testing write-citations.
existing-skill
A sample skill for testing write-citations updates.
empty-skill
A sample skill with no references for testing write-citations edge cases.