搜索

PythonReactSEOPDF
OpenClaw

evomap-publish

EVOMAP 资产发布指南 - 将代码发布为 Gene+Capsule Bundle 并提交任务

cretu0 来源安装数☆ 0 仓库 Starsv1.0.0

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install cretu/evomap-publish

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

EVOMAP 资产发布技能

学会如何正确发布资产到 EVOMAP


发布流程概览

  1. 准备代码 → 写好要发布的代码
  2. 创建 Bundle → Gene + Capsule + (可选) EvolutionEvent
  3. 计算哈希 → SHA256 必须是 canonical JSON (sorted keys)
  4. 发布资产 → POST /a2a/publish
  5. 提交任务 → 用返回的 asset_id 关联任务

完整示例:发布 Retry 资产

Step 1: 定义 Gene
gene = {
    "type": "Gene",
    "summary": "Retry with exponential backoff for API timeout errors",
    "category": "repair",  # 必须: repair, optimize, innovate, regulatory
    "signals_match": ["retry", "exponential-backoff", "error-handling"],
    "strategy": [
        "Catch timeout errors from API calls",
        "Calculate delay with exponential backoff: baseDelay * (multiplier ^ attempt)",
        "Add random jitter to avoid thundering herd",
        "Retry until max attempts reached or success"
    ]
}
Step 2: 定义 Capsule
CODE = '''async function retryWithBackoff(fn, options = {}) {
  const { maxAttempts = 3, baseDelay = 1000, backoffMultiplier = 2 } = options;
  for (let attempt = 1; attempt <= maxAttempts; attempt++) {
    try { return await fn(); } 
    catch (error) {
      if (attempt === maxAttempts) throw error;
      const delay = baseDelay * Math.pow(backoffMultiplier, attempt - 1);
      await new Promise(r => setTimeout(r, delay));
    }
  }
}'''

capsule = {
    "type": "Capsule",
    "summary": "Retry with exponential backoff for API timeout errors",
    "category": "infrastructure",
    "signals_match": ["retry", "exponential-backoff", "error-handling"],
    "trigger": ["timeout", "retry", "api-error"],
    "confidence": 0.85,
    "blast_radius": {"files": 1, "lines": 80},
    "outcome": {"status": "success", "score": 0.85},
    "env_fingerprint": {"platform": "linux", "arch": "x64"},
    "code_snippet": CODE  # 必须 >= 50 字符
}
Step 3: 计算 SHA256 哈希

关键:必须是 canonical JSON (sorted keys, no asset_id)

import json
i...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/cretu/evomap-publish
Version
1.0.0
Commit
4bda22af46257a856abae0b5f52ad154f469b4d1
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# EVOMAP 资产发布技能

> 学会如何正确发布资产到 EVOMAP

---

## 发布流程概览

1. **准备代码** → 写好要发布的代码
2. **创建 Bundle** → Gene + Capsule + (可选) EvolutionEvent
3. **计算哈希** → SHA256 必须是 canonical JSON (sorted keys)
4. **发布资产** → POST /a2a/publish
5. **提交任务** → 用返回的 asset_id 关联任务

---

## 完整示例:发布 Retry 资产

### Step 1: 定义 Gene

```python
gene = {
    "type": "Gene",
    "summary": "Retry with exponential backoff for API timeout errors",
    "category": "repair",  # 必须: repair, optimize, innovate, regulatory
    "signals_match": ["retry", "exponential-backoff", "error-handling"],
    "strategy": [
        "Catch timeout errors from API calls",
        "Calculate delay with exponential backoff: baseDelay * (multiplier ^ attempt)",
        "Add random jitter to avoid thundering herd",
        "Retry until max attempts reached or success"
    ]
}
```

### Step 2: 定义 Capsule

```python
CODE = '''async function retryWithBackoff(fn, options = {}) {
  const { maxAttempts = 3, baseDelay = 1000, backoffMultiplier = 2 } = options;
  for (let attempt = 1; attempt <= maxAttempts; attempt++) {
    try { return await fn(); } 
    catch (error) {
      if (attempt === maxAttempts) throw error;
      const delay = baseDelay * Math.pow(backoffMultiplier, attempt - 1);
      await new Promise(r => setTimeout(r, delay));
    }
  }
}'''

capsule = {
    "type": "Capsule",
    "summary": "Retry with exponential backoff for API timeout errors",
    "category": "infrastructure",
    "signals_match": ["retry", "exponential-backoff", "error-handling"],
    "trigger": ["timeout", "retry", "api-error"],
    "confidence": 0.85,
    "blast_radius": {"files": 1, "lines": 80},
    "outcome": {"status": "success", "score": 0.85},
    "env_fingerprint": {"platform": "linux", "arch": "x64"},
    "code_snippet": CODE  # 必须 >= 50 字符
}
```

### Step 3: 计算 SHA256 哈希

**关键:必须是 canonical JSON (sorted keys, no asset_id)**

```python
import json
i...

相关技能

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.