[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74FVWA34WZ4ZE8G3520TTGC":3,"skill-same:01M74FVWA34WZ4ZE8G3520TTGC":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M74FVWA34WZ4ZE8G3520TTGC","add-i18n-key",null,"添加国际化键，必须双语同步并使用 SkillInspectorBundle 加载","dong4j\u002Fskill-inspector","dong4j","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F20341123?v=4","01M74FVQ9QPK760ZRZ7F32AMGN","01M74FVQACEMG56Q0BHA8JB271",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdong4j\u002Fskill-inspector\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fadd-i18n-key\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: add-i18n-key\ndescription: 添加国际化键，必须双语同步并使用 SkillInspectorBundle 加载\n---\n\n# \u002Fadd-i18n-key — 添加国际化键\n\n为任何用户可见文本添加 i18n key。**项目硬性约定**：所有面向用户的文案 **必须** 走 `SkillInspectorBundle`，禁止在代码里硬编码字符串。\n\n## Usage\n\n```\n\u002Fadd-i18n-key [key] [en-text]\n```\n\n- `key` — snake_case，分类前缀，例如 `action.validate.skill.title`、`inspection.frontmatter.tags.invalid`、`quickfix.tags.add`。\n- `en-text` — 英文原文（IntelliJ 默认 locale）。\n\n## Information Needed\n\n1. **使用位置** — Action \u002F Inspection \u002F Quick Fix \u002F Settings \u002F Status Bar \u002F Notification \u002F 错误消息。\n2. **是否含占位符** — `{0}` `{1}` 用于 `MessageFormat` 替换。\n3. **中文翻译** — 项目支持中英双语，必须同步提供。\n\n## 命名约定（强制）\n\n| 前缀               | 用途                    | 示例                                    |\n|------------------|-----------------------|---------------------------------------|\n| `plugin.*`       | 插件基本信息                | `plugin.name`                         |\n| `action.*`       | Action 标题 \u002F 描述        | `action.validate.skill.title`         |\n| `inspection.*`   | 规则消息 + display name   | `inspection.frontmatter.name.missing` |\n| `quickfix.*`     | Quick Fix family name | `quickfix.name.add`                   |\n| `settings.*`     | 设置页字段                 | `settings.enable.inspection`          |\n| `statusbar.*`    | 状态栏 widget            | `statusbar.tooltip.enabled`           |\n| `notification.*` | 通知标题 \u002F 操作链接           | `notification.action.open.problems`   |\n| `error.*`        | 错误提示                  | `error.no.project`                    |\n\n**规则**：\n\n- key 全部 **lowercase + dot-separated**，单词内用连字符分隔（如 `name.too-long`，与 ruleId 保持一致便于关联）。\n- 不要随意建新前缀；新增功能尽量复用上表前缀。\n\n## Files to Modify\n\n### 1. 英文资源：`src\u002Fmain\u002Fresources\u002Fmessages\u002FSkillInspectorBundle.properties`\n\n```properties\ninspection.frontmatter.tags.invalid=Tags must use kebab-case\ninspection.frontmatter.tags.invalid.with.value=Tag \"{0}\" must use kebab-case\n```\n\n按已有分组（`# Inspection`、`# Quick Fix`、`# Status Bar` 等）追加，不要打乱顺序。\n\n### 2. 中文资源：`src\u002Fmain\u002Fresources\u002Fmessages\u002FSkillInspectorBundle_zh_CN.properties`\n\n**必须同步**，否则中文用户会看到英文 fallback：\n\n```properties\ninspection.frontmatter.tags.invalid=tags 必须使用 kebab-case\ninspection.frontmatter.tags.invalid.with.value=tag \"{0}\" 必须使用 kebab-case\n```\n\n**关键约束**：\n\n- **中文文件支持原始 UTF-8**：现代 IntelliJ 已支持 `messages` bundle 的 UTF-8，**不需要再写 `\\u63D2\\u4EF6` 形式的 Unicode 转义**。但如果你看到旧\n  key 是转义形式，**保留原样**，不要混用——后续可以单独走\"全文件转 UTF-8\"的清理任务。\n- **占位符必须一致**：`{0}` `{1}` 在两个 bundle 文件里的数量、顺序、含义必须严格相同。\n- **不要在 properties 文件里加注释解释占位符**：注释会跟着进 IDE 二进制，徒增体积。\n\n### 3. 代码引用：通过 `SkillInspectorBundle.message(...)` 加载\n\n**永远走 bundle，不要硬编码**：\n\n```java\nimport dev.dong4j.idea.skill.inspector.util.SkillInspectorBundle;\n\nString text = SkillInspectorBundle.message(\"inspection.frontmatter.tags.invalid\");\nString withArg = SkillInspectorBundle.message(\"inspection.frontmatter.tags.invalid.with.value\", tagName);\n```\n\n`message(...)` 方法会触发 IDE 的 `@PropertyKey` 检查：\n\n```62:66:src\u002Fmain\u002Fjava\u002Fdev\u002Fdong4j\u002Fidea\u002Fskill\u002Finspector\u002Futil\u002FSkillInspectorBundle.java\n    @NotNull\n    @Nls\n    public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object... params) {\n        return INSTANCE.getMessage(key, params);\n    }\n```\n\n**关键约束**：\n\n- **写错 key IDE 会标红**：`@PropertyKey` 让 IntelliJ 在编辑器里直接校验 bundle，所以拼写错误编译期就能发现。\n- **延迟加载场景用 `messagePointer(...)`**：返回 `Supplier\u003CString>`，例如 Action 标题在 IDE 启动早期但 bundle 未必已加载时。\n\n### 4. plugin.xml 中的引用\n\n某些 IntelliJ 扩展点（Inspection \u002F 设置页）支持直接通过 bundle key 加载文案，不需要 Java 代码：\n\n```xml\n\u003ClocalInspection language=\"Markdown\"\n                 groupBundle=\"messages.SkillInspectorBundle\"\n                 groupKey=\"inspection.group.name\"\n                 displayNameKey=\"inspection.skill.md.display.name\"\n                 ...\n                 \u002F>\n```\n\n**所有新建 `\u003ClocalInspection>` \u002F `\u003CapplicationConfigurable>` 等扩展点优先使用 `*Key` + `groupBundle` 加载**，而不是写死的\n`displayName=\"My Inspection\"`。\n\n## Build & Verify\n\n```bash\n.\u002Fgradlew compileJava       # @PropertyKey 校验，写错的 key 编译期报错\n.\u002Fgradlew runIde\n# IDE 实例：切换 IDE 语言 (Help → Change Language) → 验证中英文切换正常\n```\n\n## Troubleshooting\n\n- **`MissingResourceException: Can't find resource for bundle SkillInspectorBundle, key xxx`**：中文 bundle 漏加 key，或 key 拼写有出入。\n- **IDE 中显示原始 key（如 `inspection.frontmatter.tags.invalid`）**：bundle 文件没被打包，确认 properties 文件位于\n  `src\u002Fmain\u002Fresources\u002Fmessages\u002F` 且 `plugin.xml` 中 `\u003Cresource-bundle>messages.SkillInspectorBundle\u003C\u002Fresource-bundle>` 已声明。\n- **`{0}` 占位符没替换**：调用 `message()` 时漏传参数；或参数类型为 `null`（`MessageFormat` 会抛 `IllegalArgumentException`，传\n  `String.valueOf(...)` 兜底）。\n- **中文显示乱码**：确认文件保存为 UTF-8（IDE 默认）；老转义形式的中文不要用纯文本工具改成 UTF-8 再混合编辑，会乱掉。\n- **`@PropertyKey` 标红但 key 实际存在**：IDE 缓存问题，`File → Invalidate Caches → Restart`。\n\n## 参考代码\n\n- Bundle 加载工具：`src\u002Fmain\u002Fjava\u002Fdev\u002Fdong4j\u002Fidea\u002Fskill\u002Finspector\u002Futil\u002FSkillInspectorBundle.java`\n- 英文资源：`src\u002Fmain\u002Fresources\u002Fmessages\u002FSkillInspectorBundle.properties`\n- 中文资源：`src\u002Fmain\u002Fresources\u002Fmessages\u002FSkillInspectorBundle_zh_CN.properties`\n- Bundle 注册：`src\u002Fmain\u002Fresources\u002FMETA-INF\u002Fplugin.xml`（`\u003Cresource-bundle>` 标签）\n","# \u002Fadd-i18n-key — 添加国际化键\n\n为任何用户可见文本添加 i18n key。**项目硬性约定**：所有面向用户的文案 **必须** 走 `SkillInspectorBundle`，禁止在代码里硬编码字符串。\n\n## Usage\n\n```\n\u002Fadd-i18n-key [key] [en-text]\n```\n\n- `key` — snake_case，分类前缀，例如 `action.validate.skill.title`、`inspection.frontmatter.tags.invalid`、`quickfix.tags.add`。\n- `en-text` — 英文原文（IntelliJ 默认 locale）。\n\n## Information Needed\n\n1. **使用位置** — Action \u002F Inspection \u002F Quick Fix \u002F Settings \u002F Status Bar \u002F Notification \u002F 错误消息。\n2. **是否含占位符** — `{0}` `{1}` 用于 `MessageFormat` 替换。\n3. **中文翻译** — 项目支持中英双语，必须同步提供。\n\n## 命名约定（强制）\n\n| 前缀               | 用途                    | 示例                                    |\n|------------------|-----------------------|---------------------------------------|\n| `plugin.*`       | 插件基本信息                | `plugin.name`                         |\n| `action.*`       | Action 标题 \u002F 描述        | `action.validate.skill.title`         |\n| `inspection.*`   | 规则消息 + display name   | `inspection.frontmatter.name.missing` |\n| `quickfix.*`     | Quick Fix family name | `quickfix.name.add`                   |\n| `settings.*`     | 设置页字段                 | `settings.enable.inspection`          |\n| `statusbar.*`    | 状态栏 widget            | `statusbar.tooltip.enabled`           |\n| `notification.*` | 通知标题 \u002F 操作链接           | `notification.action.open.problems`   |\n| `error.*`        | 错误提示                  | `error.no.project`                    |\n\n**规则**：\n\n- key 全部 **lowercase + dot-separated**，单词内用连字符分隔（如 `name.too-long`，与 ruleId 保持一致便于关联）。\n- 不要随意建新前缀；新增功能尽量复用上表前缀。\n\n## Files to Modify\n\n### 1. 英文资源：`src\u002Fmain\u002Fresources\u002Fmessages\u002FSkillInspectorBundle.properties`\n\n```properties\ninspection.frontmatter.tags.invalid=Tags must use kebab-case\ninspection.frontmatter.tags.invalid.with.value=Tag \"{0}\" must use kebab-case\n```\n\n按已有分组（`# Inspection`、`# Quick Fix`、`# Status Bar` 等）追加，不要打乱顺序。\n\n### 2. 中文资源：`src\u002Fmain\u002Fresources\u002Fmessages\u002FSkillInspectorBundle_zh_CN.properties`\n\n**必须同步**，否则中文用户会看到英文 fallback：\n\n```properties\ninspection.frontmatter.tags.invalid=tags 必须使用 kebab-case\ninspection.frontmatter.tags.invalid.with.value=tag \"{0}\" 必须使用 kebab-case\n```\n\n**关键约束**：\n\n- **中文文件支持原始 UTF-8**：现代 IntelliJ 已支持 `messages` bundle 的 UTF-8，**不需要再写 `\\u63D2\\u4EF6` 形式的 Unicode 转义**。但如果你看到旧\n  key 是转义形式，**保留原样**，不要混用——后续可以单独走\"全文件转 UTF-8\"的清理任务。\n- **占位符必须一致**：`{0}` `{1}` 在两个 bundle 文件里的数量、顺序、含义必须严格相同。\n- **不要在 properties 文件里加注释解释占位符**：注释会跟着进 IDE 二进制，徒增体积。\n\n### 3. 代码引用：通过 `SkillInspectorBundle.message(...)` 加载\n\n**永远走 bundle，不要硬编码**：\n\n```java\nimport dev.dong4j.idea.skill.inspector.util.SkillInspectorBundle;\n\nString text = SkillInspectorBundle.message(\"inspection.frontmatter.tags.invalid\");\nString withArg = SkillInspectorBundle.message(\"inspection.frontmatter.tags.invalid.with.value\", tagName);\n```\n\n`message(...)` 方法会触发 IDE 的 `@PropertyKey` 检查：\n\n```62:66:src\u002Fmain\u002Fjava\u002Fdev\u002Fdong4j\u002Fidea\u002Fskill\u002Finspector\u002Futil\u002FSkillInspectorBundle.java\n    @NotNull\n    @Nls\n    public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object... params) {\n        return INSTANCE.getMessage(key, params);\n    }\n```\n\n**关键约束**：\n\n- **写错 key IDE 会标红**：`@PropertyKey` 让 IntelliJ 在编辑器里直接校验 bundle，所以拼写错误编译期就能发现。\n- **延迟加载场景用 `messagePointer(...)`**：返回 `Supplier\u003CString>`，例如 Action 标题在 IDE 启动早期但 bundle 未必已加载时。\n\n### 4. plugin.xml 中的引用\n\n某些 IntelliJ 扩展点（Inspection \u002F 设置页）支持直接通过 bundle key 加载文案，不需要 Java 代码：\n\n```xml\n\u003ClocalInspection language=\"Markdown\"\n                 groupBundle=\"messages.SkillInspectorBundle\"\n                 groupKey=\"inspection.group.name\"\n                 displayNameKey=\"inspection.skill.md.display.name\"\n                 ...\n                 \u002F>\n```\n\n**所有新建 `\u003ClocalInspection>` \u002F `\u003CapplicationConfigurable>` 等扩展点优先使用 `*Key` + `groupBundle` 加载**，而不是写死的\n`displayName=\"My Inspection\"`。\n\n## Build & Verify\n\n```bash\n.\u002Fgradlew compileJava       # @PropertyKey 校验，写错的 key 编译期报错\n.\u002Fgradlew runIde\n# IDE 实例：切换 IDE 语言 (Help → Change Language) → 验证中英文切换正常\n```\n\n## Troubleshooting\n\n- **`MissingResourceException: Can't find resource for bundle SkillInspectorBundle, key xxx`**：中文 bundle 漏加 key，或 key 拼写有出入。\n- **IDE 中显示原始 key（如 `inspection.frontmatter.tags.invalid`）**：bundle 文件没被打包，确认 properties 文件位于\n  `src\u002Fmain\u002Fresources\u002Fmessages\u002F` 且 `plugin.xml` 中 `\u003Cresource-bundle>messages.SkillInspectorBundle\u003C\u002Fresource-bundle>` 已声明。\n- **`{0}` 占位符没替换**：调用 `message()` 时漏传参数；或参数类型为 `null`（`MessageFormat` 会抛 `IllegalArgumentException`，传\n  `String.valueOf(...)` 兜底）。\n- **中文显示乱码**：确认文件保存为 UTF-8（IDE 默认）；老转义形式的中文不要用纯文本工具改成 UTF-8 再混合编辑，会乱掉。\n- **`@PropertyKey` 标红但 key 实际存在**：IDE 缓存问题，`File → Invalidate Caches → Restart`。\n\n## 参考代码\n\n- Bundle 加载工具：`src\u002Fmain\u002Fjava\u002Fdev\u002Fdong4j\u002Fidea\u002Fskill\u002Finspector\u002Futil\u002FSkillInspectorBundle.java`\n- 英文资源：`src\u002Fmain\u002Fresources\u002Fmessages\u002FSkillInspectorBundle.properties`\n- 中文资源：`src\u002Fmain\u002Fresources\u002Fmessages\u002FSkillInspectorBundle_zh_CN.properties`\n- Bundle 注册：`src\u002Fmain\u002Fresources\u002FMETA-INF\u002Fplugin.xml`（`\u003Cresource-bundle>` 标签）\n",{"name":5,"description":7},"main","c0266b890b58adaa8f53b9f33b11529190898b49",".claude\u002Fskills\u002Fadd-i18n-key","https:\u002F\u002Fgithub.com\u002Fdong4j\u002Fskill-inspector","https:\u002F\u002Fskill-inspector.dong4j.site\u002F","https:\u002F\u002Fgithub.com\u002Fdong4j","dong4j.github.io","Product designer who focuses on simplicity & usability.","2026-08-05 00:38:56",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add dong4j\u002Fskill-inspector --skill add-i18n-key",{"tool":38,"command":39},"bunx","bunx skills add dong4j\u002Fskill-inspector --skill add-i18n-key",{"tool":41,"command":42},"pnpm","pnpm dlx skills add dong4j\u002Fskill-inspector --skill add-i18n-key","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdong4j\u002Fskill-inspector\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fadd-i18n-key\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":18},"01M74FYTATP8V4W018N979431T","unused-reference-resource","Use this skill when `references\u002F` contains files that are never linked from the body.","https:\u002F\u002Fgithub.com\u002Fdong4j\u002Fskill-inspector\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Ffixtures\u002Fskills\u002Funused-reference-resource\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M74FYRN28TF1P34H0X7DKYN9","short-description","too short","https:\u002F\u002Fgithub.com\u002Fdong4j\u002Fskill-inspector\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Ffixtures\u002Fskills\u002Fshort-description\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M74FYPRJBM1QSQQBZYSN31E2","security-sensitive-path","Use this skill when verifying detection of sensitive paths like `.env` or `~\u002F.ssh` in the body.","https:\u002F\u002Fgithub.com\u002Fdong4j\u002Fskill-inspector\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Ffixtures\u002Fskills\u002Fsecurity-sensitive-path\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M74FYMD6NC9Y2PH6MCGR1Z1J","security-secret","Use this skill when verifying detection of leaked secret patterns in the body.","https:\u002F\u002Fgithub.com\u002Fdong4j\u002Fskill-inspector\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Ffixtures\u002Fskills\u002Fsecurity-secret\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M74FYJ5SYAZZ4TTPN74STE1K","security-prompt-injection","Use this skill when verifying detection of prompt-injection phrases such as \"ignore previous instructions\".","https:\u002F\u002Fgithub.com\u002Fdong4j\u002Fskill-inspector\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Ffixtures\u002Fskills\u002Fsecurity-prompt-injection\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M74FYFQH6Q4NHE1K6CXDBARS","security-dangerous-command","Use this skill when verifying detection of dangerous shell commands in the body.","https:\u002F\u002Fgithub.com\u002Fdong4j\u002Fskill-inspector\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Ffixtures\u002Fskills\u002Fsecurity-dangerous-command\u002FSKILL.md",[],[]]