building-skills-from-patterns
Skill2 starsChanged 6 months agoMITView on GitHub
When the same multi-step workflow repeats in Cursor (user corrections or agent redos), capture it as a new SKILL.md under .cursor/skills/ so future sessions load it automatically. Use when the user says "/building-skills-from-patterns", "building skills from patterns", or asks about building skills from patterns.
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Create .cursor/skills/<slug>/SKILL.md (or in this repo’s pattern, copy from resources/<slug>/SKILL.md when contributing upstream).
- Distinctive: line 50
No secrets or machine-specific paths.
- Distinctive: line 64
If the pattern is “every time I save, run X,” suggest a hook instead.
- Distinctive: line 68
Prefer one skill per workflow — avoid megaskills that try to cover every situation.
- Distinctive: line 69
Update an existing skill instead of adding a duplicate if the workflow evolves.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
Building Skills From Patterns
Skills are reusable SKILL.md files. This meta-skill tells the agent to promote repeated muscle memory into a named skill: research once, encode the workflow, reuse forever.
When to trigger
- The user has asked for the same sequence three or more times (e.g. “always run lint then tsc then test before commit”).
- The agent notices it is re-deriving the same steps on every task in this repo (e.g. “how we deploy preview branches”).
- A correction sounds like a policy (“never use raw SQL here — always the repository layer”) — pair with
suggesting-cursor-rulesif it should be always-on; use a skill if it is a procedure with steps.
Workflow
1. Name the pattern
Choose a short slug (lowercase, hyphens): verifying-api-before-merge, releasing-mobile-build, etc.
2. Draft SKILL.md
Create .cursor/skills/<slug>/SKILL.md (or in this repo’s pattern, copy from resources/<slug>/SKILL.md when contributing upstream).
Frontmatter:
---
name: <slug>
description: One line: what it does and when to use it. Ends with a clear trigger.
user-invocable: true # optional, if the user should be able to invoke by name
---Body sections (keep lean):
- Title — human-readable.
- When to use — bullets.
- Steps — numbered, imperative, tool names where useful (
npm,gh, MCP tools). - Notes — edge cases, safety, when not to use.
Match the tone of other skills in the repo: concrete commands, no filler.
3. Validate
- Description is specific enough for Cursor to match the skill when the user describes the task.
- Steps are executable by an agent without guessing repo layout (or say “detect package manager from lockfile”).
- No secrets or machine-specific paths.
4. Point the user to it
Tell the user where the file lives and that the agent will pick it up on the next chat in that workspace.
Relationship to rules and hooks
| Mechanism | Use for |
| Skill | On-demand procedure, branching steps, tool usage. |
Rule (.cursor/rules/) | Always-on conventions, style, file patterns. |
Hook (.cursor/hooks.json) | Automate after file save / stop events. |
If the pattern is “every time I save, run X,” suggest a hook instead. If it is “when I ask to ship,” keep it as a skill.
Notes
- Prefer one skill per workflow — avoid megaskills that try to cover every situation.
- Update an existing skill instead of adding a duplicate if the workflow evolves.
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- ZeroTokenClaw/agents-skills★ 199% same
- matarpeles/skills-registry-demo★ 099% same
Wrote their own version · 0
None found.
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.
In this repository85 other files it gives its agents.
- accessibility-auditingSkill
- adding-analyticsSkill
- adding-api-docsSkill
- adding-authSkill
- adding-dockerSkill
- adding-e2e-testsSkill
- adding-error-trackingSkill
- adding-feature-flagsSkill
- adding-stripeSkill
- api-smoke-testingSkill
- architecture-decision-recordsSkill
- auditing-performanceSkill
- auditing-securitySkill
- auto-type-checkingSkill
- babysitting-prSkill
- best-of-n-solvingSkill
- cavemanSkill
- codebase-onboardingSkill
- comparing-branches-visuallySkill
- converting-css-modules-to-tailwindSkill
- converting-css-to-tailwindSkill
- creating-prSkill
- dark-mode-testingSkill
- database-designSkill
- design-an-interfaceSkill
- detecting-port-conflictsSkill
- domain-modelSkill
- edit-articleSkill
- exporting-to-pngSkill
- finding-dev-server-urlSkill
- fixing-broken-linksSkill
- form-testingSkill
- generating-imagesSkill
- git-guardrails-claude-codeSkill
- github-triageSkill
- grill-meSkill
- grinding-until-passSkill
- improve-codebase-architectureSkill
- incident-responseSkill
- kubernetes-deployingSkill
- migrate-to-shoehornSkill
- monitoring-terminal-errorsSkill
- network-request-auditingSkill
- obsidian-vaultSkill
- parallel-ci-triageSkill
- parallel-code-reviewSkill
- parallel-exploringSkill
- parallel-test-fixingSkill
- profiling-performanceSkill
- prompt-engineeringSkill
- python-tdd-with-uvSkill
- qaSkill
- react-native-patternsSkill
- recording-browser-flow-as-testSkill
- request-refactor-planSkill
- responsive-testingSkill
- reviewing-codeSkill
- saving-workspace-contextSkill
- scaffold-exercisesSkill
- screenshotting-changelogSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

