← 返回 Skills 市场
junwugit

learn-skill

作者 John Do · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
63
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install learn-skill
功能描述
Analyze and learn any newly installed skill through two-layer Mermaid diagrams. Use when: user asks to parse/analyze a new skill, understand skill structure,...
使用说明 (SKILL.md)

Learn Skill - 通用技能分析工具

解析任意 Skill 的功能结构,生成可视化的双层架构图表。

核心方法:两层架构分析法

层次 关注点 产出物
规划层 技能定位、边界、输入要求 决策 flowchart、mindmap
绘制层 功能分解、用户交互、API调用 架构图、时序图、提问样例

使用方法

Step 1: 读取目标 Skill 的 SKILL.md

首先读取待分析技能的 SKILL.md 文件,了解其:

  • description - 技能描述和触发场景
  • 功能列表和命令示例

Step 2: 生成两层分析

根据 SKILL.md 内容,生成两层架构图表:

第一层(规划层):

flowchart TB
    A["🔍 用户请求"] --> B{类型判断}
    B -->|匹配技能| C[✅ 使用该 Skill]
    B -->|不匹配| D[❌ 不适用]
    C --> E["📍 输入要求"]
    E --> F["调用 API/工具"]
    F --> G["返回结果"]
    
    style C fill:#00d9ff,color:#000
    style D fill:#ff6b6b,color:#fff

第二层(绘制层):

  • 用户提问样例 flowchart
  • 核心功能架构图(命令类型 → 输出格式 → 格式化代码)
  • 完整交互时序图

Step 3: 输出 HTML 报告

生成包含所有图表的 HTML 文件供用户查看。

