dongshuyan/compass-skills / skills/run-history-skill-builder
run-history-skill-builder
VerifiedTurn 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.2 KB |
| agents/openai.yaml | config | 347 B |
| evals/evals.json | config | 4.1 KB |
| references/examples.md | markdown | 2.7 KB |
| references/history-mining.md | markdown | 3.3 KB |
| references/open-source-pattern-mining.md | markdown | 1.9 KB |
| references/self-repair-and-evals.md | markdown | 3.0 KB |
| references/skill-design-protocol.md | markdown | 2.6 KB |
| scripts/test_validate_skill_package.py | script | 5.1 KB |
| scripts/validate_skill_package.py | script | 13.1 KB |
scripts/test_validate_skill_package.py
View on GitHub#!/usr/bin/env python3
"""Regression tests for the builder's portable package validator."""
from __future__ import annotations
import json
import subprocess
import sys
import tempfile
import unittest
from pathlib import Path
VALIDATOR = Path(__file__).with_name("validate_skill_package.py")
def write_skill(root: Path) -> Path:
skill_dir = root / "sample-skill"
skill_dir.mkdir()
(skill_dir / "SKILL.md").write_text(
"""---
name: sample-skill
description: >- # folded description
Build a reusable workflow from an observed run
with clear evidence and validation.
license: Apache-2.0
compatibility: Requires Python 3.10 or newer
metadata: # package metadata
category: maintenance
allowed-tools: Read Bash
---
# Sample Skill
""",
encoding="utf-8",
)
scripts_dir = skill_dir / "scripts"
scripts_dir.mkdir()
(scripts_dir / "check.py").write_text("VALUE = 1\n", encoding="utf-8")
evals_dir = skill_dir / "evals"
evals_dir.mkdir()
(evals_dir / "evals.json").write_text(
json.dumps(
{
"evals": [
{
"id": 1,
"prompt": "Build a skill from this completed run.",
"expected_output": "A validated skill package.",
"expectations": ["Uses the authorized run evidence."],
}
]
}
),
encoding="utf-8",
)
return skill_dir
class ValidateSkillPackageTests(unittest.TestCase):
def test_accepts_multiline_yaml_and_supported_optional_fields(self) -> None:
with tempfile.TemporaryDirectory() as temp_dir:
skill_dir = write_skill(Path(temp_dir))
result = subprocess.run(
[sys.executable, "-B", str(VALIDATOR), str(skill_dir), "--json"],
check=False,
capture_output=True,
text=True,
)
payload = json.loads(result.stdout)
self.assertEqual(result.returncode, 0, payload)
self.assertEqual(
payload["validation_scope"],
"package_structure_and_deterministic_artifact_checks",
)
self.assertFalse(payload["behavior_evaluated"])
self.assertEqual(payload["errors"], [])
self.assertEqual(payload["warnings"], [])
self.assertFalse((skill_dir / "scripts" / "__pycache__").exists())
def test_accepts_quoted_name_with_trailing_comment(self) -> None:
with tempfile.TemporaryDirectory() as temp_dir:
skill_dir = write_skill(Path(temp_dir))
skill_md = skill_dir / "SKILL.md"
skill_md.write_text(
skill_md.read_text(encoding="utf-8").replace(
"name: sample-skill",
'name: "sample-skill" # package name',
),
encoding="utf-8",
)
result = subprocess.run(
[sys.executable, "-B", str(VALIDATOR), str(skill_dir), "--json"],
check=False,
capture_output=True,
text=True,
)
payload = json.loads(result.stdout)
self.assertEqual(result.returncode, 0, payload)
self.assertEqual(payload["errors"], [])
def test_rejects_malformed_nested_metadata(self) -> None:
for malformed_value in ("[maintenance", "team: east"):
with self.subTest(malformed_value=malformed_value):
with tempfile.TemporaryDirectory() as temp_dir:
skill_dir = write_skill(Path(temp_dir))
skill_md = skill_dir / "SKILL.md"
skill_md.write_text(
skill_md.read_text(encoding="utf-8").replace(
" category: maintenance",
f" category: {malformed_value}",
),
encoding="utf-8",
)
result = subprocess.run(
[sys.executable, "-B", str(VALIDATOR), str(skill_dir), "--json"],
check=False,
capture_output=True,
text=True,
)
payload = json.loads(result.stdout)
self.assertEqual(result.returncode, 1, payload)
self.assertTrue(
any("unsupported nested frontmatter value syntax" in item for item in payload["errors"]),
payload,
)
def test_success_message_does_not_claim_behavior_validation(self) -> None:
with tempfile.TemporaryDirectory() as temp_dir:
skill_dir = write_skill(Path(temp_dir))
result = subprocess.run(
[sys.executable, "-B", str(VALIDATOR), str(skill_dir)],
check=False,
capture_output=True,
text=True,
)
self.assertEqual(result.returncode, 0, result.stdout)
self.assertIn("structural package validation passed", result.stdout)
self.assertIn("does not evaluate skill behavior", result.stdout)
if __name__ == "__main__":
unittest.main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |