shiwenwen/hope-agent/skills/ha-self-update/SKILL.md
ha-self-update
Use it for deployment and operations tasks; the detail page covers purpose, installation, and practical steps.
- Source repository stars
- 1,485
- Declared platforms
- 0
- Static risk flags
- 1
- Last source update
- 2026-08-24
- Source checked
- 2026-08-25
Decision brief
What it does: where it fits
Hope Agent ships a single binary (hope-agent) that dispatches into three modes by subcommand: desktop GUI, hope-agent server, and hope-agent acp. All three share the same release artifacts under github.com/shiwenwen/hope-agent/releases and the same Minisign-signed update manifes…
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/shiwenwen/hope-agent --skill "skills/ha-self-update"Inspect the Agent Skill "ha-self-update" from https://github.com/shiwenwen/hope-agent/blob/ee2d729bd514209508989a70f9bdfb6b169b2925/skills/ha-self-update/SKILL.md at commit ee2d729bd514209508989a70f9bdfb6b169b2925. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Workflow
Read the result aloud (versions + 1-2 lines from notes). If hasupdate == false and the user asked to upgrade anyway (e.g. for a force-reinstall), surface that and ask if they really want to pin a targetversion.
Use exec to peek at active workload: launchctl list | grep hopeagent / systemctl --user is-active hope-agent.service, plus sessionslist({ limit: 5 }) to see if any session is mid-turn.If a cron job is scheduled in the next few minutes, suggest waiting.On macOS: warn if Hope Agent.app is open and the user is mid-task — restart will kill in-flight turns. - 02
When to suggest an upgrade
Trigger paths (any one is enough):
User asks ("升级一下" / "is there an update" / "show release notes" / "the latest version").User reports a bug. Run appupdate(action="check") first — if hasupdate: true, mention "there's a newer version latestversion; let me check its notes for before we dig in" and read the notes. If the notes mention the bug…A startup snapshot shows the agent hasn't upgraded in a long while AND hasupdate is true. Don't nag — bring it up once per conversation at most. - 03
1. Check — never skip
Read the result aloud (versions + 1-2 lines from notes). If hasupdate == false and the user asked to upgrade anyway (e.g. for a force-reinstall), surface that and ask if they really want to pin a targetversion.
Read the result aloud (versions + 1-2 lines from notes). If hasupdate == false and the user asked to upgrade anyway (e.g. for a force-reinstall), surface that and ask if they really want to pin a targetversion. - 04
2. Pre-flight before recommending install
Quick checks before calling appupdate(action="install") — these aren't blocking, but mention them:
Use exec to peek at active workload: launchctl list | grep hopeagent / systemctl --user is-active hope-agent.service, plus sessionslist({ limit: 5 }) to see if any session is mid-turn.If a cron job is scheduled in the next few minutes, suggest waiting.On macOS: warn if Hope Agent.app is open and the user is mid-task — restart will kill in-flight turns. - 05
3. Install — pass runinbackground: true
runinbackground: true is recommended for install (download + verify + swap takes 10s-2min depending on connection). The tool returns { jobid, status: "started" } immediately. The user sees a confirmation dialog (Yes/No) — that dialog cannot be bypassed.
runinbackground: true is recommended for install (download + verify + swap takes 10s-2min depending on connection). The tool returns { jobid, status: "started" } immediately. The user sees a confirmation dialog (Yes/No)…If they decline, the tool returns cancelledbyuser. Don't try again automatically — wait for the user to ask.
Permission review
Static risk signals and limitations
Network access
The documentation includes network, browsing, or remote request actions.
curl -s http://127.0.0.1:8420/api/health # if server is configuredEvidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 92/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 1,485 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- shiwenwen/hope-agent
- Skill path
- skills/ha-self-update/SKILL.md
- Commit
- ee2d729bd514209508989a70f9bdfb6b169b2925
- License
- MIT
- Collected
- 2026-08-25
- Default branch
- main
View the original SKILL.md
Hope Agent Self-Update
Hope Agent ships a single binary (hope-agent) that dispatches into three modes by subcommand: desktop GUI, hope-agent server, and hope-agent acp. All three share the same release artifacts under github.com/shiwenwen/hope-agent/releases and the same Minisign-signed update manifest. The app_update tool is the single entry point for self-upgrade; this skill is the methodology for using it well.
When to suggest an upgrade
Trigger paths (any one is enough):
- User asks ("升级一下" / "is there an update" / "show release notes" / "the latest version").
- User reports a bug. Run
app_update(action="check")first — ifhas_update: true, mention "there's a newer versionlatest_version; let me check its notes for<bug-description>before we dig in" and read the notes. If the notes mention the bug, suggest upgrading first. - A startup snapshot shows the agent hasn't upgraded in a long while AND
has_updateis true. Don't nag — bring it up once per conversation at most.
Do NOT trigger if the user is mid-task on something that would be disrupted (active chat turn from a subagent, in-flight cron run, IM media uploading). Wait or finish first.
Workflow
1. Check — never skip
app_update(action="check")
Returns:
{
"current_version": "0.1.1",
"latest_version": "0.2.0",
"has_update": true,
"install_source": { "kind": "brew", "prefix": "/opt/homebrew" },
"recommended_path": "package_manager",
"platform_target": "darwin-aarch64",
"notes": "fix: …",
"pub_date": "2026-05-12T10:00:00Z",
"bare_binary_available": true
}
Read the result aloud (versions + 1-2 lines from notes). If has_update == false and the user asked to upgrade anyway (e.g. for a force-reinstall), surface that and ask if they really want to pin a target_version.
2. Pre-flight before recommending install
Quick checks before calling app_update(action="install") — these aren't blocking, but mention them:
- Use
execto peek at active workload:launchctl list | grep hopeagent/systemctl --user is-active hope-agent.service, plussessions_list({ limit: 5 })to see if any session is mid-turn. - If a cron job is scheduled in the next few minutes, suggest waiting.
- On macOS: warn if
Hope Agent.appis open and the user is mid-task — restart will kill in-flight turns.
3. Install — pass run_in_background: true
app_update(action="install", run_in_background: true)
run_in_background: true is recommended for install (download + verify + swap takes 10s-2min depending on connection). The tool returns { job_id, status: "started" } immediately. The user sees a confirmation dialog (Yes/No) — that dialog cannot be bypassed.
If they decline, the tool returns cancelled_by_user. Don't try again automatically — wait for the user to ask.
4. Track progress
Two ways to follow along:
app_update(action="status", job_id="...")— polls the in-memory phase tracker.- Frontend subscribes to EventBus topic
app_update:progress— the UI renders the progress bar automatically; the tool also emitsapp_update:completedwhen the job finishes.
Phases (in order): starting → running → downloading → verifying → staging → backing → swapping → restarting → done. Failure transitions straight to failed with an error field.
5. Verify after install
The service restarts itself on success, but the binary swap is only visible to processes started AFTER the swap — the model conversation is still running the old image. Tell the user:
Upgrade succeeded. The server service has been restarted on the new image. Your desktop GUI is still running the old version — quit and reopen to load v0.2.0.
Then exec to confirm:
hope-agent --version # should print the new version
curl -s http://127.0.0.1:8420/api/health # if server is configured
Path routing
recommended_path in the check output is the auto-selected route. The user can override via prefer_path on install:
| Path | When | What happens |
|---|---|---|
tauri | Desktop GUI in foreground, bridge registered | tauri-plugin-updater downloads + verifies + installs the signed bundle. |
package_manager | brew / scoop / apt / dnf / AUR install | Runs brew upgrade --cask hope-agent (etc.), then restarts the service. |
self_contained | Manual install, or above paths unavailable | Downloads bare-binary tar.gz, verifies Minisign sig, atomic-swap, restart. |
manual_prompt | Cannot pick automatically | Tool prompts the user via ask_user_question to choose recovery. |
prefer_path: "self_contained" is the right fallback when the package-manager path fails (stale tap, sudo refused, etc.). prefer_path: "package_manager" is rarely needed — only when the user wants brew/apt to record the new version.
When things fail
The tool surfaces failures via app_update(action="status")'s error field. Common cases:
| Error contains | Recover with |
|---|---|
minisign verify failed | Re-run install (download may have been truncated). If it persists twice, treat as a release-signing problem — DO NOT bypass; tell the user to report it. |
HTTP 4xx/5xx from <url> | Network / GitHub Releases hiccup. Wait a minute, retry. Suggest a manual download if persistent. |
manifest has no bare_binary entry for… | Switch to prefer_path: "package_manager". If that also doesn't apply, ask the user to download from the release page manually. |
package manager upgrade failed | Show the stderr to the user. Often: sudo denied, stale apt cache (sudo apt update first), brew tap not synced (brew update first). |
service restart failed | The new binary is in place but the service didn't come back. Walk the user through launchctl kickstart -k gui/$UID/ai.hopeagent.server / systemctl --user restart hope-agent.service manually. |
atomic swap … failed | Suggest app_update(action="rollback") to restore the previous binary, then investigate before retrying. |
Rollback
If a successful install behaves badly, the previous binary is in ~/.hope-agent/updater/backup/<old-version>/hope-agent. Restore via:
app_update(action="rollback")
Same Yes/No confirmation as install. The tool restores the most recent backup, restarts the service. Only the most recent 2 backups are retained.
What this skill cannot do
- Skip the user confirmation.
installandrollbackalways pop the Yes/No dialog. Trying to bypass it would defeat the whole point of HIGH-risk gating. - Change the update endpoint.
latest.jsonlives at the URL hardcoded inha_updater::manifest::UPDATE_MANIFEST_URLand pinned by both the desktop bundle andha-updater/src/keys.rspubkey. - Switch release channels. Only the stable channel is supported today. Beta/nightly is on the roadmap but not yet wired up.
- Restart the desktop app for the user. After the binary swap completes, the user has to quit and relaunch the desktop GUI themselves — this is intentional so they don't lose in-flight chat state.
Frequently asked questions
What to verify before installation and use
What does the ha-self-update source document cover?
Hope Agent ships a single binary (hope-agent) that dispatches into three modes by subcommand: desktop GUI, hope-agent server, and hope-agent acp. All three share the same release artifacts under github.com/shiwenwen/hope-agent/releases and the same Minisign-signed update manifes…
How do I install ha-self-update?
The source record exposes this install command: npx skills add https://github.com/shiwenwen/hope-agent --skill "skills/ha-self-update". Inspect the command and pinned source before running it.
Which permission-related actions were detected?
Static rules flagged network in the source; the page lists the matching lines and excerpts.
Alternatives
Compare before choosing
Postpartum-genushyacinthus29/dotnet-skills
dotnet-worker-services
Build long-running .NET background services with `BackgroundService`, Generic Host, graceful shutdown, configuration, logging, and deployment patterns suited to workers and daemons.
vasilyu1983/AI-Agents-public
qa-testing-ios
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
garrytan/gbrain
brain-pdf
Generate a publication-quality PDF from any brain page via the gstack make-pdf binary. Strips YAML frontmatter, sanitizes emoji, applies running headers and page numbers. Brain page is always the source of truth; PDF is a rendering.
NVIDIA/skills
rtvi-cv-customize-model
How to swap the DeepStream CV detection model in the VSS Alerts Blueprint verification (2d_cv) mode - covers ONNX export, custom bbox parsers, compose mount gotchas, nvinfer config, runtime TRT engine build, deployment, and a segmentation-capable model addendum handoff.