Skip to main content

skill-audit

🔒 Security auditing CLI for AI agent skills.

AI agents increasingly use "skills" - modular packages containing instructions and executable code that extend an agent's capabilities. These skills can execute code on your machine, making them a significant security risk if not properly vetted.

skill-audit helps you audit skills before trusting them.

Features

  • 🔍 Prompt Injection Detection - Scans skill descriptions for jailbreak patterns and manipulation attempts
  • 🔑 Secret Scanning - Finds hardcoded API keys, tokens, and credentials (via trufflehog/gitleaks)
  • 🐚 Shell Script Analysis - Checks bash scripts for dangerous patterns (via shellcheck)
  • 🐍 Code Security - Analyzes Python/JS code for security issues (via semgrep)
  • 📄 SARIF Output - CI/CD ready output format for GitHub Actions integration
  • 🔌 Extensible - Plugin architecture for custom scanners

Installation

macOS

# 1. Clone the repo
git clone https://github.com/markpors/skill-audit
cd skill-audit

# 2. Create virtual environment and install
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

# 3. Install security tools (recommended)
brew install shellcheck semgrep trufflehog

# Note: gitleaks is an alternative to trufflehog (only need one)
# brew install gitleaks

# 4. Verify installation
skill-audit check-tools

Add to your shell profile (optional, for global access):

# Add to ~/.zshrc or ~/.bashrc
alias skill-audit="source ~/dev/skill-audit/.venv/bin/activate && skill-audit"

Linux

# 1. Clone and install
git clone https://github.com/markpors/skill-audit
cd skill-audit
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

# 2. Install security tools
pip install semgrep
sudo apt install shellcheck  # Debian/Ubuntu
# For trufflehog: https://github.com/trufflesecurity/trufflehog#installation

From PyPI (coming soon)

pip install skill-audit

Usage

Basic Audit

# Audit a skill directory
skill-audit audit ./my-skill/

# Audit a specific file
skill-audit audit ./my-skill/SKILL.md

Output Formats

# Pretty terminal output (default)
skill-audit audit ./my-skill/

# JSON output
skill-audit audit ./my-skill/ --format json

# SARIF output (for CI/CD)
skill-audit audit ./my-skill/ --format sarif -o results.sarif

Check Available Tools

skill-audit check-tools

Strict Mode

# Fail on warnings (not just errors)
skill-audit audit ./my-skill/ --strict

What It Checks

Prompt/Instruction Analysis

  • Jailbreak patterns ("ignore previous instructions", "DAN mode", etc.)
  • Role manipulation attempts ("you are root", "pretend to be admin")
  • Data exfiltration instructions
  • Safety bypass attempts

Code Analysis

  • Hardcoded secrets and credentials
  • Dangerous shell patterns (rm -rf, eval, etc.)
  • Arbitrary code execution risks
  • Subprocess injection vulnerabilities

Exit Codes

Code Meaning
0 Passed - no errors found
1 Failed - errors found (or warnings in strict mode)
2 Error - tool execution failed

CI/CD Integration

GitHub Actions

- name: Audit Skills
  run: |
    pip install skill-audit
    skill-audit audit ./skills/ --format sarif -o results.sarif
    
- name: Upload SARIF
  uses: github/codeql-action/upload-sarif@v2
  with:
    sarif_file: results.sarif

Development

# Clone and install in dev mode
git clone https://github.com/markpors/skill-audit
cd skill-audit
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check src/

Limitations

skill-audit is a static analysis tool. It cannot catch everything.

What it CAN detect:

  • Known jailbreak patterns and prompt injection attempts
  • Hardcoded secrets and credentials
  • Dangerous code patterns (eval, exec, shell injection)
  • Common shell script vulnerabilities

What it CANNOT detect:

  • Obfuscated malware — encoded, encrypted, or cleverly hidden payloads
  • Novel attack patterns — zero-day techniques not in our ruleset
  • Contextual intent — a "File Deleter" skill legitimately needs to delete files
  • Indirect prompt injection — malicious content injected via external data sources
  • Runtime behavior — dynamic code generation, network calls at runtime
  • Supply chain attacks — compromised dependencies of the skill itself

False positives

Some legitimate skills may trigger warnings. For example:

  • A password manager skill will "access credentials" — that's its job
  • A cleanup utility will use rm commands
  • An API client will contain endpoint URLs

Use --strict mode thoughtfully, and review warnings in context.

Disclaimer

⚠️ THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.

skill-audit is a security scanning tool, not a guarantee of safety.

  • A passing audit does not mean a skill is safe. It only means no known issues were detected.
  • A failing audit does not mean a skill is malicious. It may be a false positive.
  • Always review skills manually before granting them access to sensitive systems.
  • Do not rely solely on this tool for security decisions in production environments.
  • The authors are not responsible for any damage caused by skills that pass or fail audits.

Use at your own risk. When in doubt, don't install the skill.

License

MIT

Release files for skill-audit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for skill-audit 0.1.0
File Size Uploaded
skill_audit-0.1.0.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for skill-audit 0.1.0
File Interpreter ABI Platform
skill_audit-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.4 kB

Release files / skill_audit-0.1.0.tar.gz

Download URL skill_audit-0.1.0.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2b8725d8e4ea40eb97d138625d630b0f2b7cb932f8c0f8adbcddfa8c894082c1
BLAKE2b-256 checksum
How to use checksums
f5d0a15c0d25201fa77ba23919ab5d935dcb39c882f7ddacbb4a2a37782b20d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / skill_audit-0.1.0-py3-none-any.whl

Download URL skill_audit-0.1.0-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f851f09722b441e0ec561071ec080c80cd6aa4f1512d8cb578ca2db51b32fc2
BLAKE2b-256 checksum
How to use checksums
1083bc235a9fe063bd0c534914ada06aa3f1b6a05ff6355660765d90c2952023
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page