Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计异常

generate-interface-uml生成接口 uml

Agent Skill

generate-interface-uml 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

759

周安装

31

GitHub Stars

18

下载量

246
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:generate-interface-uml(生成接口 uml)
来源仓库:https://github.com/openharmonyinsight/openharmony-skills
仓库路径:skills/generate-interface-uml
安装命令:
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill generate-interface-uml
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill generate-interface-uml

简介

generate-interface-uml 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 当前顶部介绍为空,原始 SKILL.md 摘录未提供。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Interface UML Generator

This skill helps generate PlantUML sequence diagrams and class diagrams for new interfaces, based on existing similar interfaces in the codebase.

When to Use

User wants to create UML diagrams (sequence diagrams, class diagrams) for:

  • New API interfaces
  • New method implementations
  • Interface call chains
  • IPC communication flows

Workflow

Step 1: Gather Basic Information

Start with what the user provides (often just an interface name), then ask questions to collect:

Essential Information:

  1. Interface name(s) - e.g., AddGlocalBlackList, RemoveGlocalBlackList
  2. Parameters - What are the input parameters and their types?
  3. Return type - What does the interface return?
  4. Reference interface - Is there an existing similar interface to use as a template?

Optional Information (ask if needed): 5. Output directory - Where should the PlantUML files be saved? 6. Diagram types - Sequence diagram? Class diagram? Both? 7. Call chain destination - Which class/method does it ultimately call?

Step 2: Analyze Reference Interface

Search the codebase for the reference interface to understand the call chain:

# Find the reference interface implementation
grep -r "SetFocusAppInfo" --include="*.h" --include="*.cpp"

Key files to examine:

  • Client-side interfaces: RSInterfaces, RSRenderInterface
  • IPC layer: RSIClientToRenderConnection, RSClientToRenderConnection
  • Service-side: RSRenderPipelineAgent, RSMainThread
  • Target class: Where the interface ultimately executes

Step 3: Generate PlantUML Diagrams

Sequence Diagram Template

@startuml InterfaceName序列图
title InterfaceName 接口调用时序图

autonumber
skinparam maxMessageSize 150
skinparam boxPadding 10

actor "客户端应用" as Client
box "客户端进程 (Client Process)" #LightBlue
    participant "RSInterfaces" as RSInterfaces
    participant "RSRenderInterface" as RSRenderInterface
    participant "RSRenderPipelineClient\n(IPC Proxy)" as IPCProxy
end box

box "跨进程通信 (IPC)" #LightYellow
    participant "Binder/Hipc\n通信通道" as Binder
end box

box "服务端进程 (Render Service)" #LightGreen
    participant "RSClientToRenderConnection\n(IPC Stub)" as IPCStub
    participant "RSRenderPipelineAgent" as Agent
    participant "RSMainThread" as MainThread
    participant "TargetClass\n(在RSMainThread线程中执行)" as Target
end box

== 客户端调用流程 ==

Client -> RSInterfaces: InterfaceName(params)
activate RSInterfaces

RSInterfaces -> RSRenderInterface: InterfaceName(params)
activate RSRenderInterface

RSRenderInterface -> IPCProxy: InterfaceName(params)
activate IPCProxy

== 跨进程IPC调用 ==

IPCProxy -> Binder: IPC调用\nInterfaceName
activate Binder

Binder -> IPCStub: 接收IPC调用\nInterfaceName
activate IPCStub

== 服务端处理流程 ==

IPCStub -> Agent: InterfaceName(params)
activate Agent

Agent -> Agent: ScheduleMainThreadTask(\nlambda任务)

Agent -> MainThread: PostTask(\n执行InterfaceName)
activate MainThread

MainThread -> Target: TargetMethod(params)
activate Target

note right of Target
    描述具体操作
end note

Target --> MainThread: 返回
deactivate Target

MainThread --> Agent: 任务完成
deactivate MainThread

Agent --> IPCStub: 返回结果\n(ERR_OK)
deactivate Agent

IPCStub --> Binder: 返回IPC结果
deactivate IPCStub

Binder --> IPCProxy: 返回IPC结果
deactivate Binder

IPCProxy --> RSRenderInterface: 返回结果
deactivate IPCProxy

RSRenderInterface --> RSInterfaces: 返回结果
deactivate RSRenderInterface

