Create an AI Skill in 10 Minutes: The Complete Tutorial
Do you use an AI assistant for coding and find yourself repeating the same instructions? It's time to create an AI skill. In 10 minutes, you'll have a working skill that automates a recurring task. Follow the guide.
Minute 0-2: Identify the Task to Automate
The first step to create an AI skill is choosing the right task. A good candidate is:
- Repetitive: you do it at least once a week
- Procedural: it follows defined steps
- Text-based: it involves code, configuration, or documentation
Good Task Examples
| Task | Frequency | Time Saved | |------|-----------|------------| | Create a new React component | 3-5x/week | 15 min | | Write unit tests | Daily | 20 min | | Prepare a release | Weekly | 30 min | | Scaffold an API endpoint | 2-3x/week | 10 min |
For this tutorial, we'll create a skill that generates a complete React component with its tests and types.
Minute 2-5: Write the SKILL.md
Create a SKILL.md file with the following structure:
# Generate React Component
## Description
Creates a complete TypeScript React component with tests
and types, following the project conventions.
## Instructions
1. Ask for the component name and its type (page, feature, UI)
2. Create the main file `ComponentName.tsx` with:
- Necessary dependency imports
- Typed Props interface
- Functional component with named export
- Styles via CSS modules or Tailwind depending on the project
3. Create the test file `ComponentName.test.tsx` with:
- Basic render test
- Main props test
- User interaction test
4. Create the index file `index.ts` for re-export
5. Update the parent folder barrel export if it exists
## Conventions
- Use named exports (no default export)
- Name files in PascalCase
- Place components in `src/components/[type]/`
- Tests in the same folder as the component
## Example
Input: "Create a UI component called UserAvatar"
Expected output:
src/components/ui/UserAvatar/ ├── UserAvatar.tsx ├── UserAvatar.test.tsx └── index.ts
The secret to a good skill is being precise in instructions while remaining flexible for edge cases.
Minute 5-7: Install the Skill
Installation depends on your tool.
For Claude Code
# Create the skills directory
mkdir -p .claude/skills
# Copy the file
cp SKILL.md .claude/skills/react-component.md
Claude Code automatically detects files in .claude/skills/ and makes them available as slash commands.
For Cursor
Add the SKILL.md content to your .cursorrules file:
# Add to Cursor rules file
cat SKILL.md >> .cursorrules
For Windsurf
Place the skill in the cascade memory directory:
mkdir -p .windsurf/skills
cp SKILL.md .windsurf/skills/react-component.md
Minute 7-9: Test and Refine
Test your skill with a concrete case:
User: Create a UI component called SearchBar
Verify that the result respects:
- Expected file structure
- Naming conventions
- Quality of generated tests
- Integration with existing code
Common Iterations
After the first test, you'll likely need to adjust:
- Imports: specify which libraries to use
- Styling: clarify whether it's Tailwind, CSS modules, styled-components
- Tests: add test patterns specific to your project
## Adjustment after testing
- Always import from @/lib/utils for helpers
- Use cn() for conditional Tailwind classes
- Include a snapshot test in every test file
Minute 9-10: Document and Share
Add a metadata header to your skill for easier sharing:
---
name: react-component
version: 1.0.0
author: your-name
tags: [react, typescript, components]
compatibility: [claude-code, cursor, windsurf]
---
You can then publish your skill on a marketplace like Skills & Guides for other developers to benefit from.
Best Practices for Creating an AI Skill
Be Explicit
Rather than "create a good component," detail exactly what "good" means in your context.
Include Concrete Examples
Input/output examples are the best way to calibrate AI behavior.
Handle Edge Cases
Plan for what happens when a file already exists, when the name is invalid, or when a dependency is missing.
Version Your Skills
Treat your skills like code: version them, review them, and document changes.
Conclusion
Creating an AI skill is simpler than it seems. In 10 minutes, you have a tool that will save you hours over time. The most important thing is to start small, test quickly, and iterate. Your first skill doesn't need to be perfect — it just needs to work.
Explore our skills library for inspiration, or publish yours to help the community.