Skip to content

Commit da4b12c

Browse files
committed
Merge branch 'main' into copilot/update-functions-recipe-reference
2 parents 274cbc2 + 8b79a8f commit da4b12c

File tree

347 files changed

+19936
-6748
lines changed

Some content is hidden

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

347 files changed

+19936
-6748
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Creates a GitHub issue in `microsoft/github-copilot-for-azure` for integration t
99

1010
## Input
1111

12-
- **Skill name** (required): e.g., `azure-role-selector`, `appinsights-instrumentation`
12+
- **Skill name** (required): e.g., `azure-rbac`, `appinsights-instrumentation`
1313
- **Test run** (optional): Timestamp of test run. Defaults to most recent with logs for the skill.
1414

1515
## Steps

.github/skills/sensei/README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ Sensei implements the "Ralph Wiggum" technique:
3636
2. **Score** - Evaluate frontmatter compliance
3737
3. **Improve** - Add triggers, anti-triggers, compatibility
3838
4. **Verify** - Run tests to ensure changes work
39-
5. **Check Tokens** - Analyze token usage, gather suggestions
40-
6. **Summary** - Display before/after with suggestions
41-
7. **Prompt** - Ask user: Commit, Create Issue, or Skip?
42-
8. **Repeat** - Until target score reached
39+
5. **Validate References** - Check markdown links are valid
40+
6. **Check Tokens** - Analyze token usage, gather suggestions
41+
7. **Summary** - Display before/after with suggestions
42+
8. **Prompt** - Ask user: Commit, Create Issue, or Skip?
43+
9. **Repeat** - Until target score reached
4344

4445
---
4546

@@ -57,7 +58,7 @@ Run sensei on appinsights-instrumentation --skip-integration
5758

5859
### Multiple Skills
5960
```
60-
Run sensei on azure-security, azure-networking, azure-observability
61+
Run sensei on azure-security, azure-observability
6162
```
6263

6364
### All Low-Adherence Skills
@@ -169,20 +170,27 @@ npm test -- --testPathPattern=azure-validation
169170
└─────────────────────┬───────────────────────────────────┘
170171
171172
┌─────────────────────────────────────────────────────────┐
172-
│ 7. CHECK TOKENS: │
173+
│ 7. VALIDATE REFERENCES: │
174+
│ npm run references {skill-name} │
175+
│ • Check markdown links are valid │
176+
│ • Ensure links stay within skill directory │
177+
└─────────────────────┬───────────────────────────────────┘
178+
179+
┌─────────────────────────────────────────────────────────┐
180+
│ 8. CHECK TOKENS: │
173181
│ npm run tokens -- check plugin/skills/{skill-name} │
174182
│ npm run tokens -- suggest (gather optimizations) │
175183
└─────────────────────┬───────────────────────────────────┘
176184
177185
┌─────────────────────────────────────────────────────────┐
178-
8. SUMMARY: Display before/after comparison │
186+
9. SUMMARY: Display before/after comparison │
179187
│ • Score change (Low → Medium-High) │
180188
│ • Token delta (+/- tokens) │
181189
│ • Unimplemented suggestions │
182190
└─────────────────────┬───────────────────────────────────┘
183191
184192
┌─────────────────────────────────────────────────────────┐
185-
9. PROMPT USER: Choose action
193+
10. PROMPT USER: Choose action │
186194
│ [C] Commit changes │
187195
│ [I] Create GitHub issue with suggestions │
188196
│ [S] Skip (discard changes) │

