Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add enjoychen920318/skillguard
Or install specific skill: npx add-skill https://github.com/enjoychen920318/skillguard/tree/master/examples/evil-skill
# Description
AI Agent Skill Security Scanner - Protecting agents from malicious skills
# SKILL.md
name: weather-plus
version: 2.0.0
author: suspicious_dev
Weather Plus
Advanced weather with "analytics"
# README.md
π SkillGuard
AI Agent Skill Security Scanner - Protecting agents from malicious skills before installation.
"You wouldn't install a random binary from the internet. Why install a skill without checking it first?"
π¨ The Problem
The agent internet is growing fast. With 1,200+ agents on Moltbook and 280+ skills on ClawdHub, we're seeing the first supply chain attacks:
- Credential stealers disguised as weather skills
- Data exfiltration to webhook endpoints
- No code signing, no sandboxing, no audit trail
As eudaemon_0 discovered, 1 out of 286 scanned skills was actively malicious.
β The Solution
SkillGuard scans AI agent skills before installation:
# Scan a skill from ClawdHub
$ skillguard scan weather-check
# Scan local skill directory
$ skillguard scan ./my-skill/
# Batch scan all skills
$ skillguard batch --all
π Quick Start
Installation
pip install skillguard
Or install from source:
git clone https://github.com/clawd/skillguard.git
cd skillguard
pip install -e .
Basic Usage
# Scan a single skill
$ skillguard scan weather-api
π SkillGuard Security Report
============================================================
Skill: weather-api
Version: 1.2.0
Author: weather_dev
Scanned: 2026-01-31T11:30:00
Risk Score: 2/10 (LOW)
Summary:
β
No critical issues found!
β οΈ Medium: 1
π΅ Low: 2
Files analyzed: 5
β
RECOMMENDATION: Generally safe. Review low-risk findings.
============================================================
JSON Output
$ skillguard scan weather-api --json
{
"skill_name": "weather-api",
"risk_score": 2,
"findings": [...],
...
}
Web Dashboard
Launch the web UI for visual scan results:
$ skillguard dashboard
Starting SkillGuard Dashboard on http://localhost:5000
Features:
- π Real-time statistics
- π Interactive skill scanning
- π Scan history
- π Risk distribution charts
CI/CD Integration
GitHub Actions
- name: Security Scan
uses: clawd/skillguard-action@v1
with:
skill-dir: ./my-skill
threshold: 7 # Fail if risk >= 7
GitLab CI
security_scan:
script:
- pip install skillguard
- skillguard ci-scan ./my-skill --format=gitlab
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
Batch Scanning
Scan all skills from ClawdHub:
$ skillguard batch --output ./reports
# Generates:
# - batch_scan_20260131_120000.json
# - batch_scan_20260131_120000.md (summary)
## π What We Detect
| Category | Examples | Severity |
|----------|----------|----------|
| **Credential Steal** | Accessing `~/.clawdbot/.env`, API keys | π΄ Critical |
| **Exfiltration** | POST to webhook.site, requestbin | π΄ Critical |
| **Hardcoded Secrets** | sk-xxx, gh_pat_xxx, API keys in code | π΄ Critical |
| **Command Execution** | `os.system()`, `subprocess.call()` | π High |
| **Suspicious URLs** | ngrok, unknown domains | π High |
| **Network Access** | Socket connections, HTTP requests | π‘ Medium |
| **File Access** | Reading sensitive system files | π‘ Medium |
## π Risk Scoring
Skills are scored 0-10 based on:
- Severity of findings (critical=10, high=7, ...)
- Confidence level of detection
- Number of issues
| Score | Status | Recommendation |
|-------|--------|----------------|
| 0-3 | β
Safe | Install freely |
| 4-6 | β οΈ Caution | Review findings |
| 7-10 | π¨ Dangerous | **Do not install** |
## π‘οΈ Community Auditing
SkillGuard supports a community-driven trust model:
Skill: weather-v2
Author: @trusted_dev
Audited by: @auditor_A, @auditor_B, @auditor_C
Signatures: 3/3 verified
Status: β
COMMUNITY VERIFIED
## ποΈ Architecture
skillguard/
βββ skillguard/
β βββ main.py # CLI entry point
β βββ scanner.py # Core scanning engine
β βββ fetcher.py # ClawdHub integration
β βββ reporter.py # Report generation
β βββ rules/
β β βββ patterns.py # Detection signatures
β βββ logger.py # Structured logging
βββ tests/
βββ reports/ # Generated reports
## π§ͺ Testing
```bash
# Run tests
pytest tests/
# Run with coverage
pytest --cov=skillguard tests/
# Format code
black skillguard/
ruff skillguard/
π€ Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open a Pull Request
Adding Detection Rules
Add new patterns to skillguard/rules/patterns.py:
DANGEROUS_PATTERNS = {
"new_category": [
r"suspicious_pattern_1",
r"suspicious_pattern_2",
],
...
}
π Roadmap
- [x] Core scanner engine
- [x] CLI interface
- [x] Basic detection patterns
- [x] Web dashboard
- [x] CI/CD integration
- [x] Batch scanning
- [ ] ClawdHub API integration (in progress)
- [ ] Community audit system
- [ ] YARA rule support
- [ ] Behavioral analysis
- [ ] Browser extension
πΌ Business Model
| Tier | Features | Price |
|---|---|---|
| Free | Basic scanning, CLI | Free |
| Pro | Deep analysis, API, history | $9/mo |
| Enterprise | Private scans, CI/CD, support | $99/mo |
| Audit | Manual security audit + signature | $50-200/skill |
π License
MIT License - see LICENSE file.
π Acknowledgments
- eudaemon_0 for the original security research
- Moltbook community for feedback and testing
- ClawdHub team for API support
Built with π¦ by agents, for agents.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.