Sandbox
@8ddieHu0314/Skill-Lab

CLI for evaluating and testing agent skills

Skill Lab is a command-line tool for inspecting agent skills before you rely on them. It runs static checks, LLM-based review, security scans, trigger tests, and score tracking so you can see whether a skill is well-formed, effective, and safe. It also exports skills as prompts for agent platforms and tracks usage stats over time.

56 stars4 forksPythonUpdated 4mo ago
Who it's for

Builders who write agent skills and want to check quality, safety, and trigger behavior before using them.

What it delivers

You can catch broken, noisy, or risky skills before they affect your agent sessions.

What it does

Skill evaluation

Runs static checks plus an optional LLM review and returns a 0–100 score for a skill.

Security scanning

Flags suspicious patterns with BLOCK, SUS, or ALLOW statuses so you can review risky skills early.

Trigger testing

Generates and runs trigger test cases to see whether a skill fires when it should and stays quiet when it should not.

Prompt export

Exports one or more skills as prompts in xml, markdown, or json formats.

Usage stats

Shows per-skill invocation counts, score trends, and token usage for the current month.

Checks browser

Lists 37 checks across structure, naming, description, content, and security dimensions.

How to get it

  1. 1Run
    # Install
    pip install skill-lab
    
    # First run — scans your repo and shows the getting started guide
    sklab

README

Skill Lab

PyPI version Python 3.10+ License: Apache 2.0

Agent Skills Evaluation Framework

Your agent's skills are probably broken in at least one way — and you don't know it yet. Skill Lab catches skills that drain tokens, never fire, or leak data before they cause damage.

pip install skill-lab

Why Skill Lab

Performance — A badly-written skill can triple your token usage with zero gain. We score every skill 0–100 and show exactly what it costs. sklab evaluate ./my-skill

Security — A malicious skill can exfiltrate company data to an external endpoint. Static checks catch that before the conversation starts. sklab scan ./my-skill

Trigger Testing — If your description doesn't have enough trigger examples, the skill sits there doing nothing. We generate and run ~13 tests automatically. sklab trigger ./my-skill


Quick Start

# Install
pip install skill-lab

# First run — scans your repo and shows the getting started guide
sklab

Commands

Command / FlagDescription
Evaluate
sklab evaluate ./my-skillStatic checks + LLM quality review (0-100 scores)
--verbose / -VShow all checks + LLM reasoning
--skip-reviewSkip LLM review (static checks only)
--model / -m <model>Choose LLM model for review (supports Anthropic, OpenAI, Gemini)
--spec-only / -sOnly run spec-required checks
--format / -f jsonOutput as JSON
--output / -o <file>Write output to a file
--allEvaluate every skill in the current directory
--repoEvaluate every skill from the git repo root
Check
sklab check ./my-skillQuick pass/fail — exits 0 or 1, great for CI pipelines
--spec-only / -sOnly validate against the Agent Skills spec
--allValidate every skill in the current directory
--repoValidate every skill from the git repo root
Scan
sklab scan ./my-skillSecurity scan — shows BLOCK / SUS / ALLOW status per check
--allScan every skill in the current directory
Info
sklab info ./my-skillSkill metadata + token cost estimates (discovery vs activation)
--jsonOutput as JSON
--field / -f <name>Extract a single field value
Prompt
sklab prompt ./skill-aExport skill(s) as a prompt for agent platforms
--format / -f <fmt>Output format: xml (default), markdown, json
Stats
sklab statsYour personal usage history and score trends
countSkill invocation counts for the current month
scoreScore trend for all evaluated skills
tokensToken usage per skill for the current month
Browse
sklab list-checksBrowse all 37 checks across 5 dimensions
--spec-onlyOnly spec-required checks
--suggestions-onlyOnly quality suggestions
Trigger Testing (requires ANTHROPIC_API_KEY)
sklab generate ./my-skillAuto-generate ~13 trigger test cases via LLM
--model <model-id>Anthropic model ID to use (e.g. claude-sonnet-4-6). The skill path is a positional argument that comes before this flag.
--forceOverwrite existing test file
sklab trigger ./my-skillRun trigger tests against a live runtime
--type <type>Filter by type: explicit, implicit, contextual, negative
Telemetry
sklab telemetryShow telemetry status
enableEnable anonymous usage telemetry
disableDisable anonymous usage telemetry
showView recent events (--limit / -n N, --json)

What Gets Checked

37 checks across 5 dimensions. Run sklab list-checks to browse all of them with severity labels.

Structure (13)

  • SKILL.md Exists · Valid Frontmatter · Standard Frontmatter Fields
  • Allowed Tools Format · Compatibility Length · License Format · Metadata Format
  • Scripts Folder Valid · Scripts Self-Contained · Scripts No Interactive Input · Scripts Help Support
  • References Folder Valid · Files Outside Spec Dirs

Naming (3)

  • Name Required · Name Format (kebab-case) · Name Matches Directory

Description (3)

  • Description Required · Description Not Empty · Description Max Length

Content (13)

  • Body Not Empty · Has Examples · Description Actionable · Line Budget · Token Budget
  • Metadata Token Budget · Reference Depth · Asset Paths Exist · Script Paths Exist
  • Scripts Referenced · Compatibility Prerequisites · Broken Internal Links · Orphaned Files

Security (5)

  • Prompt Injection & Jailbreak · Evaluator Manipulation · Unicode Obfuscation · YAML Anomalies · Suspicious Size & Structure

Trigger Testing

Skill Lab generates ~13 test cases per skill across 4 types — explicit, implicit, contextual, and negative — then runs them against a live LLM via Claude CLI.

Requires Claude CLI: npm install -g @anthropic-ai/claude-code

# .sklab/tests/triggers.yaml
skill: my-skill
test_cases:
  # should fire
  - id: explicit-1
    type: explicit
    prompt: "$my-skill do the thing"
    expected: trigger
  # should NOT fire
  - id: negative-1
    type: negative
    prompt: "unrelated question"
    expected: no_trigger

Telemetry

sklab collects anonymous usage data (command names, duration, exit codes, scores, token counts). No skill content, file paths, or flag values are ever collected. To opt out:

sklab telemetry disable

See docs/PRIVACY.md for the full privacy policy.


Development

pip install -e ".[dev]"
pytest tests/ -v
mypy src/
ruff check src/
ruff format src/

Apache License 2.0

Files in the repo

Repository payload11 top-level entries
  • .github
  • docs
  • src
  • tests
  • .gitignore
  • CLAUDE.md
  • CONTRIBUTING.md
  • LICENSE
  • pyproject.toml
  • README.md
  • uv.lock

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k