add-function-examples
Guide for adding new AI function examples, for testing specific features against the actual provider APIs.
Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept/reject, deprecate, or supersede an ADR; bootstrap an adr folder and index; consult existing ADRs before implementing changes; or
$ npx -y skills add vercel/ai --skill adr-skill --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/adr-skillContext preview
The summary Claude sees to decide when to auto-load this skill.
Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept/reject, deprecate, or supersede an ADR; bootstrap an adr folder and index; consult existing ADRs before implementing changes; or
name: adr-skill description: Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept/reject, deprecate, or supersede an ADR; bootstrap an adr folder and index; consult existing ADRs before implementing changes; or enforce ADR conventions. This skill uses Socratic questioning to capture intent before drafting, and validates output against an agent-readiness checklist. metadata: internal: true
ADRs created with this skill are **executable specifications for coding agents**. A human approves the decision; an agent implements it. The ADR must contain everything the agent needs to write correct code without asking follow-up questions.
This means:
Write an ADR when a decision:
Do NOT write an ADR for:
When in doubt: if a future agent working in this codebase would benefit from knowing _why_ this choice was made, write the ADR.
If you are an agent coding in a repo and you encounter any of these situations, **stop and propose an ADR** before continuing:
**How to propose**: Tell the human what decision you've hit, why it matters, and ask if they want to capture it as an ADR. If yes, run the full four-phase workflow. If no, note the decision in a code comment and move on.
Every ADR goes through four phases. Do not skip phases.
Before asking any questions, gather context from the repo:
1. **Find existing ADRs.** Check `contributing/decisions/`, `docs/decisions/`, `adr/`, `docs/adr/`, `decisions/` for existing records. Read them. Note:
2. **Check the tech stack.** Read `package.json`, `go.mod`, `requirements.txt`, `Cargo.toml`, or equivalent. Note relevant dependencies and versions.
3. **Find related code patterns.** If the decision involves a specific area (e.g., "how we handle auth"), scan for existing implementations. Identify the specific files, directories, and patterns that will be affected by the decision.
4. **Check for ADR references in code.** Look for ADR references in comments and docs (see "Code ↔ ADR Linking" below). This reveals which existing decisions govern which parts of the codebase.
5. **Note what you found.** Carry this context into Phase 1 — it will sharpen your questions and prevent the ADR from contradicting existing decisions.
Interview the human to understand the decision space. Ask questions **one at a time**, building on previous answers. Do not dump a list of questions.
**Core questions** (ask in roughly this order, skip what's already clear from context or Phase 0):
1. **What are you deciding?** — Get a short, specific title. Push for a verb phrase ("Choose X", "Adopt Y", "Replace Z with W"). 2. **Why now?** — What broke, what's changing, or what will break if you do nothing? This is the trigger. 3. **What constraints exist?** — Tech stack, timeline, budget, team size, existing code, compliance. Be concrete. Reference what you found in Phase 0 ("I see you're already using X — does that constrain this?"). 4. **What does success look like?** — Measurable outcomes. Push past "it works" to specifics (latency, throughput, DX, maintenance burden). 5. **What options have you considered?** — At least two. For each: what's the core tradeoff? If they only have one option, help them articulate why alternatives were rejected. 6. **What's your current lean?** — Capture gut intuition early. Often reveals unstated priorities. 7. **Who needs to know or approve?** — Decision-makers, consulted experts, informed stakeholders. 8. **What would an agent need to implement this?** — Which files/directories are affected? What existing patterns should it follow? What should it avoid? What tests would prove it's working? This directly feeds the Implementation Plan.
**Adaptive follow-ups**: Based on answers, probe deeper where the decision is fuzzy. Common follow-ups:
The AI Toolkit for TypeScript. From the creators of Next.js, the AI SDK is a free open-source library for building AI-powered applications and agents
Repo: vercel/ai
Guide for adding new AI function examples, for testing specific features against the actual provider APIs.
Guide for adding new AI SDK harness packages. Use when creating a new @ai-sdk/harness-<name> package that adapts a coding-agent runtime to HarnessV1.
Guide for adding first-party AI provider packages to the AI SDK. Use when creating a provider package under packages/ to integrate an external AI service.
Capture API response test fixture.
Develop examples for AI SDK functions. Use when creating, running, or modifying examples under examples/ai-functions/src to validate provider support,…
List the contents of an npm package tarball before publishing. Use when the user wants to see what files are included in an npm bundle, verify package…