本文へ移動
cccskills
無料GitHub で公開

expert-trace-skill-distillation

Use when turning expert materials, execution traces, repository evidence, or long-form documents into an inspectable, correctable, and empirically verified agent skill. Covers source governance, capability-vs-behavior separation, contrastive induction from successes and failures, intervention testing, versioning, rollback, and task-conditioned vs. reusable-library evaluation.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md7.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Expert Trace Skill Distillation

Build skills from evidence, not from a single unconstrained generation pass. The output must be an inspectable software artifact whose sources, boundaries, evaluation results, corrections, and rollback points remain visible.

When to Activate

Activate when:

  • Distilling a teammate's procedures, review standards, or decision heuristics into a skill
  • Generating a skill from successful and failed agent trajectories
  • Turning a repository, manual, API specification, or research paper into reusable procedures
  • Creating a role-grounded skill without open-ended impersonation
  • Evaluating whether a generated skill actually helps instead of merely sounding plausible

Paper-Backed Principles

The cited papers support these principles:

  1. Skills are interventions. Compare the same tasks with and without the candidate skill.
  2. Failures and successes both matter. Contrast nearby successful and failed trajectories to isolate missing checks, reusable procedures, and regression risks.
  3. Capability and behavior are separate tracks. Encode work practices separately from bounded style or interaction rules.
  4. Skill generation is a pipeline-level problem. Evaluate the generator, backbone, source type, executor, and verifier together.
  5. Repository-grounded and document-grounded extraction are different. Repositories hide operational knowledge across code, config, and scripts. Documents often state rules explicitly but distribute them across sections.
  6. Task-conditioned and task-agnostic generation are different regimes. A focused skill generated after a task is known is easier than a reusable library generated before downstream tasks are visible.

Workflow

Step 1: Define the Distillation Contract

Record:

## Distillation Contract
- Target capability:
- Intended users and agent hosts:
- In-scope source materials:
- Out-of-scope materials:
- Source rights and consent:
- Private-by-default artifacts:
- Allowed behavior constraints:
- Explicitly prohibited identity claims:
- Evaluation tasks:
- Rollback owner:

Do not claim to recreate a person. Distill selected procedures, mental models, and bounded interaction preferences into a correctable package.

Step 2: Collect and Normalize Evidence

Use only authorized materials. Typical sources:

  • Work documents, runbooks, code review comments, incident notes, and design records
  • Repository files, scripts, configuration, tests, and command history
  • Manuals, API docs, specifications, and research papers
  • Successful and failed agent trajectories with tool calls and environment observations

For each item, record provenance:

source_id: source-001
uri: path-or-url
source_type: repository|document|trajectory|human-feedback
rights: private|internal|public
captured_at: ISO-8601
scope: capability|bounded-behavior|both
notes: why this evidence is relevant

Step 3: Run Dual Distillation

Generate two inspectable tracks:

TrackIncludeExclude
Capabilityworkflows, standards, review criteria, heuristics, recovery patternsunsupported claims, generic filler
Bounded behaviorcommunication posture, interaction rules, correction history, explicit limitsidentity substitution, invented motives

Keep behavior optional. A capability-only variant should remain usable.

Step 4: Run Contrastive Trajectory Induction

When trajectories exist:

  1. Group comparable attempts by task.
  2. Identify baseline failures and nearby successes.
  3. Extract procedures present in successes but missing from failures.
  4. Extract recurring failure modes and checks that would catch them.
  5. Produce candidate rules at the pattern level, not as task-specific anecdotes.
## Contrastive Pattern
- Task family:
- Failure signature:
- Nearby success:
- Missing behavior:
- Candidate reusable rule:
- Verification check:
- Evidence IDs:

Step 5: Render the Skill Package

Minimum package:

skill-name/
  SKILL.md
  references/
    capability.md
    behavior-boundaries.md
    evidence-ledger.md
    correction-log.md
    evaluation-report.md

SKILL.md should stay compact and route to references through progressive disclosure.

Step 6: Verify as an Intervention

Evaluate the same task instances with and without the skill:

OutcomeMeaning
Baseline fail -> skill passRepair
Baseline pass -> skill failRegression
Both passPreserved success
Both failNo improvement