.github/skills/sensei/SKILL.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,20 @@ When user says "sensei help" or asks how to use sensei, show this:
2828
║ EXAMPLES: ║
2929
║ Run sensei on appinsights-instrumentation ║
3030
║ Run sensei on azure-security --skip-integration ║
31-
║ Run sensei on azure-security, azure-networking
31+
║ Run sensei on azure-security, azure-observability
3232
║ Run sensei on all Low-adherence skills ║
3333
║ ║
3434
║ WHAT IT DOES: ║
35-
║ 1. READ - Load skill's SKILL.md, tests, and token count ║
36-
║ 2. SCORE - Check compliance (Low/Medium/Medium-High/High) ║
37-
║ 3. SCAFFOLD- Create tests from template if missing ║
38-
║ 4. IMPROVE - Add USE FOR triggers + DO NOT USE FOR ║
39-
║ 5. TEST - Run tests, fix if needed ║
40-
║ 6. TOKENS - Check token budget, gather suggestions ║
41-
║ 7. SUMMARY - Show before/after with suggestions ║
42-
║ 8. PROMPT - Ask: Commit, Create Issue, or Skip? ║
43-
║ 9. REPEAT - Until Medium-High score + tests pass ║
35+
║ 1. READ - Load skill's SKILL.md, tests, and token count ║
36+
║ 2. SCORE - Check compliance (Low/Medium/Medium-High/High) ║
37+
║ 3. SCAFFOLD - Create tests from template if missing ║
38+
║ 4. IMPROVE - Add USE FOR triggers + DO NOT USE FOR ║
39+
║ 5. TEST - Run tests, fix if needed ║
40+
║ 6. REFERENCES- Validate markdown links ║
41+
║ 7. TOKENS - Check token budget, gather suggestions ║
42+
║ 8. SUMMARY - Show before/after with suggestions ║
43+
║ 9. PROMPT - Ask: Commit, Create Issue, or Skip? ║
44+
║ 10. REPEAT - Until Medium-High score + tests pass ║
4445
║ ║
4546
║ TARGET SCORE: Medium-High ║
4647
║ ✓ Description > 150 chars ║
@@ -70,7 +71,7 @@ Run sensei on azure-deploy
7071

7172
### Multiple Skills
7273
```
73-
Run sensei on azure-security, azure-networking, azure-observability
74+
Run sensei on azure-security, azure-observability
7475
```
7576

7677
### By Adherence Level
@@ -94,10 +95,11 @@ For each skill, execute this loop until score >= Medium-High AND tests pass:
9495
5. **IMPROVE FRONTMATTER** - Add triggers, anti-triggers, compatibility (stay under 1024 chars)
9596
6. **IMPROVE TESTS** - Update `shouldTriggerPrompts` and `shouldNotTriggerPrompts` to match
9697
7. **VERIFY** - Run `cd tests && npm test -- --testPathPattern={skill-name}`
97-
8. **TOKENS** - Check token budget, gather optimization suggestions
98-
9. **SUMMARY** - Display before/after comparison with unimplemented suggestions
99-
10. **PROMPT** - Ask user: Commit, Create Issue, or Skip?
100-
11. **REPEAT** - Go to step 2 (max 5 iterations per skill)
98+
8. **VALIDATE REFERENCES** - Run `cd scripts && npm run references {skill-name}` to check markdown links
99+
9. **TOKENS** - Check token budget, gather optimization suggestions
100+
10. **SUMMARY** - Display before/after comparison with unimplemented suggestions
101+
11. **PROMPT** - Ask user: Commit, Create Issue, or Skip?
102+
12. **REPEAT** - Go to step 2 (max 5 iterations per skill)
101103

102104
## Scoring Criteria (Quick Reference)
103105

