+ Community Extensions — Cai Docs

Community Extensions

Community extensions are pre-built custom actions and destinations shared by other Cai users. Browse and install them directly from the in-app extension browser, or from the cai-extensions repository on GitHub.

How to Install

  1. Open Settings > Community Extensions
  2. Browse available extensions
  3. Click Install on the extension you want
  4. The extension is added as a custom action or destination in your Cai settings

To uninstall, go back to Community Extensions and click the extension again.

Tip: You can also install extensions by copying a # cai-extension YAML snippet to your clipboard. Cai detects it automatically and shows a trust confirmation dialog. This is useful for installing extensions shared outside the community repository.

Extension Types

TypeWhat it doesInstalls asNeeds LLM?
promptSends clipboard text to the LLM with a custom instructionActionYes
urlOpens a URL with %s replaced by clipboard textActionNo
shellRuns a shell command with the textActionNo
webhookSends text to an HTTP endpointDestinationNo
deeplinkOpens a URL scheme / deep linkDestinationNo
applescriptRuns an AppleScript with the textDestinationNo

Custom actions appear in the Cai action window — you trigger them just like built-in actions. Destinations are output targets that receive text after an action runs (or directly from clipboard).

Security

Cai takes a cautious approach to community extensions:

  • Trust confirmation — Every extension shows a confirmation dialog before installation, whether installed from the in-app browser or via clipboard. You always see what it does before it’s added.
  • AppleScript and shell types cannot be installed via clipboard — These types are blocked from clipboard install for safety. You can install them through the in-app extension browser or create them manually in Settings.
  • No auto-execution — Extensions are never run automatically. You must explicitly trigger them like any other action.

Caution: Only install extensions from sources you trust. While dangerous types are blocked, webhook destinations can still send your text to external servers. Always review the extension details before installing.


Creating an Extension

Each extension is a single YAML file inside a folder in the community repository. Here’s how to create one.

Required Fields

Every extension.yaml must start with # cai-extension on the first line and include these fields:

FieldDescription
nameDisplay name shown in Cai (title case)
descriptionOne-line summary — what users see when browsing
authorYour GitHub username
versionVersion string, quoted (e.g. "1.0")
tagsArray of lowercase tags for search/filtering
iconSF Symbol name (e.g. envelope.fill)
typeprompt, url, webhook, or deeplink

Prompt Action

Sends clipboard text to the LLM with your instruction:

# cai-extension
name: Professional Email
description: Rewrite text as a polished professional email
author: your-github-username
version: "1.0"
tags: [writing, email]
icon: envelope.fill
type: prompt
prompt: |
  Rewrite the following text as a professional email.
  Keep the core message but make it polished and clear.
  Include a greeting and sign-off.
  Do not use any markdown formatting.

Prompt tips:

  • Be specific about format, tone, and what to preserve
  • Include “Do not use any markdown formatting” — output goes to clipboard, not a renderer
  • Don’t add preambles like “The user has copied:” — Cai handles that automatically
  • Don’t include {{text}} or {{clipboard}} placeholders — text is passed automatically
  • Cai’s system prompt already says “Output ONLY the processed text” — don’t repeat that

URL Action

Opens a URL with %s replaced by the clipboard text:

# cai-extension
name: Search StackOverflow
description: Search StackOverflow for the selected text
author: your-github-username
version: "1.0"
tags: [developer, search]
icon: magnifyingglass
type: url
url: "https://stackoverflow.com/search?q=%s"

The clipboard text is automatically URL-encoded.

Webhook Destination

Sends text to an HTTP endpoint:

# cai-extension
name: Send to Slack
description: Post text to a Slack channel via webhook
author: your-github-username
version: "1.0"
tags: [productivity, slack]
icon: bubble.left.fill
type: webhook
show_in_action_list: true
webhook:
  url: "{{slack_webhook_url}}"
  method: POST
  headers:
    Content-Type: application/json
  body: '{"text": "{{result}}"}'
setup:
  - key: slack_webhook_url
    label: Slack Webhook URL
    secret: false

Opens a URL scheme / deep link with the result text:

# cai-extension
name: Save to Bear
description: Create a new note in Bear
author: your-github-username
version: "1.0"
tags: [productivity, notes]
icon: doc.text
type: deeplink
show_in_action_list: true
deeplink: "bear://x-callback-url/create?text={{result}}"

Template Placeholders

PlaceholderUsed inDescription
%sURL actionsReplaced with clipboard text (URL-encoded)
{{result}}DestinationsReplaced with the text to send (auto-escaped per destination type)
{{field_key}}DestinationsReplaced with user-configured setup field value

Setup Fields

Setup fields let users configure values like API keys and webhook URLs when they first use the extension. Define them with the setup key:

setup:
  - key: api_key
    label: "API Key"
    secret: true # stored in Keychain, masked in UI
  - key: channel
    label: "Channel Name"
    secret: false

Reference them in your templates with {{key_name}}.


Submitting an Extension

The easiest way to share a custom action or destination you’ve built:

  1. Open Settings > Custom Actions (or Custom Destinations)
  2. Click the share icon (↗) on the custom action or destination you want to share
  3. Cai copies the extension YAML to your clipboard and opens the community repo
  4. Fork the repo, create a folder under extensions/ with a kebab-case name (e.g. professional-email)
  5. Paste the YAML as extension.yaml and open a pull request

The generated YAML includes all the required fields. You just need to update author to your GitHub username, write a short description, and add relevant tags.

Create manually

You can also write the YAML by hand:

  1. Fork the cai-extensions repository
  2. Create a folder under extensions/ with a kebab-case name
  3. Add an extension.yaml file inside it (must start with # cai-extension)
  4. Open a pull request

All PRs require review and approval before merging.

Guidelines

  • One extension per folder — keep it focused
  • Test your extension in Cai before submitting (copy the YAML, press Option+C)
  • Use SF Symbol names for icons
  • Write a clear description — one sentence, no period
  • No API keys in YAML — use setup fields for secrets
  • applescript and shell types require extra review — these are accepted but will be scrutinized more carefully before merging

What Happens After You Submit

  1. CI validates your YAML automatically (required fields, format, type)
  2. A maintainer reviews your extension
  3. Once approved and merged, the extension appears in the community repository