Report:

  • Net success delta
  • Repair count
  • Regression count
  • Held-out performance
  • Cross-model transfer
  • Task-conditioned vs. task-agnostic performance
  • Repository-grounded vs. document-grounded performance
  • Artifact completeness and provenance coverage

Use deterministic execution checks where possible. Use judges only when deterministic checks cannot represent valid outputs.

Step 7: Correct, Version, and Roll Back

Treat feedback as a patch:

## Correction Record
- Version:
- Trigger:
- Evidence:
- Track changed: capability|bounded-behavior
- Sections patched:
- Expected improvement:
- Regression suite:
- Rollback target:

Every correction must create a new version and preserve the previous artifact.

Output Format

## Source Boundary
[Authorized evidence and exclusions]

## Extracted Tracks
[Capability and optional bounded behavior]

## Contrastive Patterns
[Success/failure-derived reusable rules]

## Generated Package
[Files and entrypoints]

## Intervention Evaluation
[Repairs, regressions, held-out results, provenance coverage]

## Lifecycle
[Version, correction history, rollback path]

Guidelines

  1. Require provenance for every extracted rule.
  2. Keep capability and behavior separately inspectable.
  3. Test generated skills against hidden or held-out tasks.
  4. Prefer deterministic execution checks.
  5. Measure regressions, not only repaired failures.
  6. Keep task-conditioned and reusable-library claims separate.
  7. Default sensitive source materials and generated artifacts to local/private storage.

Gotchas

  1. Single-pass summarization - A summary is not an operational skill.
  2. Identity replacement - A role-grounded artifact must not claim to reproduce a person.
  3. No baseline - Without a no-skill comparison, the net effect is unknown.
  4. Task leakage - Do not expose verifier internals, hidden tests, or held-out tasks to the generator.
  5. Append-only corrections - Patch reusable patterns at the right abstraction level instead of accumulating contradictory notes.
  6. Repository blindness - Read config, scripts, and tests; procedures are rarely contained in one README.

References


Skill Metadata

Created: 2026-06-02 Version: 1.0.0

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when long-lived agents, project memories, system prompts, or playbooks are repeatedly summarized, rewritten, or optimized and risk losing domain detail, provenance, or execution learnings.

日本語の概要は準備中です。原文の説明を表示しています。

mouadja02/skills102026年10月16日 更新

Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.

日本語の概要は準備中です。原文の説明を表示しています。

mouadja02/skills102026年10月16日 更新

Adds educational comments to a code file so it becomes a learning resource, asking for the file (with a list of close matches) if none is given. Use when preparing code for learners, onboarding, or teaching.

日本語の概要は準備中です。原文の説明を表示しています。

mouadja02/skills102026年10月16日 更新

Write, debug, and optimize Adobe Illustrator automation scripts using ExtendScript (JavaScript/JSX). Use when creating or modifying scripts that manipulate documents, layers, paths, text frames, colors, symbols, artboards, or any Illustrator DOM objects. Covers the complete JavaScript object model, coordinate system, measurement units, export workflows, and scripting best practices.

日本語の概要は準備中です。原文の説明を表示しています。

mouadja02/skills102026年10月16日 更新

Patterns and techniques for adding governance, safety, and trust controls to AI agent systems. Use this skill when: - Building AI agents that call external tools (APIs, databases, file systems) - Implementing policy-based access controls for agent tool usage - Adding semantic intent classification to detect dangerous prompts - Creating trust scoring systems for multi-agent workflows - Building audit trails for agent actions and decisions - Enforcing rate limits, content filters, or tool restrictions on agents - Working with any agent framework (PydanticAI, CrewAI, OpenAI Agents, LangChain, AutoGen)

日本語の概要は準備中です。原文の説明を表示しています。

mouadja02/skills102026年10月16日 更新

Check any AI agent codebase against the OWASP Agentic Security Initiative (ASI) Top 10 risks. Use this skill when: - Evaluating an agent system's security posture before production deployment - Running a compliance check against OWASP ASI 2026 standards - Mapping existing security controls to the 10 agentic risks - Generating a compliance report for security review or audit - Comparing agent framework security features against the standard - Any request like "is my agent OWASP compliant?", "check ASI compliance", or "agentic security audit"

日本語の概要は準備中です。原文の説明を表示しています。

mouadja02/skills102026年10月16日 更新

mouadja02 のスキルをすべて見る

このスキルの問題を報告する