RSInterfaces --> Client: 返回结果
deactivate RSInterfaces

@enduml

Class Diagram Template

@startuml InterfaceName类图
title InterfaceName系列接口涉及的类关系图

skinparam classAttributeIconSize 0
skinparam class {
    BackgroundColor<<client>> LightBlue
    BackgroundColor<<service>> LightGreen
    BackgroundColor<<static>> LightYellow
    BorderColor Black
}

package "客户端 (Client)" <<client>> {
    class RSInterfaces {
        + {static} GetInstance(): RSInterfaces&
        + InterfaceName(params): ReturnType
        --
        - renderInterface_: RSRenderInterface*
    }

    class RSRenderInterface {
        + InterfaceName(params): ReturnType
        --
        - renderPipelineClient_: RSRenderPipelineClient*
    }

    RSInterfaces --> RSRenderInterface
}

package "IPC通信层" {
    interface RSIClientToRenderConnection {
        + InterfaceName(params, ErrorCode&): ErrCode
    }

    class RSClientToRenderConnection {
        + InterfaceName(params, ErrorCode&): ErrCode
        --
        - renderPipelineAgent_: sptr<RSRenderPipelineAgent>
    }

    RSClientToRenderConnection ..|> RSIClientToRenderConnection
}

package "服务端 (Render Service)" <<service>> {
    class RSRenderPipelineAgent {
        + InterfaceName(params, ErrorCode&): ErrCode
        --
        - rsRenderPipeline_: std::shared_ptr<RSRenderPipeline>
    }

    class RSMainThread {
        + PostTask(RSTask): void
        + ScheduleTask(Task): std::future<Return>
        --
        - mainThreadId_: std::thread::id
    }
}

package "TargetClass (静态类)" <<static>> {
    class TargetClass {
        + {static} TargetMethod(params): void
        --
        - {static} member_: Type
    }
}

RSRenderInterface --> RSIClientToRenderConnection: 通过IPC调用
RSClientToRenderConnection --> RSRenderPipelineAgent
RSRenderPipelineAgent ..> RSMainThread: ScheduleMainThreadTask
RSRenderPipelineAgent ..> TargetClass: 调用静态方法

@enduml

Step 4: Save PlantUML Files

Write the generated PlantUML files to the specified directory:

  • Use descriptive filenames: InterfaceName_sequence.puml, InterfaceName_ClassDiagram.puml
  • Include UTF-8 BOM for Chinese character support if needed
  • Save to user-specified output directory

Step 5: Optional - Create Comparison Diagram

If comparing with existing interfaces, create a comparison diagram showing:

  • Parameter differences
  • Call chain differences
  • Target class differences

Questions to Ask User

  1. Interface names: What are the interface names you want to generate UML for?
  2. Reference interface: Which existing interface should be used as a reference?
  3. Parameters: What are the parameter types for the new interface(s)?
  4. Return type: What should the interface return?
  5. Target class: Which class does the interface ultimately call? (e.g., ScreenSpecialLayerInfo, RSMainThread)
  6. Thread requirement: Does it need to execute in a specific thread? (e.g., RSMainThread thread)
  7. Output directory: Where should the PlantUML files be saved?

Example Usage

User provides:

Generate UML for AddGlocalBlackList, RemoveGlocalBlackList, SetGlocalBlackList

Ask follow-up questions:

  1. "What should be the parameter type?" → const std::vector<NodeId>&
  2. "Which existing interface is similar?" → SetFocusAppInfo
  3. "Which class does it ultimately call?" → ScreenSpecialLayerInfo
  4. "What's the output directory?" → Current code directory

Generate output:

  • AddGlocalBlackList_sequence.puml
  • RemoveGlocalBlackList_sequence.puml
  • SetGlocalBlackList_sequence.puml
  • InterfaceName_ClassDiagram.puml

Tips

  • Use Chinese for diagram titles and notes if the codebase uses Chinese
  • Include autonumber for sequence diagrams
  • Use color coding to distinguish client/service/static layers
  • Add notes to explain key operations
  • Group related steps with == Section Name ==

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.27%
按下载量换算82

Claude

32.45%
按下载量换算80

Cursor

20.43%
按下载量换算50

Gemini CLI

9.51%
按下载量换算23

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills