OpenParable
Skip to content
← Back to skills

Actions

Development
actions

Actions is an Agent Skill for development published in the JetBrains/intellij-community repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Guidelines for implementing IntelliJ actions (AnAction). Use those rules when you need to create or change an action in the intellij platform.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/JetBrains/intellij-community/blob/HEAD/.agents/skills/actions/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/actions, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Actions

Guidelines for implementing IntelliJ actions (AnAction).

Documentation

Best Practices

  • NEVER instantiate Presentation in action constructors - Use no-argument constructors
  • Define text, description, and icon in plugin.xml - Not in constructor parameters
  • Use AnActionEvent#getCoroutineScope for launching suspending computations - actionPerformed runs synchronously with event invocation and may freeze the IDE.
  • Follow the convention:
    1. Set the id attribute for the action in plugin.xml
    2. Optionally set the icon attribute if an icon is needed
    3. Set text and description in the message bundle (e.g., GitBundle.properties):
    • action.<action-id>.text=Translated Action Text
    • action.<action-id>.description=Translated Action Description

Good example:

Kotlin:

class MyAction : AnAction()

plugin.xml:

<action id="My.Action.Id"
        class="my.package.MyAction"
        icon="my.package.MyIcons.ICON"/>

Bundle.properties:

action.My.Action.Id.text=My Action
action.My.Action.Id.description=Description of my action