oberconcejo/VS-CODE / .agents/skills/skill-comply
skill-comply
VerifiedVisualize whether skills, rules, and agent definitions are actually followed — auto-generates scenarios at 3 prompt strictness levels, runs agents, classifies behavioral sequences, and reports compliance rates with full tool call timelines. Use when checking whether agents actually follow the skills, rules, and definitions they were given, rather than assuming they do.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.4 KB |
| fixtures/compliant_trace.jsonl | other | 1.0 KB |
| fixtures/noncompliant_trace.jsonl | other | 629 B |
| fixtures/tdd_spec.yaml | config | 1.2 KB |
| prompts/classifier.md | markdown | 1.0 KB |
| prompts/scenario_generator.md | markdown | 1.9 KB |
| prompts/spec_generator.md | markdown | 1.6 KB |
| pyproject.toml | manifest | 360 B |
| scripts/__init__.py | script | 0 B |
| scripts/classifier.py | script | 2.9 KB |
| scripts/grader.py | script | 7.6 KB |
| scripts/parser.py | script | 2.7 KB |
| scripts/report.py | script | 6.3 KB |
| scripts/run.py | script | 4.2 KB |
| scripts/runner.py | script | 9.9 KB |
| scripts/scenario_generator.py | script | 1.8 KB |
| scripts/spec_generator.py | script | 2.2 KB |
| scripts/utils.py | script | 411 B |
| tests/test_classifier.py | script | 3.4 KB |
| tests/test_grader.py | script | 19.5 KB |
| tests/test_parser.py | script | 3.1 KB |
| tests/test_runner.py | script | 21.8 KB |
| tests/test_utf8.py | script | 10.1 KB |
scripts/spec_generator.py
View on GitHub"""Generate compliance specs from skill files using LLM."""
from __future__ import annotations
import subprocess
import tempfile
from pathlib import Path
import yaml
from scripts.parser import ComplianceSpec, parse_spec
from scripts.utils import extract_yaml
PROMPTS_DIR = Path(__file__).parent.parent / "prompts"
def generate_spec(
skill_path: Path,
model: str = "haiku",
max_retries: int = 2,
) -> ComplianceSpec:
"""Generate a compliance spec from a skill/rule file.
Calls claude -p with the spec_generator prompt, parses YAML output.
Retries on YAML parse errors with error feedback.
"""
skill_content = skill_path.read_text(encoding="utf-8")
prompt_template = (PROMPTS_DIR / "spec_generator.md").read_text(encoding="utf-8")
base_prompt = prompt_template.replace("{skill_content}", skill_content)
last_error: Exception | None = None
for attempt in range(max_retries + 1):
prompt = base_prompt
if attempt > 0 and last_error is not None:
prompt += (
f"\n\nPREVIOUS ATTEMPT FAILED with YAML parse error:\n"
f"{last_error}\n\n"
f"Please fix the YAML. Remember to quote all string values "
f"that contain colons, e.g.: description: \"Use type: description format\""
)
result = subprocess.run(
["claude", "-p", "--model", model, "--output-format", "text"],
input=prompt,
capture_output=True,
encoding="utf-8",
timeout=120,
)
if result.returncode != 0:
raise RuntimeError(f"claude -p failed: {result.stderr}")
raw_yaml = extract_yaml(result.stdout)
tmp_path = None
with tempfile.NamedTemporaryFile(
mode="w", suffix=".yaml", delete=False, encoding="utf-8",
) as f:
f.write(raw_yaml)
tmp_path = Path(f.name)
try:
return parse_spec(tmp_path)
except (yaml.YAMLError, KeyError, TypeError) as e:
last_error = e
if attempt == max_retries:
raise
finally:
if tmp_path is not None:
tmp_path.unlink(missing_ok=True)
raise RuntimeError("unreachable")
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |