raycast
by @xaif
Build and maintain Raycast extensions using the Raycast API. Triggers on @raycast/api, List, Grid, Detail, Form, AI.ask, LocalStorage, Cache, showToast, and BrowserExtension. Use this repo's references/api/*.md files as the primary source of truth for component specs and API usage.
clawhub install raycastπ About This Skill
name: raycast-extensions description: Build and maintain Raycast extensions using the Raycast API. Triggers on @raycast/api, List, Grid, Detail, Form, AI.ask, LocalStorage, Cache, showToast, and BrowserExtension. Use this repo's references/api/*.md files as the primary source of truth for component specs and API usage.
Raycast Extensions Skill
Build powerful extensions with React, TypeScript, and the Raycast API.
Quick Start (Agent Workflow)
Follow these steps when tasked with implementing or fixing Raycast features:
1. Identify the core component: Determine if the UI needs a List, Grid, Detail, or Form.
2. Consult Reference: Open and read the corresponding file in references/api/ (e.g., references/api/list.md).
3. Use Defaults:
- Feedback: Use showToast for Loading/Success/Failure. Use showHUD only for quick background completions.
- Data: Use Cache for frequent/transient data, LocalStorage for persistent user data.
- Access: Always check environment.canAccess(AI) or environment.canAccess(BrowserExtension) before use.
4. Implementation: Provide a concise implementation using @raycast/api components.
5. Citing: Link back to the specific references/api/*.md file you used.
Cookbook Patterns
1. List & Grid (Searchable UI)
UseList for text-heavy data and Grid for image-heavy data.
} />
}
/>
2. Detail (Rich Markdown)
Use for displaying long-form content or item details.
}
/>
3. Form (User Input)
Always include aSubmitForm action.
4. Feedback & Interactivity
PrefershowToast for most feedback.
// Success/Failure
await showToast({ style: Toast.Style.Success, title: "Success!" });// HUD (Overlay)
await showHUD("Done!");
5. Data Persistence
UseCache for performance, LocalStorage for persistence.
// Cache (Sync/Transient)
const cache = new Cache();
cache.set("key", "value");// LocalStorage (Async/Persistent)
await LocalStorage.setItem("key", "value");
6. AI & Browser Extension (Restricted APIs)
Always wrap inenvironment.canAccess checks.
if (environment.canAccess(AI)) {
const result = await AI.ask("Prompt");
}if (environment.canAccess(BrowserExtension)) {
const tabs = await BrowserExtension.getTabs();
}
Additional Resources
API Reference Tree
Examples
For end-to-end examples combining multiple components and APIs, see examples.md.
π‘ Examples
For end-to-end examples combining multiple components and APIs, see examples.md.