1 ---
2 name: skill-authoring
3 description: Create reusable skills that extend agent capabilities. Use when the user asks to create a skill, teach you something reusable, or save instructions for future tasks.
4 ---
5
6 # Skill Authoring
7
8 Create skills to save reusable knowledge, procedures, and workflows that persist across sessions. Skills are instructions for future versions of yourself—write them as if teaching a fresh instance how to handle a task.
9
10 ## When to Use
11
12 - User asks to "create a skill" or "teach you how to do X"
13 - User wants to save instructions for repeated future use
14 - A workflow should be reusable across sessions
15
16 ## How to Create a Skill
17
18 1. Choose a skill name (lowercase, hyphens only, e.g., `code-review`)
19 2. Write the SKILL.md file to `.agents/skills/SKILLNAME/SKILL.md`
20
21 ## SKILL.md Format
22
23 ```markdown
24 ---
25 name: skill-name
26 description: What this skill does. When to use it.
27 ---
28
29 # Skill Title
30
31 Instructions, examples, and workflows go here.
32 ```
33
34 ### Frontmatter Requirements
35
36 - `name`: Max 64 chars, lowercase letters/numbers/hyphens only
37 - `description`: Max 1024 chars, include WHAT it does and WHEN to use it
38
39 ## Writing Tips
40
41 - **Be concise**: Only include info you don't already know
42 - **Match specificity to fragility**: Exact commands for fragile ops, general guidance for flexible tasks
43 - **Include examples**: Input/output pairs help with output quality
44 - **Keep under 500 lines**: For longer skills, reference separate files
45
46 ## Skill Locations
47
48 - **`.agents/skills/`** - User and agent-editable skills. Create new skills here. These can be freely modified, updated, and deleted.
49 - **`~/.local/skills/`** - Replit-provided skills. These are read-only and managed by the platform.
50
51 ## Key Considerations
52
53 - **Description is critical for discovery**: The description determines when you'll use this skill in the future. Be specific about triggers:
54 - Bad: `description: Processes documents` (too vague)
55 - Good: `description: Extracts text and images from PDF files. Use when the user asks to read, parse, or convert PDF documents.`
56 - **Collaborate with the user**: Ask what they want included. Don't guess—the user knows what's important to them
57 - **Include project-specific context**: File paths, naming conventions, API endpoints, preferred libraries—things unique to this user's workflow
58 - **Use separate files for large content**: Organize reference material in folders (e.g., `.agents/skills/SKILLNAME/reference/api.md`) and link to it from SKILL.md
59 - **Skills can be updated**: Skills in `.agents/skills/` are mutable. Update them as you discover better patterns—don't treat them as permanent. Iterate as the user's needs evolve
60 - **Skills can reference other skills**: A skill can invoke or build upon other skills. Use this to compose complex workflows from simpler building blocks
61
62 ## Complete Example
63
64 ```markdown
65 ---
66 name: pr-review
67 description: Reviews pull requests for code quality and security. Use when the user asks to review a PR or check code changes.
68 ---
69
70 # PR Review
71
72 ## Process
73
74 1. Read the PR description and linked issues
75 2. Review each file for issues
76 3. Check for test coverage
77 4. Look for security vulnerabilities
78 5. Summarize findings with line references
79
80 ## What to Check
81
82 - Logic errors and edge cases
83 - Security issues (injection, XSS, auth bypass)
84 - Performance concerns
85 - Missing error handling
86
87 ## Output Format
88
89 \`\`\`markdown
90 ## Summary
91 [1-2 sentence overview]
92
93 ## Issues Found
94 - **[severity]** file:line - description
95
96 ## Verdict
97 [Approve / Request Changes / Comment]
98 \`\`\`
99 ```