Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Search & research

cp-skill-ingest

Use when asked to ingest one URL or local snapshot into a tracked .ingest.md source analysis, or to execute a bounded re-ingest request. Retaining quotes in an existing ingest is cp-skill-ground's job, not this skill's.

zby · AI review on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add zby/commonplace --skill cp-skill-ingest

About this skill


name: cp-skill-ingest description: Use when asked to ingest one URL or local snapshot into a tracked .ingest.md source analysis, or to execute a bounded re-ingest request. Retaining quotes in an existing ingest is cp-skill-ground's job, not this skill's. type: kb/types/instruction.md user-invocable: true allowed-tools: Read, Write, Grep, Glob, Bash, Skill, Task context: fork model: opus argument-hint: "[url-or-file | re_ingest_request] — URL, snapshot path, or structured re-ingest request. No argument lists recent snapshots."

Ingest source

Ingest one URL-backed primary source into a tracked kb/sources/*.ingest.md report. The reading copy may already exist as a Markdown snapshot under kb/sources/.snapshots/.

Contract

Target: $ARGUMENTS

The direct output is the .ingest.md report in kb/sources/, with the local snapshot's slug. URL snapshotting and connection discovery may write their own local or generated artifacts. Do not directly write any other library artifacts.

The parent agent owns target resolution, snapshotting, checksum guards, connection discovery, drafting-worker dispatch, handoff verification, final validation, and user reporting. One primary fresh drafting worker owns the ingest analysis and writes the .ingest.md report; at most one fresh replacement worker may repair that report after a failed handoff. Use only a harness-provided sub-agent or worker mechanism; never launch codex, codex exec, claude, or another agent CLI from the shell. If the harness cannot launch a fresh worker without carrying the parent's conversation history, stop after connection discovery and report that isolated drafting is unavailable. Do not draft locally unless the user explicitly authorizes a local fallback for that run. If authorized, execute the same standalone drafting instruction with the same fixed inputs and report drafting was local, not delegated as a workflow exception.

The drafting worker executes the standalone draft-ingest-report.md instruction. That instruction owns report analysis, writing, and worker-side verification; this skill owns only the surrounding orchestration.

The caller may supply an occasion: the question or job that brought the source in. It is the one task-specific input the worker receives beyond the fixed paths. It must be stated before the source is read and must not carry the parent's reading of the source; the worker records it and lets it govern only the report's selection sections. An occasion that is already an exact source-side claim is cp-skill-ground's job once the ingest exists; pass the broader question here, or none.

The canonical empty Quotes block is the following complete Markdown section, including the blank line after its sentence:

## Quotes

No source quotes have been retained yet.

A re-ingest caller supplies this structured request instead of an ordinary URL-or-file target:

re_ingest_request:
  ingest_path: <exact ingest path>
  snapshot_path: <name-paired snapshot path>
  occasion: <optional; omitted keeps the incumbent's occasion field>

Steps

  1. Resolve the target and replacement policy.
    • If the target is a re_ingest_request, require exactly one existing kb/sources/<slug>.ingest.md and its exact name-paired kb/sources/.snapshots/<slug>.md. Reject a different snapshot_path; do not search for a snapshot by checksum. Read the ingest's source and snapshot_sha256, reject the retired source_snapshot and code_revisions fields, and require the snapshot's frontmatter source to equal the ingest's canonical source. Compute lowercase SHA-256 from the exact snapshot bytes.
      • Require zero or one incumbent Quotes block; stop before mutation if more than one exists. The block starts at the exact ## Quotes heading and includes every byte through the byte immediately before the next level-two heading. If the section is absent, use the canonical empty Quotes block; do not infer quotes from any other section. Treat Quotes as empty only when the section is absent or is exactly the canonical empty block. Any other present Quotes block is populated.
      • If the snapshot checksum equals the incumbent snapshot_sha256, set retained_quotes to the extracted block and continue. Do not rewrite, normalize, or reformat it.
      • If the checksums differ, stop before connection discovery, backup creation, worker dispatch, or output mutation. Report both checksums, both paired paths, and the canonical source. An ingest's snapshot_sha256 is immutable because a note marked (snapshot required) may depend on those exact bytes even when Quotes is empty. A changed observation requires a distinct snapshot basename and ingest; re-ingest never changes the incumbent observation.
      • Set occasion to the request's value when supplied, else to the incumbent's frontmatter occasion verbatim, else none.
      • Set output_path to the supplied ingest_path, retain whether it existed at the start of the run, and skip the remaining Step 1 bullets.
    • If $ARGUMENTS is empty, list recent kb/sources/.snapshots/*.md files, then ask which one to ingest.
    • For a URL target, first search tracked kb/sources/*.ingest.md files for an exact frontmatter source match. If several match, stop and report the duplicate ingests. If one matches, resolve only its name-paired snapshot. If that file is missing, capture the ingest's canonical source and continue only if the adapter returns that exact name-paired path. Do not search other snapshots for the incumbent checksum.
    • If the target is a paperswithcode.co/paper/ URL, or it is an arXiv paper and the user explicitly requested code grounding, read and follow the conditional procedure ingest-paper-with-code.md. In an i
Read the complete source ↗