Skip to content

Commit 52fc8fb

Browse files
authored
skill: update with version information and fall back instructions (#11993)
Instructions assumed using latest versions. Added fallback instructions.
1 parent 4f2543d commit 52fc8fb

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

skills/use-ai-sdk/SKILL.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ metadata:
66
version: '1.0'
77
---
88

9-
## AI SDK Usage
9+
## AI SDK Documentation
1010

11-
When you need up-to-date information about the AI SDK, search the bundled documentation and source code in `node_modules/ai/`:
11+
When you need up-to-date information about the AI SDK:
12+
13+
### If using ai@6.0.34 or above
14+
15+
Search the bundled documentation and source code in `node_modules/ai/`:
1216

1317
1. **Documentation**: `grep "your query" node_modules/ai/docs/`
1418
2. **Source code**: `grep "your query" node_modules/ai/src/`
@@ -18,11 +22,21 @@ To find specific files:
1822
- `glob "node_modules/ai/docs/**/*.mdx"` for documentation files
1923
- `glob "node_modules/ai/src/**/*.ts"` for source files
2024

21-
Use these resources for current API details, usage patterns, and examples.
25+
Provider packages (`@ai-sdk/openai`, `@ai-sdk/anthropic`, etc.) also include bundled docs in their respective `node_modules/@ai-sdk/<provider>/docs/` directories.
26+
27+
**When in doubt, update to the latest version of the AI SDK.**
28+
29+
### Otherwise
30+
31+
1. Search the docs: `https://ai-sdk.dev/api/search-docs?q=your_query`
32+
2. The response includes matches with links ending in `.md`
33+
3. Fetch those `.md` URLs directly to get plain text content (e.g. `https://ai-sdk.dev/docs/agents/building-agents.md`)
34+
35+
Use these resources for current API details, examples, and usage patterns.
2236

2337
For common errors and troubleshooting, see [Common Errors Reference](references/common-errors.md).
2438

25-
## Provider-Specific Information
39+
## Provider-Specific Information (ai@6.0.34+)
2640

2741
For questions about specific providers (OpenAI, Anthropic, Google, etc.), search their dedicated packages:
2842

0 commit comments

Comments
 (0)