chief-upgrade

chief-upgrade is a skill for Claude Code from thaitype/chief. It costs 54 tokens per session (1,331 once invoked), scanned C, original, MIT.

A guide for upgrading the Chief framework to a chosen version, such as a release tag or development branch. It checks the local setup and uses an upgrade script before falling back to manual steps if needed.

In plain words
What is it for?
It helps upgrade the framework to the latest stable version, a canary branch, or a specific version while checking the configured coding agent and file-linking method.
Why use it?
It reduces the risk of upgrading the wrong agent setup or installation style. Reviewing the planned changes helps identify effects on project instructions before applying them.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions AGENTS.md; mentions OpenCode.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is bash .chief-agent-tmp/scripts/upgrade.sh --plan --agent <agent> --mode <mode>.

Part of the chief-skills plugin — 14 skills shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add thaitype/chief
Claude Code
/plugin install chief-skills

Made for: Claude Code.

Or install chief-skills, the plugin that ships this one along with the rest of its 14 skills.

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 chief-upgrade

README.md
[![agentmods](https://agentmods.dev/badge/skills/thaitype/chief/chief-upgrade.svg)](https://agentmods.dev/skills/thaitype/chief/chief-upgrade)
Your own site
<a href="https://agentmods.dev/skills/thaitype/chief/chief-upgrade"><img src="https://agentmods.dev/badge/skills/thaitype/chief/chief-upgrade.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,331 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.1 $0.00054 $0.01331
Opus 5 $0.00027 $0.00665
Sonnet 5 $0.00011 $0.00266
Haiku 4.5 $0.00005 $0.00133

Measured 6d ago against content hash 0eaee180d694, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

chief-upgrade scanned grade C with 1 finding 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 6d ago.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf .chief-agent-tmp
skills/setup/chief-upgrade/SKILL.md · 151 lines

How it starts

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

Upgrade the Chief to the version specified in the arguments.

Arguments

The first argument is the target version (branch or tag). Optional.

  • No argument → upgrade to the latest stable release (highest semver tag). Find it by running git ls-remote --tags https://github.com/thaitype/chief.git, strip refs/tags/, ignore ^{} entries, and pick the highest semver version.
  • canary → latest canary branch (active development, unreleased)
  • v1.0.0, v2.0.0, etc. → specific tagged version

Steps

0. Detect coding agent and install mode

Detect which coding agent the user has set up:

  1. .claude/agents/ exists → suggest claude-code
  2. .github/agents/ exists → suggest copilot
  3. Only .agents/ exists → suggest opencode

Detect install mode:

  1. Any file in the agent-specific directory is a symlink → link
  2. Files are regular files → copy
  3. No agent-specific directory → suggest link

Ask the user to confirm agent and mode.

1. Clone target version

git clone --depth 1 --branch <version> https://github.com/thaitype/chief.git .chief-agent-tmp

2. Run upgrade.sh --plan and diff AGENTS.md

Run the upgrade script plan:

bash .chief-agent-tmp/scripts/upgrade.sh --plan --agent <agent> --mode <mode>

Then separately diff AGENTS.md (the script does not handle this file):

diff AGENTS.md .chief-agent-tmp/template/AGENTS.md

Show both outputs to the user. For AGENTS.md, explain:

  • The Project Rules section at the top is user-owned — NEVER overwrite it.
  • Everything below (Rules Hierarchy, Chief, etc.) is framework content that may need updating.

3. Wait for user approval

Ask the user to review. They may:

  • Approve all
  • Cancel
  • Ask for more detail on a specific file

4. Run upgrade.sh (apply) and merge AGENTS.md

bash .chief-agent-tmp/scripts/upgrade.sh --agent <agent> --mode <mode>

Then merge AGENTS.md manually. Use this priority order:

  1. If the user's AGENTS.md contains <!-- chief-framework:begin --> and <!-- chief-framework:end --> markers (new lazy-install convention):
    • Replace everything between the markers with the contents of .chief-agent-tmp/template/AGENTS.md.
    • Keep everything outside the markers exactly as-is.

Read the full file on GitHub · 151 lines

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. 6d ago First seen · 151 lines · 54 tokens per session scan C 0eaee180d694

Subscribe to this mod's changes

chief-upgrade is a skill published in the GitHub repository thaitype/chief (59 stars, last pushed yesterday), licensed MIT. It adds 54 tokens to every session and 1,331 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens