skill-guard 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- skill_guard-0.4.2/.github/workflows/ci.yml +45 -0
- skill_guard-0.4.2/.github/workflows/publish.yaml +46 -0
- skill_guard-0.4.2/.github/workflows/skill-gate-monitor.yml +20 -0
- skill_guard-0.4.2/.gitignore +80 -0
- skill_guard-0.4.2/CHANGELOG.md +63 -0
- skill_guard-0.4.2/CONTRIBUTING.md +65 -0
- skill_guard-0.4.2/LICENSE +111 -0
- skill_guard-0.4.2/PKG-INFO +130 -0
- skill_guard-0.4.2/PYPI_SETUP.md +27 -0
- skill_guard-0.4.2/README.md +92 -0
- skill_guard-0.4.2/docs/ci-integration.md +250 -0
- skill_guard-0.4.2/docs/configuration-reference.md +86 -0
- skill_guard-0.4.2/docs/eval-authoring-guide.md +143 -0
- skill_guard-0.4.2/docs/getting-started.md +64 -0
- skill_guard-0.4.2/docs/hooks-guide.md +152 -0
- skill_guard-0.4.2/docs/integration-guide.md +335 -0
- skill_guard-0.4.2/pyproject.toml +70 -0
- skill_guard-0.4.2/skill_guard/__init__.py +0 -0
- skill_guard-0.4.2/skill_guard/commands/__init__.py +0 -0
- skill_guard-0.4.2/skill_guard/commands/catalog.py +134 -0
- skill_guard-0.4.2/skill_guard/commands/check.py +158 -0
- skill_guard-0.4.2/skill_guard/commands/conflict.py +58 -0
- skill_guard-0.4.2/skill_guard/commands/init.py +52 -0
- skill_guard-0.4.2/skill_guard/commands/monitor.py +282 -0
- skill_guard-0.4.2/skill_guard/commands/secure.py +49 -0
- skill_guard-0.4.2/skill_guard/commands/test.py +105 -0
- skill_guard-0.4.2/skill_guard/commands/validate.py +53 -0
- skill_guard-0.4.2/skill_guard/config.py +319 -0
- skill_guard-0.4.2/skill_guard/engine/__init__.py +0 -0
- skill_guard-0.4.2/skill_guard/engine/agent_runner.py +229 -0
- skill_guard-0.4.2/skill_guard/engine/catalog_manager.py +126 -0
- skill_guard-0.4.2/skill_guard/engine/lifecycle.py +74 -0
- skill_guard-0.4.2/skill_guard/engine/notifier.py +73 -0
- skill_guard-0.4.2/skill_guard/engine/quality.py +486 -0
- skill_guard-0.4.2/skill_guard/engine/security.py +252 -0
- skill_guard-0.4.2/skill_guard/engine/similarity.py +193 -0
- skill_guard-0.4.2/skill_guard/main.py +49 -0
- skill_guard-0.4.2/skill_guard/models.py +326 -0
- skill_guard-0.4.2/skill_guard/output/__init__.py +0 -0
- skill_guard-0.4.2/skill_guard/output/html.py +67 -0
- skill_guard-0.4.2/skill_guard/output/json_out.py +23 -0
- skill_guard-0.4.2/skill_guard/output/markdown.py +64 -0
- skill_guard-0.4.2/skill_guard/output/text.py +78 -0
- skill_guard-0.4.2/skill_guard/parser.py +202 -0
- skill_guard-0.4.2/tests/__init__.py +0 -0
- skill_guard-0.4.2/tests/fixtures/skills/broken-refs-skill/SKILL.md +10 -0
- skill_guard-0.4.2/tests/fixtures/skills/conflicting-skill/SKILL.md +9 -0
- skill_guard-0.4.2/tests/fixtures/skills/invalid-skill/SKILL.md +9 -0
- skill_guard-0.4.2/tests/fixtures/skills/malicious-skill/SKILL.md +10 -0
- skill_guard-0.4.2/tests/fixtures/skills/malicious-skill/scripts/setup.sh +2 -0
- skill_guard-0.4.2/tests/fixtures/skills/valid-skill/SKILL.md +18 -0
- skill_guard-0.4.2/tests/fixtures/skills/valid-skill/evals/config.yaml +14 -0
- skill_guard-0.4.2/tests/fixtures/skills/valid-skill/evals/prompts/basic.md +1 -0
- skill_guard-0.4.2/tests/fixtures/skills/valid-skill/evals/prompts/edge-case.md +1 -0
- skill_guard-0.4.2/tests/fixtures/skills/valid-skill/evals/prompts/not-my-job.md +1 -0
- skill_guard-0.4.2/tests/fixtures/skills/valid-skill/references/runbook.md +4 -0
- skill_guard-0.4.2/tests/fixtures/skills/valid-skill/scripts/check.sh +3 -0
- skill_guard-0.4.2/tests/integration/__init__.py +0 -0
- skill_guard-0.4.2/tests/integration/conftest.py +31 -0
- skill_guard-0.4.2/tests/integration/test_agent_runner_integration.py +235 -0
- skill_guard-0.4.2/tests/unit/__init__.py +0 -0
- skill_guard-0.4.2/tests/unit/test_agent_runner.py +206 -0
- skill_guard-0.4.2/tests/unit/test_catalog.py +132 -0
- skill_guard-0.4.2/tests/unit/test_check_cmd.py +57 -0
- skill_guard-0.4.2/tests/unit/test_cli.py +39 -0
- skill_guard-0.4.2/tests/unit/test_config.py +40 -0
- skill_guard-0.4.2/tests/unit/test_init_cmd.py +11 -0
- skill_guard-0.4.2/tests/unit/test_lifecycle.py +68 -0
- skill_guard-0.4.2/tests/unit/test_models.py +112 -0
- skill_guard-0.4.2/tests/unit/test_monitor_cmd.py +138 -0
- skill_guard-0.4.2/tests/unit/test_notifier.py +111 -0
- skill_guard-0.4.2/tests/unit/test_output.py +33 -0
- skill_guard-0.4.2/tests/unit/test_output_text.py +71 -0
- skill_guard-0.4.2/tests/unit/test_parser.py +28 -0
- skill_guard-0.4.2/tests/unit/test_quality.py +22 -0
- skill_guard-0.4.2/tests/unit/test_security.py +15 -0
- skill_guard-0.4.2/tests/unit/test_similarity.py +20 -0
- skill_guard-0.4.2/tests/unit/test_test_cmd.py +183 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.12"
|
|
17
|
+
- run: pip install -e ".[dev]"
|
|
18
|
+
- run: ruff check .
|
|
19
|
+
- run: ruff format --check .
|
|
20
|
+
|
|
21
|
+
unit-tests:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
needs: lint
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
python-version: ["3.11", "3.12"]
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- uses: actions/setup-python@v5
|
|
30
|
+
with:
|
|
31
|
+
python-version: ${{ matrix.python-version }}
|
|
32
|
+
- run: pip install -e ".[dev]"
|
|
33
|
+
- run: pytest tests/unit/ -v --cov=skill_guard --cov-report=xml
|
|
34
|
+
|
|
35
|
+
integration-tests:
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
needs: unit-tests
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- uses: actions/setup-python@v5
|
|
41
|
+
with:
|
|
42
|
+
python-version: "3.12"
|
|
43
|
+
- run: pip install -e ".[dev]"
|
|
44
|
+
- name: Run integration tests (mock agent)
|
|
45
|
+
run: pytest tests/integration/ -v -m integration --no-cov
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write # required for PyPI Trusted Publishing (OIDC)
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
|
|
22
|
+
- name: Install build tools
|
|
23
|
+
run: pip install build
|
|
24
|
+
|
|
25
|
+
- name: Build distributions
|
|
26
|
+
run: python -m build
|
|
27
|
+
|
|
28
|
+
- name: Upload dist artifacts
|
|
29
|
+
uses: actions/upload-artifact@v4
|
|
30
|
+
with:
|
|
31
|
+
name: dist
|
|
32
|
+
path: dist/
|
|
33
|
+
|
|
34
|
+
publish:
|
|
35
|
+
needs: build
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
environment: pypi
|
|
38
|
+
steps:
|
|
39
|
+
- name: Download dist artifacts
|
|
40
|
+
uses: actions/download-artifact@v4
|
|
41
|
+
with:
|
|
42
|
+
name: dist
|
|
43
|
+
path: dist/
|
|
44
|
+
|
|
45
|
+
- name: Publish to PyPI (Trusted Publishing)
|
|
46
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: skill-guard Monitor
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 9 * * 1"
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
monitor:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
env:
|
|
12
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
13
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.12"
|
|
19
|
+
- run: pip install skill-guard
|
|
20
|
+
- run: skill-guard monitor --catalog skill-catalog.yaml --format md
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
*.so
|
|
5
|
+
.Python
|
|
6
|
+
build/
|
|
7
|
+
develop-eggs/
|
|
8
|
+
dist/
|
|
9
|
+
downloads/
|
|
10
|
+
eggs/
|
|
11
|
+
.eggs/
|
|
12
|
+
lib/
|
|
13
|
+
lib64/
|
|
14
|
+
parts/
|
|
15
|
+
sdist/
|
|
16
|
+
var/
|
|
17
|
+
wheels/
|
|
18
|
+
share/python-wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
MANIFEST
|
|
23
|
+
pip-log.txt
|
|
24
|
+
pip-delete-this-directory.txt
|
|
25
|
+
htmlcov/
|
|
26
|
+
.tox/
|
|
27
|
+
.nox/
|
|
28
|
+
.coverage
|
|
29
|
+
.coverage.*
|
|
30
|
+
.cache
|
|
31
|
+
nosetests.xml
|
|
32
|
+
coverage.xml
|
|
33
|
+
*.cover
|
|
34
|
+
*.py,cover
|
|
35
|
+
.hypothesis/
|
|
36
|
+
.pytest_cache/
|
|
37
|
+
cover/
|
|
38
|
+
*.mo
|
|
39
|
+
*.pot
|
|
40
|
+
local_settings.py
|
|
41
|
+
db.sqlite3
|
|
42
|
+
db.sqlite3-journal
|
|
43
|
+
instance/
|
|
44
|
+
.webassets-cache
|
|
45
|
+
.scrapy
|
|
46
|
+
docs/_build/
|
|
47
|
+
.pybuilder/
|
|
48
|
+
target/
|
|
49
|
+
.ipynb_checkpoints
|
|
50
|
+
profile_default/
|
|
51
|
+
ipython_config.py
|
|
52
|
+
.pdm.toml
|
|
53
|
+
__pypackages__/
|
|
54
|
+
celerybeat-schedule
|
|
55
|
+
celerybeat.pid
|
|
56
|
+
*.sage.py
|
|
57
|
+
.env
|
|
58
|
+
.venv
|
|
59
|
+
env/
|
|
60
|
+
venv/
|
|
61
|
+
ENV/
|
|
62
|
+
env.bak/
|
|
63
|
+
venv.bak/
|
|
64
|
+
.spyderproject.db
|
|
65
|
+
.spyproject
|
|
66
|
+
.rope_project
|
|
67
|
+
/site
|
|
68
|
+
.mypy_cache/
|
|
69
|
+
.dmypy.json
|
|
70
|
+
dmypy.json
|
|
71
|
+
.pyre/
|
|
72
|
+
.pytype/
|
|
73
|
+
cython_debug/
|
|
74
|
+
.idea/
|
|
75
|
+
.vscode/
|
|
76
|
+
*.swp
|
|
77
|
+
*.swo
|
|
78
|
+
.DS_Store
|
|
79
|
+
skill-gate.yaml
|
|
80
|
+
skill-catalog.yaml
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.3.0 — 2026-03-05
|
|
4
|
+
|
|
5
|
+
### Phase 3: Monitoring + Lifecycle
|
|
6
|
+
|
|
7
|
+
**New:**
|
|
8
|
+
- `skill-guard monitor` — full health check pipeline across all catalog skills
|
|
9
|
+
- `lifecycle.py` — automated stage transitions (production → degraded → deprecated), staleness checks, CODEOWNERS/MAINTAINERS ownership validation
|
|
10
|
+
- `notifier.py` — Slack webhook alerts + GitHub Issues creation (deduplicates open issues)
|
|
11
|
+
- `output/html.py` — HTML health report with inline CSS, color-coded status cards
|
|
12
|
+
- `.github/workflows/skill-guard-monitor.yml` — weekly scheduled monitoring (Monday 9am UTC)
|
|
13
|
+
|
|
14
|
+
**Tests:** 64 passing, 81.57% coverage
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## v0.2.0 — 2026-03-05
|
|
19
|
+
|
|
20
|
+
### Phase 2: Integration Testing + Catalog
|
|
21
|
+
|
|
22
|
+
**New:**
|
|
23
|
+
- `skill-guard test` — runs evals against real agent via OpenAI Responses API
|
|
24
|
+
- `skill-guard catalog` — register, list, search, stats subcommands
|
|
25
|
+
- `skill-guard check` — full pipeline: validate → secure → conflict → test in one pass
|
|
26
|
+
- `agent_runner.py` — async eval execution, pre/post hook support, health polling
|
|
27
|
+
- `catalog_manager.py` — atomic YAML catalog read/write, stage management
|
|
28
|
+
- `docs/ci-integration.md` — full GitHub Actions integration guide
|
|
29
|
+
- CI: lint → unit-tests → integration-tests pipeline
|
|
30
|
+
|
|
31
|
+
**Tests:** 50 passing, 80.82% coverage
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## v0.1.0 — 2026-03-05
|
|
36
|
+
|
|
37
|
+
### Phase 1: Static Analysis Foundation
|
|
38
|
+
|
|
39
|
+
**New:**
|
|
40
|
+
- `skill-guard validate` — schema validation, description quality, eval presence checks
|
|
41
|
+
- `skill-guard secure` — prompt injection detection, scope violation scanning
|
|
42
|
+
- `skill-guard conflict` — TF-IDF cosine similarity conflict detection
|
|
43
|
+
- `skill-guard init` — project scaffold (skill-guard.yaml + CI workflow)
|
|
44
|
+
|
|
45
|
+
## v0.3.2 — 2026-03-05
|
|
46
|
+
|
|
47
|
+
### Bug fixes & docs
|
|
48
|
+
|
|
49
|
+
- Fix: wrong Anthropic skill-creator URL in README
|
|
50
|
+
- Fix: README Documentation section linked to non-existent files
|
|
51
|
+
- Docs: add `docs/eval-authoring-guide.md` — eval authoring reference
|
|
52
|
+
- Docs: add `docs/hooks-guide.md` — pre/post hook scripts guide
|
|
53
|
+
- Docs: add `docs/integration-guide.md` — end-to-end setup with real Responses API agent
|
|
54
|
+
|
|
55
|
+
## v0.4.0 — 2026-03-05
|
|
56
|
+
|
|
57
|
+
### Project rename: skill-gate → skill-guard
|
|
58
|
+
|
|
59
|
+
- PyPI package: `skill-guard` (was `agentskill-gate`)
|
|
60
|
+
- CLI command: `skill-guard` (was `skill-gate`)
|
|
61
|
+
- Python package: `skill_guard` (was `skill_gate`)
|
|
62
|
+
- GitHub repo: `vaibhavtupe/skill-guard` (was `skill-gate`)
|
|
63
|
+
- All functionality unchanged — pure rename
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Contributing to skill-guard
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing! skill-guard is an open source project and we welcome contributions of all kinds.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Clone the repo
|
|
9
|
+
git clone https://github.com/vaibhavtupe/skill-guard.git
|
|
10
|
+
cd skill-guard
|
|
11
|
+
|
|
12
|
+
# Create a virtual environment
|
|
13
|
+
python -m venv .venv
|
|
14
|
+
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
15
|
+
|
|
16
|
+
# Install in development mode with dev dependencies
|
|
17
|
+
pip install -e ".[dev]"
|
|
18
|
+
|
|
19
|
+
# Run tests
|
|
20
|
+
pytest
|
|
21
|
+
|
|
22
|
+
# Run linting
|
|
23
|
+
ruff check .
|
|
24
|
+
ruff format .
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Development Workflow
|
|
28
|
+
|
|
29
|
+
1. Fork the repository
|
|
30
|
+
2. Create a feature branch: `git checkout -b feature/your-feature-name`
|
|
31
|
+
3. Make your changes
|
|
32
|
+
4. Add tests for new functionality
|
|
33
|
+
5. Ensure all tests pass: `pytest`
|
|
34
|
+
6. Ensure linting passes: `ruff check . && ruff format --check .`
|
|
35
|
+
7. Open a Pull Request
|
|
36
|
+
|
|
37
|
+
## Pull Request Guidelines
|
|
38
|
+
|
|
39
|
+
- Keep PRs focused — one feature or fix per PR
|
|
40
|
+
- Include tests for any new functionality
|
|
41
|
+
- Update documentation if you're changing behavior
|
|
42
|
+
- The PR description should explain what changed and why
|
|
43
|
+
- All CI checks must pass before merge
|
|
44
|
+
|
|
45
|
+
## Issue Templates
|
|
46
|
+
|
|
47
|
+
Use the GitHub issue templates for:
|
|
48
|
+
- **Bug reports** — include the command you ran, the error output, and your environment
|
|
49
|
+
- **Feature requests** — describe the problem you're solving and your proposed solution
|
|
50
|
+
|
|
51
|
+
## Code Style
|
|
52
|
+
|
|
53
|
+
- Python 3.11+
|
|
54
|
+
- Formatted with `ruff format` (line length: 100)
|
|
55
|
+
- Linted with `ruff check`
|
|
56
|
+
- Type hints required for all public functions
|
|
57
|
+
- Docstrings for all public functions and classes
|
|
58
|
+
|
|
59
|
+
## Good First Issues
|
|
60
|
+
|
|
61
|
+
Look for issues labeled `good first issue` — these are well-scoped and a great way to get familiar with the codebase.
|
|
62
|
+
|
|
63
|
+
## Questions?
|
|
64
|
+
|
|
65
|
+
Open a [GitHub Discussion](https://github.com/vaibhavtupe/skill-guard/discussions) for questions, ideas, or feedback.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity.
|
|
18
|
+
|
|
19
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
20
|
+
exercising permissions granted by this License.
|
|
21
|
+
|
|
22
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
23
|
+
including but not limited to software source code, documentation
|
|
24
|
+
source, and configuration files.
|
|
25
|
+
|
|
26
|
+
"Object" form shall mean any form resulting from mechanical
|
|
27
|
+
transformation or translation of a Source form, including but
|
|
28
|
+
not limited to compiled object code, generated documentation,
|
|
29
|
+
and conversions to other media types.
|
|
30
|
+
|
|
31
|
+
"Work" shall mean the work of authorship made available under
|
|
32
|
+
the License, as indicated by a copyright notice that is included in
|
|
33
|
+
or attached to the work.
|
|
34
|
+
|
|
35
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
36
|
+
form, that is based on (or derived from) the Work and for which the
|
|
37
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
38
|
+
represent, as a whole, an original work of authorship.
|
|
39
|
+
|
|
40
|
+
"Contribution" shall mean any work of authorship submitted to the
|
|
41
|
+
Licensor for inclusion in the Work.
|
|
42
|
+
|
|
43
|
+
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
44
|
+
whom a Contribution has been received by the Licensor and included
|
|
45
|
+
within the Work.
|
|
46
|
+
|
|
47
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
48
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
49
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
50
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
51
|
+
publicly perform, publicly display, and distribute the Work and such
|
|
52
|
+
Derivative Works in Source or Object form.
|
|
53
|
+
|
|
54
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
55
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
56
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
57
|
+
patent license to make, have made, use, offer to sell, sell, import,
|
|
58
|
+
and otherwise transfer the Work.
|
|
59
|
+
|
|
60
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
61
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
62
|
+
modifications, and in Source or Object form, provided that You
|
|
63
|
+
meet the following conditions:
|
|
64
|
+
|
|
65
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
66
|
+
Works a copy of this License; and
|
|
67
|
+
|
|
68
|
+
(b) You must cause any modified files to carry prominent notices
|
|
69
|
+
stating that You changed the files; and
|
|
70
|
+
|
|
71
|
+
(c) You must retain, in all form of the Work or Derivative Works
|
|
72
|
+
that You distribute, all copyright, patent, trademark, and
|
|
73
|
+
attribution notices from the Source form of the Work; and
|
|
74
|
+
|
|
75
|
+
(d) If the Work includes a "NOTICE" text file, you must include a
|
|
76
|
+
readable copy of the attribution notices contained within such
|
|
77
|
+
NOTICE file.
|
|
78
|
+
|
|
79
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
80
|
+
any Contribution submitted for inclusion in the Work by You shall be
|
|
81
|
+
under the terms and conditions of this License, without any additional
|
|
82
|
+
terms or conditions.
|
|
83
|
+
|
|
84
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
85
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
86
|
+
except as required for reasonable and customary use in describing the
|
|
87
|
+
origin of the Work.
|
|
88
|
+
|
|
89
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed
|
|
90
|
+
to in writing, the software is provided on an "AS IS" BASIS, WITHOUT
|
|
91
|
+
WARRANTIES OR CONDITIONS OF ANY KIND.
|
|
92
|
+
|
|
93
|
+
8. Limitation of Liability. In no event shall any Contributor be liable
|
|
94
|
+
to You for damages, including any direct, indirect, incidental, special,
|
|
95
|
+
exemplary, or consequential damages.
|
|
96
|
+
|
|
97
|
+
9. Accepting Warranty or Additional Liability. While redistributing the
|
|
98
|
+
Work or Derivative Works thereof, You may choose to offer acceptance
|
|
99
|
+
of warranty, liability, or other terms and conditions. However, in
|
|
100
|
+
accepting such obligations, You may offer such obligations only on
|
|
101
|
+
Your own behalf and on your sole responsibility.
|
|
102
|
+
|
|
103
|
+
END OF TERMS AND CONDITIONS
|
|
104
|
+
|
|
105
|
+
Copyright 2026 Vaibhav Tupe
|
|
106
|
+
|
|
107
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
108
|
+
you may not use this file except in compliance with the License.
|
|
109
|
+
You may obtain a copy of the License at
|
|
110
|
+
|
|
111
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: skill-guard
|
|
3
|
+
Version: 0.4.2
|
|
4
|
+
Summary: The quality gate for Agent Skills — validate, secure, conflict-detect, and test skills across their full lifecycle
|
|
5
|
+
Project-URL: Homepage, https://github.com/vaibhavtupe/skill-guard
|
|
6
|
+
Project-URL: Repository, https://github.com/vaibhavtupe/skill-guard
|
|
7
|
+
Project-URL: Issues, https://github.com/vaibhavtupe/skill-guard/issues
|
|
8
|
+
Author-email: Vaibhav Tupe <vaibhav@example.com>
|
|
9
|
+
License: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: agent-skills,ai-agents,cli,llm,quality-gate
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Requires-Dist: httpx>=0.27
|
|
21
|
+
Requires-Dist: pydantic>=2.0
|
|
22
|
+
Requires-Dist: python-levenshtein>=0.25
|
|
23
|
+
Requires-Dist: rich>=13.0
|
|
24
|
+
Requires-Dist: ruamel-yaml>=0.18
|
|
25
|
+
Requires-Dist: scikit-learn>=1.4
|
|
26
|
+
Requires-Dist: typer>=0.12
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: fastapi>=0.111; extra == 'dev'
|
|
29
|
+
Requires-Dist: httpx>=0.27; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
34
|
+
Requires-Dist: uvicorn>=0.29; extra == 'dev'
|
|
35
|
+
Provides-Extra: embeddings
|
|
36
|
+
Requires-Dist: sentence-transformers>=2.7; extra == 'embeddings'
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
# skill-guard
|
|
40
|
+
|
|
41
|
+
**The quality gate for Agent Skills.**
|
|
42
|
+
|
|
43
|
+
[](https://badge.fury.io/py/agentskill-guard)
|
|
44
|
+
[](LICENSE)
|
|
45
|
+
[](https://www.python.org/downloads/)
|
|
46
|
+
|
|
47
|
+
skill-guard is a CLI tool that validates, secures, and governs [Agent Skills](https://agentskills.io) across their full lifecycle — from contribution to production monitoring.
|
|
48
|
+
|
|
49
|
+
## The Problem
|
|
50
|
+
|
|
51
|
+
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:
|
|
52
|
+
|
|
53
|
+
- A new skill's description overlaps with an existing one → agent picks the wrong skill half the time
|
|
54
|
+
- Skills with dangerous scripts get merged because nobody reviewed the `scripts/` directory
|
|
55
|
+
- Nobody knows what skills are installed, who owns them, or whether they still work
|
|
56
|
+
- A skill passes every test in isolation but fails when the real agent uses it with 25 other skills loaded
|
|
57
|
+
|
|
58
|
+
skill-guard is the quality gate that catches these problems before they reach production.
|
|
59
|
+
|
|
60
|
+
## What It Does
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
ONBOARDING (pre-merge, in CI):
|
|
64
|
+
skill-guard validate → format compliance + quality scoring
|
|
65
|
+
skill-guard secure → scan for dangerous patterns
|
|
66
|
+
skill-guard conflict → detect trigger overlap with existing skills
|
|
67
|
+
skill-guard test → inject into staging agent, run evals
|
|
68
|
+
skill-guard check → run all four as a single gate
|
|
69
|
+
|
|
70
|
+
ONGOING (post-merge, scheduled):
|
|
71
|
+
skill-guard monitor → re-run evals, detect drift, manage lifecycle
|
|
72
|
+
skill-guard catalog → searchable registry of approved skills
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Quick Start
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip install agentskill-guard
|
|
79
|
+
|
|
80
|
+
# Initialize in your skills repo
|
|
81
|
+
skill-guard init
|
|
82
|
+
|
|
83
|
+
# Validate a skill
|
|
84
|
+
skill-guard validate ./skills/my-skill/
|
|
85
|
+
|
|
86
|
+
# Check for security issues
|
|
87
|
+
skill-guard secure ./skills/my-skill/
|
|
88
|
+
|
|
89
|
+
# Check for conflicts with existing skills
|
|
90
|
+
skill-guard conflict ./skills/my-skill/ --against ./skills/
|
|
91
|
+
|
|
92
|
+
# Run the full gate (validate + secure + conflict)
|
|
93
|
+
skill-guard check ./skills/my-skill/ --against ./skills/
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Installation
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Core (static analysis — no agent required)
|
|
100
|
+
pip install agentskill-guard
|
|
101
|
+
|
|
102
|
+
# With embedding-based conflict detection
|
|
103
|
+
pip install agentskill-guard[embeddings]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Requires Python 3.11+.
|
|
107
|
+
|
|
108
|
+
## Documentation
|
|
109
|
+
|
|
110
|
+
- [Getting Started](docs/getting-started.md)
|
|
111
|
+
- [End-to-End Integration Guide](docs/integration-guide.md) ← start here for real agent setup
|
|
112
|
+
- [Writing Evals](docs/eval-authoring-guide.md)
|
|
113
|
+
- [Hook Scripts](docs/hooks-guide.md)
|
|
114
|
+
- [CI/CD Integration](docs/ci-integration.md)
|
|
115
|
+
- [Configuration Reference](docs/configuration-reference.md)
|
|
116
|
+
|
|
117
|
+
## What skill-guard Does NOT Do
|
|
118
|
+
|
|
119
|
+
- Does **not** replace [Anthropic's skill-creator](https://github.com/anthropics/skills/blob/main/skills/skill-creator/SKILL.md) for writing skills
|
|
120
|
+
- Does **not** host or serve skills — skills live in your repo
|
|
121
|
+
- Does **not** modify skills — it reports issues, authors fix them
|
|
122
|
+
- Does **not** require a database or server — the catalog is a YAML file in your repo
|
|
123
|
+
|
|
124
|
+
## Contributing
|
|
125
|
+
|
|
126
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). We welcome contributions of all kinds.
|
|
127
|
+
|
|
128
|
+
## License
|
|
129
|
+
|
|
130
|
+
Apache 2.0. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# PyPI Publishing Setup
|
|
2
|
+
|
|
3
|
+
skill-guard uses **Trusted Publishing (OIDC)** — no API token needed. One-time setup:
|
|
4
|
+
|
|
5
|
+
## Steps
|
|
6
|
+
|
|
7
|
+
1. **Create the PyPI project**
|
|
8
|
+
- Go to https://pypi.org/manage/account/publishing/
|
|
9
|
+
- Add a new Trusted Publisher:
|
|
10
|
+
- PyPI project name: `agentskill-guard`
|
|
11
|
+
- GitHub owner: `vaibhavtupe`
|
|
12
|
+
- GitHub repo: `skill-guard`
|
|
13
|
+
- Workflow filename: `publish.yml`
|
|
14
|
+
- Environment name: `pypi`
|
|
15
|
+
|
|
16
|
+
2. **Create the GitHub environment**
|
|
17
|
+
- Go to https://github.com/vaibhavtupe/skill-guard/settings/environments
|
|
18
|
+
- Create environment named `pypi`
|
|
19
|
+
- Optional: add protection rules (required reviewers)
|
|
20
|
+
|
|
21
|
+
3. **Trigger a publish**
|
|
22
|
+
- Push a version tag: `git tag v0.3.1 && git push origin v0.3.1`
|
|
23
|
+
- The `publish.yml` workflow fires automatically, builds, and uploads to PyPI
|
|
24
|
+
|
|
25
|
+
## That's it
|
|
26
|
+
|
|
27
|
+
No secrets, no tokens. GitHub's OIDC identity is used to authenticate with PyPI directly.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# skill-guard
|
|
2
|
+
|
|
3
|
+
**The quality gate for Agent Skills.**
|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/py/agentskill-guard)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://www.python.org/downloads/)
|
|
8
|
+
|
|
9
|
+
skill-guard is a CLI tool that validates, secures, and governs [Agent Skills](https://agentskills.io) across their full lifecycle — from contribution to production monitoring.
|
|
10
|
+
|
|
11
|
+
## The Problem
|
|
12
|
+
|
|
13
|
+
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:
|
|
14
|
+
|
|
15
|
+
- A new skill's description overlaps with an existing one → agent picks the wrong skill half the time
|
|
16
|
+
- Skills with dangerous scripts get merged because nobody reviewed the `scripts/` directory
|
|
17
|
+
- Nobody knows what skills are installed, who owns them, or whether they still work
|
|
18
|
+
- A skill passes every test in isolation but fails when the real agent uses it with 25 other skills loaded
|
|
19
|
+
|
|
20
|
+
skill-guard is the quality gate that catches these problems before they reach production.
|
|
21
|
+
|
|
22
|
+
## What It Does
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
ONBOARDING (pre-merge, in CI):
|
|
26
|
+
skill-guard validate → format compliance + quality scoring
|
|
27
|
+
skill-guard secure → scan for dangerous patterns
|
|
28
|
+
skill-guard conflict → detect trigger overlap with existing skills
|
|
29
|
+
skill-guard test → inject into staging agent, run evals
|
|
30
|
+
skill-guard check → run all four as a single gate
|
|
31
|
+
|
|
32
|
+
ONGOING (post-merge, scheduled):
|
|
33
|
+
skill-guard monitor → re-run evals, detect drift, manage lifecycle
|
|
34
|
+
skill-guard catalog → searchable registry of approved skills
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Quick Start
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install agentskill-guard
|
|
41
|
+
|
|
42
|
+
# Initialize in your skills repo
|
|
43
|
+
skill-guard init
|
|
44
|
+
|
|
45
|
+
# Validate a skill
|
|
46
|
+
skill-guard validate ./skills/my-skill/
|
|
47
|
+
|
|
48
|
+
# Check for security issues
|
|
49
|
+
skill-guard secure ./skills/my-skill/
|
|
50
|
+
|
|
51
|
+
# Check for conflicts with existing skills
|
|
52
|
+
skill-guard conflict ./skills/my-skill/ --against ./skills/
|
|
53
|
+
|
|
54
|
+
# Run the full gate (validate + secure + conflict)
|
|
55
|
+
skill-guard check ./skills/my-skill/ --against ./skills/
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Installation
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Core (static analysis — no agent required)
|
|
62
|
+
pip install agentskill-guard
|
|
63
|
+
|
|
64
|
+
# With embedding-based conflict detection
|
|
65
|
+
pip install agentskill-guard[embeddings]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Requires Python 3.11+.
|
|
69
|
+
|
|
70
|
+
## Documentation
|
|
71
|
+
|
|
72
|
+
- [Getting Started](docs/getting-started.md)
|
|
73
|
+
- [End-to-End Integration Guide](docs/integration-guide.md) ← start here for real agent setup
|
|
74
|
+
- [Writing Evals](docs/eval-authoring-guide.md)
|
|
75
|
+
- [Hook Scripts](docs/hooks-guide.md)
|
|
76
|
+
- [CI/CD Integration](docs/ci-integration.md)
|
|
77
|
+
- [Configuration Reference](docs/configuration-reference.md)
|
|
78
|
+
|
|
79
|
+
## What skill-guard Does NOT Do
|
|
80
|
+
|
|
81
|
+
- Does **not** replace [Anthropic's skill-creator](https://github.com/anthropics/skills/blob/main/skills/skill-creator/SKILL.md) for writing skills
|
|
82
|
+
- Does **not** host or serve skills — skills live in your repo
|
|
83
|
+
- Does **not** modify skills — it reports issues, authors fix them
|
|
84
|
+
- Does **not** require a database or server — the catalog is a YAML file in your repo
|
|
85
|
+
|
|
86
|
+
## Contributing
|
|
87
|
+
|
|
88
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). We welcome contributions of all kinds.
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
Apache 2.0. See [LICENSE](LICENSE).
|