Skip to main content

The quality gate for Agent Skills — validate, secure, conflict-detect, and test skills across their full lifecycle

Project description

skill-guard

The quality gate for Agent Skills.

PyPI version License Python 3.11+

skill-guard is a CLI tool that validates, secures, and governs Agent Skills across their full lifecycle — from contribution to production monitoring.

The Problem

Agent Skills are powerful. They're also ungoverned. As soon as more than one person contributes skills to a shared agent, things break in hard-to-diagnose ways:

  • A new skill's description overlaps with an existing one → agent picks the wrong skill half the time
  • Skills with dangerous scripts get merged because nobody reviewed the scripts/ directory
  • Nobody knows what skills are installed, who owns them, or whether they still work
  • A skill passes every test in isolation but fails when the real agent uses it with 25 other skills loaded

skill-guard is the quality gate that catches these problems before they reach production.

What It Does

ONBOARDING (pre-merge, in CI):
  skill-guard validate   → format compliance + quality scoring
  skill-guard secure     → scan for dangerous patterns  
  skill-guard conflict   → detect trigger overlap with existing skills
  skill-guard test       → runs evals against an OpenAI-compatible endpoint. Use pre_test_hook/post_test_hook for your own deploy/teardown flow.
  skill-guard check      → runs validate + secure + conflict as a single gate. Agent evals run if --endpoint is configured.

ONGOING (post-merge, scheduled):
  skill-guard monitor    → re-run evals, detect drift, manage lifecycle. Run via cron or CI for continuous drift detection. No built-in scheduler.
  skill-guard catalog    → searchable registry of registered skills (approval workflow planned for v0.7)

Quick Start

pip install skill-guard

# Initialize in your skills repo
skill-guard init

# Validate a skill
skill-guard validate ./skills/my-skill/

# Check for security issues
skill-guard secure ./skills/my-skill/

# Check for conflicts with existing skills
skill-guard conflict ./skills/my-skill/ --against ./skills/

# Note: Currently only tfidf is supported. embeddings and llm are planned for v0.6.

# Run the full gate (validate + secure + conflict; test runs if --endpoint is configured)
skill-guard check ./skills/my-skill/ --against ./skills/

Example Output

$ skill-guard validate ./skills/my-skill/

 skill-guard validate — my-skill
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Check                     ┃ Result                                           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ skill_md_exists           │ ✅ SKILL.md found                                │
│ valid_yaml_frontmatter    │ ✅ Valid YAML frontmatter                        │
│ name_field_present        │ ✅ name: my-skill                                │
│ description_field_present │ ✅ description field present                     │
│ directory_name_matches    │ ✅ Directory name matches skill name             │
│ description_trigger_hint  │ ✅ Description contains trigger hint ('Use when')│
│ no_broken_body_paths      │ ✅ No broken relative paths in SKILL.md body     │
│ evals_directory_exists    │ ⚠️ No evals/ directory found                     │
│                           │ → Create evals/config.yaml with test cases       │
│ metadata_has_author       │ ✅ author: my-team                               │
│ metadata_has_version      │ ✅ version: 1.0                                  │
└───────────────────────────┴──────────────────────────────────────────────────┘
Score: 97/100 | Grade: A | Blockers: 0 | Warnings: 1

Installation

Prerequisites

Requirement Version Notes
Python 3.11+ Required. 3.12 and 3.13 tested.
pip any recent Bundled with Python
typer ≥0.13.0 Installed automatically
Agent endpoint Required only for skill-guard test (OpenAI-compatible API)

Note: skill-guard validate, secure, conflict, init, catalog, and check work fully offline — no agent or API key needed.

Installation

# Core (static analysis — no agent required)
pip install skill-guard

# Optional future extras for planned embedding-based conflict detection
pip install skill-guard[embeddings]

Documentation

Anthropic Spec Validation

skill-guard validate includes Anthropic AgentSkills spec compliance checks by default. Set validate.anthropic_spec: false in skill-guard.yaml if you need to disable those additional findings.

Exit Codes

  • 0: success
  • 1: validation/security failures
  • 2: warnings only (when fail_on_warning is false)
  • 3: config error
  • 4: parse error
  • 5: hook script failure
  • 6: health check timeout

Pre-commit

Use pre-commit to enforce checks before skill changes land:

repos:
  - repo: https://github.com/vaibhavtupe/skill-guard
    rev: v0.5.0
    hooks:
      - id: skill-guard-validate
      - id: skill-guard-secure
      - id: skill-guard-check

These hooks run against changed SKILL.md files, deduplicate by skill root, and then execute the corresponding skill-guard command for each affected skill.

Templates

Use skill-guard init --template base to scaffold a new skill, or skill-guard init --list-templates to see the available scaffolds. Generated templates include SKILL.md, evals/, references/, scripts/, and assets/ so they validate immediately.

GitHub Actions

- uses: vaibhavtupe/skill-guard-action@v1
  with:
    path: ./skills/my-skill

See vaibhavtupe/skill-guard-action for the full action repo.

GitHub Actions

Use the separate action repo vaibhavtupe/skill-guard-action@v1 in workflows:

- uses: vaibhavtupe/skill-guard-action@v1
  with:
    command: check
    path: ./skills/my-skill
    against: ./skills/

What skill-guard Does NOT Do

  • Does not replace Anthropic's skill-creator for writing skills
  • Does not host or serve skills — skills live in your repo
  • Does not modify skills — it reports issues, authors fix them
  • Does not require a database or server — the catalog is a YAML file in your repo

Contributing

See CONTRIBUTING.md. We welcome contributions of all kinds.

License

Apache 2.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skill_guard-0.5.0.tar.gz (79.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skill_guard-0.5.0-py3-none-any.whl (62.5 kB view details)

Uploaded Python 3

File details

Details for the file skill_guard-0.5.0.tar.gz.

File metadata

  • Download URL: skill_guard-0.5.0.tar.gz
  • Upload date:
  • Size: 79.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for skill_guard-0.5.0.tar.gz
Algorithm Hash digest
SHA256 cea54111bd5e4892070af2a242e964718ed89d20b8bd74eb72613b58eeedfdbc
MD5 7539ea2cd371be6b28d758ff388214ae
BLAKE2b-256 22984eaa5a59da164bc5c8363c6c5e356d2c3a978f460f96dc1cd892ac4c0291

See more details on using hashes here.

Provenance

The following attestation bundles were made for skill_guard-0.5.0.tar.gz:

Publisher: publish.yaml on vaibhavtupe/skill-guard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file skill_guard-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: skill_guard-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 62.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for skill_guard-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4885de138734f2dae2840b7861361c39223a602a3aa537db38d551f24da8d415
MD5 571ce7fcf4ff06049367f43fe664f5ab
BLAKE2b-256 46908de883c93a8b2cff5d6de183c45bf0a4ab7bf2383fd85d432dd4774e3ee4

See more details on using hashes here.

Provenance

The following attestation bundles were made for skill_guard-0.5.0-py3-none-any.whl:

Publisher: publish.yaml on vaibhavtupe/skill-guard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page