describe-collection
Skill1 starsChanged 5 months agoApache-2.0View on GitHub
Walk a collection, capture each work's source metadata and place in the collection hierarchy, then dispatch the field-generator agent to produce a first-pass, schema-conformant metadata record per work with value_ids and provenance.
In this repository10 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- build-application-profileSkill
- classify-and-routeSkill
- compute-pass-rateSkill
- export-for-repositorySkill
- preprocess-derivativesSkill
- refine-promptsSkill
- resolve-authoritiesSkill
- review-triageSkill
- tune-house-styleSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
Default behavior: process at most a small sample, then stop and hand the operator a summary so they can sanity-check before any larger run.
- Distinctive: line 50
When a manifest or directory holds more than the sample size, generate the sample, write its records and the run manifest, present the …
- Very specific: line 126
Read the generation model from application-profile.json (model.generation).
- Very specific: line 142
Write the start fields now: run_id, started_at, dataset (sample_id, item_count, item_ids, source, and held_out when this is a held-out …
- Very specific: line 177
Do not resolve authorities or invent URIs.
- Very specific: line 178
Do not review or accept records.
- Very specific: line 179
Do not export. Records land in runs/.
- Distinctive: line 180
Do not strip collection context.
- Very specific: line 181
Do not name unidentified people, and route sensitive, culturally restricted, or reparative-description cases to review_flags rather than …
- Distinctive: line 184
Do not process a large batch before a sample has cleared review.
≈ “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.
Files
describe-collection
The operator entry point for a first-pass run. It owns pipeline stage 1 (intake and inventory) and
drives stage 4 (generation) by dispatching the field-generator agent against the generation
prompt. It walks a collection, captures what already describes each work and where it sits in the
collection tree, runs generation per work, and writes one metadata record per work plus a run
manifest.
It is the stage that produces the first-pass records the rest of the loop reviews and improves. It
stops at first-pass output: every controlled value leaves this skill with authority_status of
needs_verification, and the deterministic resolve-authorities stage (stage 5) confirms candidates
against the real authorities later. This skill does not resolve authorities, does not review, and does
not export.
Where it sits in the pipeline
| Stage | Skill or asset | |
| Before | 2 Pre-processing (OCR, AV transcription) | preprocess-derivatives |
| Before | 3 Classification and routing | classify-and-route |
| This skill | 1 Intake and inventory + 4 Generation (LLM) | describe-collection (dispatches agent field-generator, prompt ../../prompts/system/metadata-generation.v1.md) |
| After | 5 Authority resolution (deterministic) | resolve-authorities |
| After | 6 Human review (confidence-gated) | review-triage |
| After | 7 Export and ingest | export-for-repository |
For a simple image collection with no derivatives or transcription needed, this skill can follow
intake directly. When works carry text or audiovisual material, run preprocess-derivatives and
classify-and-route first so generation receives OCR text, transcripts, and the right schema and
prompt set. This skill consumes those upstream outputs; it does not reproduce them.
The LLM is one stage of seven. Stage 4 here is the only generative step; intake (stage 1) is deterministic capture, and authority resolution (stage 5) is deterministic lookup downstream. Keeping generation boxed into one inspectable stage is what makes the output auditable. See ../../docs/architecture.md.
Sample-before-scale: the hard checkpoint
Default behavior: process at most a small sample, then stop and hand the operator a summary so they can sanity-check before any larger run. This checkpoint enforces the improvement loop's discipline. A generic prompt rarely clears an institution's per-record threshold on the first pass, and the loop exists to raise it on a sample before the volume run earns sampled review. Do not process a large batch before a sample has cleared review. See ../../docs/the-improvement-loop.md and the operating spine in ../../CLAUDE.md.
When a manifest or directory holds more than the sample size, generate the sample, write its records and the run manifest, present the summary table, and ask the operator before continuing.
Inputs
Composed from this shared repo plus the adjacent institution workspace, with local material winning (see ../../docs/adjacent-workspace.md).
From the adjacent workspace (named workspace locations, reachable at ../<institution>-metadata/ from
the clone, not repo-relative paths):
works/: the digital objects to describe, or a manifest enumerating them. For text-bearing or audiovisual works this includes the derivatives produced bypreprocess-derivatives(OCR text, Whisper transcripts, technical metadata).application-profile.json: what to generate and how. This skill readstarget_schema,controlled_vocabularies,description_style,required_fields,collection_hierarchy, andmodel. Its shape is fixed by ../../schemas/application-profile.schema.json.context/: collection scope, house style, exemplar finished records for few-shot calibration, and donor or provenance notes. The profile'sdescription_style.examples_pathpoints in here.overrides/: any local prompt, skill, or agent customization that shadows the shared asset at the same relative path.
From this repo (relative to skills/describe-collection/):
- The generation prompt: ../../prompts/system/metadata-generation.v1.md.
Its
{{...}}placeholders are filled fromapplication-profile.json. - The record contract: ../../schemas/metadata-record.schema.json.
- The run-manifest contract: ../../schemas/run-manifest.schema.json.
- The generation agent:
field-generator(in../../agents/).
What it does
Stage 1: intake and inventory
For each work, capture the collection context as fact, before generation, so the hierarchy enters the
record from the institution's arrangement rather than from model inference. Write it into the record's
collection_context object (the schema-backed home; there is no separate inventory schema):
- The position in the hierarchy:
repository,collection,series,subseries,is_part_of(the identifier or title of the immediate parent), andaccession, drawn from the directory structure, a DAMS export, a spreadsheet, or the profile'scollection_hierarchy. source_metadata: every scrap of pre-existing description that travels with the work, captured by key as free-form evidence: filename, folder path, accession note, donor note, partial legacy record.
This captured context is the evidence stage 4 uses and the cataloguer checks later. Capturing it at intake is what keeps the model from manufacturing a hierarchy. See ../../docs/collection-context.md.
Stage 4: generation
For each work, dispatch the field-generator agent to run the generation prompt with the work, its
derivatives, its collection_context, and the profile-derived configuration. The agent returns a
first-pass record conforming to ../../schemas/metadata-record.schema.json,
under the eight hard rules in ../../CLAUDE.md. This skill orchestrates and stamps
the run; it does not reimplement generation logic, which lives in the prompt and the agent.
Per-value handling this skill is responsible for:
- value_id on every value, assigned at generation and stable across re-runs. Scalar fields use the
field name (
title,description,creator,date,type,spatial,medium_technique,language). Array-field values use the field name plus a stable suffix:subjects.01,genre_form.01,depicted_entities.01. Review verdicts referencevalue_id, never an array position, so a verdict stays attached to the same value when array order changes between rounds. Do not emit positional keys. - Authority candidates stay at
needs_verification. The agent proposes a best-candidate label and setsauthority_status; this skill leavesauthority_urinull and resolves nothing. The LLM proposes, the deterministic stage 5 disposes, the human confirms. - Provenance stamped on every record:
generated_by(the resolved generation model id),model_rolegeneration,prompt_version(for examplesystem/metadata-generation@1.0.0),skilldescribe-collection@1.0.0,agentfield-generator,generated_date,run_id(linking to the run manifest),local_onlywhere the collection requires a local model, andhuman_reviewedfalse. disclosure_notecarried through with the model, prompt version, and date, its reviewer portion left for human approval downstream.
Model is a parameter
Read the generation model from application-profile.json (model.generation); do not hardcode a
model id. Generation runs on the cost-effective model that does the volume, while a frontier model
orchestrates the loop elsewhere. For collections the profile lists under
model.local_only_collections, run a local model so nothing leaves the institution, and set
local_only true in provenance and in the run manifest. See ../../docs/models-and-cost.md.
Outputs
Written to the adjacent workspace runs/ (these are run artifacts; export-ready records are written
to output/ later by export-for-repository after review):
- One metadata record per work, conforming to ../../schemas/metadata-record.schema.json,
with
collection_contextpopulated from intake, every value carryingvalue_id,confidence, andbasis, controlled values carrying anauthority_candidateatneeds_verification, and provenance anddisclosure_notestamped. - One run manifest, conforming to ../../schemas/run-manifest.schema.json.
Write the start fields now:
run_id,started_at,dataset(sample_id,item_count,item_ids,source, andheld_outwhen this is a held-out confirmation run),models(generation,local_only),prompt_versions, andskill_versions. Leaveoutcomeempty;compute-pass-ratefills it after review. - An operator summary table for the sanity check: one row per work with item id, title, overall confidence, and the count of low-confidence fields, so the operator can read the sample at a glance before approving a larger run.
The records feed resolve-authorities (stage 5) and then review-triage (stage 6). The cataloguer's
verdicts come back as review-feedback (../../schemas/review-feedback.schema.json),
keyed by value_id, and compute-pass-rate reads them against the run manifest.
Usage example
This is sample-user-prompt #1 from the initiative's operator curriculum, localized to repo conventions. Paths name the adjacent workspace; the system prompt and config are the repo's canonical locations.
Read the collection at ../acme-metadata/works/civil-war-telegrams/. For each work, capture its
collection context (series, parent, filename, any accession or donor notes) into collection_context,
then run the generation stage with the field-generator agent using
prompts/system/metadata-generation.v1.md and the institution config in
../acme-metadata/application-profile.json. Write one record per work to ../acme-metadata/runs/, write
the run manifest, then give me a summary table: item, title, overall confidence, and number of
low-confidence fields. Stop and ask me before processing more than 25 works so I can sanity-check the
first batch.What the operator practices here is batch orchestration over a manifest, structured JSON output, and the sample-before-scale checkpoint. The 25-work stop is the loop's gate: it keeps a large run from happening before a sample has cleared review.
Boundaries
- Do not resolve authorities or invent URIs. Candidates leave at
needs_verificationfor stage 5. - Do not review or accept records. Generation sets
human_reviewedfalse; review is stage 6. - Do not export. Records land in
runs/; export to the repository format is stage 7. - Do not strip collection context. It is captured at intake and preserved on every record.
- Do not name unidentified people, and route sensitive, culturally restricted, or
reparative-description cases to
review_flagsrather than resolving them. See ../../docs/responsible-description.md. - Do not process a large batch before a sample has cleared review.
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
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.

