Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.

Commit 04712c1

Browse files
committed
feat(skillpack): harden validator and improve skill discovery
Expands descriptions with more trigger phrases for Copilot auto-discovery. Quotes argument-hint values to fix GitHub web rendering. Adds disable-model-invocation to skill-scaffold so it only runs on explicit /skill-scaffold invocation. Validator now enforces name matches folder, name format and length per Agent Skills spec, and description length. README clarifies that version is a repo convention, not a spec requirement.
1 parent 0b136c1 commit 04712c1

5 files changed

Lines changed: 49 additions & 19 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
[![Build Skillpack](https://github.com/mickpletcher/VSCode/actions/workflows/build-skillpack.yml/badge.svg)](https://github.com/mickpletcher/VSCode/actions/workflows/build-skillpack.yml)
44
[![Create Release Tag](https://github.com/mickpletcher/VSCode/actions/workflows/create-release-tag.yml/badge.svg)](https://github.com/mickpletcher/VSCode/actions/workflows/create-release-tag.yml)
55
[![Latest Release](https://img.shields.io/github/v/release/mickpletcher/VSCode)](https://github.com/mickpletcher/VSCode/releases)
6-
[![Download Skillpack](https://img.shields.io/badge/release%20artifact-skillpack.tar.gz-1f883d)](https://github.com/mickpletcher/VSCode/releases/latest/download/skillpack.tar.gz)
6+
[![Download Skillpack](https://img.shields.io/badge/release%20artifact-skillpack.zip-1f883d)](https://github.com/mickpletcher/VSCode/releases/latest/download/skillpack.zip)
77
[![Download Manifest](https://img.shields.io/badge/release%20artifact-manifest.json-0a7ea4)](https://github.com/mickpletcher/VSCode/releases/latest/download/manifest.json)
88

99
A small catalog of reusable GitHub Copilot skills for VS Code. Each skill in this repository packages a repeatable workflow as:
1010

11-
- a machine-readable [SKILL.md](git-autopilot/SKILL.md)
12-
- a human-readable local README
11+
- a machine-readable `SKILL.md` with YAML frontmatter Copilot uses to trigger the skill
12+
- a human-readable `README.md`
1313
- a top-level folder that can be browsed directly from GitHub
1414

1515
The goal is straightforward: keep useful workflows packaged, documented, and easy to extend.
@@ -58,14 +58,14 @@ Summarizes a pull request or diff into a reviewer-friendly overview with key cha
5858
## Design Rules
5959

6060
- keep each skill focused on one repeatable workflow
61-
- include a stable `version` field in each skill's frontmatter
61+
- include a `version` field in each skill's frontmatter — this is a repo convention for the skillpack manifest, not part of the Agent Skills specification
6262
- use strong trigger phrases in each `description` field
6363
- write supporting READMEs for humans, not just Copilot
6464
- prefer procedural instructions and explicit edge cases over vague guidance
6565

6666
## Skillpack Script
6767

68-
The repository includes a packaging script at [scripts/skillpack.sh](scripts/skillpack.sh). It builds a distributable bundle under `dist/skillpack`, copies every top-level skill directory that contains a `SKILL.md`, includes the root README and license, writes a manifest, and creates a `dist/skillpack.tar.gz` archive. See [scripts/README.md](scripts/README.md) for full usage details.
68+
The repository includes a packaging script at [scripts/skillpack.sh](scripts/skillpack.sh). It builds a distributable bundle under `dist/skillpack`, copies every top-level skill directory that contains a `SKILL.md`, includes the root README and license, writes a manifest, and creates a `dist/skillpack.zip` archive. See [scripts/README.md](scripts/README.md) for full usage details.
6969

7070
## GitHub Actions
7171

pr-summary/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
name: pr-summary
33
version: 1.0.0
4-
description: Summarizes a pull request or pending code changes into a reviewer-friendly overview with highlights, risks, and testing notes. Use this when asked to write a PR summary, draft a pull request description, explain a change set, or prepare reviewer notes from a diff.
5-
argument-hint: [optional: branch, file scope, or PR theme]
4+
description: Summarizes a pull request or pending code changes into a reviewer-friendly overview with highlights, key changes, risks, and testing notes. Use this when asked to write a PR summary, draft a pull request description, explain a change set, summarize a branch, prepare reviewer notes from a diff, or generate PR context for a code review.
5+
argument-hint: "[branch] optional branch name, file scope, or PR theme"
66
---
77

88
# Pull Request Summary

release-notes/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
name: release-notes
33
version: 1.0.0
4-
description: Drafts release notes or changelog entries from git history, staged diffs, or completed work items. Use this when asked to write release notes, summarize a release, prepare a changelog entry, or turn recent changes into a publishable update summary.
5-
argument-hint: [optional: version, date range, or scope]
4+
description: Drafts release notes or changelog entries from git history, staged diffs, or completed work items. Use this when asked to write release notes, summarize a release, prepare a changelog entry, update the changelog, publish a release summary, or turn recent commits into a structured update for users or maintainers.
5+
argument-hint: "[version] optional version, date range, or scope"
66
---
77

88
# Release Notes

scripts/skillpack.sh

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ collect_skills() {
9191
}
9292

9393
validate_skills() {
94-
local skill_dir skill_name
94+
local skill_dir skill_name declared_name name_length desc_length
9595

9696
collect_skills
9797

@@ -107,26 +107,50 @@ validate_skills() {
107107
echo "Missing README.md for skill: $skill_name" >&2
108108
exit 1
109109
fi
110-
111110
if ! grep -q '^---$' "$skill_dir/SKILL.md"; then
112111
echo "Missing YAML frontmatter markers in $skill_name/SKILL.md" >&2
113112
exit 1
114113
fi
115-
116114
if ! grep -q '^name:' "$skill_dir/SKILL.md"; then
117115
echo "Missing name field in $skill_name/SKILL.md" >&2
118116
exit 1
119117
fi
120-
121118
if ! grep -q '^description:' "$skill_dir/SKILL.md"; then
122119
echo "Missing description field in $skill_name/SKILL.md" >&2
123120
exit 1
124121
fi
125-
126122
if ! grep -q '^version:' "$skill_dir/SKILL.md"; then
127123
echo "Missing version field in $skill_name/SKILL.md" >&2
128124
exit 1
129125
fi
126+
127+
# Enforce Agent Skills spec: name must match folder name exactly
128+
declared_name=$(extract_frontmatter_value "$skill_dir/SKILL.md" "name")
129+
if [[ "$declared_name" != "$skill_name" ]]; then
130+
echo "Name mismatch in $skill_name/SKILL.md: frontmatter declares '$declared_name' but folder is '$skill_name'" >&2
131+
echo "VS Code will not load this skill until these match." >&2
132+
exit 1
133+
fi
134+
135+
# Enforce spec: name must be lowercase letters, digits, and hyphens only
136+
if [[ ! "$declared_name" =~ ^[a-z0-9-]+$ ]]; then
137+
echo "Invalid name '$declared_name' in $skill_name/SKILL.md: must be lowercase letters, digits, and hyphens only" >&2
138+
exit 1
139+
fi
140+
141+
# Enforce spec: name must be max 64 characters
142+
name_length=${#declared_name}
143+
if [[ $name_length -gt 64 ]]; then
144+
echo "Name too long in $skill_name/SKILL.md: $name_length characters (max 64)" >&2
145+
exit 1
146+
fi
147+
148+
# Enforce spec: description must be max 1024 characters
149+
desc_length=$(extract_frontmatter_value "$skill_dir/SKILL.md" "description" | wc -c)
150+
if [[ $desc_length -gt 1024 ]]; then
151+
echo "Description too long in $skill_name/SKILL.md: $desc_length characters (max 1024)" >&2
152+
exit 1
153+
fi
130154
done
131155
}
132156

@@ -162,7 +186,7 @@ write_json_manifest() {
162186
printf ' "manifest_format": "json",\n'
163187
printf ' "source": "%s",\n' "$(json_escape "$repo_root")"
164188
printf ' "output": "%s",\n' "$(json_escape "$output_dir")"
165-
printf ' "archive": "%s",\n' "$(json_escape "$output_dir.tar.gz")"
189+
printf ' "archive": "%s",\n' "$(json_escape "$output_dir.zip")"
166190
printf ' "generated_at": "%s",\n' "$generated_at"
167191
printf ' "hash_algorithm": "sha256",\n'
168192
printf ' "skill_count": %s,\n' "${#skill_dirs[@]}"
@@ -282,7 +306,12 @@ else
282306
write_text_manifest
283307
fi
284308

285-
tar -czf "$output_dir.tar.gz" -C "$(dirname "$output_dir")" "$(basename "$output_dir")"
309+
if ! command -v zip >/dev/null 2>&1; then
310+
echo "zip is not available" >&2
311+
exit 1
312+
fi
313+
314+
(cd "$(dirname "$output_dir")" && zip -qr "$(basename "$output_dir").zip" "$(basename "$output_dir")")
286315

287316
echo "Created skillpack at $output_dir"
288-
echo "Created archive at $output_dir.tar.gz"
317+
echo "Created archive at $output_dir.zip"

skill-scaffold/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22
name: skill-scaffold
33
version: 1.0.0
4-
description: Creates a new GitHub Copilot skill folder with a valid SKILL.md, a human-readable README.md, and an index entry in the repository root README. Use this when asked to add a new skill, scaffold a Copilot skill, document a skill folder, or expand a skill catalog repository.
5-
argument-hint: [optional: skill name and purpose]
4+
description: Creates a new GitHub Copilot skill folder with a valid SKILL.md, a human-readable README.md, and an index entry in the repository root README. Use this when asked to add a new skill, scaffold a Copilot skill, create a skill folder, bootstrap a skill, document a skill folder, or expand a skill catalog repository.
5+
argument-hint: "[skill-name] optional skill name and purpose"
6+
disable-model-invocation: true
67
---
78

89
# Skill Scaffold

0 commit comments

Comments
 (0)