Skip to content

Commit b392a9c

Browse files
authored
Merge branch 'main' into main
2 parents a3611f7 + 7f36450 commit b392a9c

File tree

134 files changed

+6572
-1127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+6572
-1127
lines changed

.github/instructions/skill-files.instructions.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,19 @@ Every SKILL.md must include YAML frontmatter with:
1313
```yaml
1414
---
1515
name: skill-name
16-
description: Detailed description including trigger phrases and use cases.
16+
description: "Detailed description including trigger phrases and use cases."
17+
license: MIT
18+
metadata:
19+
author: Microsoft
20+
version: "1.0.0"
1721
---
1822
```
1923

2024
- **name**: 1-64 characters, lowercase letters and hyphens only, must match directory name
2125
- **description**: 1-1024 characters, explain WHAT the skill does and WHEN to use it. Include trigger phrases.
26+
- **license**: Required for all skills. Use `MIT` unless there is a documented exception.
27+
- **metadata.author**: Recommended value is `Microsoft`.
28+
- **metadata.version**: Semver format (`X.Y.Z`). Set to `"1.0.0"` for new skills. Must be bumped in the same PR that modifies the skill.
2229

2330
## Size Limits
2431

.github/skills/file-test-bug/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
22
name: file-test-bug
33
description: "File a GitHub issue for local integration test failures. TRIGGERS: file test bug, report test failure, create bug for test, integration test failed, test failure issue, junit failure"
4+
license: MIT
5+
metadata:
6+
author: Microsoft
7+
version: "1.0.0"
48
---
59

610
# File Test Bug

.github/skills/markdown-token-optimizer/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
22
name: markdown-token-optimizer
33
description: "Analyzes markdown files for token efficiency. TRIGGERS: optimize markdown, reduce tokens, token count, token bloat, too many tokens, make concise, shrink file, file too large, optimize for AI, token efficiency, verbose markdown, reduce file size"
4+
license: MIT
5+
metadata:
6+
author: Microsoft
7+
version: "1.0.0"
48
---
59

610
# Markdown Token Optimizer

.github/skills/sensei/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
22
name: sensei
33
description: "**WORKFLOW SKILL** — Iteratively improve skill frontmatter compliance using the Ralph loop pattern. WHEN: \"run sensei\", \"sensei help\", \"improve skill\", \"fix frontmatter\", \"skill compliance\", \"frontmatter audit\", \"score skill\", \"check skill tokens\". INVOKES: token counting tools, test runners, git commands. FOR SINGLE OPERATIONS: use token CLI directly for counts/checks."
4+
license: MIT
5+
metadata:
6+
author: Microsoft
7+
version: "1.0.0"
48
---
59

610
# Sensei

