| name | skills-daily-update |
| description | Automated skill update workflow for openagent framework. Fetch skills from Skill Market API, detect git repository updates via commit hash comparison, pack changed skills into zip archives, and publish to Agent Hub via zhub CLI. Use this skill whenever the user mentions updating skills, checking skill updates, syncing skills, daily updates, packaging skills, publishing skills, or comparing if repos have new commits. Also trigger when users say things like '技能更新', '检查技能', '打包上架', or '同步技能'. |
Skills Daily Update
Overview
Automated skill update workflow for openagent framework skills. This skill guides LLM through a deterministic pipeline:
- Fetch skills from Skill Market API
- Check for updates via git commit hash comparison
- Pack changed skills into individual zip archives
- Publish to Agent Hub via zhub CLI
Prerequisites
zhub CLI 0.3.0 or newer installed (npm install -g @zerone-agent/zhub@^0.3.0)
- Logged into Agent Hub via
zhub login --url <server-url> --token cli_xxxx
- Python 3 with the
requests package
Workflow
Execute these steps in order, reviewing outputs at each stage:
Step 1: Fetch Skills
Get current skill list from the API:
python3 scripts/skills_update.py fetch --framework openagent --lang en
Output: JSON array of skill names (e.g., ["skill-market", "superpowers"])
Step 2: Update Configuration
Compare the fetched list with config/repos.json. For any new/unknown skills:
-
Default repo (github.com/Zerone-Agent/agent-use-skills):
"skill-name": {"repo": null, "subdir": "skill-name"}
-
Independent repo:
"skill-name": {"repo": "https://github.com/example/repo.git", "subdir": null}
-
Independent repo with subdir:
"skill-name": {"repo": "https://github.com/example/repo.git", "subdir": "path/to/skill"}
Step 3: Check for Updates
Detect which skills have new commits using local cache:
python3 scripts/skills_update.py check --repos config/repos.json --state state/last_commits.json
How it works:
- First run: clones all repos to
~/.cache/skills-daily-update/repos/
- Subsequent runs: runs
git pull on cached repos (much faster)
- Compares current HEAD commit hash against
state/last_commits.json
- Outputs only changed skills to
state/pack_plan.json
Output: state/pack_plan.json with updated skills
Step 4: Review Plan
Inspect state/pack_plan.json to confirm which skills changed. Manually edit this file if you need to add or remove skills before packing.
Step 5: Pack Skills
Create zip archives:
python3 scripts/skills_update.py pack --plan state/pack_plan.json --output ./dist
Output: Individual zip files in ./dist/ (e.g., skill-market.zip)
Step 6: Publish to Agent Hub
Choose the publish mode based on the task:
- Direct zhub mode (preferred for interactive work): Use when publishing or inspecting one or a few skills, retrying a failed item, or debugging. The LLM should call
zhub directly instead of routing the action through Python.
- Python batch mode: Use for unattended daily runs or larger batches that need consistent retries and automatic plan updates.
Before either mode, verify the CLI and session:
which zhub
zhub whoami
Direct zhub mode
Read each selected skill's source_path from state/pack_plan.json, then run the matching command:
zhub skill create \
--from-dir <source_path> \
--name <skill-name> \
--title <skill-title> \
--type community \
--output json
zhub skill update <skill-name> \
--from-dir <source_path> \
--title <skill-title> \
--type community \
--output json
After each successful command, write published, hub_id, and hub_url from the JSON response back to that skill's entry in state/pack_plan.json. Do not mark failed commands as published.
Use other direct zhub commands for interactive Agent Hub operations such as listing, inspecting, updating, or deleting resources. Run zhub <resource> --help before an unfamiliar or destructive operation; do not add a Python wrapper solely to execute a single CLI command.
Python batch mode
Publish all eligible skills in the plan:
python3 scripts/skills_update.py publish --plan state/pack_plan.json
Options:
--title-prefix: Add prefix to skill titles (e.g., "v2.0-")
--type: Skill type, either expert or community (default: community)
The batch command uses zhub skill create for new skills and zhub skill update <skill-name> for existing skills, with retries and plan persistence handled by Python. zhub reads name and description from each skill's SKILL.md frontmatter.
Output: Skills published to Agent Hub
Note: Daily updated skills are published as community type by default.
Step 7: Update State
After successful publish, update state/last_commits.json with the new commit hashes from state/pack_plan.json.
Configuration Reference
repos.json
{
"_default_repo": "https://github.com/Zerone-Agent/agent-use-skills.git",
"_default_path": "awesome-skills/skills",
"skills": {
"skill-market": {
"repo": null,
"subdir": "skill-market",
"description": "自动化的技能发现与安装技能"
},
"custom-skill": {
"repo": "https://github.com/example/custom.git",
"subdir": null,
"description": "自定义技能描述"
}
}
}
repo: null -> use _default_repo + _default_path + subdir
repo: "url" -> independent repository
subdir: relative path within repo to skill directory (null for repo root)
description: Chinese description metadata for review/configuration; zhub reads publish descriptions from each skill's SKILL.md frontmatter
pack_plan.json
Auto-generated by check, updated by pack and publish:
{
"generated_at": "2026-05-07T10:30:00Z",
"skills": [
{
"name": "skill-market",
"source_path": "/tmp/skills-update/...",
"commit_hash": "abc1234",
"zip_path": "/abs/path/to/skill-market.zip",
"published": true,
"hub_id": "skill-market",
"hub_url": "https://example.com/skill-market.zip"
}
]
}
Key Design Decisions
- Mixed repo support: Some skills live in the default monorepo, others have independent repos.
repos.json is the single source of truth.
- Commit hash tracking: Update detection uses git commit hashes rather than timestamps or file hashes, because it's deterministic and handles force pushes correctly.
- JSON-based batching:
pack_plan.json serves as the contract between check, pack, and publish. This lets LLM inspect and modify the plan at any stage.
- Native CLI for interactive actions: The LLM calls
zhub directly for one-off operations; Python remains the orchestration layer for repeatable unattended batches.
- Individual zips: Each skill gets its own
{skill-name}.zip rather than one big archive, making selective updates and downloads possible.
Important Notes
- Always review
pack_plan.json before packing — it may contain skills you don't want to update
- You can manually edit
pack_plan.json to add/remove skills
- After publish succeeds, update
last_commits.json so the next run only detects new changes
- The tool clones repos to a temporary directory during
check — don't rely on these paths persisting
- If a skill's repo is unreachable, the
check command will print a warning and skip that skill
- Skills are published to the Agent Hub profile configured by
zhub login
Quick Start
python3 scripts/skills_update.py fetch
python3 scripts/skills_update.py check
cat state/pack_plan.json
python3 scripts/skills_update.py pack
python3 scripts/skills_update.py publish