Skill

knowledge-extract

Turn a repeatedly observed behavior into a skill draft with a trigger, procedure, anti-patterns, and checks. Use when the same correction or workflow has appeared at least three times.

Category
core
Version
0.2.0
License
MIT
Status
active
Length
118 lines
Source
skills/core/knowledge-extract/SKILL.md

Install and discovery

npx --yes --package @youcisla/agent-foundry agent-foundry-install

After the installer runs, this record is available as knowledge-extract. See the docs for harness roots and verification steps.

Contents

Knowledge Extract

Turn observed behavior into a reusable skill draft. Drafts stay under the private plans/ tree until a human promotes them.

Procedure

Pipeline

Observe -> Capture -> Draft -> Validate -> Promote
StepOutputLocation
ObservePattern seen at least three timessession notes
CaptureOne-paragraph noteplans/skills/drafts/notes/
DraftFull SKILL.mdplans/skills/drafts/<name>/SKILL.md
ValidateEvaluator and validator passsame draft folder
PromoteHuman moves the folderskills/core/<name>/

Step 1 - Observe

A pattern qualifies when it repeats:

  • The same correction was applied to two different problems.
  • The same pre-check precedes a class of work every time.
  • A recurring phrasing maps to a recurring intent.

One occurrence is an anecdote. Wait for the third.

Step 2 - Capture

Draft one paragraph in a note:

## Pattern
[One sentence: what recurs]

## Why it matters
[The cost when the pattern is missed]

## Examples
- [date] [context where it applied]

If the note is still interesting a week later, draft the skill.

Step 3 - Draft

Create plans/skills/drafts/<name>/SKILL.md with:

---
name: <kebab-name>
description: "<what it does>. Use when <specific situation>."
version: 0.1.0
license: MIT
author: Agent Foundry Contributors
status: draft
source: local
---

Then add:

  • A procedure with concrete steps.
  • At least two anti-patterns with reasons.
  • A checklist that tests this skill's output.

Do not invent a script, hook, or companion dependency. If the pattern needs one, say it does not ship and describe the manual fallback.

Step 4 - Validate

./.venv/Scripts/python.exe scripts/foundry-eval.py --target plans/skills/drafts/<name>/SKILL.md
bash scripts/validate.sh

Both must pass. The evaluator checks metadata, trigger count, path references, and body size.

Step 5 - Promote

A human reviews the draft, changes status: draft to status: active, moves the folder to skills/core/<name>/, and regenerates the skill index. No script promotes drafts automatically.

Anti-patterns

  • Drafting from one occurrence.
  • Promoting a draft into skills/ while its claims are still unverified.
  • Writing a generic checklist that could belong to any skill.
  • Referencing a helper that does not exist.
  • Keeping the draft path outside the private plans/ tree.

References

  • details

Verification Checklist

  • [ ] The pattern has at least three observed occurrences.
  • [ ] The draft lives under plans/skills/drafts/.
  • [ ] The description has exactly one trigger phrase.
  • [ ] The checklist tests this skill's actual output.
  • [ ] foundry-eval passes before promotion.