Skills: Writing Down the Project Rules Once
The folder that stopped me explaining the API router pattern to every agent, every morning
Post 36 ended with each specialist agent carrying its own list of traps. That works until two agents need the same list, which didn’t take long. The powerpages agent needed to know how API templates are structured. So did the qa agent testing them, the security agent reviewing them, and the documentation agent describing them.
Copying the rules into four agent files is how you get four versions of the truth. Skills are the fix.
What a skill is
A skill is a folder with a SKILL.md in it: two lines of frontmatter, a name and a description, then the rules. Any agent whose task matches the description loads the file before it starts. That’s the entire mechanism.
The description does the routing. “Generating a JSON API web template for a Dataverse table and registering it in the router” means an agent adding an endpoint picks it up, and an agent fixing a stylesheet doesn’t. Write it badly and the skill loads for everything or for nothing.
The format is the same for GitHub Copilot and Claude Code. I keep one source folder in ppai and sync it to both.
Eleven of them
The casting portal ended up with eleven skills, seven I had written for ppai and four specific to the portal. The number isn’t a target. It’s what was left after merging the ones that overlapped and deleting the ones nobody loaded.
The seven I wrote for ppai:
- Generate API. From a table name to a generated JSON API template, its definitions and the router entry.
- Adopt portal. The runtime contract a portal has to provide and the infrastructure templates it has to carry.
- Validate definition. Checks a form or table definition against the schema and repairs it until it passes.
- Security review. Permission coverage, write gates and the FetchXML injection surface, before anything merges.
- Deploy. The release checklist, the fail-closed upload order, the smoke request, and rollback.
- Add language. Website language, label pack, translation, verification.
- Apply theme. The token block, the generated override stylesheet, the contrast gate.
The four specific to this portal:
- Dataverse schema. Verified table and column names for the
cast_tables. Verified, not remembered. - Testing. The Playwright setup, the static guards in the build, and how local login works against the Test site.
- Documentation. Norwegian conventions, where pages live in the docs folder, and who they’re for.
- Commit issue. Finds the right GitHub issue for a change and proposes a commit message with the number in it.
The last one does a job I was doing badly. Every commit needs an issue reference. I was guessing, occasionally at issues closed in March.
Skills, agents and memory
It took a while to get the boundaries straight. Here’s the version I’d have liked at the start.
A skill is how the project works: the router pattern, the upload order, the schema. It changes when the project changes.
An agent is who does what. The powerpages agent writes Liquid, the security agent reviews it. It changes when the team changes.
Memory is what was decided. The casting director said no export of the talent list, the brand colour is this hex value and not that one, the GDPR conversation has been had. It changes when a decision changes.
Put a decision in a skill and it reads as a rule with no reason. Put a rule in memory and only the session that saved it knows. Put either in an agent file and only that agent knows.
Where skills don’t go
The project has a docs folder, in Norwegian. For a while it had sentences like “agents must always verify the schema before writing FetchXML”, and the casting director asked who that sentence was for.
The docs are for the humans who maintain or explain the solution. Instructions to agents go in skills and agent files, next to the code. One conversation to agree, one afternoon of edits to apply.
The cost
Skills go stale. It’s the same downside as any documentation, except that an agent will act on a stale skill with confidence.
The Test site moved to a new address in October. The testing skill said the old one for two days, and an agent spent a morning running Playwright against a site that no longer answered. The fix was procedural: any change in an area updates that area’s skill in the same commit, and the qa agent checks for it. Not a new idea, just one that has to be enforced, because the alternative is a folder full of plausible fiction.
Write the rules once, in the place every agent reads, and keep them true.
Useful links
- Skills in Claude Code
- About agent skills in GitHub Copilot
- Repository custom instructions for GitHub Copilot
- Configure site settings in Power Pages
- Power Platform CLI: pac pages
Next: which model each agent runs on, and why the invoice had opinions about it.