.github/skills/sensei/references/SCORING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ license: MIT
102102
compatibility: Supports ASP.NET Core (.NET 6+), Node.js. Requires App Insights resource.
103103
metadata:
104104
author: example-org
105-
version: "1.0"
105+
version: "1.0.0"
106106
```
107107

108108
---
@@ -218,7 +218,7 @@ The [agentskills.io spec](https://agentskills.io/specification) defines addition
218218
```
219219
SUGGESTIONS:
220220
• Add license field (e.g., license: MIT)
221-
• Add metadata.version field (e.g., metadata: { version: "1.0" })
221+
• Add metadata.version field (e.g., metadata: { version: "1.0.0" })
222222
```
223223
224224
### 7. SKILL.md Size Limits
@@ -345,7 +345,7 @@ function collectSuggestions(skill):
345345
if skill.license == null:
346346
suggestions.add("Add license field (e.g., license: MIT)")
347347
if skill.metadata == null OR skill.metadata.version == null:
348-
suggestions.add("Add metadata.version field (e.g., metadata: { version: \"1.0\" })")
348+
suggestions.add("Add metadata.version field (e.g., metadata: { version: \"1.0.0\" })")
349349
if usesBlockScalar(skill.rawDescription):
350350
suggestions.add("Use inline double-quoted string for description (>- incompatible with skills.sh)")
351351
if containsAntiTriggers(skill.description):

.github/skills/skill-authoring/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
22
name: skill-authoring
33
description: "Guidelines for writing Agent Skills that comply with the agentskills.io specification. WHEN: \"create a skill\", \"new skill\", \"write a skill\", \"skill template\", \"skill structure\", \"review skill\", \"skill PR\", \"skill compliance\", \"SKILL.md format\", \"skill frontmatter\", \"skill best practices\"."
4+
license: MIT
5+
metadata:
6+
author: Microsoft
7+
version: "1.0.0"
48
---
59

610
# Skill Authoring Guide

.github/workflows/eval.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run Skill Evaluations
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
paths:
7+
- 'evals/**'
8+
- 'plugin/skills/**'
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
eval:
15+
name: Run Evaluations
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Install Azure Developer CLI
20+
uses: Azure/setup-azd@v2
21+
- name: Install waza extension
22+
run: |
23+
azd config set alpha.extensions on
24+
azd ext source add -n waza -t url -l https://raw.githubusercontent.com/microsoft/waza/main/registry.json
25+
azd ext install microsoft.azd.waza
26+
- name: Run evaluations
27+
run: azd waza run evals/azure-hosted-copilot-sdk/eval.yaml --output-dir ./results
28+
- name: Upload results
29+
if: always()
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: eval-results
33+
path: ./results
34+
retention-days: 30

.github/workflows/pr.yml

Lines changed: 108 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ jobs:
3232
working-directory: ./scripts
3333
run: npm ci
3434

35-
- name: Typecheck
35+
- name: Typecheck tests
3636
working-directory: ./tests
3737
run: npm run typecheck
3838

39+
- name: Typecheck scripts
40+
working-directory: ./scripts
41+
run: npm run typecheck
42+
3943
- name: Lint test
4044
working-directory: ./tests
4145
run: npm run lint
@@ -186,6 +190,8 @@ jobs:
186190
steps:
187191
- name: Checkout repository
188192
uses: actions/checkout@v4
193+
with:
194+
fetch-depth: 0
189195

190196
- name: Check changed skill files
191197
id: changed-skills
@@ -195,41 +201,54 @@ jobs:
195201
plugin/skills/**/SKILL.md
196202
.github/skills/**/SKILL.md
197203
204+
- name: Check all changed plugin skill files
205+
id: changed-plugin-skills
206+
uses: tj-actions/changed-files@v46
207+
with:
208+
files: |
209+
plugin/skills/**
210+
.github/skills/**
211+
212+
- name: Setup Node.js
213+
if: steps.changed-skills.outputs.any_changed == 'true'
214+
uses: actions/setup-node@v4
215+
with:
216+
node-version: '20'
217+
cache: 'npm'
218+
cache-dependency-path: scripts/package.json
219+
220+
- name: Install scripts dependencies
221+
if: steps.changed-skills.outputs.any_changed == 'true'
222+
working-directory: ./scripts
223+
run: npm ci
224+
198225
- name: Validate skill frontmatter
199226
if: steps.changed-skills.outputs.any_changed == 'true'
227+
working-directory: ./scripts
200228
run: |
201229
echo "## Skill Validation" >> $GITHUB_STEP_SUMMARY
230+
echo "" >> $GITHUB_STEP_SUMMARY
202231
203-
# Use IFS to safely handle filenames (though markdown files typically don't have spaces)
204-
IFS=$'\n'
232+
# Pass changed SKILL.md file paths directly to the validator
233+
# Prefix with ../ since working-directory is ./scripts
234+
SKILL_FILES=""
205235
for file in ${{ steps.changed-skills.outputs.all_changed_files }}; do
206-
echo "Checking $file..."
207-
208-
# Check for required frontmatter
209-
if ! head -1 "$file" | grep -q "^---"; then
210-
echo "::error file=$file::Missing YAML frontmatter"
211-
echo "❌ $file - Missing frontmatter" >> $GITHUB_STEP_SUMMARY
212-
exit 1
213-
fi
214-
215-
# Check for name field
216-
if ! grep -q "^name:" "$file"; then
217-
echo "::error file=$file::Missing required 'name' field in frontmatter"
218-
echo "❌ $file - Missing 'name' field" >> $GITHUB_STEP_SUMMARY
219-
exit 1
220-
fi
221-
222-
# Check for description field
223-
if ! grep -q "^description:" "$file"; then
224-
echo "::error file=$file::Missing required 'description' field in frontmatter"
225-
echo "❌ $file - Missing 'description' field" >> $GITHUB_STEP_SUMMARY
226-
exit 1
227-
fi
228-
229-
echo "✅ $file - Valid" >> $GITHUB_STEP_SUMMARY
236+
SKILL_FILES="$SKILL_FILES ../$file"
230237
done
231238
232-
echo "All skill files have valid frontmatter"
239+
# Run frontmatter spec validation
240+
if OUTPUT=$(npm run frontmatter -- $SKILL_FILES 2>&1); then
241+
echo "$OUTPUT"
242+
echo "✅ All skill frontmatter is valid" >> $GITHUB_STEP_SUMMARY
243+
else
244+
echo "$OUTPUT"
245+
echo "❌ Frontmatter validation failed" >> $GITHUB_STEP_SUMMARY
246+
echo "" >> $GITHUB_STEP_SUMMARY
247+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
248+
echo "$OUTPUT" >> $GITHUB_STEP_SUMMARY
249+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
250+
exit 1
251+
fi
233252
234253
- name: Validate skills.json
235254
uses: actions/github-script@v7
@@ -281,6 +300,67 @@ jobs:
281300
core.setFailed('tests/skills.json validation failed');
282301
}
283302
303+
- name: Check skill version bumps
304+
if: steps.changed-plugin-skills.outputs.any_changed == 'true'
305+
run: |
306+
echo "## Skill Version Check" >> $GITHUB_STEP_SUMMARY
307+
echo "" >> $GITHUB_STEP_SUMMARY
308+
309+
FAILED=false
310+
311+
# For each changed file, walk up to find the nearest SKILL.md
312+
SKILL_FILES=""
313+
for file in ${{ steps.changed-plugin-skills.outputs.all_changed_files }}; do
314+
dir=$(dirname "$file")
315+
while [ "$dir" != "plugin/skills" ] && [ "$dir" != ".github/skills" ] && [ "$dir" != "plugin" ] && [ "$dir" != ".github" ] && [ "$dir" != "." ]; do
316+
if [ -f "$dir/SKILL.md" ]; then
317+
SKILL_FILES="$SKILL_FILES $dir/SKILL.md"
318+
break
319+
fi
320+
dir=$(dirname "$dir")
321+
done
322+
done
323+
324+
# Deduplicate
325+
SKILL_FILES=$(echo "$SKILL_FILES" | tr ' ' '\n' | sort -u | grep -v '^$')
326+
327+
if [ -z "$SKILL_FILES" ]; then
328+
echo "No SKILL.md files affected by changes."
329+
echo "✅ No version bump needed" >> $GITHUB_STEP_SUMMARY
330+
exit 0
331+
fi
332+
333+
for skill_file in $SKILL_FILES; do
334+
SKILL_NAME=$(basename "$(dirname "$skill_file")")
335+
336+
# Get version in base branch (use [[:space:]] for portable whitespace matching)
337+
BASE_VERSION=$(git show origin/${{ github.base_ref }}:"$skill_file" 2>/dev/null | sed -n '/^---$/,/^---$/p' | grep -E '^[[:space:]]+version:' | head -1 | sed 's/.*version:[[:space:]]*"\{0,1\}\([^"]*\)"\{0,1\}/\1/' || echo "")
338+
339+
# Get version in PR branch
340+
HEAD_VERSION=$(sed -n '/^---$/,/^---$/p' "$skill_file" | grep -E '^[[:space:]]+version:' | head -1 | sed 's/.*version:[[:space:]]*"\{0,1\}\([^"]*\)"\{0,1\}/\1/')
341+
342+
# New skill (no base version) — skip, it starts at 1.0.0
343+
if [ -z "$BASE_VERSION" ]; then
344+
echo "✅ $skill_file — new skill (version: $HEAD_VERSION)"
345+
continue
346+
fi
347+
348+
if [ "$BASE_VERSION" = "$HEAD_VERSION" ]; then
349+
echo "::error file=$skill_file::Skill '$SKILL_NAME' was modified but metadata.version was not bumped ($BASE_VERSION). Bump the version in your PR."
350+
echo "❌ \`$SKILL_NAME\` (\`$skill_file\`) — version not bumped ($BASE_VERSION)" >> $GITHUB_STEP_SUMMARY
351+
FAILED=true
352+
else
353+
echo "✅ $skill_file — $SKILL_NAME version bumped: $BASE_VERSION → $HEAD_VERSION"
354+
echo "✅ \`$SKILL_NAME\` (\`$skill_file\`) — $BASE_VERSION → $HEAD_VERSION" >> $GITHUB_STEP_SUMMARY
355+
fi
356+
done
357+
358+
if [ "$FAILED" = true ]; then
359+
echo "" >> $GITHUB_STEP_SUMMARY
360+
echo "> Every PR that modifies a skill must bump its \`metadata.version\` in the same PR." >> $GITHUB_STEP_SUMMARY
361+
exit 1
362+
fi
363+
284364
- name: Skip message
285365
if: steps.changed-skills.outputs.any_changed != 'true'
286366
run: echo "No skill files changed - skipping validation"

.github/workflows/test-all-integration.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ permissions:
1111

1212
on:
1313
schedule:
14-
# 9:00 PM PST every day (5:00 AM UTC)
15-
- cron: '0 5 * * *'
16-
# 12:00 AM PST every day (8:00 AM UTC)
17-
- cron: '0 8 * * *'
18-
# 4:00 AM PST every day (12:00 PM UTC)
19-
- cron: '0 12 * * *'
14+
# Nightly job to run all the integration tests, except weekends in PST.
15+
# 9:00 PM PST Mon-Fri (5:00 AM UTC Tue-Sat)
16+
- cron: '0 5 * * 2-6'
17+
# 12:00 AM PST Tue-Sat (8:00 AM UTC Tue-Sat)
18+
- cron: '0 8 * * 2-6'
19+
# 4:00 AM PST Tue-Sat (12:00 PM UTC Tue-Sat)
20+
- cron: '0 12 * * 2-6'
2021
workflow_dispatch:
2122
inputs:
2223
skills:
@@ -30,6 +31,11 @@ on:
3031
options:
3132
- claude-sonnet-4.5
3233
- claude-opus-4.5
34+
skill-test-pattern:
35+
description: 'Optional: pattern by name or describe block for filtering skill tests. This parameter does not apply to azure-deploy tests'
36+
required: false
37+
type: string
38+
default: ''
3339
deploy-test-pattern:
3440
description: 'Optional: Comma separated patterns by name or describe block for filtering azure-deploy tests.'
3541
required: false
@@ -92,13 +98,13 @@ jobs:
9298
9399
# Set deploy-test-pattern and debug based on the schedule slot
94100
case "$CRON" in
95-
"0 5 * * *")
101+
"0 5 * * 2-6")
96102
echo "debug=${{ env.SCHEDULED_DEBUG_21 }}" >> "$GITHUB_OUTPUT"
97103
;;
98-
"0 8 * * *")
104+
"0 8 * * 2-6")
99105
echo "debug=${{ env.SCHEDULED_DEBUG_00 }}" >> "$GITHUB_OUTPUT"
100106
;;
101-
"0 12 * * *")
107+
"0 12 * * 2-6")
102108
echo "debug=${{ env.SCHEDULED_DEBUG_04 }}" >> "$GITHUB_OUTPUT"
103109
;;
104110
*)
@@ -258,13 +264,14 @@ jobs:
258264
DEBUG: ${{ needs.resolve-inputs.outputs.debug == 'true' && '1' || '' }}
259265
TEST_RUN_ID: all-integration
260266
MODEL_OVERRIDE: ${{ inputs.model-override }}
267+
SKILL_TEST_PATTERN: ${{ inputs.skill-test-pattern }}
261268
run: |
262269
echo test with $MODEL_OVERRIDE
263270
# Handle azure-ai vs azure-aigateway prefix collision
264271
if [ "${{ matrix.skill }}" = "azure-ai" ]; then
265-
npm run test:integration azure-ai/
272+
npm run test:integration azure-ai/ "$SKILL_TEST_PATTERN"
266273
else
267-
npm run test:integration ${{ matrix.skill }}
274+
npm run test:integration ${{ matrix.skill }} "$SKILL_TEST_PATTERN"
268275
fi
269276
continue-on-error: true
270277

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2+
venv/
3+
.venv/
24
__integration_*__/
35
__pycache__/
46
__test_fixtures__/

0 commit comments

Comments
 (0)