Agent skill

Upgrade Model

by macro-inc in macro-inc/macro

Upgrade an AI chat model (fast or good) across backend and frontend.

AGPL-3.0Auto-check: notesFrontend & Design

Install Upgrade Model

skills CLI
$ npx skills add macro-inc/macro --skill upgrade-model -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install macro-inc/macro upgrade-model --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/macro-inc/macro.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/upgrade-model .claude/skills/upgrade-model && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
upgrade-model
GitHub stars
4.6k
Token cost
~1.1k tokens
SKILL.md length
446 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Upgrade an AI chat model (fast or good) across backend and frontend.

  • Works in 8 steps: Determine the change → Add model to AI crate (if it doesn't… → Update DCS constants → …
  • Frontend & Design work in your project
  • SKILL.md covers Steps and Notes
  • Calls bun, cargo and codex

What it does

Upgrade Model is an agent skill from macro-inc/macro. Upgrade an AI chat model (fast or good) across backend and frontend.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design. The repository describes itself as: Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory. The licence is AGPL-3.0.

When your agent uses it

  • Frontend & Design work in your project

Example prompts

  • “/upgrade-model”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Write, Edit, Grep, Glob

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Determine the change
  2. Add model to AI crate (if it doesn't already exist)
  3. Update DCS constants
  4. Update DCS chat message handler
  5. Verify Rust compiles
  6. Generate frontend types
  7. Run bun check to find frontend usages
  8. Format and verify

What it can do on your machine

Read from SKILL.md and the folder at commit 49418e7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Write
    • Edit
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun
    • cargo
    • codex

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Upgrade Model loads about 1.1k tokens when it runs. Until then it costs about 21 tokens; SKILL.md has 446 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~21
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Write, Edit, Grep, Glob

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from macro-inc/macro at commit 49418e7, republished under its AGPL-3.0 licence (© macro-inc). 446 words, ~1,117 tokens.

Download SKILL.mdSave it as .claude/skills/upgrade-model/SKILL.md (or your agent's skills folder).
name
upgrade-model
description
Upgrade an AI chat model (fast or good) across backend and frontend.
allowed-tools
Bash, Read, Write, Edit, Grep, Glob

Upgrade Chat Model

Upgrades the AI model used in the chat app. There are two model slots:

  • fast (Enter): default/fallback model (first entry in CHAT_MODELS)
  • good (Cmd+Enter): smart mode model (second entry in CHAT_MODELS)

The user must specify which slot to upgrade and the new model name (e.g. Codex-opus-4-6).

Steps

1. Determine the change

Ask the user (if not already provided):

  • Which slot: fast or good?
  • What is the new model name? (e.g. Codex-opus-4-6)

Derive from the model name:

  • SERDE_NAME: the kebab-case model ID sent over the wire (e.g. Codex-opus-4-6)
  • ENUM_VARIANT: PascalCase variant name (e.g. Claude46Opus)
  • CONST_NAME: SCREAMING_SNAKE constant name (e.g. CLAUDE_46_OPUS)
  • CONST_VALUE: display string used by the frontend/provider (e.g. Codex-4.6-opus)
  • PRETTY_NAME: human-readable name (e.g. Codex Opus 4.6)
2. Add model to AI crate (if it doesn't already exist)

File: crates/agent/src/model/predefined_model.rs

Check if the enum variant already exists. If not, add all of the following:

  1. Enum variant in pub enum Model (under the Anthropic section):

    rust
    #[serde(rename = "{SERDE_NAME}")]
    #[strum(serialize = "{SERDE_NAME}")]
    {ENUM_VARIANT},
  2. String constant in pub mod constants::models:

    rust
    pub const {CONST_NAME}: &str = "{CONST_VALUE}";
  3. Match arm in to_provider_model_string():

    rust
    Model::{ENUM_VARIANT} => (ANTHROPIC, {CONST_NAME}),
  4. Match arm in from_model_str():

    rust
    {CONST_NAME} => Model::{ENUM_VARIANT},

File: crates/agent/src/model/predefined_model.rs

  1. Metadata in fn metadata():

    rust
    Model::{ENUM_VARIANT} => ModelMetadata {
        context_window: 200_000,
    },

    Use the correct context window for the model. Anthropic models are typically 200,000.

  2. Provider in fn provider():

    rust
    Model::{ENUM_VARIANT} => Provider::Anthropic,
3. Update DCS constants

File: services/document_cognition_service/src/core/model.rs

  • If upgrading the fast slot: change the first entry in CHAT_MODELS and update FALLBACK_MODEL.
  • If upgrading the good slot: change the second entry in CHAT_MODELS.
4. Update DCS chat message handler

File: services/document_cognition_service/src/api/ws/chat_message/mod.rs

Search for the old model variant being used in the model selection logic (e.g. Model::Claude45Opus). Update it to the new variant.

Show full SKILL.md (188 more words)Show less
5. Verify Rust compiles
bash
cargo check -p agent -p document_cognition_service

Fix any compilation errors before proceeding.

6. Generate frontend types

Run from apps/web/:

bash
cd apps/web && bun install && bun run gen-api

This builds all Rust OpenAPI and models binaries from local code, generates openapi.json, runs orval for TypeScript types, and generates model.ts from the local models binary. All generated files will reflect your local Rust changes.

7. Run bun check to find frontend usages
bash
cd apps/web && bun check

This will report TypeScript errors everywhere the old model string is used. Fix each one. Common locations:

  • apps/web/src/lib/core/component/AI/constant/model.ts — MODEL_PRETTYNAME, MODEL_PROVIDER_ICON, SMART_MODE_MODEL / DEFAULT_MODEL
  • apps/web/src/lib/core/component/AI/component/input/useChatInput.tsx — hardcoded model references
  • apps/web/src/lib/core/component/AI/signal/pendingSend.test.ts — test data

Replace old model strings and update display names.

8. Format and verify
bash
cd apps/web && bun format && bun check

The only errors remaining should be pre-existing ones unrelated to models (e.g. three, @aws-crypto/sha256-js type issues). All model-related errors must be resolved.

Finally, run the CI check:

bash
cd apps/web && bun run gen-api -- --check

This must pass.

Notes

  • We only support Anthropic models for chat. Other providers exist in the AI crate but are not used for the chat feature.
  • The ExhaustiveMap type in constant/model.ts requires an entry for every model in the Model type, so missing entries will cause type errors.
  • The SMART_MODE_MODEL constant is the "good" model, DEFAULT_MODEL is the "fast" model.

© macro-inc, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/upgrade-model of macro-inc/macro.

Open the folder on GitHubat commit 49418e7

Compare with similar skills

Upgrade Model next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Upgrade Model compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Upgrade Model this skillmacro-inc/macro4.6k—~1.1kAutomated safety check: NotesAGPL-3.0
Web Artifacts Builderanthropics/skills180k41 repos~769Automated safety check: PassApache-2.0
React Doctormakeplane/plane61k12 repos~657Automated safety check: PassAGPL-3.0
Impeccablebestofjs/bestofjs3.1k27 repos~2.6kAutomated safety check: PassMIT
Figma Design System Builderwarpdotdev/warp65k2 repos~4.4kAutomated safety check: PassAGPL-3.0
Web Interface Guidelines Reviewervercel-labs/openreview1.7k98 repos~308Automated safety check: PassNone

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 41 repos~769 tokens
    Frontend & DesignAuto-check passed
  • React Doctor

    makeplane/plane

    Scans React code for lint, accessibility, bundle size and architecture issues, reports a health score and checks that changes do not lower it.

    61k GitHub starsUsed in 12 repos~657 tokens
    Frontend & DesignAuto-check passed
  • Impeccable

    bestofjs/bestofjs

    A skill your agent uses when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a…

    3.1k GitHub starsUsed in 27 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Builds or updates a design system in Figma from a codebase in ordered phases: discovery, variables and tokens, components, theming and documentation, with checkpoints.

    65k GitHub starsUsed in 2 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Web Interface Guidelines Reviewer

    vercel-labs/openreview

    Official

    Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my…

    1.7k GitHub starsUsed in 98 repos~308 tokens
    Frontend & DesignAuto-check passed
  • Tailwindcss Development

    anonaddy/anonaddy

    Always invoke when the user's message includes 'tailwind' in any form.

    4.9k GitHub starsUsed in 10 repos~865 tokens
    Frontend & DesignAuto-check passed

More from macro-inc/macro

All 19 skills in this repo
  • Mintlify API

    macro-inc/macro

    Interact with the Mintlify REST API to manage deployments, trigger builds, and query documentation site metadata programmatically.

    4.6k GitHub starsUsed in 2 repos~333 tokens
    Auto-check passed
  • Add Tour

    macro-inc/macro

    Add or change an in-app feature tour (a view's guided flyover) in the web app.

    4.6k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Define Feature Flag

    macro-inc/macro

    Define a frontend feature flag with defineFlag and wire its readers.

    4.6k GitHub stars~780 tokensUpdated today
    Auto-check passed
  • Run App

    macro-inc/macro

    Run the Macro app on Cursor Cloud and pick up edits. An agent skill from macro-inc/macro.

    4.6k GitHub stars~712 tokensUpdated today
    Auto-check passed
  • Add SDK Endpoint

    macro-inc/macro

    Wrap a new backend endpoint in the TypeScript SDK (packages/sdk), or record it as skipped.

    4.6k GitHub stars~1k tokensUpdated today
    Auto-check: notes
  • Enforce hexagonal architecture in the Rust backend. An agent skill from macro-inc/macro.

    4.6k GitHub stars~3k tokensUpdated today
    Auto-check passed

Questions about Upgrade Model

What does Upgrade Model do?

Upgrade an AI chat model (fast or good) across backend and frontend. Upgrade Model is an agent skill from macro-inc/macro. Upgrade an AI chat model (fast or good) across backend and frontend.

When should I use Upgrade Model?

Upgrade Model fits situations like: frontend & Design work in your project.

How do I install Upgrade Model in Claude Code?

Run `npx skills add macro-inc/macro --skill upgrade-model -a claude-code`. Or copy the skill folder (.agents/skills/upgrade-model in macro-inc/macro) into .claude/skills/upgrade-model in your project. Claude Code loads it when a task matches its description.

How do I install Upgrade Model in Codex?

Run `npx skills add macro-inc/macro --skill upgrade-model -a codex`. Or copy the skill folder (.agents/skills/upgrade-model in macro-inc/macro) into .agents/skills/upgrade-model in your project. Codex loads it when a task matches its description.

Can I use Upgrade Model in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add macro-inc/macro --skill upgrade-model -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/upgrade-model, .gemini/skills/upgrade-model, .github/skills/upgrade-model and .opencode/skills/upgrade-model in your project.

What does Upgrade Model need to run?

Going by SKILL.md and its folder, Upgrade Model needs the command-line tools its instructions call (bun, cargo and codex). Its frontmatter pre-approves these tools: Bash, Read, Write, Edit, Grep, Glob.

Does Upgrade Model access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Upgrade Model safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Upgrade Model use?

Upgrade Model is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Upgrade Model use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Upgrade Model?

Skills that share tags, products or a category with Upgrade Model: Web Artifacts Builder (anthropics/skills, 180k stars), React Doctor (makeplane/plane, 61k stars), Impeccable (bestofjs/bestofjs, 3.1k stars) and Figma Design System Builder (warpdotdev/warp, 65k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Upgrade Model?

macro-inc (a GitHub organization) maintains it in macro-inc/macro, which has 4,590 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 8, 2026.

Source: macro-inc/macro on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.