|
| 1 | +--- |
| 2 | +title: Writing plugin skills |
| 3 | +description: Design, author, validate, and maintain thin PSModule plugin skills that point to shared documentation. |
| 4 | +--- |
| 5 | + |
| 6 | +# Writing plugin skills |
| 7 | + |
| 8 | +Use this guide when creating or changing a skill in the PSModule plugin. A |
| 9 | +skill is an operational entry point for an agent; shared process and policy |
| 10 | +belongs in the documentation structure so people and agents can use the same |
| 11 | +source of truth. |
| 12 | + |
| 13 | +## Keep skills thin |
| 14 | + |
| 15 | +Put common explanations, repository policy, standards, and user-facing |
| 16 | +procedures in the appropriate `docs/content/` page. Keep `SKILL.md` focused on |
| 17 | +the agent-specific information needed to apply that guidance: |
| 18 | + |
| 19 | +- when the skill should be used and when it should not; |
| 20 | +- the agent's operating sequence and required handoffs; |
| 21 | +- explicit stop conditions and escalation boundaries; |
| 22 | +- the repository-specific validation and report-back contract. |
| 23 | + |
| 24 | +The skill should link to the shared guide near its beginning. Do not copy |
| 25 | +organization-wide MSX rules, module standards, or long tutorials into the |
| 26 | +skill. Link to the canonical source instead. |
| 27 | + |
| 28 | +## Skill structure |
| 29 | + |
| 30 | +Create one directory per skill: |
| 31 | + |
| 32 | +```text |
| 33 | +.github/plugin/<plugin-name>/skills/<skill-name>/ |
| 34 | +└── SKILL.md |
| 35 | +``` |
| 36 | + |
| 37 | +Use lowercase, descriptive, hyphen-separated identifiers. Start `SKILL.md` |
| 38 | +with front matter containing the matching `name` and a concise `description`. |
| 39 | +The description should make the skill discoverable without embedding the full |
| 40 | +procedure. |
| 41 | + |
| 42 | +After the front matter, include: |
| 43 | + |
| 44 | +1. a short purpose statement and the link to the shared documentation; |
| 45 | +2. agent-specific operating instructions; |
| 46 | +3. explicit stop conditions; |
| 47 | +4. references to related repository and canonical MSX guidance. |
| 48 | + |
| 49 | +Prefer short imperative instructions, checklists, and handoff fields over |
| 50 | +background material. Do not include stale vendor-specific model recommendations |
| 51 | +or obsolete tool instructions. If a procedure changes for both users and |
| 52 | +agents, update the documentation guide first and reduce the skill to a pointer |
| 53 | +plus the remaining agent contract. |
| 54 | + |
| 55 | +## Plugin integration |
| 56 | + |
| 57 | +Inspect the existing plugin before editing. Preserve its `plugin.json` |
| 58 | +metadata and directory conventions. Add the new skill to the plugin README's |
| 59 | +discoverability list with a repository-relative link. Do not add a second |
| 60 | +manifest or duplicate marketplace registration for an individual skill. |
| 61 | + |
| 62 | +Keep the skill's scope explicit. If it coordinates child sessions or other |
| 63 | +agents, define the parent owner, child boundary, expected handoff, validation, |
| 64 | +report-back, and stop conditions. Do not silently broaden a skill into |
| 65 | +unrelated repository work. |
| 66 | + |
| 67 | +## Contribution and validation |
| 68 | + |
| 69 | +Work on a dedicated branch, open a draft pull request early, and use small |
| 70 | +commits. Include the required co-author trailer in every commit: |
| 71 | + |
| 72 | +```text |
| 73 | +Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> |
| 74 | +``` |
| 75 | + |
| 76 | +Run the smallest existing checks that cover the changed surfaces: |
| 77 | + |
| 78 | +- `git diff --check`; |
| 79 | +- repository Markdown and natural-language lint when available; |
| 80 | +- plugin and marketplace metadata parsing; |
| 81 | +- `zensical build --clean` when documentation or navigation changes. |
| 82 | + |
| 83 | +Review every relative link from the skill and guide, the final plugin README |
| 84 | +entry, and the diff for duplicated policy, stale instructions, accidental |
| 85 | +generated files, or unrelated changes. Report the draft PR URL, files changed, |
| 86 | +validation outcomes, policy decisions, and blockers to the owning session. |
| 87 | + |
| 88 | +## Maintenance rule |
| 89 | + |
| 90 | +When shared process changes, update the documentation page and its navigation, |
| 91 | +then make each dependent skill point to the revised source. When only an |
| 92 | +agent-specific trigger, handoff, stop condition, or tool boundary changes, |
| 93 | +update the skill without duplicating the common documentation. |
| 94 | + |
| 95 | +## References |
| 96 | + |
| 97 | +- [PSModule process plugin](https://github.com/PSModule/Process-PSModule/tree/main/.github/plugin) |
| 98 | +- [MSX Agentic Development](https://msx.no/docs/Ways-of-Working/Agentic-Development/) |
| 99 | +- [MSX Documentation Model](https://msxorg.github.io/docs/Ways-of-Working/Documentation-Model/) |
| 100 | +- [MSX Markdown standard](https://msxorg.github.io/docs/Coding-Standards/Markdown/) |
| 101 | +- [MSX Natural Language standard](https://msxorg.github.io/docs/Coding-Standards/Natural-Language/) |
0 commit comments