oh-pdd-code-generator
✓基于设计文档自动生成鸿蒙系统代码框架,包括 IDL 接口定义、目录结构、头文件、源文件模板、构建配置等。生成前会分析 OpenHarmony 存量代码,学习现有代码风格和架构规范。适用于用户请求:(1) 生成代码框架, (2) 创建 IDL 接口, (3) 生成 BUILD.gn 配置, (4) 创建服务代码, (5) 初始化项目结构, (6) 参考现有代码风格。关键词:code generation, IDL, BUILD.gn, bundle.json, SA profile, OpenHarmony code style, 代码生成, 接口定义, 构建配置, OH代码风格
Installation
SKILL.md
| 类命名 | class.Service | 服务类命名 | | 命名空间 | namespace. | 命名空间组织 | | 日志标签 | HiLogLabel | 日志使用方式 | | 错误码 | ERROR.=.[0-9] | 错误码分配 | | 宏定义 | #define.ENABLE | 条件编译开关 | | 初始化函数 | bool Init\(\) | 初始化模式 | | 清理函数 | void.Release\(\) | 资源清理模式 |
| 类名 | 大驼峰 + 后缀 | DiskInfoService | | 方法名 | 大驼峰 | GetDiskList() | | 成员变量 | 小驼峰 + 下划线后缀 | mutex, inited | | 命名空间 | 小写双冒号分隔 | OHOS::DiskManagement | | 文件名 | 小写下划线 | diskinfoservice.cpp | | 宏定义 | 大写下划线 | DISKMANAGEMENTFORMATENABLE |
| HiLog | hilog:libhilog | 日志输出 | | cutils | cutils:utils | C 工具函数 | | ipccore | ipccore:ipccore | IPC 通信 | | AccessToken | accesstoken:libaccesstoken | 权限管理 | | HiSysEvent | hisysevent:libhisysevent | 事件上报 | | HiTrace | hitracenative:hitracemeter | 链路追踪 |
Facts (cite-ready)
Stable fields and commands for AI/search citations.
- Install command
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill oh-pdd-code-generator- Category
- </>Dev Tools
- Verified
- ✓
- First Seen
- 2026-02-11
- Updated
- 2026-02-18
Quick answers
What is oh-pdd-code-generator?
基于设计文档自动生成鸿蒙系统代码框架,包括 IDL 接口定义、目录结构、头文件、源文件模板、构建配置等。生成前会分析 OpenHarmony 存量代码,学习现有代码风格和架构规范。适用于用户请求:(1) 生成代码框架, (2) 创建 IDL 接口, (3) 生成 BUILD.gn 配置, (4) 创建服务代码, (5) 初始化项目结构, (6) 参考现有代码风格。关键词:code generation, IDL, BUILD.gn, bundle.json, SA profile, OpenHarmony code style, 代码生成, 接口定义, 构建配置, OH代码风格 Source: openharmonyinsight/openharmony-skills.
How do I install oh-pdd-code-generator?
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill oh-pdd-code-generator Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor
Where is the source repository?
https://github.com/openharmonyinsight/openharmony-skills
Details
- Category
- </>Dev Tools
- Source
- skills.sh
- First Seen
- 2026-02-11