Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/thaitype/chiefnpx agentmods add skills/thaitype/chief/chief-upgradeWrote 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.
[](https://agentmods.dev/skills/thaitype/chief/chief-upgrade)<a href="https://agentmods.dev/skills/thaitype/chief/chief-upgrade"><img src="https://agentmods.dev/badge/skills/thaitype/chief/chief-upgrade/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/thaitype/chief/chief-upgrade"><img src="https://agentmods.dev/badge/skills/thaitype/chief/chief-upgrade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00054 | $0.01331 |
| Opus 5.5 | $0.00022 | $0.00532 |
| Sonnet 5.5 | $0.00011 | $0.00266 |
| Haiku 4.5 | $0.00005 | $0.00133 |
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 2mo 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 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, striprefs/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:
.claude/agents/exists → suggest claude-code.github/agents/exists → suggest copilot- Only
.agents/exists → suggest opencode
Detect install mode:
- Any file in the agent-specific directory is a symlink → link
- Files are regular files → copy
- 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:
- If the user's
AGENTS.mdcontains<!-- 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.
- Replace everything between the markers with the contents of
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.
- 2mo ago First seen · 151 lines · 54 tokens per session scan C 0eaee180d694
chief-upgrade is a skill published in the GitHub repository thaitype/chief (68 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 1,331 once invoked, about $0.0002 per session on Opus 5.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.
chief-upgrade compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| chief-upgradethaitype/chief | Skill | 68 | 1mo ago | MIT | C | 54 | Claude Code |
| imagegenopenai/codex | Skill | 134k | today | Apache-2.0 | A | 113 | Codex |
| local-ai-agentsmicrosoft/ai-agents-for-beginners | Skill | 79k | yesterday | MIT | A | 200 | Claude Code, Codex |
| playwright-climicrosoft/playwright | Skill | 100k | yesterday | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 394k | today | MIT | A | 36 | Claude Code |
| systematic-debuggingobra/superpowers | Skill | 314k | 4d ago | MIT | A | 21 | Claude Code |
| next-cache-components-adoptionvercel/next.js | Skill | 143k | yesterday | MIT | A | 95 | Claude Code |