Skip to content

Commit 0612e8b

Browse files
authored
Merge pull request #19 from dmartinol/compliance_checker
Compliance checker
2 parents 811a010 + 52da580 commit 0612e8b

14 files changed

Lines changed: 1393 additions & 510 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
name: compliance-checker
3+
description: |
4+
Run skill design compliance validation for agentic collections. Use when the user asks to:
5+
- "Check skill compliance" / "Validate skill design" / "Run compliance check"
6+
- "Verify my skills follow design principles"
7+
- Before committing skill changes
8+
9+
Runs the validate_skill_design.py script against SKILL_DESIGN_PRINCIPLES.md.
10+
---
11+
12+
# Skill Design Compliance Checker
13+
14+
Run the programmatic compliance check for skills in this agentic-collections repository.
15+
16+
## When to Use This Skill
17+
18+
Invoke this skill when the user wants to:
19+
- Validate skills against [SKILL_DESIGN_PRINCIPLES.md](SKILL_DESIGN_PRINCIPLES.md)
20+
- Check compliance before committing or opening a PR
21+
- Verify design principle adherence (DP1–DP7)
22+
23+
## Workflow
24+
25+
1. **Run from project root** (the workspace root).
26+
27+
2. **Preferred: validate only changed skills** (recommended for local dev):
28+
```bash
29+
make validate-skill-design-changed
30+
```
31+
This validates only staged and unstaged skill changes.
32+
33+
3. **Alternative: validate all skills or a specific pack**:
34+
```bash
35+
make validate-skill-design
36+
# Or validate a specific pack:
37+
make validate-skill-design PACK=rh-sre
38+
```
39+
40+
4. **Report results** to the user:
41+
- If validation passes: report success
42+
- If validation fails: list the errors and suggest fixes per the design principles
43+
44+
## Dependencies
45+
46+
- `uv` must be installed (run `make install` if needed)
47+
- Script: `scripts/validate_skill_design.py`
48+
- Reference: [SKILL_DESIGN_PRINCIPLES.md](../../../SKILL_DESIGN_PRINCIPLES.md)
49+
50+
## Design Principles Checked
51+
52+
- DP1: Document consultation transparency
53+
- DP2: Parameter specification and ordering
54+
- DP3: Description conciseness (≤500 tokens)
55+
- DP4: Dependencies declaration
56+
- DP5: Human-in-the-loop for critical skills
57+
- DP6: Mandatory sections (Prerequisites, When to Use, Workflow)
58+
- DP7: Credential security (avoid echoing env vars)

.cursor/skills

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.claude/skills

.github/copilot-instructions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Packs known to the validator are listed in `scripts/validate_structure.py` (`PAC
5353

5454
### Skills — `skills/<name>/SKILL.md`
5555

56-
Must start with valid YAML frontmatter containing at minimum `name` and `description`:
56+
Must start with valid YAML frontmatter. Root-level fields: `name`, `description`, `model`, `color`. Use `metadata` for custom fields (author, priority). See SKILL_DESIGN_PRINCIPLES.md for the 2026 Agentic Skills structure.
5757

5858
```yaml
5959
---
@@ -63,6 +63,8 @@ description: |
6363
Keep under 500 tokens.
6464
model: inherit
6565
color: blue
66+
metadata:
67+
author: "team-name"
6668
---
6769
```
6870

@@ -88,7 +90,7 @@ Same YAML frontmatter requirement (`name` + `description`). Agents orchestrate s
8890

8991
**NEVER hardcode credentials.** Always use `${ENV_VAR}` references. Gitleaks runs as a pre-commit hook and in CI.
9092

91-
## Design Principles (from CLAUDE.md)
93+
## Design Principles (from SKILL_DESIGN_PRINCIPLES.md)
9294

9395
1. **Skills encapsulate tools** — never call MCP tools directly; always go through a skill.
9496
2. **Agents orchestrate skills** — complex workflows delegate to specialized skills.
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ on:
66
branches: [main]
77

88
jobs:
9-
validate:
9+
compliance-check:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
1315

1416
- name: Set up Python
1517
uses: actions/setup-python@v5
@@ -19,8 +21,17 @@ jobs:
1921
- name: Install uv
2022
run: curl -LsSf https://astral.sh/uv/install.sh | sh
2123

22-
- name: Install dependencies and validate
24+
- name: Install dependencies and validate structure
2325
run: |
2426
source $HOME/.cargo/env
2527
make install
2628
make validate
29+
30+
- name: Validate skill design (changed skills only)
31+
env:
32+
GITHUB_EVENT_NAME: ${{ github.event_name }}
33+
GITHUB_BASE_REF: ${{ github.base_ref }}
34+
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
35+
run: |
36+
source $HOME/.cargo/env
37+
./scripts/ci-validate-changed-skills.sh

0 commit comments

Comments
 (0)