writing-agent-skills
Skill0 starsChanged 39 days agoMITView on GitHub
Writes, reviews and lints Agent Skills (SKILL.md folders) so they load and trigger correctly in Claude Code, OpenAI Codex, Cursor, Gemini CLI and GitHub Copilot, using the SkillLint CLI. Use when creating or editing a SKILL.md, when a skill does not load or trigger, or before publishing skills or a Claude Code plugin.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- msewell/agent-stufftheir own version, first seen Oct 20, 2026
- piousp/llm-skillstheir own version, first seen Oct 15, 2026
- xingkaixin/skillstheir own version, first seen Jul 18, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- piousp/llm-skills★ 2same name
- msewell/agent-stuff★ 0same name
- xingkaixin/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Keep exactly one level: skills/<name>/SKILL.md.
- Distinctive: line 38
Start from assets/SKILL.template.md.
- Distinctive: line 44
Write the description in the third person and include both *what* and *when*: "Extracts tables from PDF files.
- Very specific: line 49
Keep SKILL.md under 500 lines (about 5000 tokens).
- Very specific: line 51
Keep references one level deep: link reference files from SKILL.md, not from other reference files.
- Very specific: line 53
No absolute or user-specific paths (C:\Users\..., /Users/...), no backslash paths, and no wording that goes stale ("until next month", "the …
- Very specific: line 57
Run from the repository root (Node.js 18+):
- Very specific: line 86
Add the GitHub Action so every pull request is linted: uses: mahiepit/SkillLint@v1.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Writing and linting Agent Skills
A skill is a folder with a SKILL.md file: YAML frontmatter (name, description) followed by Markdown instructions. Agents read only name and description at startup and load the body when the description matches the task, so the description decides whether the skill is ever used.
Workflow
Copy this checklist and tick it off:
- [ ] 1. Pick the folder name and location
- [ ] 2. Write the frontmatter
- [ ] 3. Write the body and bundled files
- [ ] 4. Run SkillLint and fix every error
- [ ] 5. Re-run until it reports no errors1. Folder name and location
- The folder name is the skill name: lowercase
a-z, digits and single hyphens, at most 64 characters, e.g.processing-invoices. No uppercase, underscores or spaces. - Where agents look for project skills:
.claude/skills/<name>/— Claude Code (also read by Cursor and Copilot).agents/skills/<name>/— Codex, Cursor, Gemini CLI and Copilotskills/<name>/— inside a Claude Code plugin
- Keep exactly one level:
skills/<name>/SKILL.md. Claude Code and Gemini CLI do not find deeper nesting.
2. Frontmatter
Start from assets/SKILL.template.md. Rules that break loading:
- The file must be named exactly
SKILL.mdand start with---on line 1 (no BOM, nothing before it). namemust equal the folder name.descriptionis required, at most 1024 characters, and under 500 characters if the skill must also load in Codex.- Quote the description if it contains
:or#— otherwise YAML fails or silently cuts the text. When in doubt, use double quotes. - Write the description in the third person and include both what and when: "Extracts tables from PDF files. Use when the user mentions PDFs, forms or invoices." Never "I can help you ...".
- For portable skills use only the spec fields:
name,description,license,compatibility,metadata(string values; quote versions such as"1.0"),allowed-tools(a space-separated string). See references/portability.md for which agent supports which extra field.
3. Body and bundled files
- Keep
SKILL.mdunder 500 lines (about 5000 tokens). Move long reference material intoreferences/, scripts intoscripts/, templates intoassets/. - Link every bundled file from
SKILL.mdwith a relative path and forward slashes, and say when to use it. Files that are never mentioned are invisible to the agent. - Keep references one level deep: link reference files from
SKILL.md, not from other reference files. - Scripts need a shebang (
#!/usr/bin/env python3), LF line endings and the executable bit (git update-index --chmod=+x <file>on Windows). - No absolute or user-specific paths (
C:\Users\...,/Users/...), no backslash paths, and no wording that goes stale ("until next month", "the new API since last year").
4. Lint
Run from the repository root (Node.js 18+):
npx --yes github:mahiepit/SkillLint .Lint one skill, or check only the agents you ship to:
npx --yes github:mahiepit/SkillLint .claude/skills/my-skill
npx --yes github:mahiepit/SkillLint --target claude,codex .In Claude Code with the SkillLint plugin installed, the same CLI is also on the Bash PATH as skilllint.js.
Reading the output: each line is line:column severity message rule-id, followed by a fix: hint.
- error — at least one agent will not load the skill, or loads it wrong. Fix all of them.
- warning — it loads, but triggers poorly or breaks for some agents. Fix unless the warning is about an agent you do not target (then pass
--target). - info — housekeeping (unreferenced files, CRLF, missing table of contents).
--fix applies the safe fixes (BOM, CRLF in scripts, trailing whitespace, name casing when it matches the folder). Every rule is explained at https://github.com/mahiepit/SkillLint/blob/main/docs/RULES.md.
5. Iterate
Fix, re-run, and repeat until the summary says 0 errors. Then test the skill for real: ask the agent a question that should trigger it and check that it does; if not, add the user's words to the description.
Publishing
- Add the GitHub Action so every pull request is linted:
uses: mahiepit/SkillLint@v1. - For a Claude Code plugin, SkillLint also checks
.claude-plugin/plugin.jsonand.claude-plugin/marketplace.json(names,./paths, sources).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

