Skill Harvester
Working systems contain craft that nobody wrote down. Harvesting extracts that craft into reusable procedure — without taking ownership of the source system's truth.
The chain is explicit, and every arrow is a transformation with its own provenance:
software experience → evidence → harvested competency → tested skill
→ versioned release → target activationHard rules
- Never elevate harvested material into governing truth. A skill may say "derived from X at snapshot Y". It may never say "therefore this governs X".
- Cite the evidence for every candidate, with its class (below). An uncited candidate is an opinion.
- Never silently duplicate an existing skill. Search the catalog first.
- Declare project-specific dependencies honestly. A skill needing infrastructure the target lacks is not "mostly portable"; it is incompatible, and the metadata says so.
- The source is read-only. Harvesting never modifies what it harvests from.
- A failed search is `searched_no_match`, not "the project has none".
- Repetition is the signal. One occurrence is an implementation. Three across unrelated areas is a competency.
Evidence classes
Every candidate records where it came from and what kind of evidence that is. Strongest first:
| Class | Meaning | Strength |
|---|---|---|
documented_doctrine | Written doctrine in the source — architecture docs, protocol READMEs | Strong: intentional and stated |
tests | Asserted by a test | Strong: enforced, not aspirational |
observed_code | Read from implementation | Medium: real, but may be accident or legacy |
project_convention | Stated by the project owner | Medium: authoritative on intent, not on state |
inference | The harvester's own conclusion | Weak: must be labelled as such, always |
unknown | Not established | None |
Doctrine that the code contradicts is contradictory — record both sides. Do not pick the tidier one.
Procedure
- Bound the source. Name the project, the snapshot or commit, and the paths read. Unavailable identifiers are typed, never invented.
- Sweep for repetition. Look for: repeated architectural decisions; recurring review objections; the same constraint restated in several places; a shape repeated across many modules; rules enforced by tests; conventions stated by the owner.
- Draft candidates. For each, one sentence: "the competency of ___ , evidenced by ___ ". If the evidence half is hard to write, it is not a candidate yet.
- Classify the evidence for each candidate.
- Detect dependencies. Does the candidate assume specific infrastructure, a framework, a protocol, a schema? List them. This determines compatibility, and getting it wrong ships a skill that cannot run.
- Route each candidate with the disposition table below.
- Check for duplication against the existing catalog — by capability, not by name. Two skills that would fire on the same trigger are one skill.
- Consolidate. Candidates that always co-occur are one competency. This step removes more candidates than any other; expect the first list to shrink by a third.
- Generate the skeleton —
SKILL.mdwith the two frontmatter keys,agents/openai.yaml, and only the optional folders actually needed. - Record provenance in the catalog sidecar and in a harvest document that keeps the interpretation separate from the source.
- Write fixtures before declaring it done: one task it owns, one nearby task it does not, one that challenges an invariant.
Disposition table
| Route to | When |
|---|---|
| Standalone skill | A distinct competency with its own trigger, its own decision procedure, and a boundary another skill would not respect |
| Reference in an existing skill | Framework- or domain-specific detail attached to a competency that already exists |
| Deterministic tooling | The check is mechanical and needs no judgement. Prose would be a worse implementation of a script |
| Project documentation only | True of one project, not transferable, no decision procedure |
| Nothing | An implementation detail, an accident, or already-public knowledge |
The commonest error is routing to standalone skill because the material is interesting. Interest is not a trigger. If no realistic task would load it in preference to an existing skill, it is a reference.
Worked example
Source: Atlas Project, snapshot `02260d7e`.
- Sweep.
supabase/migrations/shows 73 migrations, every one ordering CREATE → GRANT → RLS → POLICY. The owner states the same rule in project conventions. No test enforces it. - Candidate. "The competency of writing Postgres migrations whose grant and policy ordering is correct by construction, evidenced by 73 consistent migrations and a stated convention."
- Evidence.
observed_code(strong repetition) plusproject_convention. Nottests— nothing enforces it, which is itself worth recording, and is why part of it became a script. - Dependencies. Postgres, row-level security, a Data API where grants are not implied. Not universal.
- Route. Standalone skill: distinct trigger, real decision procedure, clear boundary. The purely mechanical part — ordering, missing grants, RLS without policy — routes to a script inside the skill, because prose is a bad linter.
- Duplication check.
security-revieweralso touches RLS. Different trigger: one writes migrations, the other audits posture. Both exist; each names the other in its stop conditions. - Not elevated. The resulting skill informs migration work. It does not become Atlas's migration policy — Atlas owns that.
Pressure tests
- For each candidate, can you name the file and the class of evidence? Not "it's in the codebase somewhere".
- Would a real task load this in preference to an existing skill? Name the task.
- Does the candidate assume anything the target profile marks
unknownorabsent? - Is any
inferencepresented asdocumented_doctrine? - Would activating this skill in the source project change what that project believes about itself? If yes, you have elevated interpretation into truth — stop.
- Could two harvested skills fire on the same request and disagree?
Stop conditions
- The source snapshot cannot be identified — record
unknownand proceed, but never fabricate a commit. - A candidate's only evidence is
inferenceand the material is consequential — hold it as a documented candidate, not a skill. - The candidate duplicates an existing skill's trigger — extend that skill.
- Harvesting would require writing to the source — stop; sources are read-only.