Skip to content

Commit 7d2a66f

Browse files
authored
chore: improve usability (#20)
* chore: improve consumer scripts * chore: trim it down to nx skills * update docs around skills
1 parent ad41d7d commit 7d2a66f

37 files changed

Lines changed: 341 additions & 2566 deletions

.github/pull_request_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
## Checklist
1515

1616
- [ ] Followed [spec/SKILL_SPEC.md](../spec/SKILL_SPEC.md) (7 sections, ≤500 lines, kebab-case name, flat resource dirs).
17-
- [ ] Bumped the skill's `version` in `skills/<name>/package.json` (semver — patch / minor / major).
1817
- [ ] Updated `SKILL.md` when behaviour changed (description, Use When, Workflow, Examples).
1918
- [ ] Ran `make validate` (or `uv run python scripts/validate_skill.py skills/<name>/SKILL.md`) locally and it passed.
2019
- [ ] Ran `make format` and `make lint` if Python under `scripts/` or `tests/` changed.

.github/scripts/check-version-bumps.sh

Lines changed: 0 additions & 78 deletions
This file was deleted.

.github/scripts/publish-changed-skills.sh

Lines changed: 0 additions & 69 deletions
This file was deleted.

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@ description: Scaffolds a new skill profile in this repo and fills in the require
1212

1313
## Don't Use When
1414
- The user wants to check an existing skill against the spec → use `skill-validator`.
15-
- The user wants to bump a version or publish → use `skill-release`.
1615
- The user is editing prose in an existing, already-structured skill.
1716

1817
## Workflow
19-
1. Pick a kebab-case `<skill-name>` and create `skills/<skill-name>/`.
20-
2. Copy `templates/SKILL.md` and `templates/package.json` into that folder.
21-
3. Fill the frontmatter (`name`, `description`) and write the H1 title line.
22-
4. Complete all seven sections: Use When, Don't Use When, Workflow, Rules, Examples, Edge Cases, References.
23-
5. Set the package `name` to `@bcgov/<skill-name>` (matching the manifest `name`) and `version` to `0.1.0` in `package.json`.
18+
1. Before scaffolding, confirm no upstream catalogue already covers this use case. Search [The Agent Skills Directory](https://www.skills.sh/), the [Microsoft Agent Skills catalog](https://microsoft.github.io/skills/#agents), [`anthropics/skills`](https://github.com/anthropics/skills), and [`github/awesome-copilot`](https://github.com/github/awesome-copilot). If an upstream skill covers it, point the user there instead of scaffolding a duplicate; only proceed when the skill is genuinely BC Gov–specific (encodes BC Gov policies, internal services, regulatory requirements, or org-specific workflows).
19+
2. Pick a kebab-case `<skill-name>` and create `skills/<skill-name>/`.
20+
3. Copy `templates/SKILL.md` into that folder.
21+
4. Fill the frontmatter (`name`, `description`) and write the H1 title line.
22+
5. Complete all seven sections: Use When, Don't Use When, Workflow, Rules, Examples, Edge Cases, References.
2423
6. Run `uv run python scripts/validate_skill.py skills/<skill-name>/SKILL.md` and fix any errors.
2524

2625
## Rules
27-
- Always set the new skill's starting `version` to `0.1.0` in `package.json`, never in the `SKILL.md` frontmatter. (Why: version lives only in package.json to avoid drift between two sources of truth.)
28-
- Always keep the package `name` as `@bcgov/<skill-name>` — same as the folder and the manifest `name`. (Why: consumers wire skills into their agent by folder name; matching keeps `node_modules/@bcgov/<name>/` usable as-is with no rename step.)
26+
- Always run the upstream-catalogue check in Workflow step 1 before scaffolding. (Why: this repo is for BC Gov–specific skills; duplicating an upstream skill fragments the ecosystem, doubles the maintenance burden, and makes it ambiguous which one consumers should install. Reviewers will ask for the result of this check in the PR description.)
2927
- Never invent a new section order or rename a section. (Why: the validator matches the seven section titles exactly and the PR check will fail.)
3028
- Always keep `## Use When` as situational triggers (when to reach for this skill at all) and `## Workflow` as the numbered procedure (how to do the work). Never let a Use When bullet paraphrase a Workflow step — if a bullet starts with "Always ship…", "Set X to Y", or restates a procedural detail, it belongs in Workflow, not Use When. (Why: the two sections serve different reader intents — routing vs. execution — and duplicating content between them bloats the agent's context, makes routing fuzzier, and drifts out of sync on every edit.)
3129

3230
## Examples
3331
- "I want to add a skill for looking up land parcels" → scaffold `skills/parcel-lookup/`, fill the template, validate.
34-
- "How do I start a new skill profile?" → copy the templates into a new skill dir and walk through the seven sections.
32+
- "How do I start a new skill profile?" → copy the template into a new skill dir and walk through the seven sections.
3533

3634
## Edge Cases
3735
- If a `skills/<skill-name>/` folder already exists → confirm whether to edit it (route to the author flow on the existing files) rather than overwriting.
3836
- If the user hasn't named the skill → propose a kebab-case name from the described purpose before scaffolding.
3937

4038
## References
39+
For the upstream-catalogue check in step 1, search [The Agent Skills Directory](https://www.skills.sh/), [Microsoft Agent Skills](https://microsoft.github.io/skills/#agents), [`anthropics/skills`](https://github.com/anthropics/skills), and [`github/awesome-copilot`](https://github.com/github/awesome-copilot); the "Before adding a new skill" section of [CONTRIBUTING.md](../../../CONTRIBUTING.md) explains the policy in full.
40+
4141
See [spec/SKILL_SPEC.md](../../../spec/SKILL_SPEC.md) for the authoritative manifest spec and [templates/SKILL.md](../../../templates/SKILL.md) for the starting point.

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

Lines changed: 0 additions & 42 deletions
This file was deleted.

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@ description: Validates skill profiles against the spec and explains how to fix f
1212

1313
## Don't Use When
1414
- The user wants to create a new skill from scratch → use `skill-author`.
15-
- The user wants to bump a version or publish → use `skill-release`.
1615
- The failure is a Python/tooling error unrelated to a skill's contents.
1716

1817
## Workflow
1918
1. For one skill, run `uv run python scripts/validate_skill.py skills/<name>/SKILL.md`.
2019
2. For everything, run `uv run python scripts/validate_skill.py --all`.
2120
3. To mirror CI on a branch, run `uv run python scripts/validate_skill.py --base origin/main`.
2221
4. Read each `- <message>` line under a failing file and map it to the offending section or field.
23-
5. Edit the `SKILL.md` or `package.json` to fix it, then re-run until the file shows ``.
22+
5. Edit the `SKILL.md` to fix it, then re-run until the file shows ``.
2423

2524
## Rules
2625
- Always re-run the validator after each fix rather than batching guesses. (Why: one fix can reveal or mask another, and the validator is fast.)
27-
- Always check both the `SKILL.md` and the sibling `package.json` on a failure. (Why: the validator reports manifest and package errors together for the same skill.)
2826
- Never edit `scripts/validate_skill.py` to make a skill pass. (Why: the spec is the contract; loosening the validator weakens every skill in the catalogue.)
2927

3028
## Examples
@@ -34,7 +32,7 @@ description: Validates skill profiles against the spec and explains how to fix f
3432

3533
## Edge Cases
3634
- If `--base` finds no changed skills → report that nothing changed; there is nothing to validate.
37-
- If the error is `missing package.json` → create one from `templates/package.json` beside the manifest before re-running.
35+
- If the error names a missing or empty section → add the section heading (verbatim) with at least one bullet of content and re-run.
3836

3937
## References
4038
See [spec/SKILL_SPEC.md](../../../spec/SKILL_SPEC.md) for what each check enforces and [CONTRIBUTING.md](../../../CONTRIBUTING.md) for the PR-check summary.

.github/workflows/pr.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ name: PR
66
# 2. lint-tests — formats, lints, and unit-tests the tooling that produces
77
# skills (scripts/, tests/, pyproject.toml). Runs after fork-gate: if the
88
# generator is broken, validating skill output is meaningless.
9-
# 3. skills — validates the SKILL.md profiles the PR changed and
10-
# enforces that every changed publishable skill has its package.json
11-
# version bumped. Gated on lint-tests passing.
9+
# 3. skills — validates the SKILL.md profiles the PR changed. Gated on
10+
# lint-tests passing.
1211
# 4. results — always runs (`if: always()`), needs every other job, and
1312
# fails if any of them failed or was cancelled. This is the SINGLE
1413
# required status check on `main`, so we can add or rename jobs in this
@@ -89,11 +88,6 @@ jobs:
8988
- name: Validate changed skills
9089
run: uv run python scripts/validate_skill.py --base "origin/${{ github.base_ref }}"
9190

92-
- name: Check version bumps on changed skills
93-
env:
94-
BASE_REF: origin/${{ github.base_ref }}
95-
run: bash .github/scripts/check-version-bumps.sh
96-
9791
# 3. Aggregator. Always runs (even if upstream jobs failed or were cancelled)
9892
# and fails if any required job failed or was cancelled. Branch protection
9993
# only needs to require THIS one check — adding or renaming jobs above

.github/workflows/publish.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)