Spaces:
Running
Running
File size: 10,962 Bytes
b937320 04339e3 b937320 6b4f03a b937320 6b4f03a b937320 6b4f03a b937320 716b726 b937320 716b726 b937320 716b726 b937320 04339e3 b937320 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 | # Skills
**Teach AI your preferences and workflows.**
Skills are instruction documents that guide how AI builds your projects. Enable skills to make AI follow your preferred patterns, best practices, and coding styles automatically.
---
## What Are Skills?
Skills are markdown documents that teach the AI how you want things done:
- **Workflow guides** - Step-by-step processes to follow
- **Best practices** - Coding standards and patterns
- **Domain knowledge** - Specific expertise (e.g., accessibility)
- **Preferences** - Your personal coding style
**Think of skills as:**
- Training manuals for the AI
- Automated best practices
- Consistency enforcers
- Knowledge you don't have to repeat
**Skills are NOT:**
- Project templates (see [Templates](?doc=templates))
- Executable code
- Data storage
- Replacement for good prompts
---
## How Skills Work
When you enable a skill, OSW Studio makes it **available** to the AI, but doesn't load the entire content into context automatically. Instead:
1. **Metadata is revealed** - AI sees skill names, descriptions, and tags
2. **Dynamic loading** - Skills are loaded into project context only when needed
3. **Smart selection** - AI chooses to read a skill when it seems relevant to the task
4. **User control** - You can explicitly ask AI to use a specific skill
**Example**: Enable the "Accessibility" skill:
- AI sees "Accessibility skill available - WCAG guidelines and best practices"
- When you ask to build a form, AI recognizes accessibility is relevant
- AI reads the full skill content and applies the guidance:
- Add proper ARIA labels
- Ensure keyboard navigation
- Include alt text for images
- Follow accessibility best practices
This approach keeps the AI's context clean while making expertise available when needed.
### Skill Evaluation (Optional)
By default, the AI decides on its own whether to read a skill β but it doesn't always get it right. In practice, skills can be ignored even when they're clearly relevant, because the instruction to check skills is buried in a large system prompt.
**Skill Evaluation** solves this with a pre-flight check: before the main AI call, a quick non-streaming call evaluates your prompt against enabled skills. If any match, an explicit "read this skill" directive is injected into your message so the AI treats it as a high-priority instruction rather than an easily overlooked system prompt note.
**To enable:**
1. Go to **Skills** view
2. Toggle **Skill Evaluation** on (below the global skills toggle)
**What changes:**
- Each message triggers an additional API call using your selected model
- Matched skills appear as explicit read directives in the AI's input
- A `skill_evaluation` event appears in the debug panel showing what was evaluated
**Trade-off:** This adds an extra API call per message, increasing initial token usage. It's disabled by default β enable it if you find skills aren't being picked up consistently.
---
## Built-in Skills
OSW Studio includes skills to get you started:
### Workflow
Teaches AI the recommended workflow for building in OSW Studio.
**What it does:**
- Plan before coding (PLAN.md)
- Build incrementally (main page first)
- Run `build` to verify compilation
- File structure and modularity guidance
**When to use**: Always - this is the foundation
### Responsive
Dedicated responsive design skill.
**What it does:**
- Mobile-first CSS with key breakpoints
- Navigation collapse patterns (hamburger menus)
- Fluid typography with `clamp()`
- Touch targets and common mobile failures
**When to use**: When building sites that need to work on mobile
### Frontend Design
Visual design quality guidance.
**What it does:**
- Typography and font pairing
- Color systems with CSS custom properties
- Spatial composition and motion
- Avoiding generic AI aesthetics
**When to use**: When you want polished, professional-looking output
### Handlebars Advanced
Advanced Handlebars templating techniques.
**What it does:**
- Use Handlebars helpers
- Create reusable components
- Implement dynamic content
- Follow template best practices
**When to use**: When building Handlebars-based sites
### Accessibility
Web accessibility best practices (WCAG guidelines).
**What it does:**
- Add semantic HTML
- Include ARIA attributes
- Ensure keyboard navigation
- Provide alt text
- Use proper heading hierarchy
**When to use**: Always - accessibility should be standard
### Server Mode Skills
These skills guide the AI when working with a published deployment's backend:
- **Server** - Overview of Server Mode's backend features and `/.server/` context
- **Functions** - Edge functions (API endpoints) and server functions (helpers)
- **Database** - SQLite access from edge functions, schema design, migrations
- **Secrets** - Managing API keys and sensitive configuration
**When to use**: When a deployment is selected and you're building or extending backend features.
---
## Using Skills
### Enable a Skill
1. Click **Skills** in sidebar
2. Browse available skills
3. Click the toggle to enable a skill
4. Return to your project
The AI can now access this skill when it's relevant to your task. You can also explicitly ask the AI to use a specific skill (e.g., "Use the Accessibility skill to build this form").
### Disable a Skill
1. Go to **Skills** view
2. Find the enabled skill
3. Click the toggle to disable
The AI will no longer have access to that skill's content.
### Multiple Skills
Enable multiple skills at once. The AI can access any enabled skill when relevant to the task at hand.
**Recommendation**: Start with OSW Workflow + Accessibility as your baseline. The AI will intelligently choose which skills to reference based on what you're building.
---
## Creating Custom Skills
Teach AI your own preferred workflows and patterns.
### When to Create Skills
Create skills for:
- Company coding standards
- Personal workflow preferences
- Specific technologies you use
- Domain expertise (e.g., e-commerce patterns)
- Repeated instructions you give
### How to Create a Skill
1. **Write your skill**
- Use markdown format
- Be clear and specific
- Include examples
- Keep it focused on one topic
2. **Save as skill**
- Go to **Skills** view and click **Create Skill**, or
- Click the **+** button in the Skills panel header inside a workspace
- Paste your content
- Add metadata (name, description, tags)
- Save β the skill is immediately available to the AI on the next message
3. **Use your skill**
- Enable it like built-in skills
- Test it on a project
- Refine as needed
### Skill Writing Tips
**β
Good skill content:**
Example of a well-written skill:
```
# Mobile-First Responsive Design
Always build mobile layouts first, then desktop.
## Process
1. Start with mobile viewport (375px)
2. Build layout that works on small screens
3. Add media queries for tablet (768px+)
4. Add media queries for desktop (1024px+)
## CSS Structure
- Use min-width media queries
- Avoid max-width
- Test on real devices
## Example CSS
/* Mobile first */
.container {
padding: 1rem;
}
/* Tablet and up */
@media (min-width: 768px) {
.container {
padding: 2rem;
}
}
```
**β Avoid:**
- Vague instructions ("make it good")
- Too many topics in one skill
- Contradictory guidance
- Overly long documents (keep under 2 pages)
---
## Managing Skills
### Browse Skills
1. Click **Skills** in sidebar
2. View built-in and custom skills
3. Read descriptions
4. Enable/disable as needed
### Edit Custom Skills
1. Find your skill in Skills view
2. Click **Edit**
3. Make changes
4. Save
Built-in skills can't be edited.
### Delete Custom Skills
1. Find skill in Skills view
2. Click **Delete** (trash icon)
3. Confirm deletion
Built-in skills can't be deleted.
---
## Importing & Exporting Skills
### Export a Skill
Share your skills with others or back them up:
1. Go to **Skills** view
2. Find your skill
3. Click **Export** (download icon)
4. Save the skill file (`.md`)
### Import a Skill
Use skills created by others:
1. Click **Skills** in sidebar
2. Click **Import Skill**
3. Select skill file
4. Skill appears in your library
Skills are compatible with Anthropic's SKILL.md convention, so you can use skills from other sources.
---
## Skill Tips
**π‘ Start with built-in skills**
Learn how skills work before creating your own
**π‘ One skill per topic**
Don't try to teach everything in one skill
**π‘ Be specific**
Vague guidance leads to unpredictable results
**π‘ Include examples**
Show the AI exactly what you want
**π‘ Test and refine**
Create a skill, test it, improve it based on results
**π‘ Don't over-skill**
Too many skills can confuse the AI. Start with 2-3 essential ones.
---
## Skills vs Templates
**Skills** = Instructions for AI
- Markdown documents
- Teach AI how to work
- Apply to any project
- Reusable across all projects
**Templates** = Project starting points
- Complete file structures
- HTML, CSS, JavaScript
- One-time use per project
Use skills to improve how AI works. Use templates to start projects faster.
**[Learn about Templates β](?doc=templates)**
---
## Common Use Cases
### Company Standards
Create a skill with your company's:
- Code formatting rules
- File naming conventions
- Comment standards
- Framework preferences
### Personal Workflow
Teach AI your preferences:
- CSS methodology (BEM, Tailwind, CSS-in-JS)
- JavaScript style (ES6+ features you prefer)
- HTML structure patterns
- Testing requirements
### Technology-Specific
Create skills for:
- React best practices
- Vue patterns
- Specific CSS frameworks
- Animation libraries
### Domain Expertise
Share knowledge about:
- E-commerce best practices
- Blog structures
- Portfolio patterns
- SaaS landing pages
---
## Common Questions
**Q: How many skills should I enable?**
A: Start with 2-3 core skills. Add more as needed. Too many can be overwhelming.
**Q: Can skills conflict?**
A: Yes. If two skills give opposite guidance, AI may get confused. Keep skills complementary.
**Q: Do skills slow down AI?**
A: Minimal impact. Only skill metadata is always present. Full skill content is loaded on-demand, so you only pay for tokens when the skill is actually used. If you enable Skill Evaluation, there's an additional API call per message for the pre-flight check.
**Q: Can I use Anthropic's SKILL.md files?**
A: Yes! OSW Studio is compatible with the SKILL.md convention.
**Q: Should every team member have the same skills?**
A: For consistency, yes. Export/import skills to share with your team.
---
**Next Steps:**
- **[Working with AI](?doc=working-with-ai)** - Get better results
- **[Templates](?doc=templates)** - Start projects faster
- **[Projects](?doc=projects)** - Manage your work
---
**Ready to create your first skill?** Think about instructions you repeat often, and turn them into a reusable skill!
|