HTML 输出规范(确保文字清晰可见):

  • 页面背景使用深色渐变时,正文文字使用浅色 #eee 或白色
  • 表格使用白色背景 #fff + 深色文字 #1a1a2e 提供高对比度
  • 代码块使用浅色背景(如 rgba(0,217,255,0.15))+ 深色文字
  • 标题使用渐变色或亮色(#00d9ff, #00ff88)确保与背景区分
  • 图表容器使用白色背景避免与深色页面混色

示例:Weather Skill 分析

下面以 Weather Skill 为例,展示两层架构的完整输出。

第一层:规划层 - 技能定位与适用范围

flowchart TB
    A["🔍 用户查询天气"] --> B{查询类型判断}
    
    B -->|天气/温度/预报| C[✅ 使用 Weather Skill]
    B -->|历史数据| D[❌ 不适用]
    B -->|气候趋势分析| D
    B -->|极端天气警报| D
    B -->|航空/航海气象| D
    
    C --> E["📍 需要提供位置"]
    E --> F["城市名/地区/机场代码"]
    F --> G["调用 wttr.in API"]
    G --> H["返回天气数据"]
    
    style C fill:#00d9ff,color:#000
    style D fill:#ff6b6b,color:#fff
mindmap
  root((Weather Skill))
    适用场景
      当前天气查询
      温度询问
      降雨预测
      未来天气预报
      出行天气规划
    不适用场景
      历史天气数据
      气候趋势分析
      极端天气警报
      专业气象服务
    数据来源
      wttr.in
      Open-Meteo
    特殊要求
      需要提供位置信息
      支持城市名/机场码
      无需API密钥

第二层:绘制层 - 核心功能架构与提问样例

💬 用户提问样例

flowchart LR
    Q1["❓ '北京今天天气怎么样?'"] 
    Q2["❓ '东京明天会下雨吗?'"]
    Q3["❓ '上海周末温度多少?'"]
    Q4["❓ '伦敦下周天气预报'"]
    
    Q1 -->|城市+时间| R1["当前天气查询"]
    Q2 -->|城市+时间+降水| R2["降雨预测查询"]
    Q3 -->|城市+时间段| R3["周末预报查询"]
    Q4 -->|城市+时间范围| R4["周预报查询"]

⚙️ 核心功能架构

flowchart LR
    subgraph 命令类型
        A1["当前天气 curl wttr.in/London?format=3"] 
        A2["3天预报 curl wttr.in/London"]
        A3["一周预报 curl wttr.in/London?format=v2"]
        A4["指定日期 curl wttr.in/London?1"]
    end
    
    subgraph 输出格式
        B1["单行摘要 format=3"]
        B2["详细条件 ?0"]
        B3["JSON输出 format=j1"]
        B4["PNG图片 .png"]
    end
    
    subgraph 格式化代码
        C1["%l 位置"]
        C2["%c 天气状况"]
        C3["%t 温度"]
        C4["%f 体感温度"]
        C5["%w 风速"]
        C6["%h 湿度"]
        C7["%p 降水量"]
    end
    
    A1 --> B1
    A2 --> B2
    A3 --> B3
    A4 --> B4
    
    B1 --> C1
    B1 --> C2
    B1 --> C3

时序图 - 完整交互流程

sequenceDiagram
    participant U as 用户
    participant A as Agent
    participant W as wttr.in API
    
    U->>A: "伦敦天气怎么样?"
    A->>A: 识别为天气查询请求
    A->>W: curl "wttr.in/London?format=j1"
    W->>A: 返回JSON天气数据
    A->>A: 解析数据提取关键信息
    A->>U: 格式化回复 🌤️ 伦敦: 18°C 感觉像: 16°C 西风 12km/h 湿度 65%
    
    U->>A: "明天会下雨吗?"
    A->>W: curl "wttr.in/London?format=%p"
    W->>A: 返回降水信息
    A->>U: 降水概率回复

输出模板

当用户要求分析新 Skill 时,按以下格式组织输出:

# {Skill名称} 分析

## 第一层:规划层 - 技能定位与适用范围
[flowchart + mindmap]

## 第二层:绘制层 - 核心功能架构与提问样例
[用户提问样例 flowchart]
[核心功能架构图]
[时序图]

相关资源

  • Mermaid 图表语法mermaid-diagrams Skill
  • 技能创建规范skill-creator Skill
安全使用建议
This skill is coherent and low-risk: it only describes reading a target SKILL.md and producing diagrams/HTML. Before running it, confirm (1) the agent is only allowed to read the specific SKILL.md you want analyzed (not arbitrary filesystem locations), (2) you are comfortable with the agent writing the generated HTML somewhere accessible, and (3) the agent is not configured to automatically execute example network commands shown in the documentation. If you want extra safety, run the analysis in a sandboxed agent or restrict its file- and network-access permissions.
功能分析
Type: OpenClaw Skill Name: learn-skill Version: 1.0.0 The learn-skill bundle is a documentation utility designed to analyze other OpenClaw skills and generate visual architectural reports using Mermaid diagrams. The SKILL.md file provides structured instructions for the agent to parse skill metadata and create flowcharts, mindmaps, and sequence diagrams without any high-risk behaviors or unauthorized data access.
能力评估
Purpose & Capability
Name and description match the behavior in SKILL.md. The skill is instruction-only and claims to parse SKILL.md to produce two-layer Mermaid diagrams and an HTML report — it does not request unrelated binaries, env vars, or credentials.
Instruction Scope
Runtime instructions explicitly say to read the target skill's SKILL.md and generate diagrams and an HTML report. That scope is appropriately narrow. Notes: the document contains example curl/network calls (wttr.in) and references other skills (mermaid-diagrams, skill-creator) as resources — these are examples/suggestions rather than mandatory behavior. You should confirm the agent is configured to only read the intended SKILL.md and not to escalate to reading other files or sending arbitrary network traffic.
Install Mechanism
No install spec and no code files are present (instruction-only). Nothing is downloaded or written by the skill itself beyond the agent performing the document parsing and generating output — this is the lowest-risk installation mode.
Credentials
The skill requires no environment variables, credentials, or config paths. That aligns with the stated purpose of parsing SKILL.md and rendering diagrams.
Persistence & Privilege
always is false and the skill does not request persistent or elevated privileges. It does not attempt to modify other skills' configs or system-wide settings in its instructions.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install learn-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /learn-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of learn-skill. - Allows analysis and visualization of any installed skill using two-layer Mermaid diagrams. - Supports structured outputs: flowcharts, mindmaps, architecture, and sequence diagrams. - Designed for use when users want to parse, analyze, or understand a new skill. - Provides an HTML report with clear visual and formatting standards. - Includes sample analysis for a Weather Skill to demonstrate method and output.
元数据
Slug learn-skill
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

learn-skill 是什么?

Analyze and learn any newly installed skill through two-layer Mermaid diagrams. Use when: user asks to parse/analyze a new skill, understand skill structure,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 63 次。

如何安装 learn-skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install learn-skill」即可一键安装,无需额外配置。

learn-skill 是免费的吗?

是的,learn-skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

learn-skill 支持哪些平台?

learn-skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 learn-skill?

由 John Do(@junwugit)开发并维护,当前版本 v1.0.0。

💬 留言讨论