self-upgrade

self-upgrade is a skill for Claude Code, Codex from sonichi/sutando. It costs 0 tokens per session (1,051 once invoked), scanned A, original, MIT.

A guided procedure for updating the Sutando codebase to the latest upstream version while keeping its running session alive. It handles the restart arrangement needed by this headless system.

In plain words
What is it for?
Use it when upgrading Sutando from upstream code and restarting its core services without losing control of the current agent session.
Why use it?
A simple pull-and-restart can leave the session hanging because the startup process keeps running in the foreground. This procedure moves the restart into a durable background session.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sonichi/sutando/self-upgrade
Any agent
npx skills add sonichi/sutando --skill self-upgrade
Clone the repo
git clone --depth 1 https://github.com/sonichi/sutando

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for self-upgrade

README.md
[![agentmods](https://agentmods.dev/badge/skills/sonichi/sutando/self-upgrade.svg)](https://agentmods.dev/skills/sonichi/sutando/self-upgrade)
Your own site
<a href="https://agentmods.dev/skills/sonichi/sutando/self-upgrade"><img src="https://agentmods.dev/badge/skills/sonichi/sutando/self-upgrade.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,051 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01051
Opus 5 $0.00000 $0.00526
Sonnet 5 $0.00000 $0.00210
Haiku 4.5 $0.00000 $0.00105

Measured 5d ago against content hash 36231bce36cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

self-upgrade scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/upgrade.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/self-upgrade/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Self-upgrade

Safely upgrade this Sutando checkout to the latest upstream code without bricking the running core session — the "success path" distilled from a real 2026-07-20 upgrade that would otherwise hang (and did, the first time).

Usage: /self-upgrade

Why this skill exists

A naive "pull + restart" self-upgrade gets stuck, because:

  1. src/restart.sh ends with exec bash src/startup.sh.
  2. src/startup.sh runs foreground work and foreground-parents the credential-proxy (a tsx process that never exits). The open-source core is headless: the optional Swift helpers (ax-read, Sutando.app) are built separately by the app packaging/setup workflow, not by core startup.
  3. So running restart.sh inline from the core session never returns — the Bash call hangs forever, the task never gets a result, and from the owner's side you've "gone stuck."

The fix is simple once you know it: hand the restart to the same durable tmux server that owns the core. A plain nohup … & is not enough: the supported Codex executor tears down that process tree when the tool call ends. A detached tmux service pane survives that boundary, remains the parent of restarted services, and lets startup recreate the managed task notifier.

On activation

Step 1 — Pull + durable restart handoff (mechanical)

Run the helper. It aborts safely on a dirty tree or a non-fast-forward, pulls --ff-only, and launches src/restart.sh in the persistent sutando-services tmux session:

bash skills/self-upgrade/scripts/upgrade.sh          # origin/main
# bash skills/self-upgrade/scripts/upgrade.sh --no-restart   # pull only

Exit 0 = upgraded (or already latest); exit 2 = aborted (dirty tree / not a fast-forward) — surface the reason and stop.

If the diff touched package*.json / tsconfig / *.swift / requirements (the script prints this), a rebuild may be needed. For *.swift, rebuild the optional menu-bar app and ax-read through the app setup workflow; core startup.sh intentionally does not build them. For npm deps run npm ci before relying on the TS services.

Read the full file on GitHub · 92 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 92 lines · 0 tokens per session scan A 36231bce36cf

Subscribe to this mod's changes

self-upgrade is a skill published in the GitHub repository sonichi/sutando (391 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,051 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.