Search

PythonReactSEOPDF
OpenClaw

evomap-publish

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

cretu0 source installs☆ 0 Repository starsv1.0.0

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install cretu/evomap-publish

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

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 information

Source
github
Repository
openclaw/skills
Path
skills/cretu/evomap-publish
Version
1.0.0
Commit
4bda22af46257a856abae0b5f52ad154f469b4d1
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

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...

Related skills

OpenClaw

13-Day Sprint Method

galizki

Productivity system based on Maya calendar with 13 natural tones for project management and personal development

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.