.github/skills/sensei/references/EXAMPLES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ description: |
120120
security services are available", "explain managed identity", "RBAC basics", "Key Vault
121121
concepts", "Entra ID overview", "Defender for Cloud features". DO NOT USE FOR: hardening
122122
existing resources (use azure-security-hardening), Entra app registration setup (use
123-
entra-app-registration), or role assignment guidance (use azure-role-selector).
123+
entra-app-registration), or role assignment guidance (use azure-rbac).
124124
---
125125
```
126126

.github/skills/sensei/references/LOOP.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ The Ralph loop is an iterative improvement cycle inspired by the ["Ralph Wiggum"
3636
│ YES │ │
3737
▼ ▼ │
3838
┌──────────────────┐ │ │
39-
6. CHECK TOKENS │ │ │
39+
7. CHECK TOKENS │ │ │
4040
│ Get suggestions │ │ │
4141
└────────┬─────────┘ │ │
4242
│ │ │
4343
▼ │ │
4444
┌──────────────────┐ │ │
45-
7. SUMMARY │ │ │
45+
8. SUMMARY │ │ │
4646
│ Before/After │ │ │
4747
└────────┬─────────┘ │ │
4848
│ │ │
4949
▼ │ │
5050
┌──────────────────┐ │ │
51-
8. PROMPT USER │ │ │
51+
9. PROMPT USER │ │ │
5252
│ Commit/Issue? │ │ │
5353
└────────┬─────────┘ │ │
5454
│ │ │
@@ -83,6 +83,12 @@ The Ralph loop is an iterative improvement cycle inspired by the ["Ralph Wiggum"
8383
│ │
8484
▼ │
8585
┌──────────────────┐ │
86+
│ 5c. VALIDATE │ │
87+
│ REFERENCES │ │
88+
└────────┬─────────┘ │
89+
│ │
90+
▼ │
91+
┌──────────────────┐ │
8692
│ Iteration < 5? │─┘
8793
└────────┬─────────┘
8894
│ NO
@@ -220,6 +226,33 @@ This runs only unit and trigger tests, which are fast and don't require the Copi
220226
- Adjust frontmatter or test prompts
221227
- Re-run (counts as sub-iteration)
222228

229+
### Step 5c: VALIDATE REFERENCES
230+
231+
**Action:** Check that all markdown links in skill files are valid and don't escape the skill directory
232+
233+
**Command:**
234+
```bash
235+
cd scripts && npm run references {skill-name}
236+
```
237+
238+
**What it checks:**
239+
1. Every local markdown link points to an actual file or directory
240+
2. Every local markdown link stays within the skill's own directory
241+
3. External links (http://, https://, mailto:) are ignored
242+
4. Fragment-only links (#anchor) are ignored
243+
244+
**Expected outcome:**
245+
- ✅ All references are valid and contained within skill directory
246+
247+
**If validation fails:**
248+
- Review broken or escaped references
249+
- Fix invalid links or move referenced files into skill directory
250+
- Re-run validation (counts as sub-iteration)
251+
252+
**Example issues caught:**
253+
- Broken link: `[CLI Commands](references/CLI-COMMANDS.md)` when file doesn't exist
254+
- Escaped reference: `[Other skill](../../other-skill/SKILL.md)` crosses skill boundary
255+
223256
### Step 6: CHECK TOKENS
224257

225258
**Action:** Analyze token usage and gather optimization suggestions

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,13 @@ From the [frontmatter audit](https://gist.github.com/spboyer/28c31bf0cafb8748940
214214
2. `azure-diagnostics`
215215
3. `azure-security`
216216
4. `azure-security-hardening`
217-
5. `azure-networking`
218-
6. `azure-observability`
219-
7. `azure-storage`
220-
8. `azure-ai`
221-
9. `azure-validation`
222-
10. `azure-nodejs-production`
223-
11. `entra-app-registration`
224-
12. `azure-role-selector`
217+
5. `azure-observability`
218+
6. `azure-storage`
219+
7. `azure-ai`
220+
8. `azure-validation`
221+
9. `azure-nodejs-production`
222+
10. `entra-app-registration`
223+
11. `azure-rbac`
225224
226225
### Medium-Adherence Skills
227226

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

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Metadata (~100 tokens) loads at startup. SKILL.md (<5000 tokens) loads on activa
3737

3838
References are JIT (just-in-time) loaded:
3939
- Only files explicitly linked via `[text](references/file.md)` load
40+
- **Link to files, not folders** - `[Recipes](references/recipes/README.md)` not `[Recipes](references/recipes/)`
4041
- Each file loads in full (not sections)
4142
- No caching between requests - write self-contained files
4243
- Use recipes/services patterns for multi-option skills
@@ -48,12 +49,26 @@ See [REFERENCE-LOADING.md](references/REFERENCE-LOADING.md) for details.
4849
```bash
4950
# Run from the scripts directory
5051
cd scripts
51-
npm run tokens -- check plugin/skills/my-skill/SKILL.md
52+
npm run references # Validate all skill links
53+
npm run tokens -- check # Check token limits
5254
```
5355

56+
### Integrity Checks
57+
58+
When reviewing or authoring skills, verify:
59+
1. **No broken links** - All referenced files exist
60+
2. **No orphaned references** - All reference files are linked
61+
3. **Token budgets** - References under 1000 tokens (split if exceeded)
62+
4. **No duplicates** - Consolidate repeated content
63+
5. **No out-of-place guidance** - Service-specific content belongs in service-specific references
64+
65+
See [Validation](references/validation/README.md) for detailed procedures.
66+
5467
## Reference Documentation
5568

56-
- [GUIDELINES.md](references/GUIDELINES.md) - Detailed writing guidelines
57-
- [REFERENCE-LOADING.md](references/REFERENCE-LOADING.md) - How references load and token efficiency
58-
- [CHECKLIST.md](references/CHECKLIST.md) - Pre-submission checklist
69+
- [Guidelines](references/guidelines/README.md) - Detailed writing guidelines
70+
- [Token Budgets](references/token-budgets.md) - Limits and splitting guidance
71+
- [Reference Loading](references/REFERENCE-LOADING.md) - How references load
72+
- [Checklist](references/CHECKLIST.md) - Pre-submission checklist
73+
- [Validation](references/validation/README.md) - Link and reference validation
5974
- [agentskills.io/specification](https://agentskills.io/specification) - Official spec

.github/skills/skill-authoring/references/CHECKLIST.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ Use this checklist before submitting a new skill or updating an existing one.
1414

1515
## Token Budget
1616

17+
See [Token Budgets](token-budgets.md) for detailed limits.
18+
1719
- [ ] SKILL.md is under 500 tokens (soft limit)
1820
- [ ] SKILL.md is under 5000 tokens (hard limit per spec)
19-
- [ ] SKILL.md is under 500 lines
2021
- [ ] Reference files are each under 1000 tokens
21-
- [ ] Run `npm run check` from `scripts/` directory
22+
- [ ] Run `npm run tokens -- check` from `scripts/` directory
2223

2324
## Structure
2425

@@ -29,6 +30,14 @@ Use this checklist before submitting a new skill or updating an existing one.
2930
- [ ] File references use relative paths from skill root
3031
- [ ] No deeply nested reference chains
3132

33+
## Link and Reference Integrity
34+
35+
- [ ] All markdown links point to existing files (no broken links)
36+
- [ ] All files in `references/` are linked from SKILL.md or other references (no orphans)
37+
- [ ] References >1000 tokens are split into folder with README.md
38+
- [ ] Duplicate content is consolidated into shared references
39+
- [ ] No out-of-place guidance (service-specific content in generic sections)
40+
3241
## Content Quality
3342

3443
- [ ] Instructions are action-oriented (step-by-step)
@@ -56,12 +65,9 @@ Use this checklist before submitting a new skill or updating an existing one.
5665
## Final Steps
5766

5867
```bash
59-
# Run token check
6068
cd scripts
61-
npm run check
62-
63-
# Generate updated metadata (optional)
64-
npm run tokens
69+
npm run references # Validate all skill links
70+
npm run tokens -- check # Check token limits
6571
```
6672

67-
If any checks fail, see [GUIDELINES.md](GUIDELINES.md) for guidance.
73+
If any checks fail, see [Guidelines](guidelines/README.md) for guidance.

0 commit comments

Comments
 (0)