Skip to main content

Overview

Custom actions allow you to create reusable AI workflows tailored to your specific needs. Each action can have its own prompt, system prompt, temperature settings, and behavior.

The LocalGPTAction Interface

Actions are defined using the LocalGPTAction interface:

Field Descriptions

string
required
The display name of the action that appears in the context menu and Action Palette.
string
required
The main instruction sent to the AI. Can include template keywords like {{=SELECTION=}} and {{=CONTEXT=}}.
number
Controls randomness/creativity (0-2). If not set, uses the default creativity setting. Lower values are more deterministic.
string
The system prompt that defines the AI’s role and behavior. This is sent as the system message to guide the AI’s overall approach.
boolean
When true, the AI’s response replaces the selected text. When false (default), the response is appended after the selection.
boolean
When true, creates a visual separator in the actions list instead of an executable action.
CommunityActionRef
Metadata for community actions. Automatically managed when installing actions from the community library.

Creating Actions in Settings

Method 1: Manual Creation

  1. Open SettingsLocal GPT
  2. Scroll to the Actions section
  3. Click Add Action
  4. Fill in the action fields:
    • Name: A descriptive name for your action
    • System Prompt: (Optional) Define the AI’s role
    • Prompt: The main instruction
    • Replace selected text: Toggle on to replace instead of append
  5. Click Save
Action names must be unique. If you try to save an action with a duplicate name, you’ll see an error message.

Method 2: Quick Add

Use the Quick Add field for faster action creation using a special format: Format:
Example:
The scissor emoji (✂️) is used as a separator. You can copy it from the settings page or use the keyboard shortcut.

Method 3: Community Actions

  1. Click Community Actions button
  2. Browse available actions
  3. Click Install on any action you want to use
  4. The action is automatically added to your list
Community actions are automatically updated to the latest version. To prevent auto-updates, modify the Prompt or System Prompt fields.

Action Field Examples

Example 1: Code Documentation Generator

Example 2: Grammar Fixer with Context

Example 3: Meeting Notes Summarizer

Example 4: Enhanced Context Action

Use {{=CONTEXT_START=}} and {{=CONTEXT_END=}} to conditionally include context only when available. See the Prompt Templating guide for more details.

Example 5: Creative Rewriter

Default Actions

Local GPT comes with these default actions:

Temperature Settings

The temperature field controls the creativity/randomness of responses:

0.0 - 0.3

Deterministic: Consistent, factual outputs. Best for grammar fixes, code documentation, data extraction.

0.4 - 0.6

Balanced: Good mix of consistency and variety. Best for summarization, rewriting, Q&A.

0.7 - 1.0

Creative: More varied, creative outputs. Best for brainstorming, creative writing, idea generation.

1.0+

Highly Creative: Maximum randomness. Use sparingly for experimental or highly creative tasks.
If you don’t specify a temperature, the action will use the default creativity setting from SettingsLocal GPTCreativity.

Replace Mode

The replace field determines how the AI’s response is inserted:

Replace: false (default)

Replace: true

Use replace: true for actions like:
  • Grammar/spelling correction
  • Text simplification
  • Format conversion
  • Rewriting/rephrasing

Managing Actions

Editing Actions

  1. Click Edit next to any action in the settings
  2. Modify the fields as needed
  3. Click Save
If you edit a community action, it will stop receiving automatic updates. This allows you to customize it without losing your changes.

Deleting Actions

  1. Click Edit on the action you want to delete
  2. Click Remove
  3. Click Remove again to confirm (button turns red)

Reordering Actions

Desktop:
  • Drag and drop actions using the grip handle (⋮⋮) on the left
Mobile:
  • Use the chevron up/down buttons to move actions

Creating Separators

  1. Click Add Separator
  2. A visual separator is added to organize your actions list
  3. Drag to position it where needed
Use separators to group related actions together, like “Writing Aids”, “Code Tools”, “Research”, etc.

Sharing Actions

Every action has a copy button that generates a shareable string:
  1. Click the Copy icon next to any action
  2. Share the copied text with others
  3. Recipients can paste it into the Quick Add field
Shareable format:

Best Practices

Action Naming

  • Use emojis to make actions visually distinct (🪄, ✍️, 📝, 🧠)
  • Keep names short and descriptive
  • Group related actions with similar emoji/prefix

System Prompts

  • Define the AI’s role clearly (“You are a…”)
  • Set expectations for output format
  • Include constraints or guidelines
  • Keep it focused and specific

Main Prompts

  • Be clear and specific about what you want
  • Use template keywords for flexibility
  • Provide examples when helpful
  • Structure complex prompts with headers

Performance Tips

  • Shorter prompts = faster responses
  • Use replace: true when you don’t need to keep the original
  • Avoid overly complex system prompts that might confuse the model
  • Test actions with different models to find the best fit

Troubleshooting

Action Not Appearing in Menu

  • Check that the action name is not empty
  • Ensure the action was saved successfully
  • Try reloading Obsidian

Unexpected Output

  • Review your system prompt for clarity
  • Check template keyword placement
  • Adjust temperature for more/less variation
  • Try a different AI model

Performance Issues

  • Simplify overly complex prompts
  • Use a faster model for the action
  • Reduce context limit if using Enhanced Actions
  • Check your AI provider connection

Prompt Templating

Master template keywords for dynamic prompts

AI Providers Setup

Configure AI models and providers