-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (84 loc) · 2.63 KB
/
Copy pathlint-skills.yml
File metadata and controls
99 lines (84 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Lint Skills
on:
push:
paths:
- "skills/**"
- "scripts/lint_skills.py"
- "scripts/eval_skills/**"
- "scripts/skill_eval_prompt.md"
- "docs/skill-quality-rubric.md"
- "tests/test_lint_skills.py"
- "tests/eval_skills/**"
- ".github/workflows/lint-skills.yml"
pull_request:
paths:
- "skills/**"
- "scripts/lint_skills.py"
- "scripts/eval_skills/**"
- "scripts/skill_eval_prompt.md"
- "docs/skill-quality-rubric.md"
- "tests/test_lint_skills.py"
- "tests/eval_skills/**"
- ".github/workflows/lint-skills.yml"
permissions:
contents: read
pull-requests: write
checks: write
jobs:
lint:
name: Skill Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install pytest
run: pip install pytest
- name: Run linter tests
run: python -m pytest tests/test_lint_skills.py -v
- name: Run skill linter
run: python scripts/lint_skills.py
eval:
name: Skill Quality Agent
needs: lint
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run driver tests
run: npm test
- name: Restore eval cache
uses: actions/cache@v6
with:
path: .cache/skill-eval
key: skill-eval-${{ hashFiles('skills/**/SKILL.md', 'scripts/skill_eval_prompt.md', 'docs/skill-quality-rubric.md') }}
restore-keys: |
skill-eval-
- name: Run skill quality agent
env:
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
run: npm run eval-skills -- --base-ref origin/${{ github.base_ref }}
- name: Find existing sticky comment
id: find-comment
if: always() && hashFiles('skill-eval-comment.md') != ''
uses: peter-evans/find-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: "<!-- skill-eval-bot -->"
- name: Post sticky PR comment
if: always() && hashFiles('skill-eval-comment.md') != ''
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body-path: skill-eval-comment.md
edit-mode: replace
comment-id: ${{ steps.find-comment.outputs.comment-id }}