ソース情報
- リポジトリ
- macro-inc/macro
- ソースの最終更新活動
- 2026年7月13日 13:24
- 検出された SKILL.md の言語
- 英語
- スター
- 3,572
- フォーク
- 358
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/macro-inc/macro --skill upgrade-modelコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
Wrap a new backend endpoint in the TypeScript SDK (packages/sdk), or record it as skipped. Use when `just coverage` fails, or after adding an endpoint to a Rust service.
Debug local Rust services in this repository by starting the crate's binary with debug logging, tailing service logs, and using those logs to answer runtime questions. Use when Codex needs to investigate service startup, runtime behavior, errors, or logs for a Rust binary in a crate.
Validate Rust work after substantial Rust code changes by running `just check`, `just clippy`, then `just format`. Use before the final response after a significant Rust implementation or cleanup task; batch edits first instead of running after every small change.
SOC 職業分類に基づく
SKILL.md を表示中
| name | upgrade-model |
| description | Upgrade an AI chat model (fast or good) across backend and frontend. |
| allowed-tools | Bash, Read, Write, Edit, Grep, Glob |
Upgrades the AI model used in the chat app. There are two model slots:
CHAT_MODELS)CHAT_MODELS)The user must specify which slot to upgrade and the new model name (e.g. claude-opus-4-6).
Ask the user (if not already provided):
fast or good?claude-opus-4-6)Derive from the model name:
SERDE_NAME: the kebab-case model ID sent over the wire (e.g. claude-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. claude-4.6-opus)PRETTY_NAME: human-readable name (e.g. Claude Opus 4.6)File: crates/agent/src/model/predefined_model.rs
Check if the enum variant already exists. If not, add all of the following:
Enum variant in pub enum Model (under the Anthropic section):
#[serde(rename = "{SERDE_NAME}")]
#[strum(serialize = "{SERDE_NAME}")]
{ENUM_VARIANT},
String constant in pub mod constants::models:
pub const {CONST_NAME}: &str = "{CONST_VALUE}";
Match arm in to_provider_model_string():
Model::{ENUM_VARIANT} => (ANTHROPIC, {CONST_NAME}),
Match arm in from_model_str():
{CONST_NAME} => Model::{ENUM_VARIANT},
File: crates/agent/src/model/predefined_model.rs
Metadata in fn metadata():
Model::{ENUM_VARIANT} => ModelMetadata {
context_window: 200_000,
},
Use the correct context window for the model. Anthropic models are typically 200,000.
Provider in fn provider():
Model::{ENUM_VARIANT} => Provider::Anthropic,
File: services/document_cognition_service/src/core/model.rs
CHAT_MODELS and update FALLBACK_MODEL.CHAT_MODELS.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.
cargo check -p agent -p document_cognition_service
Fix any compilation errors before proceeding.
Run from apps/web/:
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.
bun check to find frontend usagescd 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_MODELapps/web/src/lib/core/component/AI/component/input/useChatInput.tsx — hardcoded model referencesapps/web/src/lib/core/component/AI/signal/pendingSend.test.ts — test dataReplace old model strings and update display names.
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:
cd apps/web && bun run gen-api -- --check
This must pass.
ExhaustiveMap type in constant/model.ts requires an entry for every model in the Model type, so missing entries will cause type errors.SMART_MODE_MODEL constant is the "good" model, DEFAULT_MODEL is the "fast" model.