feiskyer/claude-code-settings / skills/skill-creator
skill-creator
VerifiedCreate, refine, and benchmark agent skills. Use when building a new skill, updating an existing one, running evals, checking trigger quality, or improving a skill description.
| File | Kind | Size |
|---|---|---|
| LICENSE.txt | markdown | 11.1 KB |
| README.md | markdown | 462 B |
| SKILL.md | skill md | 30.0 KB |
| agents/analyzer.md | markdown | 10.4 KB |
| agents/comparator.md | markdown | 6.9 KB |
| agents/grader.md | markdown | 9.1 KB |
| assets/eval_review.html | other | 6.9 KB |
| eval-viewer/generate_review.py | script | 16.0 KB |
| eval-viewer/viewer.html | other | 43.9 KB |
| references/schemas.md | markdown | 11.6 KB |
| scripts/__init__.py | script | 0 B |
| scripts/aggregate_benchmark.pyexecutable | script | 14.5 KB |
| scripts/generate_report.pyexecutable | script | 13.0 KB |
| scripts/improve_description.py | script | 16.2 KB |
| scripts/package_skill.pyexecutable | script | 4.1 KB |
| scripts/platforms/__init__.py | script | 54 B |
| scripts/platforms/base.py | script | 2.2 KB |
| scripts/platforms/claude_code.py | script | 6.3 KB |
| scripts/platforms/codex.py | script | 5.4 KB |
| scripts/platforms/openclaw.py | script | 4.3 KB |
| scripts/quick_validate.py | script | 9.6 KB |
| scripts/run_eval.pyexecutable | script | 8.2 KB |
| scripts/run_loop.pyexecutable | script | 15.0 KB |
| scripts/utils.py | script | 3.4 KB |
scripts/platforms/openclaw.py
View on GitHub"""OpenClaw platform adapter for skill trigger evaluation.
Registers temporary skills under ~/.openclaw/skills/ and detects triggering via
a sentinel phrase embedded in the skill body. OpenClaw's JSON output exposes
which skills were available to the model, but not whether the full skill body
was consulted, so trigger detection remains heuristic.
"""
import json
import shutil
import subprocess
import sys
from pathlib import Path
from scripts.platforms.base import PlatformAdapter, QueryRunResult, RegisteredSkill
# Skills are installed globally so all agents can see them during testing.
_OPENCLAW_SKILLS_DIR = Path.home() / ".openclaw" / "skills"
class OpenClawAdapter(PlatformAdapter):
"""Adapter for OpenClaw (openclaw CLI)."""
def __init__(self, agent_id: str = "main"):
self._agent_id = agent_id
def find_project_root(self) -> Path:
return Path.home() / ".openclaw"
def register_skill(self, skill_name: str, description: str, sentinel: str) -> RegisteredSkill:
"""Write a temporary skill folder into ~/.openclaw/skills/.
The skill body instructs the agent to include the sentinel phrase if it
activates this skill — this is how we detect triggering without stream events.
"""
skill_dir = _OPENCLAW_SKILLS_DIR / skill_name
skill_dir.mkdir(parents=True, exist_ok=True)
skill_md = skill_dir / "SKILL.md"
skill_md.write_text(
f"---\n"
f"name: {skill_name}\n"
f"description: {description}\n"
f"---\n\n"
f"**IMPORTANT**: If you activate this skill for the user's request, "
f"you MUST include the exact phrase \"{sentinel}\" at the very start "
f"of your response, before any other text.\n"
)
return RegisteredSkill(
name=skill_name,
detection_token=sentinel,
detection_mode="heuristic",
detection_details=(
"Heuristic response-sentinel detection. OpenClaw exposes available "
"skill summaries in `systemPromptReport`, but not authoritative "
"skill-load events for the full SKILL.md body."
),
cleanup_paths=[skill_md, skill_dir],
)
def unregister_skill(self, registration: RegisteredSkill) -> None:
for path in registration.cleanup_paths:
if path.is_file():
path.unlink(missing_ok=True)
elif path.exists():
shutil.rmtree(path, ignore_errors=True)
def run_query(self, query: str, timeout: int, model: str | None) -> QueryRunResult | None:
"""Run openclaw agent --local and return response text, or None on failure."""
cmd = [
"openclaw", "agent",
"--local",
"--agent", self._agent_id,
"--message", query,
"--json",
]
try:
result = subprocess.run(
cmd,
capture_output=True,
text=True,
timeout=timeout,
)
except (FileNotFoundError, subprocess.TimeoutExpired):
return None
if result.returncode != 0:
print(f"Warning: openclaw exited with code {result.returncode}", file=sys.stderr)
return None
try:
data = json.loads(result.stdout)
payloads = data.get("payloads", [])
response_text = payloads[0].get("text", "") if payloads else ""
entries = (
data.get("meta", {})
.get("systemPromptReport", {})
.get("skills", {})
.get("entries", [])
)
available_skill_names = [entry.get("name", "") for entry in entries if entry.get("name")]
return QueryRunResult(
response_text=response_text,
raw_output=result.stdout,
metadata={"available_skill_names": available_skill_names},
)
except (json.JSONDecodeError, KeyError):
return None
def detect_trigger(self, run_result: QueryRunResult, registration: RegisteredSkill) -> bool:
available_skill_names = set(run_result.metadata.get("available_skill_names", []))
if registration.name not in available_skill_names:
return False
return registration.detection_token in run_result.response_text
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 |
| 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 |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |