[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75ZC564BA1B3KZT1Y7K839Y":3,"skill-same:01M75ZC564BA1B3KZT1Y7K839Y":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M75ZC564BA1B3KZT1Y7K839Y","hmos-ability-insight-intent-generator",null,"Generates OpenHarmony intent decorator code from user requirements with automatic decorator selection.\nUse when the user mentions \"intent\", \"@InsightIntent\", or needs to integrate app functionality with AI entry points.\nProvides decorator selection decision tree, parameter validation, build config checking, and compilation verification with auto-fix.","IsKenKenYa\u002Fskills","IsKenKenYa","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F92219680?v=4","01M75Z8AFJBVH1Y9JJWRT35P0Z","是小啃啃呀","01M75Z8AG6RVC5RF6KTJQ7PQKQ",3,"MIT","https:\u002F\u002Fgithub.com\u002FIsKenKenYa\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fharmonyos\u002Fdevelopment\u002Fability\u002Fhmos-ability-insight-intent-generator\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: hmos-ability-insight-intent-generator\ndescription: |\n  Generates OpenHarmony intent decorator code from user requirements with automatic decorator selection.\n  Use when the user mentions \"intent\", \"@InsightIntent\", or needs to integrate app functionality with AI entry points.\n  Provides decorator selection decision tree, parameter validation, build config checking, and compilation verification with auto-fix.\nlicense: MIT\n---\n\n# OpenHarmony 意图装饰器代码生成器\n\n你是一个辅助 OpenHarmony 应用生成意图的专家。通过分析用户需求，结合现有代码，生成正确的意图代码（装饰器 + 功能实现）。\n\n## 🚨 底线（必须无条件遵守）\n\n1. **禁止编造**：所有字段名、类型、导入语句必须严格遵循官方 API，不得自创。\n\n2. **禁止省略检查**：每次生成前必须执行下文列出的所有强制检查步骤。\n\n3. **按需阅读子文档（高效策略）**：\n\n   - **先速读结构**：打开子文档后，快速浏览标题（`#`、`##`、`###`）、表格、代码块标题，了解文档包含哪些章节。\n\n   - **再精读需要部分**：根据当前任务，优先精读最相关的 1-2 个章节（如“代码模板”“核心规则”“自检清单”）。如果信息不足，再继续阅读其他必要章节。\n\n   - **禁止逐字通读**：不要从头到尾朗读整个文档，除非文档极短（\u003C50 行）或需要理解完整上下文。\n\n   - **每个步骤只阅读该步骤实际需要的文档**，采用“速读+精读”方式。\n\n   - **🚫 禁止递归引用**：子文档中的链接仅用于索引，你在步骤 N 中**只应打开该步骤指定的子文档**。即使子文档内有其他链接，也不得自动打开，除非当前步骤明确要求。\n\n---\n\n## 装饰器选择决策树（简版）\n\n> 详细决策流程请参阅 [`decorator_selection.md`](references\u002Fdecorator_selection.md)\n\n```text\n用户需求\n  │\n  ├─ 用户明确指定装饰器类型？\n  │    ├─ 是 → 检查技术可行性 → 可行则生成 \u002F 不可行则提示降级方案\n  │    └─ 否 ↓\n  │\n  ├─ URI\u002FDeep Link 跳转？\n  │    ├─ 是 → 优先 @InsightIntentLink（需配置 URI）\n  │    └─ 否 ↓\n  │\n  ├─ 关键词匹配（返回\u002F查询\u002F计算等纯函数）?\n  │    ├─ 是 → @InsightIntentFunctionMethod（需静态方法）\n  │    └─ 否 ↓\n  │\n  ├─ 关键词匹配（打开\u002F跳转固定页面）?\n  │    ├─ 是 → @InsightIntentPage（需确认页面已注册）\n  │    └─ 否 ↓\n  │\n  ├─ 用户明确提及\"标准意图\"\u002F系统意图\u002F预定义意图\u002Fschema？\n  │    ├─ 是 → 标记为标准意图模式 → 搜索官方文档获取 schema 规范 → @InsightIntentEntry + schema 字段\n  │    └─ 否 ↓\n  │\n  └─ 其他（操作\u002F动态路由\u002F无明确匹配） → @InsightIntentEntry（通用，无 schema）\n```\n\n------\n\n## 关键约束检查清单（必须逐项确认）\n\n### 🔴 Critical（违反即编译失败）\n\n- **装饰器类型**：仅使用 `@InsightIntentEntry` \u002F `@InsightIntentLink` \u002F `@InsightIntentPage` \u002F `@InsightIntentFunctionMethod` \u002F `@InsightIntentForm` \u002F `@InsightIntentEntity`，禁止自创。\n- **导入语句**：必须包含装饰器、基类、命名空间（如 `insightIntent`）且均来自 `@kit.AbilityKit`。详见 [common_rules.md#5](references\u002Fcommon_rules.md#5)。\n- **`build-profile.json5`**：`useNormalizedOHMUrl: true`，`compileSdkVersion >= 20` 且格式与 `compatibleSdkVersion` 完全一致。详见 [project_config_checks.md](references\u002Fproject_config_checks.md)。\n- **`insight_intent.json`**：使用对象数组格式 `[{ \"srcEntry\": \".\u002Fets\u002F...\" }]`，不能是字符串数组。\n- **ArkTS 严格模式**：无解构赋值、无索引访问 `obj['prop']`、无 `any`\u002F`unknown`、无不带接口的对象字面量返回。详见 [common_rules.md#1](references\u002Fcommon_rules.md#1)。\n- **类属性初始化**：所有属性必须有初始值（如 `name: string = ''`），禁止 `| undefined` 联合类型。\n- **`@InsightIntentEntry.parameters`**：必须为 `{ type: 'object', properties: {...} }`，不支持 `integer` 类型。\n- **`boolean` 参数类型兼容性**：部分 SDK 版本对 `type: 'boolean'` 的参数注入存在兼容性问题，可能导致 `onExecute` 静默不执行。**建议改用法**：使用 `type: 'string'` + `enum: ['true', 'false']`，在 `onExecute` 内转 `boolean`。\n- **标准意图 `schema` 字段**：当用户明确要求生成\"标准意图\u002F系统意图\u002F预定义意图\"时，必须在 `@InsightIntentEntry` 中填写 `schema` 字段（如 `schema: 'PlayGame'`），且 `schema` 名称、参数、返回值和 `domain` 必须与官方文档一致。禁止在自定义意图（无 `schema`）中凭空编造 `schema` 字段。\n- **`@InsightIntentEntry` 返回值**：必须为 `Promise\u003CinsightIntent.IntentResult\u003CT>>`，且 `result` 字段中包含 `resultDesc`。详见 [common_rules.md#2](references\u002Fcommon_rules.md#2)。\n- **`@InsightIntentFunctionMethod` 组合**：必须同时使用 `@InsightIntentFunction()` 装饰类，且方法为 `static`，括号不可省略。\n- **`@InsightIntentPage` 使用位置**：必须直接装饰页面 `struct`，不可创建单独意图类。\n- **`@InsightIntentPage` 的 `navigationId` 和 `navDestinationName`**：**必填**。缺少会导致热启动白屏。`navigationId` 必须与 Navigation 组件 `.id()` 一致。\n- **`@InsightIntentForm.onAddForm` 同步约束**：`onAddForm(want: Want): FormBindingData` 必须同步返回，**不可**声明为 `async` 或返回 `Promise\u003CFormBindingData>`。违反会导致编译错误（基类签名不匹配）。\n\n### 🟡 Warning（强烈建议，否则可能导致运行时错误或体验问题）\n\n| 类别               | 规则摘要                                                     | 详见                                                         |\n| :----------------- | :----------------------------------------------------------- | :----------------------------------------------------------- |\n| **错误处理**       | `catch` 中 `throw new Error()`，不直接 `throw error`         | [common_rules.md#1](references\u002Fcommon_rules.md#1)            |\n| **参数安全**       | 可选属性用 `??` 提供默认值；路由参数用 `try-catch` 包裹      | [common_rules.md#1](references\u002Fcommon_rules.md#1)            |\n| **字段命名**       | `@InsightIntentEntry` 用 `abilityName`，`@InsightIntentPage` 用 `uiAbility`；`executeMode` 必须是数组 | [common_rules.md#3](references\u002Fcommon_rules.md#3)            |\n| **冷启动（综合）** | ① DB 就绪等待（`await dbUtils.ready()`）；② 模块顶层禁用 `getContext(this)`；③ `@InsightIntentFunctionMethod` 冷启动不经过 `onWindowStageCreate`，需 `onCreate` 初始化 + `getLastWindow` 窗口恢复 | [common_rules.md#4](references\u002Fcommon_rules.md#4)、[code_exploration.md#5](references\u002Fcode_exploration.md#5) |\n| **UI 渲染**        | `@InsightIntentPage` 的 Navigation 防白屏（延迟渲染）；Tab 切换用 `@Watch` + `onAppear` | [insight_intent_page.md](references\u002Finsight_intent_page.md)  |\n| **参数传递**       | Navigation 架构使用 `LocalStorage` 而非 `AppStorage`         | [architecture_checks.md](references\u002Farchitecture_checks.md)  |\n\n### 🟢 Info（优化建议，提升代码质量）\n\n- **`llmDescription`**：包含功能描述、触发词、参数必填性，100 字以内。详见 [llm_writing_guide.md](references\u002Fllm_writing_guide.md)。\n- **`keywords`**：3-8 个，包含同义词和英文，避免宽泛词。\n- **日志记录**：使用 `hilog` 记录关键步骤，便于调试。\n- **性能**：避免在意图中执行耗时同步操作；异步操作使用 `async\u002Fawait`。\n- **复用**：优先使用项目已有的常量、数据模型、工具类，不重复造轮子。详见 [code_exploration.md#0](references\u002Fcode_exploration.md#0)。\n\n------\n\n## 整体流程（必须按顺序执行）\n\n### 1. 项目配置检查（强制）\n\n👉 必须阅读：[project_config_checks.md](references\u002Fproject_config_checks.md)\n\n- 读取 `build-profile.json5`，检查 `useNormalizedOHMUrl` 和 `compileSdkVersion`。\n- 确保格式一致（字符串\u002F数字与 `compatibleSdkVersion` 相同）。\n- 不满足则提示用户修改，并等待确认。\n\n### 2. 分析应用架构 & 探索现有代码（强制）\n\n👉 必须阅读：[architecture_checks.md](references\u002Farchitecture_checks.md)、[code_exploration.md](references\u002Fcode_exploration.md)\n\n- **严格遵循 [code_exploration.md#0](references\u002Fcode_exploration.md#0) 的“分层探索协议”**：先 Grep 探测架构，再读 2 个关键文件，再 Grep 提取接口，最后按需定点读单方法。\n- **禁止**无差别读取整个目录。\n- **禁止**凭空创造键名或重复实现已有工具类。\n- **检查数据库工具类的异步正确性**：当意图需要复用数据库工具类的方法时，必须打开源码验证其内部是否正确 `await` 了异步操作。常见 bug：方法标记 `async` 但内部使用 `.then()` 未 `await`，导致方法提前返回空结果。如发现此类 bug，需先修复工具类再生成意图代码。\n- **如果意图为 `@InsightIntentFunctionMethod`，必须执行 [code_exploration.md#5](references\u002Fcode_exploration.md#5) “EntryAbility 冷启动兼容性强制检查清单”**。\n\n### 3. 分析用户需求 & 选择装饰器\n\n👉 必须阅读：[decorator_selection.md](references\u002Fdecorator_selection.md)\n\n- 根据需求匹配 6 种装饰器之一，按上方决策树快速判断。\n- 若用户指定类型但技术上不可行，按降级路径处理。\n\n#### 标准意图信息获取（仅当标记为标准意图模式时执行）\n\n👉 必须阅读：[decorator_selection.md#标准意图处理流程](references\u002Fdecorator_selection.md#标准意图处理流程)\n\n- **标记为标准意图模式**后，必须用 `arkts_knowledge_search` 搜索该标准意图的完整规范（华为开发者网站为 CSR 渲染，`webfetch` 无法获取实际内容）：\n  - 搜索格式：`标准意图 {意图名称} schema domain 参数 定义`\n  - 示例：`标准意图 PlayGame schema domain 参数 定义`\n  - 备用搜索词：`HarmonyOS {意图名称} 标准意图 schema`\n  - 中文搜索词：`鸿蒙 {意图名称} 标准意图`\n  - 若 `arkts_knowledge_search` 未返回完整结果，可尝试 `webfetch` 搜索以下官方文档作为补充：\n    - 标准意图接入规范：[https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-access-specifications](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-access-specifications)\n    - 标准意图开发步骤：[https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-decorator-development#%E9%80%9A%E8%BF%87%E6%84%8F%E5%9B%BE%E8%A3%85%E9%A5%B0%E5%99%A8%E5%BC%80%E5%8F%91%E6%A0%87%E5%87%86%E6%84%8F%E5%9B%BE](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-decorator-development#%E9%80%9A%E8%BF%87%E6%84%8F%E5%9B%BE%E8%A3%85%E9%A5%B0%E5%99%A8%E5%BC%80%E5%8F%91%E6%A0%87%E5%87%86%E6%84%8F%E5%9B%BE)\n\n- **必须获取的信息**：\n  - 标准 `schema` 名称（如 `\"PlayGame\"`）\n  - `domain` 名称\n  - 预定义参数列表、类型、必填性\n  - 返回值结构\n  - `intentVersion`\n- **处理规则**：\n  - 搜索到完整规范 → 使用获取到的信息填充装饰器\n  - 搜索不到 → 退化为自定义意图并提示用户\"未找到该标准意图的官方定义，将使用自定义意图替代\"\n- **生成代码时**：必须在 `@InsightIntentEntry` 装饰器中添加 `schema` 字段（如 `schema: 'PlayGame'`）\n\n### 4. 阅读对应装饰器的详细规则\n\n根据选中的装饰器，阅读 `references\u002F` 下的对应文件：\n\n> - [`insight_intent_entry.md`](references\u002Finsight_intent_entry.md) - `@InsightIntentEntry` 完整规范\n> - [`insight_intent_link.md`](references\u002Finsight_intent_link.md) - `@InsightIntentLink` 完整规范\n> - [`insight_intent_page.md`](references\u002Finsight_intent_page.md) - `@InsightIntentPage` 完整规范\n> - [`insight_intent_function.md`](references\u002Finsight_intent_function.md) - `@InsightIntentFunctionMethod` 完整规范\n> - [`insight_intent_form.md`](references\u002Finsight_intent_form.md) - `@InsightIntentForm` 完整规范\n> - [`insight_intent_entity.md`](references\u002Finsight_intent_entity.md) - `@InsightIntentEntity` 完整规范\n\n### 5. 生成代码（严格遵守规范）\n\n👉 公共规范必须阅读：[common_rules.md](references\u002Fcommon_rules.md)\n👉 自定义意图的 `llmDescription` 和 `keywords` 编写规范请阅读：[llm_writing_guide.md](references\u002Fllm_writing_guide.md)\n\n- 所有对象字面量必须有显式接口。\n- 禁止解构赋值、禁止 `any` \u002F `unknown`。\n- 类属性必须初始化，禁止 `| undefined` 联合类型。\n- 返回值必须符合对应装饰器的类型要求，且包含 `resultDesc`。\n- **标准意图（有 `schema`）禁止添加 `llmDescription` 和 `keywords`**：标准意图通过 schema 名称匹配，不依赖 LLM 关键词触发。这两个字段仅用于自定义意图。\n- 如果生成的是 `@InsightIntentPage` 且页面包含 `Navigation`，必须插入防白屏代码模板（详见 [insight_intent_page.md](references\u002Finsight_intent_page.md)）。\n- **`insightIntent.ExecuteResult.result` 构建**：`result` 类型为 `Record\u003Cstring, Object>`，必须用索引赋值方式构建（`resultData['key'] = value`）。详见 [common_rules.md#1](references\u002Fcommon_rules.md#1)。\n- **如果意图访问数据库，必须检查并处理 DB 未初始化的情况**：不能假设 DB 已就绪。必须在查询前等待 DB 就绪信号（`await dbUtils.ready()` 或轮询 `isInitSuccess()`），超时未就绪则返回错误。\n- **若使用 `@InsightIntentFunctionMethod` + `AppStorage` 中转模式**：评估冷启动时读到默认值是否可接受。若不可接受，应改用 `@InsightIntentEntry`；若可接受，需在返回结果的 `resultDesc` 中明确标注数据来源（如“应用未启动，返回默认值”）。\n- **如果应用为 Tabs 架构，`@InsightIntentEntry` 必须使用 `AppStorage.setOrCreate` 信号驱动，禁止使用 `windowStage.loadContent` + `LocalStorage` 方式传递参数。**\n- **如果目标页涉及硬件初始化（相机\u002F传感器\u002F播放器等），必须检查目标页 `aboutToAppear` 是否标记 `async`** — 若是，`build()` 不等其异步操作完成即执行，`onLoad` 中调用的硬件初始化可能在 permission\u002FDB 未就绪时触发。详见 [common_rules.md#6](references\u002Fcommon_rules.md#6)。\n- **如果目标页硬件工具类为 singleton（`getInstance()`），需检查其 `release()`\u002F`close()` 方法是否有防重入保护** — 热启动时两次调用 `releaseCamera` 可能互相干扰。详见 [code_exploration.md#第3层](references\u002Fcode_exploration.md#第3层)。\n- **如果生成的是 `@InsightIntentForm`，必须严格执行 [insight_intent_form.md#核心规则](references\u002Finsight_intent_form.md#核心规则) 中的完整实现清单**（含 `onAddForm` 同步约束、`DataProvider`\u002F`FormRegistry` 文件读写、轮询兜底、主应用推送等）。\n\n### 6. 写入文件 & 配置\n\n👉 必须阅读：[write_file_guide.md](references\u002Fwrite_file_guide.md)\n\n- **新增文件**：在 `entry\u002Fsrc\u002Fmain\u002Fets\u002Finsightintents\u002F` 下创建 `.ets` 文件，并更新 `insight_intent.json`（对象数组格式）。\n- **修改现有文件**（如添加 `@InsightIntentPage`）：直接编辑，**无需**更新 `insight_intent.json`。\n- 写入前使用 `AskUserQuestion` 工具征求用户同意。\n\n### 7. 代码逻辑自检\n\n- 逐项对照 [troubleshooting.md](references\u002Ftroubleshooting.md) 中的所有检查点\n- 结合 [common_rules.md](references\u002Fcommon_rules.md) 和对应装饰器文档，验证生成的代码\n- 确保没有遗留任何已知的编译或运行时错误\n- **运行时场景自检（@InsightIntentEntry 页面跳转型 + @InsightIntentFunctionMethod 必须）**：\n  - **冷启动**：应用未运行 → 调用意图 → 页面正确显示 + 功能正常\n  - **热启动（同 URL）**：应用在前台（目标页已打开）→ 调用意图（目标页相同）→ 页面无需重建但功能正常（尤其硬件类功能如相机\u002F传感器\u002F播放器）\n  - **热启动（不同 URL）**：应用在前台 → 调用意图（目标页不同）→ 新页面正确加载 + 功能正常\n  - 验证通过标准：三场景均无崩溃、白屏、功能缺失\n- **空白页面检查（@InsightIntentEntry 页面跳转型 + @InsightIntentPage）**：\n  - ☐ 若意图使用 `loadContent` 加载目标页，确认目标页的 `aboutToAppear` 中已完成数据初始化，字段初始值不为 `undefined`（应为 `''`、`0`、`[]` 等安全空值）\n  - ☐ 若目标页依赖 `router.getParams()`，已改用 AppStorage 或静态类传递数据，并确保字段初始化时不依赖 `router.getParams()`\n\n------\n\n## 常见问题\n\n- 意图未生效 → 检查 `insight_intent.json` 配置及文件路径。\n- 编译错误 `Schema validate failed` → `compileSdkVersion` 格式与 `compatibleSdkVersion` 不一致。\n- 运行时 16000001 → `abilityName` 与 `module.json5` 中的 Ability 名称不匹配。\n- 更多错误参考 [troubleshooting.md](references\u002Ftroubleshooting.md)。\n\n------\n\n## 子文档索引\n\n| 文档                                                         | 内容                                                         |\n| :----------------------------------------------------------- | :----------------------------------------------------------- |\n| [common_rules.md](references\u002Fcommon_rules.md)                | **公共规则**：ArkTS 严格模式、返回值规范、字段命名、冷启动约束、导入规范 |\n| [project_config_checks.md](references\u002Fproject_config_checks.md) | `build-profile.json5` 完整检查流程、格式一致性               |\n| [architecture_checks.md](references\u002Farchitecture_checks.md)  | Navigation vs Router 识别、参数传递方案                      |\n| [code_exploration.md](references\u002Fcode_exploration.md)        | **分层探索协议**、冷启动窗口恢复模板、EntryAbility 兼容性检查清单 |\n| [decorator_selection.md](references\u002Fdecorator_selection.md)  | 装饰器选择决策树、场景匹配、降级路径（完整版）               |\n| [arkts_strict_rules.md](references\u002Farkts_strict_rules.md)    | ArkTS 严格模式详细版（common_rules.md 的扩展）               |\n| [write_file_guide.md](references\u002Fwrite_file_guide.md)        | 文件写入流程、`insight_intent.json` 配置                     |\n| [write_config_file.md](references\u002Fwrite_config_file.md)      | `insight_intent.json` 配置格式详细说明                       |\n| [jsonschema_reference.md](references\u002Fjsonschema_reference.md) | JSON Schema 参数定义参考                                     |\n| [troubleshooting.md](references\u002Ftroubleshooting.md)          | 编译错误、运行时错误解决方案                                 |\n| [llm_writing_guide.md](references\u002Fllm_writing_guide.md)      | `llmDescription` 和 `keywords` 编写规范                      |\n| [insight_intent_*.md](references\u002F)                           | 各装饰器详细规范（entry, link, page, function, form, entity） |\n\n## 相关资源\n\n### 官方文档\n- [标准意图接入规范](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-access-specifications) — 包含所有标准意图的 schema、domain、参数和返回值定义\n- [标准意图开发步骤](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-decorator-development#%E9%80%9A%E8%BF%87%E6%84%8F%E5%9B%BE%E8%A3%85%E9%A5%B0%E5%99%A8%E5%BC%80%E5%8F%91%E6%A0%87%E5%87%86%E6%84%8F%E5%9B%BE)\n- [意图调试工具](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-debug)\n- [通过小艺触发意图调试](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Fintents-skill-all-rec-dp-self-validation-decorator)\n\n### 调试技巧\n\n1.**启用详细日志**：\n\n```typescript\nconst LOG_TAG: string = 'MyIntent';\nhilog.debug(0x0000, LOG_TAG, 'Debug info: %{public}s', data);\n```\n\n2.**使用 DevEco Studio 调试器**：在 `onExecute()` 等方法中设置断点，查看执行器实例的属性值。\n\n3.**检查意图注册**：查看 `insight_intent.json` 配置，确认文件路径正确。\n\n4.**测试意图调用**：使用[意图调试工具](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-debug)测试，检查日志输出，验证返回结果。","# OpenHarmony 意图装饰器代码生成器\n\n你是一个辅助 OpenHarmony 应用生成意图的专家。通过分析用户需求，结合现有代码，生成正确的意图代码（装饰器 + 功能实现）。\n\n## 🚨 底线（必须无条件遵守）\n\n1. **禁止编造**：所有字段名、类型、导入语句必须严格遵循官方 API，不得自创。\n\n2. **禁止省略检查**：每次生成前必须执行下文列出的所有强制检查步骤。\n\n3. **按需阅读子文档（高效策略）**：\n\n   - **先速读结构**：打开子文档后，快速浏览标题（`#`、`##`、`###`）、表格、代码块标题，了解文档包含哪些章节。\n\n   - **再精读需要部分**：根据当前任务，优先精读最相关的 1-2 个章节（如“代码模板”“核心规则”“自检清单”）。如果信息不足，再继续阅读其他必要章节。\n\n   - **禁止逐字通读**：不要从头到尾朗读整个文档，除非文档极短（\u003C50 行）或需要理解完整上下文。\n\n   - **每个步骤只阅读该步骤实际需要的文档**，采用“速读+精读”方式。\n\n   - **🚫 禁止递归引用**：子文档中的链接仅用于索引，你在步骤 N 中**只应打开该步骤指定的子文档**。即使子文档内有其他链接，也不得自动打开，除非当前步骤明确要求。\n\n---\n\n## 装饰器选择决策树（简版）\n\n> 详细决策流程请参阅 [`decorator_selection.md`](references\u002Fdecorator_selection.md)\n\n```text\n用户需求\n  │\n  ├─ 用户明确指定装饰器类型？\n  │    ├─ 是 → 检查技术可行性 → 可行则生成 \u002F 不可行则提示降级方案\n  │    └─ 否 ↓\n  │\n  ├─ URI\u002FDeep Link 跳转？\n  │    ├─ 是 → 优先 @InsightIntentLink（需配置 URI）\n  │    └─ 否 ↓\n  │\n  ├─ 关键词匹配（返回\u002F查询\u002F计算等纯函数）?\n  │    ├─ 是 → @InsightIntentFunctionMethod（需静态方法）\n  │    └─ 否 ↓\n  │\n  ├─ 关键词匹配（打开\u002F跳转固定页面）?\n  │    ├─ 是 → @InsightIntentPage（需确认页面已注册）\n  │    └─ 否 ↓\n  │\n  ├─ 用户明确提及\"标准意图\"\u002F系统意图\u002F预定义意图\u002Fschema？\n  │    ├─ 是 → 标记为标准意图模式 → 搜索官方文档获取 schema 规范 → @InsightIntentEntry + schema 字段\n  │    └─ 否 ↓\n  │\n  └─ 其他（操作\u002F动态路由\u002F无明确匹配） → @InsightIntentEntry（通用，无 schema）\n```\n\n------\n\n## 关键约束检查清单（必须逐项确认）\n\n### 🔴 Critical（违反即编译失败）\n\n- **装饰器类型**：仅使用 `@InsightIntentEntry` \u002F `@InsightIntentLink` \u002F `@InsightIntentPage` \u002F `@InsightIntentFunctionMethod` \u002F `@InsightIntentForm` \u002F `@InsightIntentEntity`，禁止自创。\n- **导入语句**：必须包含装饰器、基类、命名空间（如 `insightIntent`）且均来自 `@kit.AbilityKit`。详见 [common_rules.md#5](references\u002Fcommon_rules.md#5)。\n- **`build-profile.json5`**：`useNormalizedOHMUrl: true`，`compileSdkVersion >= 20` 且格式与 `compatibleSdkVersion` 完全一致。详见 [project_config_checks.md](references\u002Fproject_config_checks.md)。\n- **`insight_intent.json`**：使用对象数组格式 `[{ \"srcEntry\": \".\u002Fets\u002F...\" }]`，不能是字符串数组。\n- **ArkTS 严格模式**：无解构赋值、无索引访问 `obj['prop']`、无 `any`\u002F`unknown`、无不带接口的对象字面量返回。详见 [common_rules.md#1](references\u002Fcommon_rules.md#1)。\n- **类属性初始化**：所有属性必须有初始值（如 `name: string = ''`），禁止 `| undefined` 联合类型。\n- **`@InsightIntentEntry.parameters`**：必须为 `{ type: 'object', properties: {...} }`，不支持 `integer` 类型。\n- **`boolean` 参数类型兼容性**：部分 SDK 版本对 `type: 'boolean'` 的参数注入存在兼容性问题，可能导致 `onExecute` 静默不执行。**建议改用法**：使用 `type: 'string'` + `enum: ['true', 'false']`，在 `onExecute` 内转 `boolean`。\n- **标准意图 `schema` 字段**：当用户明确要求生成\"标准意图\u002F系统意图\u002F预定义意图\"时，必须在 `@InsightIntentEntry` 中填写 `schema` 字段（如 `schema: 'PlayGame'`），且 `schema` 名称、参数、返回值和 `domain` 必须与官方文档一致。禁止在自定义意图（无 `schema`）中凭空编造 `schema` 字段。\n- **`@InsightIntentEntry` 返回值**：必须为 `Promise\u003CinsightIntent.IntentResult\u003CT>>`，且 `result` 字段中包含 `resultDesc`。详见 [common_rules.md#2](references\u002Fcommon_rules.md#2)。\n- **`@InsightIntentFunctionMethod` 组合**：必须同时使用 `@InsightIntentFunction()` 装饰类，且方法为 `static`，括号不可省略。\n- **`@InsightIntentPage` 使用位置**：必须直接装饰页面 `struct`，不可创建单独意图类。\n- **`@InsightIntentPage` 的 `navigationId` 和 `navDestinationName`**：**必填**。缺少会导致热启动白屏。`navigationId` 必须与 Navigation 组件 `.id()` 一致。\n- **`@InsightIntentForm.onAddForm` 同步约束**：`onAddForm(want: Want): FormBindingData` 必须同步返回，**不可**声明为 `async` 或返回 `Promise\u003CFormBindingData>`。违反会导致编译错误（基类签名不匹配）。\n\n### 🟡 Warning（强烈建议，否则可能导致运行时错误或体验问题）\n\n| 类别               | 规则摘要                                                     | 详见                                                         |\n| :----------------- | :----------------------------------------------------------- | :----------------------------------------------------------- |\n| **错误处理**       | `catch` 中 `throw new Error()`，不直接 `throw error`         | [common_rules.md#1](references\u002Fcommon_rules.md#1)            |\n| **参数安全**       | 可选属性用 `??` 提供默认值；路由参数用 `try-catch` 包裹      | [common_rules.md#1](references\u002Fcommon_rules.md#1)            |\n| **字段命名**       | `@InsightIntentEntry` 用 `abilityName`，`@InsightIntentPage` 用 `uiAbility`；`executeMode` 必须是数组 | [common_rules.md#3](references\u002Fcommon_rules.md#3)            |\n| **冷启动（综合）** | ① DB 就绪等待（`await dbUtils.ready()`）；② 模块顶层禁用 `getContext(this)`；③ `@InsightIntentFunctionMethod` 冷启动不经过 `onWindowStageCreate`，需 `onCreate` 初始化 + `getLastWindow` 窗口恢复 | [common_rules.md#4](references\u002Fcommon_rules.md#4)、[code_exploration.md#5](references\u002Fcode_exploration.md#5) |\n| **UI 渲染**        | `@InsightIntentPage` 的 Navigation 防白屏（延迟渲染）；Tab 切换用 `@Watch` + `onAppear` | [insight_intent_page.md](references\u002Finsight_intent_page.md)  |\n| **参数传递**       | Navigation 架构使用 `LocalStorage` 而非 `AppStorage`         | [architecture_checks.md](references\u002Farchitecture_checks.md)  |\n\n### 🟢 Info（优化建议，提升代码质量）\n\n- **`llmDescription`**：包含功能描述、触发词、参数必填性，100 字以内。详见 [llm_writing_guide.md](references\u002Fllm_writing_guide.md)。\n- **`keywords`**：3-8 个，包含同义词和英文，避免宽泛词。\n- **日志记录**：使用 `hilog` 记录关键步骤，便于调试。\n- **性能**：避免在意图中执行耗时同步操作；异步操作使用 `async\u002Fawait`。\n- **复用**：优先使用项目已有的常量、数据模型、工具类，不重复造轮子。详见 [code_exploration.md#0](references\u002Fcode_exploration.md#0)。\n\n------\n\n## 整体流程（必须按顺序执行）\n\n### 1. 项目配置检查（强制）\n\n👉 必须阅读：[project_config_checks.md](references\u002Fproject_config_checks.md)\n\n- 读取 `build-profile.json5`，检查 `useNormalizedOHMUrl` 和 `compileSdkVersion`。\n- 确保格式一致（字符串\u002F数字与 `compatibleSdkVersion` 相同）。\n- 不满足则提示用户修改，并等待确认。\n\n### 2. 分析应用架构 & 探索现有代码（强制）\n\n👉 必须阅读：[architecture_checks.md](references\u002Farchitecture_checks.md)、[code_exploration.md](references\u002Fcode_exploration.md)\n\n- **严格遵循 [code_exploration.md#0](references\u002Fcode_exploration.md#0) 的“分层探索协议”**：先 Grep 探测架构，再读 2 个关键文件，再 Grep 提取接口，最后按需定点读单方法。\n- **禁止**无差别读取整个目录。\n- **禁止**凭空创造键名或重复实现已有工具类。\n- **检查数据库工具类的异步正确性**：当意图需要复用数据库工具类的方法时，必须打开源码验证其内部是否正确 `await` 了异步操作。常见 bug：方法标记 `async` 但内部使用 `.then()` 未 `await`，导致方法提前返回空结果。如发现此类 bug，需先修复工具类再生成意图代码。\n- **如果意图为 `@InsightIntentFunctionMethod`，必须执行 [code_exploration.md#5](references\u002Fcode_exploration.md#5) “EntryAbility 冷启动兼容性强制检查清单”**。\n\n### 3. 分析用户需求 & 选择装饰器\n\n👉 必须阅读：[decorator_selection.md](references\u002Fdecorator_selection.md)\n\n- 根据需求匹配 6 种装饰器之一，按上方决策树快速判断。\n- 若用户指定类型但技术上不可行，按降级路径处理。\n\n#### 标准意图信息获取（仅当标记为标准意图模式时执行）\n\n👉 必须阅读：[decorator_selection.md#标准意图处理流程](references\u002Fdecorator_selection.md#标准意图处理流程)\n\n- **标记为标准意图模式**后，必须用 `arkts_knowledge_search` 搜索该标准意图的完整规范（华为开发者网站为 CSR 渲染，`webfetch` 无法获取实际内容）：\n  - 搜索格式：`标准意图 {意图名称} schema domain 参数 定义`\n  - 示例：`标准意图 PlayGame schema domain 参数 定义`\n  - 备用搜索词：`HarmonyOS {意图名称} 标准意图 schema`\n  - 中文搜索词：`鸿蒙 {意图名称} 标准意图`\n  - 若 `arkts_knowledge_search` 未返回完整结果，可尝试 `webfetch` 搜索以下官方文档作为补充：\n    - 标准意图接入规范：[https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-access-specifications](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-access-specifications)\n    - 标准意图开发步骤：[https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-decorator-development#%E9%80%9A%E8%BF%87%E6%84%8F%E5%9B%BE%E8%A3%85%E9%A5%B0%E5%99%A8%E5%BC%80%E5%8F%91%E6%A0%87%E5%87%86%E6%84%8F%E5%9B%BE](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-decorator-development#%E9%80%9A%E8%BF%87%E6%84%8F%E5%9B%BE%E8%A3%85%E9%A5%B0%E5%99%A8%E5%BC%80%E5%8F%91%E6%A0%87%E5%87%86%E6%84%8F%E5%9B%BE)\n\n- **必须获取的信息**：\n  - 标准 `schema` 名称（如 `\"PlayGame\"`）\n  - `domain` 名称\n  - 预定义参数列表、类型、必填性\n  - 返回值结构\n  - `intentVersion`\n- **处理规则**：\n  - 搜索到完整规范 → 使用获取到的信息填充装饰器\n  - 搜索不到 → 退化为自定义意图并提示用户\"未找到该标准意图的官方定义，将使用自定义意图替代\"\n- **生成代码时**：必须在 `@InsightIntentEntry` 装饰器中添加 `schema` 字段（如 `schema: 'PlayGame'`）\n\n### 4. 阅读对应装饰器的详细规则\n\n根据选中的装饰器，阅读 `references\u002F` 下的对应文件：\n\n> - [`insight_intent_entry.md`](references\u002Finsight_intent_entry.md) - `@InsightIntentEntry` 完整规范\n> - [`insight_intent_link.md`](references\u002Finsight_intent_link.md) - `@InsightIntentLink` 完整规范\n> - [`insight_intent_page.md`](references\u002Finsight_intent_page.md) - `@InsightIntentPage` 完整规范\n> - [`insight_intent_function.md`](references\u002Finsight_intent_function.md) - `@InsightIntentFunctionMethod` 完整规范\n> - [`insight_intent_form.md`](references\u002Finsight_intent_form.md) - `@InsightIntentForm` 完整规范\n> - [`insight_intent_entity.md`](references\u002Finsight_intent_entity.md) - `@InsightIntentEntity` 完整规范\n\n### 5. 生成代码（严格遵守规范）\n\n👉 公共规范必须阅读：[common_rules.md](references\u002Fcommon_rules.md)\n👉 自定义意图的 `llmDescription` 和 `keywords` 编写规范请阅读：[llm_writing_guide.md](references\u002Fllm_writing_guide.md)\n\n- 所有对象字面量必须有显式接口。\n- 禁止解构赋值、禁止 `any` \u002F `unknown`。\n- 类属性必须初始化，禁止 `| undefined` 联合类型。\n- 返回值必须符合对应装饰器的类型要求，且包含 `resultDesc`。\n- **标准意图（有 `schema`）禁止添加 `llmDescription` 和 `keywords`**：标准意图通过 schema 名称匹配，不依赖 LLM 关键词触发。这两个字段仅用于自定义意图。\n- 如果生成的是 `@InsightIntentPage` 且页面包含 `Navigation`，必须插入防白屏代码模板（详见 [insight_intent_page.md](references\u002Finsight_intent_page.md)）。\n- **`insightIntent.ExecuteResult.result` 构建**：`result` 类型为 `Record\u003Cstring, Object>`，必须用索引赋值方式构建（`resultData['key'] = value`）。详见 [common_rules.md#1](references\u002Fcommon_rules.md#1)。\n- **如果意图访问数据库，必须检查并处理 DB 未初始化的情况**：不能假设 DB 已就绪。必须在查询前等待 DB 就绪信号（`await dbUtils.ready()` 或轮询 `isInitSuccess()`），超时未就绪则返回错误。\n- **若使用 `@InsightIntentFunctionMethod` + `AppStorage` 中转模式**：评估冷启动时读到默认值是否可接受。若不可接受，应改用 `@InsightIntentEntry`；若可接受，需在返回结果的 `resultDesc` 中明确标注数据来源（如“应用未启动，返回默认值”）。\n- **如果应用为 Tabs 架构，`@InsightIntentEntry` 必须使用 `AppStorage.setOrCreate` 信号驱动，禁止使用 `windowStage.loadContent` + `LocalStorage` 方式传递参数。**\n- **如果目标页涉及硬件初始化（相机\u002F传感器\u002F播放器等），必须检查目标页 `aboutToAppear` 是否标记 `async`** — 若是，`build()` 不等其异步操作完成即执行，`onLoad` 中调用的硬件初始化可能在 permission\u002FDB 未就绪时触发。详见 [common_rules.md#6](references\u002Fcommon_rules.md#6)。\n- **如果目标页硬件工具类为 singleton（`getInstance()`），需检查其 `release()`\u002F`close()` 方法是否有防重入保护** — 热启动时两次调用 `releaseCamera` 可能互相干扰。详见 [code_exploration.md#第3层](references\u002Fcode_exploration.md#第3层)。\n- **如果生成的是 `@InsightIntentForm`，必须严格执行 [insight_intent_form.md#核心规则](references\u002Finsight_intent_form.md#核心规则) 中的完整实现清单**（含 `onAddForm` 同步约束、`DataProvider`\u002F`FormRegistry` 文件读写、轮询兜底、主应用推送等）。\n\n### 6. 写入文件 & 配置\n\n👉 必须阅读：[write_file_guide.md](references\u002Fwrite_file_guide.md)\n\n- **新增文件**：在 `entry\u002Fsrc\u002Fmain\u002Fets\u002Finsightintents\u002F` 下创建 `.ets` 文件，并更新 `insight_intent.json`（对象数组格式）。\n- **修改现有文件**（如添加 `@InsightIntentPage`）：直接编辑，**无需**更新 `insight_intent.json`。\n- 写入前使用 `AskUserQuestion` 工具征求用户同意。\n\n### 7. 代码逻辑自检\n\n- 逐项对照 [troubleshooting.md](references\u002Ftroubleshooting.md) 中的所有检查点\n- 结合 [common_rules.md](references\u002Fcommon_rules.md) 和对应装饰器文档，验证生成的代码\n- 确保没有遗留任何已知的编译或运行时错误\n- **运行时场景自检（@InsightIntentEntry 页面跳转型 + @InsightIntentFunctionMethod 必须）**：\n  - **冷启动**：应用未运行 → 调用意图 → 页面正确显示 + 功能正常\n  - **热启动（同 URL）**：应用在前台（目标页已打开）→ 调用意图（目标页相同）→ 页面无需重建但功能正常（尤其硬件类功能如相机\u002F传感器\u002F播放器）\n  - **热启动（不同 URL）**：应用在前台 → 调用意图（目标页不同）→ 新页面正确加载 + 功能正常\n  - 验证通过标准：三场景均无崩溃、白屏、功能缺失\n- **空白页面检查（@InsightIntentEntry 页面跳转型 + @InsightIntentPage）**：\n  - ☐ 若意图使用 `loadContent` 加载目标页，确认目标页的 `aboutToAppear` 中已完成数据初始化，字段初始值不为 `undefined`（应为 `''`、`0`、`[]` 等安全空值）\n  - ☐ 若目标页依赖 `router.getParams()`，已改用 AppStorage 或静态类传递数据，并确保字段初始化时不依赖 `router.getParams()`\n\n------\n\n## 常见问题\n\n- 意图未生效 → 检查 `insight_intent.json` 配置及文件路径。\n- 编译错误 `Schema validate failed` → `compileSdkVersion` 格式与 `compatibleSdkVersion` 不一致。\n- 运行时 16000001 → `abilityName` 与 `module.json5` 中的 Ability 名称不匹配。\n- 更多错误参考 [troubleshooting.md](references\u002Ftroubleshooting.md)。\n\n------\n\n## 子文档索引\n\n| 文档                                                         | 内容                                                         |\n| :----------------------------------------------------------- | :----------------------------------------------------------- |\n| [common_rules.md](references\u002Fcommon_rules.md)                | **公共规则**：ArkTS 严格模式、返回值规范、字段命名、冷启动约束、导入规范 |\n| [project_config_checks.md](references\u002Fproject_config_checks.md) | `build-profile.json5` 完整检查流程、格式一致性               |\n| [architecture_checks.md](references\u002Farchitecture_checks.md)  | Navigation vs Router 识别、参数传递方案                      |\n| [code_exploration.md](references\u002Fcode_exploration.md)        | **分层探索协议**、冷启动窗口恢复模板、EntryAbility 兼容性检查清单 |\n| [decorator_selection.md](references\u002Fdecorator_selection.md)  | 装饰器选择决策树、场景匹配、降级路径（完整版）               |\n| [arkts_strict_rules.md](references\u002Farkts_strict_rules.md)    | ArkTS 严格模式详细版（common_rules.md 的扩展）               |\n| [write_file_guide.md](references\u002Fwrite_file_guide.md)        | 文件写入流程、`insight_intent.json` 配置                     |\n| [write_config_file.md](references\u002Fwrite_config_file.md)      | `insight_intent.json` 配置格式详细说明                       |\n| [jsonschema_reference.md](references\u002Fjsonschema_reference.md) | JSON Schema 参数定义参考                                     |\n| [troubleshooting.md](references\u002Ftroubleshooting.md)          | 编译错误、运行时错误解决方案                                 |\n| [llm_writing_guide.md](references\u002Fllm_writing_guide.md)      | `llmDescription` 和 `keywords` 编写规范                      |\n| [insight_intent_*.md](references\u002F)                           | 各装饰器详细规范（entry, link, page, function, form, entity） |\n\n## 相关资源\n\n### 官方文档\n- [标准意图接入规范](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-access-specifications) — 包含所有标准意图的 schema、domain、参数和返回值定义\n- [标准意图开发步骤](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-decorator-development#%E9%80%9A%E8%BF%87%E6%84%8F%E5%9B%BE%E8%A3%85%E9%A5%B0%E5%99%A8%E5%BC%80%E5%8F%91%E6%A0%87%E5%87%86%E6%84%8F%E5%9B%BE)\n- [意图调试工具](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-debug)\n- [通过小艺触发意图调试](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Fintents-skill-all-rec-dp-self-validation-decorator)\n\n### 调试技巧\n\n1.**启用详细日志**：\n\n```typescript\nconst LOG_TAG: string = 'MyIntent';\nhilog.debug(0x0000, LOG_TAG, 'Debug info: %{public}s', data);\n```\n\n2.**使用 DevEco Studio 调试器**：在 `onExecute()` 等方法中设置断点，查看执行器实例的属性值。\n\n3.**检查意图注册**：查看 `insight_intent.json` 配置，确认文件路径正确。\n\n4.**测试意图调用**：使用[意图调试工具](https:\u002F\u002Fdeveloper.huawei.com\u002Fconsumer\u002Fcn\u002Fdoc\u002Fharmonyos-guides\u002Finsight-intent-debug)测试，检查日志输出，验证返回结果。",{"name":5,"license":15,"description":24},"Generates OpenHarmony intent decorator code from user requirements with automatic decorator selection.\nUse when the user mentions \"intent\", \"@InsightIntent\", or needs to integrate app functionality with AI entry points.\nProvides decorator selection decision tree, parameter validation, build config checking, and compilation verification with auto-fix.\n","main","581098187aec1258c6d9e65e1b9866c2e7381167","skills\u002Fharmonyos\u002Fdevelopment\u002Fability\u002Fhmos-ability-insight-intent-generator",0,"https:\u002F\u002Fgithub.com\u002FIsKenKenYa\u002Fskills","https:\u002F\u002Fgithub.com\u002FIsKenKenYa","是小啃啃呀-一个初学者，中国开源共享推动者之一。\r\n未来，会涉及OpenHarmony、HarmonyOS（部分应用开源）、Android Open Sources Project等。\r\n\r\n目前正在学习中，欢迎友善的讨论。","2026-10-08 01:02:25",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add IsKenKenYa\u002Fskills --skill hmos-ability-insight-intent-generator",{"tool":39,"command":40},"bunx","bunx skills add IsKenKenYa\u002Fskills --skill hmos-ability-insight-intent-generator",{"tool":42,"command":43},"pnpm","pnpm dlx skills add IsKenKenYa\u002Fskills --skill hmos-ability-insight-intent-generator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FIsKenKenYa\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fharmonyos\u002Fdevelopment\u002Fability\u002Fhmos-ability-insight-intent-generator\u002FSKILL.md",true,[],[48,56,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":52,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M75ZN00W20TC7TJ40TDM7E4X","writing-for-agents","为 agent 撰写文档。当创建或编辑 skill、修改 AGENTS.md 或 CLAUDE.md 时使用。","GPL-3.0","https:\u002F\u002Fgithub.com\u002FIsKenKenYa\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":52,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M75ZMZ63RYMNRTPEXW5T82S6","wait-what","停。上一条消息没讲明白：换个说法再讲一遍。","https:\u002F\u002Fgithub.com\u002FIsKenKenYa\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fwait-what\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":52,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M75ZMXZT6MGCGFMKRTM6V6GW","to-questionnaire","把你无法独自回答的决策转化成一份问卷，交给别人填写。","https:\u002F\u002Fgithub.com\u002FIsKenKenYa\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fto-questionnaire\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":52,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M75ZMWQGNJW3E592V94ZYJMX","teach","在当前工作区内，教会用户一项新 skill 或概念。","https:\u002F\u002Fgithub.com\u002FIsKenKenYa\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fteach\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":52,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M75ZMVQREJR3YDK0XED9AJHB","handoff","把当前对话压缩成一份交接（handoff）文档，供另一个代理接手。","https:\u002F\u002Fgithub.com\u002FIsKenKenYa\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fhandoff\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":52,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M75ZMTQAAFGA7QH26WK9Z936","grilling","就一个计划、决策或想法对用户进行无情的访谈。当用户想压力测试自己的思路，或使用任何 'grill' 触发短语时使用。","https:\u002F\u002Fgithub.com\u002FIsKenKenYa\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fgrilling\u002FSKILL.md",[],[]]