Home › Raycast extensions › Raycast extension AGENTS.md

Raycast extension AGENTS.md

AGENTS.md for Raycast extensions in TypeScript and React: manifest commands and preferences, @raycast/api components, @raycast/utils hooks, error toasts, and store-ready linting.

AGENTS.mdRaycast extensions

How to use

Save this as AGENTS.md in your repository root, commit it, and your agent will pick it up automatically. Edit the commands to match your project.

Note: Review and test before use. Provided as is, without warranty. See Terms.

AGENTS.mdDownload  
# AGENTS.md: Raycast extension

## Commands
- `npm run dev` (`ray develop`, hot reload in Raycast) · `npm run build` (`ray build`) · `npm run lint` (`ray lint`; `npm run fix-lint` to autofix)
- Never run `npm run publish` unless asked.

## Manifest (`package.json`)
- Each command is listed in `commands` with `name` matching `src/<name>.tsx`, a clear `title`, `description` and `mode` (`view`, `no-view`, `menu-bar`).
- User settings go in `preferences` (extension- or command-level) with `type`, `required` and `description`; read them with `getPreferenceValues<Preferences>()`. API keys use `type: "password"`.
- Keep `icon`, `categories`, `author` and `license` valid; store linting fails otherwise.

## UI and data
- Build UI only from `@raycast/api` components (`List`, `Grid`, `Detail`, `Form`, `ActionPanel`, `Action`). No custom HTML/CSS.
- Fetch with `@raycast/utils` hooks (`useFetch`, `usePromise`, `useCachedPromise`, `useCachedState`) and pass `isLoading` to the root component. Use `keepPreviousData` and pagination options for search-as-you-type.
- Every list item has a primary action that does the obvious thing (open, copy, paste) and a sensible `ActionPanel` order; add keyboard `shortcut`s for secondary actions.
- Errors: show `showToast({ style: Toast.Style.Failure, title, message })` or `showFailureToast(error)`; never let a command crash silently. Empty states use `List.EmptyView`.
- `no-view` commands finish with `showHUD` or a toast; `menu-bar` commands keep work short and cached.
- Store small data with `LocalStorage` or `Cache`; never write secrets to them. OAuth via `OAuth.PKCEClient` or the utils OAuth helpers.
- Don't run shell commands or AppleScript unless the feature needs it; quote all arguments.

## Done when
`ray lint` and `ray build` pass, and each changed command was opened with `npm run dev` (say if Raycast wasn't available to check).

More: all Raycast extensions rules · all AGENTS.md rules

Related rules

Electron app AGENTS.md

AGENTS.md for Electron desktop apps (Electron Forge or electron-vite): process layout, IPC contracts, and release safety.

AGENTS.mdElectron

Electron app Windsurf rules

Windsurf rules for secure Electron 44 apps: context isolation, preload bridges, typed IPC, and packaging.

WindsurfElectron

Figma plugin CLAUDE.md

CLAUDE.md for Figma plugins in TypeScript: main thread vs UI iframe, message passing, dynamic page loading with async APIs, fonts, manifest permissions, and testing.

Claude Code (CLAUDE.md)Figma plugins

Neovim Lua plugin CLAUDE.md

CLAUDE.md for Neovim plugins in Lua: setup(opts) config merging, autocommand groups, keymaps with desc, lazy loading, :checkhealth, and headless tests.

Claude Code (CLAUDE.md)Neovim plugins (Lua)

Obsidian plugin Cursor rules

Cursor rules for Obsidian community plugins in TypeScript: lifecycle and cleanup, Vault and MetadataCache APIs, settings, safe DOM, and release files.

CursorObsidian plugins

Tauri 2 Rust backend rules

Cursor rules for the Rust side of Tauri 2 apps: commands, typed errors, state, plugins, and capability files.

CursorTauri

Get the best new AI prompts every week

One short email a week: the best new prompts and rules for ChatGPT, Claude, Gemini, Midjourney, Cursor and more, plus what changed in the tools. Free, unsubscribe anytime.

Finishes on our newsletter page at beehiiv (opens in a new tab). Or subscribe directly.