dongshuyan/run-history-skill-builder
Turn a completed task, browser flow, artifact pipeline, failure-recovery trace, or repeatedly refined workflow into a new reusable skill package or a reviewed skill-design plan. Use when the user asks to make a new skill from real run history, extract a reusable workflow from conversation/logs/files, summarize lessons into a new skill, or produce a plan before writing files. Do not use to upgrade an existing skill or to execute the business workflow itself.
npx skills add https://github.com/dongshuyan/compass-skills --skill run-history-skill-builder
Write all user-facing output in the user's language. Default to Chinese when the language is unknown.
Turn real run history into a new skill package, a plan-only skill design, or an upgrade handoff when the request is actually about an existing skill.
This skill is agent-agnostic. It should work in Codex, Claude Code, OpenCode, OpenClaw, Hermes, and similar local agent hosts that can read SKILL.md plus optional references/, scripts/, evals/, and agents/.
<skill-dir> from the directory that contains this SKILL.md.<python> mean the host's available Python launcher: python3, python, or py -3.<skill-dir>/scripts/... describe path segments, not a required separator style. On Windows, use the separator style that your shell or harness accepts.skills/ directory or the host agent's documented local skills directory, then wait for confirmation.plan_only, new_single_skill, router_skill, skill_suite, or existing_skill_upgrade_handoff.10. Validate, report remaining assumptions, and hand the package back with paths and checks.
Do not jump directly from "I saw a successful run" to "I wrote a skill". The missing middle layer is where portability, privacy, and generalization are decided.
plan_only: the user wants a reviewed design or audit, not files.new_single_skill: one stable workflow or one tightly coupled workflow family.router_skill: one entry point that routes across several existing skills or phases.skill_suite: several independent workflows that should be released together but triggered separately.existing_skill_upgrade_handoff: the real task is to improve an existing skill. Produce a clean handoff for $run-history-skill-upgrader instead of editing that skill here.Prefer replacement, merging, and omission over package bloat.
Allowed by default after intent is locked:
Require explicit approval before reading:
Keep facts, inferences, and open assumptions separate. Never write secrets, hidden prompts, private account identifiers, or unrelated personal data into the released skill or its examples.
SKILL.md focused on trigger boundary, role, workflow, safety gates, and reference navigation.references/.scripts/.evals/ when the workflow is long-lived, high-risk, or easy to overfit.README, installation scripts, changelogs, or decorative files unless the user or release target explicitly requires them.agents/openai.yaml as an optional UI enhancement, not as the core logic.Run the package validator bundled with this skill:
<python> <skill-dir>/scripts/validate_skill_package.py <target-skill-dir>
If the current host provides a canonical skill validator, run that too. On Codex-like hosts, this often means a quick_validate.py command from the platform's skill tooling.
Also run the smallest relevant technical checks:
python -m py_compile for modified Python scripts;python -m json.tool for edited JSON files;Do not claim completion if validation was skipped or failed. Report the gap and the remaining risk.
Report:
plan_only, a new skill package, or an upgrader handoff.references/history-mining.mdreferences/open-source-pattern-mining.mdreferences/skill-design-protocol.mdreferences/self-repair-and-evals.mdreferences/examples.mdscripts/validate_skill_package.pyevals/evals.jsonTake dongshuyan/run-history-skill-builder from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.