Trace To Skill Inducer
ASecurityUse when you have captured session evidence — session-retro / session- observatory-live traces in .planning/patterns/, tool logs, correction records — and want to induce a reusable skill from it. Segments the traces into candidate skill units (an LLM judgment, not a deterministic parse) and decomposes each candidate into a three-part structured spec: workflow structure, execution semantics, and runtime attachments (verification, safety, rollback, state). It emits a spec object, NOT a finished...
- 72 stars
- 0 votes
- 0 copies
- 3 views
- Added September 6, 2026
Works with
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add Tibsfox/gsd-skill-creator --skill trace-to-skill-inducer --agent claude-codeAre you the author of Trace To Skill Inducer?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tibsfox-trace-to-skill-inducer)---
name: trace-to-skill-inducer
description: >
Use when you have captured session evidence — session-retro / session-
observatory-live traces in .planning/patterns/, tool logs, correction
records — and want to induce a reusable skill from it. Segments the traces
into candidate skill units (an LLM judgment, not a deterministic parse) and
decomposes each candidate into a three-part structured spec: workflow
structure, execution semantics, and runtime attachments (verification,
safety, rollback, state). It emits a spec object, NOT a finished SKILL.md,
and hands that spec to skill-forge. It records each candidate's lineage (the
skills in context for those traces) and skips sessions run under an unvetted
skill. Distinct from skill-integration (upstream frequency detector) and
skill-forge (downstream author). Backed by arxiv 2606.06893v1, 2608.05810,
2610.07645 and 2610.22984. Triggers on inducing a skill from captured traces,
turning a repeated pattern into a skill spec, and preparing evidence for
skill-forge.
description-frequency: on-demand
user-invocable: true
version: 1.2.0
format: 2025-10-02
triggers:
- "induce a skill from these captured session traces"
- "turn this repeated pattern in .planning/patterns/ into a skill spec"
- "prepare a structured spec from trace evidence for skill-forge"
updated: 2026-11-28
status: ACTIVE
source: arxiv 2606.06893v1 (Agent-Trace-to-Skill Induction), arxiv 2608.05810 (skill lineage contamination, Verifier-as-Gatekeeper), arxiv 2610.07645 (SkillPoison, condition-stripped experiences), arxiv 2610.22984 (repair-generalization gap)
---
# Trace-to-Skill Inducer
Turn captured interaction traces into a **structured skill spec** the
skill-forge loop can author from. Segment the traces into candidate skill
units, decompose each candidate into workflow structure + execution semantics +
runtime attachments, scrub sensitive data, and hand the spec downstream. This
is the induction step of the skill lifecycle on this system: it converts raw
session evidence into a design contract, and stops there.
## Why
`skill-integration` frequency-detects that a tool sequence recurs, but a raw
recurrence count is not a skill — it has no declared preconditions,
verification, rollback, or state model, so authoring straight from it produces
under-specified skills that pass validate and then misbehave in
`skill-counterfactual-audit`. The failure this prevents is *scope collision*:
if induction emits a finished SKILL.md, it overlaps `skill-forge` and two
authors fight over the same file. Draw the boundary so induction *feeds*
authoring — spec out, not skill out.
## Data classes touched
Session traces from `.planning/patterns/` are **project-internal**. A trace can
incidentally capture a **credential value** (a token echoed into a tool arg) or
**Fox Companies IP** / a MEMORY.md "never surface" record (private origins,
Center Camp trust rules). Boundary rule: the induced spec may **reference such a
value by name** (e.g. `RH_POSTGRES_URL`, `Fox-IP:<slug>`) but must **never
embed the secret value itself**. A spec carrying a live credential or a
never-surface record is fail-closed: do not emit it — escalate to the
`security-hygiene` gate. A repair note written under the §Evidence rule goes
through `cue-anchored-memory` and follows that skill's rules for memory writes.
## How
1. **Gather evidence.** Read the trace set for the target pattern from
`.planning/patterns/` (session-retro / session-observatory-live JSONL). Only
proceed on a pattern `skill-integration` already flagged, or one you can
confirm recurs in **≥ 3 distinct sessions**. Fewer than 3 → skip (§When to
skip). Record the **lineage** of the evidence: the `activeSkills` field of
each session record in `.planning/patterns/sessions.jsonl`. It is filled
at session end when `observation.mine_active_skills` is on. That is the
default, but a config written while the key was opt-in can carry an
explicit `false` (`skill-creator integration migrate` reports it).
Session-retro logs carry no skill field. A missing field, or an empty
one from a session where mining was off, means the lineage is unknown,
not clean. Leave out any session whose lineage includes a skill that is
unvetted (not tracked under `project-claude/skills/`: external, community
or uncommitted), withdrawn (named in a tombstone or in
`.claude/skills-retired/retirements.jsonl`) or known to be defective; the
3-session floor applies to the sessions that remain (§Lineage rule). Mark each
remaining session as a success (the pattern ran to its goal without correction
and the result was verified) or as a failure or correction. A pattern
evidenced only by failures and corrections is a repair note for those tasks,
not a skill (§Evidence rule).
2. **Segment into candidate skill units.** A candidate is a *goal-directed
span* with a stable entry precondition and a stable exit postcondition. This
is an **LLM judgment** — do not treat tool-sequence equality as the segment
boundary; two traces reaching the same goal via different tool order are one
candidate (§Robustness rule).
3. **Decompose each candidate into the three-part spec** (this is the induction
payload, not a SKILL.md):
- **Workflow structure** — ordered steps, branch points, loop/iteration.
Include the *conditions of use*: the context each supporting trace ran in
(branch, tool, file type, kind of task, who asked). A context shared by
every supporting trace is a precondition of the spec (§Condition rule).
- **Execution semantics** — tools invoked, arg schema, side effects, and
which steps touch shared repo state (git, worktrees, refinery-merge queue).
- **Runtime attachments** — the *verification* check that proves the step
worked, the *safety* gate (ProcessContext/LoaderContext chokepoints,
PreToolUse commit hook), the *rollback* action, and any *state* the skill
must persist (Grove content-addressed store / MEMORY.md).
4. **Scrub.** Apply the §Data-classes boundary rule — replace any credential or
never-surface value with a named reference before the spec leaves this skill.
5. **Emit the spec, hand to skill-forge.** Output the structured spec object and
route it to `skill-forge`; do not scaffold or write SKILL.md frontmatter here.
Include the lineage from step 1 and ask `skill-forge` to write it into
the authored skill, since the spec object is not kept. A spec whose
lineage is unknown says so and goes to the operator before it is forged.
The spec is a candidate, not an admitted skill: admission happens at
forge's gates (validate, critique, test-triggering), which are structural
and quality gates, not the paper's critics.
6. **Low-confidence segmentation → defer.** If step 2 cannot draw a stable
boundary (candidate spans overlap, or entry/exit conditions are unclear),
emit **no** spec and hand the raw evidence to `skill-forge`'s HITL / a human,
rather than guessing a unit.
### Robustness rule
Judge candidates by **effect, not surface phrasing**. Cluster traces by the
goal they achieve and the pre/post-conditions they satisfy, not by identical
tool calls or wording. A candidate that recurs only because the same literal
command string appears is a weaker unit than one whose *outcome* recurs.
### Lineage rule
A skill in the decision context is reference material for whatever is
distilled next. Skill accumulation in a self-evolving agent is not monotonic:
a defective skill becomes source material for later skills, forming
cross-round contamination chains, and removing the source cannot erase what
its descendants inherited. On Terminal-Bench 2, unconditional accumulation
peaks and then gives back most of its gains, and post-hoc removal of the
culprit skills recovers only a small part of the drop; Verifier-as-Gatekeeper,
which gates admission before commit with three heterogeneous critics
(structural validity, behavioral harmlessness, semantic consistency) and a
marginal-gain subset selection, improves every round, reaching 72% pass@1
with a pool roughly 5x smaller (arxiv 2608.05810). The lineage record is this
skill's design, not the paper's method: a skill is vetted before it can
become source material for another, and the lineage stays with every spec, so
that a defect found later in a source skill can be traced to what was
distilled from it.
### Condition rule
A skill can be poisoned without any single trace being wrong. SkillPoison (arxiv
2610.07645) constructs a set of successful experiences that reinforce a target
behaviour and then removes the contextual conditions that constrain when the
behaviour applies, shaping how the skill extractor generalizes. It reports attack
success rates of 95.71% across three benchmarks while all injected experiences
remain task-correct and pass verification and lexical inspection. Inspecting
traces for bad content does not catch this, because there is none. What can be
checked is the step from evidence to scope: every condition under which the
behaviour was seen stays in the spec as a precondition until a trace shows the
behaviour succeeding without it, and a behaviour with side effects on shared
state keeps the narrowest scope its traces support. Traces that did not come from
this project's own sessions are not evidence for widening a scope.
### Evidence rule
Failure-derived experience repairs more than it transfers. In a cold-start,
failure-only setting, where agents start without accumulated experience and learn
only from failed interactions (arxiv 2610.22984), across three self-evolving
paradigms and four interactive environments, failure-derived experience can help
repair previously failed tasks but rarely yields sustained improvements on unseen
tasks; agents often misinterpret failures, and even verified-correct experience
remains difficult to transfer. When that setting is relaxed, verifier feedback
and additional interaction provide limited gains, whereas successful trajectories
substantially improve transfer. A candidate therefore needs at least one verified
success among its sessions, which is a floor and not a promise of transfer, and
the spec says which of its steps come from a success and which from a correction.
A session that failed and was corrected is a correction, even when it then
reached its goal; the floor needs a session in which the procedure ran to a
verified goal without correction. Until a success exists, the pattern is recorded
as a repair note through `cue-anchored-memory`.
## Confidence / failure model
Segmentation wraps an **LLM judgment** — it is semi-decidable, not a
deterministic check, so it can over- or under-segment. This skill **reduces**
the chance of authoring an under-specified skill; it does not guarantee a correct
unit. The condition and evidence rules are this skill's design; neither
SkillPoison nor the failure-only study tested them, and the 95.71% figure is for
SkillPoison's attack on three benchmarks. Fail-closed default: on any uncertainty
about a candidate that touches **shared repo state, sensitive memory, or
self-modification**, **escalate** (to `skill-forge` HITL / `mayor-coordinator`,
an example skill under `examples/skills/`) rather than silently emit a spec. The
refinery-merge queue never auto-resolves conflicts; induction inherits that
posture — never auto-emit past an unresolved boundary.
## When to skip
- The pattern recurs in fewer than 3 sessions — collect more traces first.
- `skill-integration` has not surfaced it and you cannot confirm frequency — it
may be a one-off, not a skill.
- A finished SKILL.md already exists for this behaviour — route to
`skill-causal-curation` (keep/repair/retire) instead of re-inducing.
- The only available trace is a single session with no repetition — there is no
reusable unit to induce.
- Every supporting session is a failure or a correction — record a repair note
and wait for a verified success (§Evidence rule).
## Integration
- **skill-integration** (upstream) — its frequency detection is the trigger; this
skill consumes what it flags.
- **`tools/session-retro/` and the session-observatory-live skill** (evidence
source) — write the `.planning/patterns/` traces this skill segments.
- **skill-forge** (downstream) — receives the structured spec and does the
authoring/validate/critique/ship; this skill never writes the SKILL.md.
- **security-hygiene** — the scrub + never-surface escalation runs under it.
- **cue-anchored-memory** — receives the repair note for a pattern that has only
failures and corrections behind it (§Evidence rule).
- **skill-revocation-sweep** — a skill named in its tombstone or in
`retirements.jsonl` is not induced again; the lineage record is how the
sweep finds descendants of a withdrawn skill.
Files in this skill
- SKILL.md
- triggering.test.md
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.