← 返回
未分类 Key

Automatic Skill

每日 Skill 自动工厂 — 让 openclaw 和 Claude 完全自主地调研、设计、生成、测试并发布全新 skill,全程零人工介入。内置 10 阶段流水线(Research → Design → SEO → Create → Review → Self-Run → Self-Check → Uploa...
每日技能自动工厂——让OpenClaw和Claude完全自主地完成调研、设计、生成、测试并发布全新技能,全程无需人工介入。内置十阶段流水线(Research → Design → SEO → Create → Review → Self‑Run → Self‑Check → Upload)。
cosmofang
未分类 clawhub v1.4.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 425
下载
💾 0
安装
1
版本
#latest

概述

Automatic Skill — 每日 Skill 自动工厂

> 每天凌晨自动调研 → 设计 → 制作 → 审核 → 自测 → 发布 → 复查,全程无需人工介入(发布阶段使用你自己的 GitHub/clawHub 凭证)


⚠️ Credentials

Stages 1–7 use zero credentials. Only Stage 8 (Upload) and beyond touch your accounts.

StageActionCredentialWhat gets written
---------------------------------------------
1–7Research, Design, SEO, Create, Review, Self-Run, Self-CheckNoneLocal files only
8agh repo create / --publicGITHUB_TOKENNew public repo on your GitHub account
8bgit push to GITHUB_REPOGITHUB_TOKENNew commits to the monorepo you set
8cclawhub publishCLAWHUB_TOKENSkill listed publicly under your clawHub account
9–10Verify, Final ReviewGITHUB_TOKEN (read-only gh api)Nothing — read-only checks
CronDaily auto-run (push-toggle on)NoneRegisters a local cron job via openclaw cron

Does NOT:

  • Read, transmit, or log credentials
  • Access repos or accounts other than the ones you configure
  • Execute network operations from scripts — all network actions go through gh CLI and clawhub CLI under your control
  • Run Stage 8 in --dry-run mode (safe for testing entire pipeline without publishing)

Minimum token scopes:

  • GITHUB_TOKEN: fine-grained PAT → single repo → Contents: Read & write only
  • CLAWHUB_TOKEN: keep in shell env (~/.zshrc), never commit to any file

Purpose & Capability

automatic-skill 是一个元技能(meta-skill),它的能力是制造其他 skill。

架构说明(重要): 每个阶段脚本是"prompt generator" — 脚本本身不执行任何业务逻辑,只输出结构化 prompt。真正的执行者是 agent(Claude)。网络操作(GitHub push、clawHub publish)均由 agent 调用 gh CLI 和 clawhub CLI 完成,凭证完全在你的机器上。

核心能力:

能力说明
------------
全流水线生成从"想法"到"上线":Research → Design → SEO → Create → Review → Self-Run → Self-Check → Upload → Verify → Final Review
每日自动选题凌晨 02:00 cron 自动触发,选最高价值 idea,跑完整流程
手动触发指定 --idea 手动选题,或单独跑某一阶段调试
dry-run 模式--dry-run:执行到 Stage 7 自检后停止,不发起任何网络操作
已有 skill 迭代对现有 skill 单独跑 SEO / self-check / upload 阶段进行升级

能力边界(不做的事):

  • 不直接写 skill 源码(源码由 agent 根据 create 阶段 prompt 生成)
  • 不并发生成多个 skill(每次运行产出一个)
  • 不访问或修改除 GITHUB_REPOSKILL_OUTPUT_DIR 以外的任何路径或账号

Instruction Scope

在 scope 内(会处理):

  • "帮我自动生成一个 skill" / "skill 流水线跑了没" / "今天出了什么新 skill"
  • 手动触发全流水线或单阶段重跑(如"重跑 SEO 阶段")
  • 查看流水线状态和历史日志(status.js
  • 开关每日定时任务(push-toggle on/off
  • 用 automatic-skill 迭代已有 skill(对现有 skill 升级 / SEO 优化 / 自检 / 上传)

不在 scope 内(不处理):

  • 直接编写 skill 源码(源码由 agent 执行 create 阶段 prompt 生成,非 automatic-skill 职责)
  • 管理 GitHub 仓库权限、clawHub 账户设置、或任何账户级操作
  • 生成非 openclaw skill 格式的内容(普通项目、应用代码等)
  • 在未设置 GITHUB_TOKEN / GITHUB_REPO / CLAWHUB_TOKEN 的环境中执行 Stage 8(会提示缺少凭证,不会静默失败)

凭证缺失时的行为:

  • Stages 1–7:无需凭证,正常运行
  • Stage 8 upload:缺少任意必需凭证 → 打印具体缺失变量名 + 配置指引,停止执行(不静默失败)
  • --dry-run:完整跳过 Stage 8,可安全在无凭证环境测试前七个阶段

Persistence & Privilege

持久化写入的内容:

路径内容触发条件
---------------------
SKILL_OUTPUT_DIR//生成的 skill 文件Stage 4 Create
data/current-pipeline.json当前流水线运行状态(临时)每次流水线运行
data/pipeline-log.json历次运行历史(追加写入)Stage 10 Final Review
~/.openclaw/crontab(或系统 cron)每日定时任务条目push-toggle on 时写入,off 时删除

不写入的路径:

  • 不修改 shell 配置文件(~/.zshrc 等)
  • 不写入 GITHUB_TOKEN / CLAWHUB_TOKEN 等凭证到任何文件
  • 不在 SKILL_OUTPUT_DIR 之外创建文件(除 data/ 目录)

权限级别:

  • 运行时以当前用户身份执行,不需要 sudo 或提权
  • gh CLI 和 clawhub CLI 的权限上限由你配置的 token 范围决定
  • 如需撤销所有权限:push-toggle off(删除 cron)+ 在 GitHub/clawHub 吊销对应 token

Install Mechanism

标准安装(推荐)

从 clawHub 安装到 openclaw workspace:

clawhub install automatic-skill
# 安装路径:~/.openclaw/workspace/skills/automatic-skill/

手动安装

从本地源码目录复制:

cp -r /path/to/automatic-skill ~/.openclaw/workspace/skills/automatic-skill/

验证安装

ls ~/.openclaw/workspace/skills/automatic-skill/scripts/
node ~/.openclaw/workspace/skills/automatic-skill/scripts/status.js
# 应输出:No active pipeline run. / pipeline-log.json 状态

安装后配置

在 shell 环境中设置以下变量(写入 ~/.zshrc~/.bashrc):

export GITHUB_TOKEN=<your-github-token>          # repo write scope
export GITHUB_REPO=<owner/repo>                  # e.g. Cosmofang/openclaw-skills
export CLAWHUB_TOKEN=<your-clawhub-token>
export CLAWHUB_OWNER_ID=<your-owner-id>          # optional
export SKILL_OUTPUT_DIR=~/.openclaw/workspace/skills  # optional, this is the default

然后验证认证:

gh auth status        # 应显示 ✓ Logged in
clawhub whoami        # 应返回你的用户名

启用每日自动运行

node scripts/push-toggle.js on
# 注册 cron:每天 02:00 自动跑 daily-pipeline.js

何时使用

  • 用户说"帮我自动生成一个 skill"/"今天有新 skill 吗"/"skill 流水线跑了没"
  • 用户想查看今日生成的 skill 是什么
  • 用户想手动触发某一阶段重跑
  • 用户想查看生成历史或当前流水线状态
  • 用户想用 automatic-skill 迭代/升级/上传某个现有 skill

🔄 10-Stage Pipeline

#StageScriptDescription
-------------------------------
1Researchresearch.jsScan trends, identify skill gaps, output Top-3 ideas
2Designdesign.js Produce full architecture: file tree, script specs, data schema
3SEOseo.jsOptimize display name, tagline, description, 30+ keywords
4Createcreate.jsGenerate all files using design + SEO output
5Reviewreview.js Quality checklist: structure, scripts, content, security
6Self-Runself-run.js Execute every script, verify zero errors
7Self-Checkself-check.js Validate required fields, file tree, script signatures
7.5Safety Checkscan-check.js Pre-upload credential-safety gate; blocks upload if issues found
8Uploadupload.js Create standalone repo + push monorepo; clawhub publish
9Verifyverify-upload.js Confirm live on GitHub and clawHub
10Final Reviewfinal-review.js Full report, write to pipeline-log.json

📦 Publishing Convention

Skill Standard Sections

Every skill generated or uploaded by automatic-skill must include all five of the following sections in its SKILL.md, in this order:

#SectionRequired content
-----------------------------
1## Purpose & CapabilityCore concept + capability table + explicit "Does NOT" boundary
2## Instruction ScopeIn-scope examples + out-of-scope list + behavior on missing credentials
3## CredentialsAction/Credential/Scope table (or "no credentials required") — no hardcoded tokens
4## Persistence & PrivilegePaths-written table + "Does NOT write" list + uninstall instructions
5## Install Mechanismclawhub install command + verification step + env var examples

Stage 7 (self-check.js) validates all five sections before allowing upload. Missing or empty section = NEEDS_FIX.

GitHub Distribution

Every skill uploaded by automatic-skill must have both:

DestinationPurposeCommand
-------------------------------
/ (standalone repo)Users can search and find the skill directly on GitHubgh repo create / --public → push skill files
GITHUB_REPO/openclaw/agents/skills// (monorepo)Registry index — all skills listed in one placegit add openclaw/agents/skills// → push

Stage 8 always runs standalone repo creation first, then monorepo push.

If the standalone repo already exists, skip creation and force-push the latest files.


🌐 Language Policy

  • SKILL.md content: English (default)
  • Conversation with user: match user's language — Chinese if user writes Chinese
  • JSON logs & reports: English only

🛠️ Usage

# Full pipeline (recommended)
node scripts/pipeline.js                   # auto-select topic, run all stages
node scripts/pipeline.js --idea "daily-poem" # specify topic
node scripts/pipeline.js --dry-run         # run through self-check only, no upload

# Per-stage debug
node scripts/research.js                   # output research prompt
node scripts/design.js "daily-poem"        # output design prompt
node scripts/seo.js --from-pipeline        # output SEO optimization prompt
node scripts/create.js --from-pipeline     # output create prompt
node scripts/review.js /path/skill-dir     # output review prompt
node scripts/self-run.js /path/skill-dir   # output self-run prompt
node scripts/self-check.js /path/skill-dir # output self-check prompt
node scripts/upload.js /path/skill-dir     # output upload prompt (direct push)
node scripts/upload.js --pr /path/skill-dir  # output upload prompt (PR workflow)
node scripts/verify-upload.js skill-name   # output verify prompt (gh api checks)
node scripts/final-review.js skill-name    # output final review prompt

# Status & history
node scripts/status.js                     # current pipeline status
node scripts/status.js --history [N]       # last N runs (default 10)
node scripts/status.js --clear             # clear current pipeline state

# Cron toggle
node scripts/push-toggle.js on             # enable daily 02:00 auto-run
node scripts/push-toggle.js off            # disable
node scripts/push-toggle.js status         # show status

⏰ Cron Setup

openclaw cron add "0 2 * * *" "cd ~/.openclaw/workspace/skills/automatic-skill && node scripts/daily-pipeline.js"
openclaw cron list
openclaw cron delete <job-id>

📁 File Structure

data/
  pipeline-log.json       # append-only history of all pipeline runs
  current-pipeline.json   # transient state during active run
scripts/
  research.js             # stage 1
  design.js               # stage 2
  seo.js                  # stage 3 — SEO optimization
  create.js               # stage 4
  review.js               # stage 5
  self-run.js             # stage 6
  self-check.js           # stage 7
  upload.js               # stage 8
  verify-upload.js        # stage 9
  final-review.js         # stage 10
  pipeline.js             # orchestrator
  daily-pipeline.js       # cron entry point
  status.js               # status query
  push-toggle.js          # cron toggle

⚠️ Notes

  1. Required env vars: GITHUB_TOKEN, GITHUB_REPO, CLAWHUB_TOKEN
  2. Optional: CLAWHUB_OWNER_ID (your clawHub owner ID), SKILL_OUTPUT_DIR (default: ~/.openclaw/workspace/skills)
  3. GitHub operations use the gh CLI (inspired by steipete/github): gh auth status, gh repo view, gh api, gh pr create. Install with brew install gh and run gh auth login before first use.
  4. Stage 8 supports --pr flag for a PR-based GitHub workflow instead of direct push to main.
  5. Stage 9 verifies GitHub state live via gh api repos/{repo}/contents/{path} — no git fetch needed.
  6. Every skill gets a standalone GitHub repo (/) in addition to the monorepo entry — this lets users search and discover skills directly on GitHub
  7. On any stage failure the pipeline stops and logs the error — no partial overwrites
  8. --dry-run stops after self-check, no network operations
  9. Full run history in data/pipeline-log.json
  10. All scripts are prompt generators only — no outbound network requests are made by the scripts themselves

🧪 Test Run Log (2026-04-04)

First full dry-run results:

StageStatusNotes
----------------------
1 ResearchScanned 17 existing skills, identified 5 gaps, selected daily-poem
2 DesignFix: --from-pipeline reads from pipeline.research.selected not top-level
3 SEOAdded in v1.1.0 — produces displayName, tagline, 30+ keywords
4 CreateGenerated 9 files including 4 scripts
5 ReviewScore 97/100, 1 warning (empty data array, expected)
6 Self-Run6 script calls, all passed
7 Self-Check22/22 checks passed, score 100
8 Uploaddry-run skipped — requires GITHUB_TOKEN / GITHUB_REPO / CLAWHUB_TOKEN
9 Verifydry-run skipped
10 Final ReviewArchived to pipeline-log.json

Environment variables:

export GITHUB_TOKEN=<your-token>
export GITHUB_REPO=<owner/repo>
export CLAWHUB_TOKEN=<your-clawhub-token>
export CLAWHUB_OWNER_ID=<your-owner-id>   # optional
export SKILL_OUTPUT_DIR=~/.openclaw/workspace/skills  # optional

Version: 1.4.1 · Created: 2026-04-04 · Updated: 2026-04-09

版本历史

共 1 个版本

  • v1.4.1 当前
    2026-05-03 08:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Robot Id Card

cosmofang
Bot 身份认证标准 — 为 AI Agent 与机器人签发加密身份证书,使网站信任你的 bot。遵循 RFC 9421 HTTP 消息签名标准,兼容 Cloudflare Web Bot Auth 生态。内置 Ed25519 签名注册中心
★ 0 📥 388

Daily Brain

cosmofang
每日脑力训练:逻辑推理、数学速算、记忆挑战、文字谜题,游戏化精美卡片呈现,难度自适应分级,连续打卡追踪。每天一道精选题目锻炼大脑,保持思维敏捷。
★ 0 📥 430

Feishu Cli Setup

cosmofang
分步AI代理指南,用于安装和配置lark-cli(飞书/Lark CLI)。为Claude、Manus和OpenClaw设计,主动引导用户...
★ 0 📥 408