actions

GitHub

提供 IntelliJ IDEA 插件中 AnAction 的实现指南,规范动作创建、配置及异步处理的最佳实践。

.claude/skills/actions/SKILL.md DetachHead/rebased

触发场景

需要实现 IntelliJ 平台动作 修改或创建 IDE 插件中的 AnAction

安装

npx skills add DetachHead/rebased --skill actions -g -y
更多选项

非标准路径

npx skills add https://github.com/DetachHead/rebased/tree/master/.claude/skills/actions -g -y

不安装直接使用

npx skills use DetachHead/rebased@actions

指定 Agent (Claude Code)

npx skills add DetachHead/rebased --skill actions -a claude-code -g -y

安装 repo 全部 skill

npx skills add DetachHead/rebased --all -g -y

预览 repo 内 skill

npx skills add DetachHead/rebased --list

SKILL.md

Frontmatter
{
    "name": "actions",
    "description": "Guidelines for implementing IntelliJ actions (AnAction). Use those rules when you need to create or change an action in the intellij platform."
}

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

版本历史

  • 1f8708d 当前 2026-08-16 15:38

同 Skill 集合

.agents/skills/actions/SKILL.md
.agents/skills/code-style/SKILL.md
.agents/skills/commits/SKILL.md
.agents/skills/debugging/SKILL.md
.agents/skills/driver-ui-tests/SKILL.md
.agents/skills/eel/SKILL.md
.agents/skills/extract-module/SKILL.md
.agents/skills/module-dependencies/SKILL.md
.agents/skills/module-set-pluginization/SKILL.md
.agents/skills/notebook-for-experiment/SKILL.md
.agents/skills/pseudo-kmp/SKILL.md
.agents/skills/registry/SKILL.md
.agents/skills/remote-dev/SKILL.md
.agents/skills/safe-push/SKILL.md
.agents/skills/ssr/SKILL.md
.agents/skills/testing-internals/SKILL.md
.agents/skills/testing/SKILL.md
.agents/skills/ui-accessibility/SKILL.md
.agents/skills/writing-tests/SKILL.md
.claude/skills/code-style/SKILL.md
.claude/skills/commits/SKILL.md
.claude/skills/debugging/SKILL.md
.claude/skills/driver-ui-tests/SKILL.md
.claude/skills/eel/SKILL.md
.claude/skills/extract-module/SKILL.md
.claude/skills/jewel-pr-preparer/SKILL.md
.claude/skills/jewel-release-helper/SKILL.md
.claude/skills/managing-youtrack/SKILL.md
.claude/skills/module-dependencies/SKILL.md
.claude/skills/module-set-pluginization/SKILL.md
.claude/skills/notebook-for-experiment/SKILL.md
.claude/skills/pseudo-kmp/SKILL.md
.claude/skills/registry/SKILL.md
.claude/skills/remote-dev/SKILL.md
.claude/skills/safe-push/SKILL.md
.claude/skills/ssr/SKILL.md
.claude/skills/testing-internals/SKILL.md
.claude/skills/testing/SKILL.md
.claude/skills/ui-accessibility/SKILL.md
.claude/skills/writing-tests/SKILL.md

元信息

文件数
0
版本
1f8708d
Hash
839d89ff
收录时间
2026-08-16 15:38

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-17 06:19
浙ICP备14020137号-1 $访客地图$