llm-output-schema-cons…
Zod schema constraints that Anthropic rejects or silently ignores when sent as structured-output tool definitions via aiSdk.Output.object(). Use when writing…
Bulk-upgrade the model field across .prompt files to the latest version of each prompt's existing family. Use when prompt models have drifted (eg sonnet-4 → sonnet-4-6), after a long pause between framework updates, or as part of a periodic model-freshness pass. Within-family
$ npx -y skills add growthxai/output --skill output-dev-upgrade-prompt-models --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/output-dev-upgrade-prompt-modelsContext preview
The summary Claude sees to decide when to auto-load this skill.
Bulk-upgrade the model field across .prompt files to the latest version of each prompt's existing family. Use when prompt models have drifted (eg sonnet-4 → sonnet-4-6), after a long pause between framework updates, or as part of a periodic model-freshness pass. Within-family
name: output-dev-upgrade-prompt-models description: Bulk-upgrade the model field across .prompt files to the latest version of each prompt's existing family. Use when prompt models have drifted (eg sonnet-4 → sonnet-4-6), after a long pause between framework updates, or as part of a periodic model-freshness pass. Within-family only — never changes provider or tier. allowed-tools: [Bash, Read, Edit, Glob]
Walks every `.prompt` file in a project (or scoped subtree), classifies each model into its provider+family bucket, looks up the latest stable model in that bucket via the [`output-dev-model-selection`](../output-dev-model-selection/SKILL.md) snapshot, and rewrites the `model:` line. Provider and family tier are preserved — a Haiku stays a Haiku, an Anthropic stays an Anthropic.
This skill explicitly does **not** swap providers or escalate tiers (eg Haiku → Sonnet). Those are deliberate human decisions handled separately.
Find every `.prompt` file under the target scope. Default scope is the project's `src/` tree; the user may scope to a single workflow.
For each file, read the YAML frontmatter (between the first pair of `---` lines) and pull out `provider:` and `model:`.
Match the existing model into a family bucket. Family is preserved across the upgrade.
| Pattern | Family | |---|---| | `claude-opus-*` | `anthropic-opus` | | `claude-sonnet-*` | `anthropic-sonnet` | | `claude-haiku-*` | `anthropic-haiku` | | `gpt-*-pro` | `openai-pro` | | `gpt-*-mini` | `openai-mini` | | `gpt-*-nano` | `openai-nano` | | `gpt-N.M` (no suffix) | `openai-default` | | `gemini-*-flash-lite*` | `google-flash-lite` | | `gemini-*-flash*` | `google-flash` | | `gemini-*-pro*` | `google-pro` |
If a model doesn't match any pattern, skip the file and log a warning. Do not guess.
For each prompt, find the latest stable model in the same family by following [`output-dev-model-selection`](../output-dev-model-selection/SKILL.md) — fetch its snapshot, apply its filter rules (skip preview/alpha/beta, prefer unversioned aliases), and translate the chosen `id` to prompt-file form.
Use this family → snapshot-key + `id` regex map to pin the lookup to the existing tier:
| Family | Snapshot key | `id` regex | |---|---|---| | `anthropic-opus` | `anthropic` | `claude-opus-` | | `anthropic-sonnet` | `anthropic` | `claude-sonnet-` | | `anthropic-haiku` | `anthropic` | `claude-haiku-` | | `openai-pro` | `openai` | `-pro$` | | `openai-default` | `openai` | `^openai/gpt-[0-9.]+$` | | `openai-mini` | `openai` | `-mini$` | | `openai-nano` | `openai` | `-nano$` | | `google-pro` | `google` | `-pro` (excluding `-flash`) | | `google-flash` | `google` | `-flash$\|-flash-[0-9]` | | `google-flash-lite` | `google` | `-flash-lite` |
If no stable match exists for a family (only pre-release entries available), surface that to the user and skip the file rather than guessing or downgrading to a different family.
**Bail loudly on a failed snapshot.** If the snapshot fetch itself returned nothing — network down, gateway shape changed, `curl` or `jq` missing — abort the run before Step 5. Do **not** continue with an empty snapshot and report "no upgrades needed", because that lies: the prompts weren't actually checked. Tell the user the snapshot fetch failed, point them at the manual-fallback steps in [`output-dev-model-selection`](../output-dev-model-selection/SKILL.md), and exit.
Build a per-file report comparing the current model to the resolved `latest`:
src/workflows/foo/prompts/bar@v1.prompt claude-sonnet-4-20250514 → claude-sonnet-4-6 src/workflows/foo/prompts/baz@v1.prompt claude-haiku-4-5 ✓ already latest
Print the full report. **Wait for explicit user confirmation before writing.** In CI / non-interactive contexts, default to dry-run.
For each confirmed file, edit only the YAML frontmatter:
Refreshing the dated comment in the same edit keeps the "as of" convention coherent — without it, an upgraded prompt would have a fresh model paired with a stale date.
After the batch:
The Output SDK doesn't validate prompt model IDs at build time — invalid IDs only surface at first run. If smoke-tests are available, run at least one workflow per upgraded family.
The open-source TypeScript framework for building AI workflows and agents. Designed for Claude Code — describe what you want, Claude builds it, with all the best practices already in place. One framework.
Repo: growthxai/output
Zod schema constraints that Anthropic rejects or silently ignores when sent as structured-output tool definitions via aiSdk.Output.object(). Use when writing…
Guide to the providerOptions structure in .prompt files — decision tree for where an option goes, common mistakes, per-provider quick reference, and Anthropic…
Implement an Output SDK workflow from a plan document. Use when the user asks to build, implement, or code a workflow from an existing plan, or after…
View and edit encrypted credentials in an Output.ai project. Use when adding secrets, updating API keys, verifying credential values, or retrieving a specific…
Wire encrypted credentials to environment variables using the credential: convention. Use when setting up LLM provider keys (ANTHROPIC_API_KEY, OPENAI_API_KEY)…