quickstart changedagents-and-tools/agent-skills/quickstart
Nearest release: v2.1.238, published under an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+126added
Lines−172removed
From line
34
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits15to this page, all time
The whole hunk
from line 34, old and new numbered
/
from line 34
3434 # List Anthropic-managed Skills
3535 curl --fail-with-body -sS "https://api.anthropic.com/v1/skills?source=anthropic" \
3636 -H "x-api-key: $ANTHROPIC_API_KEY" \
37 -H "anthropic-version: 2023-06-01" \
38 -H "anthropic-beta: skills-2025-10-02" |
39 jq -r '.data[] | "\(.id): \(.display_title)"'
37 -H "anthropic-version: 2023-06-01"
4038 ```
4139
4240 ```bash CLI
4341 # List Anthropic-managed Skills
44 ant beta:skills list --source anthropic
42 ant skills list --source anthropic
4543 ```
4644
4745 ```python Python
4846 # List Anthropic-managed Skills
49 skills = client.beta.skills.list(source="anthropic")
47 skills = client.skills.list(source="anthropic")
5048
5149 for skill in skills.data:
52 print(f"{skill.id}: {skill.display_title}")
50 print(f"{skill.id}: {skill.display_name}")
5351 ```
5452
5553 ```typescript TypeScript
5654 // List Anthropic-managed Skills
57 const skills = await client.beta.skills.list({ source: "anthropic" });
55 const skills = await client.skills.list({ source: "anthropic" });
5856
5957 for (const skill of skills.data) {
60 console.log(`${skill.id}: ${skill.display_title}`);
58 console.log(`${skill.id}: ${skill.display_name}`);
6159 }
6260 ```
6361
6462 ```csharp C#
6563 // List Anthropic-managed Skills
66 var skills = await client.Beta.Skills.List(new SkillListParams { Source = "anthropic" });
64 var skills = await client.Skills.List(new SkillListParams { Source = "anthropic" });
6765
6866 foreach (var skill in skills.Items)
6967 {
70 Console.WriteLine($"{skill.ID}: {skill.DisplayTitle}");
68 Console.WriteLine($"{skill.ID}: {skill.DisplayName}");
7169 }
7270 ```
7371
7472 ```go Go
7573 // List Anthropic-managed Skills
76 skills, err := client.Beta.Skills.List(ctx, anthropic.BetaSkillListParams{
74 skills, err := client.Skills.List(ctx, anthropic.SkillListParams{
7775 Source: anthropic.String("anthropic"),
7876 })
7977 if err != nil {
from line 79
8179 }
8280
8381 for _, skill := range skills.Data {
84 fmt.Printf("%s: %s\n", skill.ID, skill.DisplayTitle)
82 fmt.Printf("%s: %s\n", skill.ID, skill.DisplayName)
8583 }
8684 ```
8785
8886 ```java Java
8987 // List Anthropic-managed Skills
90 SkillListPage skills = client.beta().skills().list(
88 SkillListPage skills = client.skills().list(
9189 SkillListParams.builder().source("anthropic").build()
9290 );
9391
94 for (SkillListResponse skill : skills.data()) {
95 IO.println(skill.id() + ": " + skill.displayTitle().orElse(""));
92 for (Skill skill : skills.data()) {
93 IO.println(skill.id() + ": " + skill.displayName());
9694 }
9795 ```
9896
from line 105
107105
108106 ```ruby Ruby
109107 # List Anthropic-managed Skills
110 skills = client.beta.skills.list(source: "anthropic")
108 skills = client.skills.list(source: "anthropic")
111109
112110 skills.data.each do |skill|
113 puts "#{skill.id}: #{skill.display_title}"
111 puts "#{skill.id}: #{skill.display_name}"
114112 end
115113 ```
116114</CodeGroup>
from line 129
131129 -H "content-type: application/json" \
132130 -H "x-api-key: $ANTHROPIC_API_KEY" \
133131 -H "anthropic-version: 2023-06-01" \
134 -H "anthropic-beta: skills-2025-10-02" \
135132 -d @- <<'EOF'
136133 {
137134 "model": "claude-opus-5",
from line 143
146143 }
147144 EOF
148145 )
149 jq -r '"stop_reason=\(.stop_reason), blocks=\(.content | length)"' <<<"$response"
150146 ```
151147
152148 ```bash CLI
153149 # Create a message with the PowerPoint Skill
154 response=$(ant beta:messages create --format json \
155 --beta skills-2025-10-02 <<'YAML'
150 response=$(ant messages create --format json <<'YAML'
156151 model: claude-opus-5
157152 max_tokens: 16000
158153 container:
from line 163
168163 name: code_execution
169164 YAML
170165 )
171
172 jq -r '"stop_reason=\(.stop_reason), blocks=\(.content | length)"' <<<"$response"
173166 ```
174167
175168 ```python Python
176169 # Create a message with the PowerPoint Skill
177 response = client.beta.messages.create(
170 response = client.messages.create(
178171 model="claude-opus-5",
179172 max_tokens=16000,
180 betas=["skills-2025-10-02"],
181173 container={
182174 "skills": [{"type": "anthropic", "skill_id": "pptx", "version": "latest"}]
183175 },
from line 187
195187
196188 ```typescript TypeScript
197189 // Create a message with the PowerPoint Skill
198 const response = await client.beta.messages.create({
190 const response = await client.messages.create({
199191 model: "claude-opus-5",
200192 max_tokens: 16000,
201 betas: ["skills-2025-10-02"],
202193 container: {
203194 skills: [{ type: "anthropic", skill_id: "pptx", version: "latest" }],
204195 },
from line 209
218209
219210 ```csharp C#
220211 // Create a message with the PowerPoint Skill
221 var response = await client.Beta.Messages.Create(new MessageCreateParams
212 var response = await client.Messages.Create(new MessageCreateParams
222213 {
223214 Model = Model.ClaudeOpus5,
224215 MaxTokens = 16000,
225 Betas = ["skills-2025-10-02"],
226 Container = new BetaContainerParams
216 Container = new ContainerParams
227217 {
228218 Skills =
229219 [
230 new BetaSkillParams
220 new SkillParams
231221 {
232 Type = BetaSkillParamsType.Anthropic,
222 Type = SkillParamsType.Anthropic,
233223 SkillID = "pptx",
234224 Version = "latest",
235225 },
from line 227
237227 },
238228 Messages =
239229 [
240 new BetaMessageParam
230 new MessageParam
241231 {
242232 Role = Role.User,
243233 Content = "Create a presentation about renewable energy with 5 slides",
244234 },
245235 ],
246 Tools = [new BetaCodeExecutionTool20260521()],
236 Tools = [new CodeExecutionTool20260521()],
247237 });
248238
249239 Console.WriteLine($"stop_reason={response.StopReason?.Raw()}, blocks={response.Content.Count}");
from line 241
251241
252242 ```go Go
253243 // Create a message with the PowerPoint Skill
254 response, err := client.Beta.Messages.New(ctx, anthropic.BetaMessageNewParams{
244 response, err := client.Messages.New(ctx, anthropic.MessageNewParams{
255245 Model: anthropic.ModelClaudeOpus5,
256246 MaxTokens: 16000,
257 Betas: []anthropic.AnthropicBeta{
258 anthropic.AnthropicBetaSkills2025_10_02,
259 },
260 Container: anthropic.BetaMessageNewParamsContainerUnion{
261 OfContainers: &anthropic.BetaContainerParams{
262 Skills: []anthropic.BetaSkillParams{
247 Container: anthropic.MessageCreateParamsContainerUnion{
248 OfContainers: &anthropic.ContainerParams{
249 Skills: []anthropic.SkillParams{
263250 {
264 Type: anthropic.BetaSkillParamsTypeAnthropic,
251 Type: anthropic.SkillParamsTypeAnthropic,
265252 SkillID: "pptx",
266253 Version: anthropic.String("latest"),
267254 },
from line 255
268255 },
269256 },
270257 },
271 Messages: []anthropic.BetaMessageParam{
272 anthropic.NewBetaUserMessage(
273 anthropic.NewBetaTextBlock("Create a presentation about renewable energy with 5 slides"),
258 Messages: []anthropic.MessageParam{
259 anthropic.NewUserMessage(
260 anthropic.NewTextBlock("Create a presentation about renewable energy with 5 slides"),
274261 ),
275262 },
276 Tools: []anthropic.BetaToolUnionParam{
277 {OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{}},
263 Tools: []anthropic.ToolUnionParam{
264 {OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{}},
278265 },
279266 })
280267 if err != nil {
from line 273
286273
287274 ```java Java
288275 // Create a message with the PowerPoint Skill
289 BetaMessage response = client.beta().messages().create(
276 Message response = client.messages().create(
290277 MessageCreateParams.builder()
291278 .model(Model.CLAUDE_OPUS_5)
292279 .maxTokens(16000)
293 .addBeta(AnthropicBeta.SKILLS_2025_10_02)
294280 .container(
295 BetaContainerParams.builder()
281 ContainerParams.builder()
296282 .addSkill(
297 BetaSkillParams.builder()
298 .type(BetaSkillParams.Type.ANTHROPIC)
283 SkillParams.builder()
284 .type(SkillParams.Type.ANTHROPIC)
299285 .skillId("pptx")
300286 .version("latest")
301287 .build()
from line 289
303289 .build()
304290 )
305291 .addUserMessage("Create a presentation about renewable energy with 5 slides")
306 .addTool(BetaCodeExecutionTool20260521.builder().build())
292 .addTool(CodeExecutionTool20260521.builder().build())
307293 .build()
308294 );
309295
from line 322
336322
337323 ```ruby Ruby
338324 # Create a message with the PowerPoint Skill
339 response = client.beta.messages.create(
325 response = client.messages.create(
340326 model: "claude-opus-5",
341327 max_tokens: 16_000,
342 betas: ["skills-2025-10-02"],
343328 container: {
344329 skills: [{type: "anthropic", skill_id: "pptx", version: "latest"}]
345330 },
from line 351
366351* **`tools`:** Enables code execution (required for Skills)
367352
368353<Note>
369 Skills are generally available on the Claude API and don't require a beta header. The examples on this page still send the `skills-2025-10-02` beta header and use the SDKs' `beta` namespace. Both remain valid, so you can run the examples as written and omit the header in your own requests.
354 Skills are generally available on the Claude API and don't require a beta header. This covers the Skills API, the `container.skills` parameter, and the Files API. Requests that still send the `skills-2025-10-02` or `files-api-2025-04-14` header keep working, and the Skills API and Files API return the earlier response format for them. The PHP tabs in this quickstart still call the SDK's `beta` namespace and send those headers, so their printed output shows the earlier response fields.
370355
371356 The examples use the `code_execution_20260521` tool version, and the Step 3 code parses the result types that current tool versions return. Skills also work with older [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) versions such as `code_execution_20250825`: any current code execution tool version satisfies the Skills requirement without a beta header. If you use a different version, use the tool `type` listed on the code execution tool page.
372357</Note>
from line 383
398383 curl --fail-with-body -sS "https://api.anthropic.com/v1/files/$file_id/content" \
399384 -H "x-api-key: $ANTHROPIC_API_KEY" \
400385 -H "anthropic-version: 2023-06-01" \
401 -H "anthropic-beta: files-api-2025-04-14" \
402386 -o "$output_path"
403387 echo "Presentation saved to $output_path"
404388 fi
from line 405
421405 if [[ -n "$file_id" ]]; then
422406 # Download the file and save it
423407 output_path="${TMPDIR:-/tmp}/renewable_energy.pptx"
424 ant beta:files download --file-id "$file_id" --output "$output_path"
408 ant files download --file-id "$file_id" --output "$output_path"
425409 echo "Presentation saved to $output_path"
426410 fi
427411 ```
from line 424
440424 if file_id:
441425 # Download the file and save it
442426 output_path = Path(tempfile.gettempdir()) / "renewable_energy.pptx"
443 file_content = client.beta.files.download(file_id=file_id)
427 file_content = client.files.download(file_id=file_id)
444428 file_content.write_to_file(output_path)
445429 print(f"Presentation saved to {output_path}")
446430 ```
from line 448
464448 if (fileId) {
465449 // Download the file and save it
466450 const outputPath = path.join(os.tmpdir(), "renewable_energy.pptx");
467 const fileContent = await client.beta.files.download(fileId);
451 const fileContent = await client.files.download(fileId);
468452 await fs.writeFile(outputPath, Buffer.from(await fileContent.arrayBuffer()));
469453 console.log(`Presentation saved to ${outputPath}`);
470454 }
from line 462
478462 foreach (var block in response.Content)
479463 {
480464 if (block.TryPickBashCodeExecutionToolResult(out var bashResult)
481 && bashResult.Content.TryPickBetaBashCodeExecutionResultBlock(out var bashResultBlock))
465 && bashResult.Content.TryPickBashCodeExecutionResultBlock(out var bashResultBlock))
482466 {
483467 foreach (var output in bashResultBlock.Content)
484468 {
from line 475
491475 {
492476 // Download the file and save it
493477 var outputPath = Path.Combine(Path.GetTempPath(), "renewable_energy.pptx");
494 using var download = await client.Beta.Files.Download(fileId);
478 using var download = await client.Files.Download(fileId);
495479 await using var source = await download.ReadAsStream();
496480 await using var destination = File.Create(outputPath);
497481 await source.CopyToAsync(destination);
from line 490
506490 var fileID string
507491 for _, block := range response.Content {
508492 switch result := block.AsAny().(type) {
509 case anthropic.BetaBashCodeExecutionToolResultBlock:
493 case anthropic.BashCodeExecutionToolResultBlock:
510494 if result.Content.Type == "bash_code_execution_result" {
511495 for _, output := range result.Content.Content {
512496 fileID = output.FileID
from line 502
518502 if fileID != "" {
519503 // Download the file and save it
520504 outputPath := filepath.Join(os.TempDir(), "renewable_energy.pptx")
521 fileContent, err := client.Beta.Files.Download(ctx, fileID, anthropic.BetaFileDownloadParams{})
505 fileContent, err := client.Files.Download(ctx, fileID)
522506 if err != nil {
523507 panic(err)
524508 }
from line 524
540524 // its Bash sub-tool, and generated files appear as bash_code_execution_output
541525 // items inside the bash_code_execution_tool_result block.
542526 String fileId = null;
543 for (BetaContentBlock block : response.content()) {
527 for (ContentBlock block : response.content()) {
544528 if (block.isBashCodeExecutionToolResult()) {
545529 var content = block.asBashCodeExecutionToolResult().content();
546 if (content.isBetaBashCodeExecutionResultBlock()) {
547 for (var output : content.asBetaBashCodeExecutionResultBlock().content()) {
530 if (content.isBashCodeExecutionResultBlock()) {
531 for (var output : content.asBashCodeExecutionResultBlock().content()) {
548532 fileId = output.fileId();
549533 }
550534 }
from line 538
554538 if (fileId != null) {
555539 // Download the file and save it
556540 Path outputPath = Files.createTempFile("renewable_energy", ".pptx");
557 try (HttpResponse fileContent = client.beta().files().download(fileId)) {
541 try (HttpResponse fileContent = client.files().download(fileId)) {
558542 Files.copy(fileContent.body(), outputPath, StandardCopyOption.REPLACE_EXISTING);
559543 }
560544 IO.println("Presentation saved to " + outputPath);
from line 588
604588 if file_id
605589 # Download the file and save it
606590 output_path = File.join(Dir.tmpdir, "renewable_energy.pptx")
607 file_content = client.beta.files.download(file_id)
591 file_content = client.files.download(file_id)
608592 File.binwrite(output_path, file_content.read)
609593 puts "Presentation saved to #{output_path}"
610594 end
from line 611
627611 -H "content-type: application/json" \
628612 -H "x-api-key: $ANTHROPIC_API_KEY" \
629613 -H "anthropic-version: 2023-06-01" \
630 -H "anthropic-beta: skills-2025-10-02" \
631614 -d '{
632615 "model": "claude-opus-5",
633616 "max_tokens": 16000,
from line 621
638621 {"role": "user", "content": "Create a quarterly sales tracking spreadsheet with sample data"}
639622 ],
640623 "tools": [{"type": "code_execution_20260521", "name": "code_execution"}]
641 }' | jq -r '"stop_reason=\(.stop_reason)"'
624 }'
642625 ```
643626
644627 ```bash CLI
645 ant beta:messages create --format json \
646 --beta skills-2025-10-02 <<'YAML' | jq -r '"stop_reason=\(.stop_reason)"'
628 ant messages create <<'YAML'
647629 model: claude-opus-5
648630 max_tokens: 16000
649631 container:
from line 643
661643 ```
662644
663645 ```python Python
664 response = client.beta.messages.create(
646 response = client.messages.create(
665647 model="claude-opus-5",
666648 max_tokens=16000,
667 betas=["skills-2025-10-02"],
668649 container={
669650 "skills": [{"type": "anthropic", "skill_id": "xlsx", "version": "latest"}]
670651 },
from line 660
679660 ```
680661
681662 ```typescript TypeScript
682 const response = await client.beta.messages.create({
663 const response = await client.messages.create({
683664 model: "claude-opus-5",
684665 max_tokens: 16000,
685 betas: ["skills-2025-10-02"],
686666 container: {
687667 skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }]
688668 },
from line 677
697677 ```
698678
699679 ```csharp C#
700 var response = await client.Beta.Messages.Create(
680 var response = await client.Messages.Create(
701681 new MessageCreateParams
702682 {
703683 Model = Model.ClaudeOpus5,
704684 MaxTokens = 16000,
705 Betas = ["skills-2025-10-02"],
706 Container = new BetaContainerParams
685 Container = new ContainerParams
707686 {
708687 Skills =
709688 [
710 new BetaSkillParams
689 new SkillParams
711690 {
712 Type = BetaSkillParamsType.Anthropic,
691 Type = SkillParamsType.Anthropic,
713692 SkillID = "xlsx",
714693 Version = "latest",
715694 },
from line 696
717696 },
718697 Messages =
719698 [
720 new BetaMessageParam
699 new MessageParam
721700 {
722701 Role = Role.User,
723702 Content = "Create a quarterly sales tracking spreadsheet with sample data",
724703 },
725704 ],
726 Tools = [new BetaCodeExecutionTool20260521()],
705 Tools = [new CodeExecutionTool20260521()],
727706 }
728707 );
729708 ```
730709
731710 ```go Go
732 response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{
711 response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
733712 Model: anthropic.ModelClaudeOpus5,
734713 MaxTokens: 16000,
735 Betas: []anthropic.AnthropicBeta{
736 anthropic.AnthropicBetaSkills2025_10_02,
737 },
738 Container: anthropic.BetaMessageNewParamsContainerUnion{
739 OfContainers: &anthropic.BetaContainerParams{
740 Skills: []anthropic.BetaSkillParams{
714 Container: anthropic.MessageCreateParamsContainerUnion{
715 OfContainers: &anthropic.ContainerParams{
716 Skills: []anthropic.SkillParams{
741717 {
742 Type: anthropic.BetaSkillParamsTypeAnthropic,
718 Type: anthropic.SkillParamsTypeAnthropic,
743719 SkillID: "xlsx",
744720 Version: anthropic.String("latest"),
745721 },
from line 722
746722 },
747723 },
748724 },
749 Messages: []anthropic.BetaMessageParam{
750 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create a quarterly sales tracking spreadsheet with sample data")),
725 Messages: []anthropic.MessageParam{
726 anthropic.NewUserMessage(anthropic.NewTextBlock("Create a quarterly sales tracking spreadsheet with sample data")),
751727 },
752 Tools: []anthropic.BetaToolUnionParam{
728 Tools: []anthropic.ToolUnionParam{
753729 {
754 OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{},
730 OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{},
755731 },
756732 },
757733 })
from line 737
761737 ```
762738
763739 ```java Java
764 BetaMessage response = client.beta().messages().create(
740 Message response = client.messages().create(
765741 MessageCreateParams.builder()
766742 .model(CLAUDE_OPUS_5)
767743 .maxTokens(16000)
768 .addBeta(AnthropicBeta.SKILLS_2025_10_02)
769744 .container(
770 BetaContainerParams.builder()
745 ContainerParams.builder()
771746 .addSkill(
772 BetaSkillParams.builder()
747 SkillParams.builder()
773748 .type(ANTHROPIC)
774749 .skillId("xlsx")
775750 .version("latest")
from line 753
778753 .build()
779754 )
780755 .addUserMessage("Create a quarterly sales tracking spreadsheet with sample data")
781 .addTool(BetaCodeExecutionTool20260521.builder().build())
756 .addTool(CodeExecutionTool20260521.builder().build())
782757 .build()
783758 );
784759
from line 780
805780 ```
806781
807782 ```ruby Ruby
808 response = client.beta.messages.create(
783 response = client.messages.create(
809784 model: "claude-opus-5",
810785 max_tokens: 16_000,
811 betas: ["skills-2025-10-02"],
812786 container: {
813787 skills: [{type: "anthropic", skill_id: "xlsx", version: "latest"}]
814788 },
from line 805
831805 -H "content-type: application/json" \
832806 -H "x-api-key: $ANTHROPIC_API_KEY" \
833807 -H "anthropic-version: 2023-06-01" \
834 -H "anthropic-beta: skills-2025-10-02" \
835808 -d '{
836809 "model": "claude-opus-5",
837810 "max_tokens": 16000,
from line 815
842815 {"role": "user", "content": "Write a 2-page report on the benefits of renewable energy"}
843816 ],
844817 "tools": [{"type": "code_execution_20260521", "name": "code_execution"}]
845 }' | jq -r '"stop_reason=\(.stop_reason)"'
818 }'
846819 ```
847820
848821 ```bash CLI
849 ant beta:messages create --format json \
850 --beta skills-2025-10-02 <<'YAML' | jq -r '"stop_reason=\(.stop_reason)"'
822 ant messages create <<'YAML'
851823 model: claude-opus-5
852824 max_tokens: 16000
853825 container:
from line 837
865837 ```
866838
867839 ```python Python
868 response = client.beta.messages.create(
840 response = client.messages.create(
869841 model="claude-opus-5",
870842 max_tokens=16000,
871 betas=["skills-2025-10-02"],
872843 container={
873844 "skills": [{"type": "anthropic", "skill_id": "docx", "version": "latest"}]
874845 },
from line 854
883854 ```
884855
885856 ```typescript TypeScript
886 const response = await client.beta.messages.create({
857 const response = await client.messages.create({
887858 model: "claude-opus-5",
888859 max_tokens: 16000,
889 betas: ["skills-2025-10-02"],
890860 container: {
891861 skills: [{ type: "anthropic", skill_id: "docx", version: "latest" }]
892862 },
from line 871
901871 ```
902872
903873 ```csharp C#
904 var response = await client.Beta.Messages.Create(
874 var response = await client.Messages.Create(
905875 new MessageCreateParams
906876 {
907877 Model = Model.ClaudeOpus5,
908878 MaxTokens = 16000,
909 Betas = ["skills-2025-10-02"],
910 Container = new BetaContainerParams
879 Container = new ContainerParams
911880 {
912881 Skills =
913882 [
914 new BetaSkillParams
883 new SkillParams
915884 {
916 Type = BetaSkillParamsType.Anthropic,
885 Type = SkillParamsType.Anthropic,
917886 SkillID = "docx",
918887 Version = "latest",
919888 },
from line 890
921890 },
922891 Messages =
923892 [
924 new BetaMessageParam
893 new MessageParam
925894 {
926895 Role = Role.User,
927896 Content = "Write a 2-page report on the benefits of renewable energy",
928897 },
929898 ],
930 Tools = [new BetaCodeExecutionTool20260521()],
899 Tools = [new CodeExecutionTool20260521()],
931900 }
932901 );
933902 ```
934903
935904 ```go Go
936 response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{
905 response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
937906 Model: anthropic.ModelClaudeOpus5,
938907 MaxTokens: 16000,
939 Betas: []anthropic.AnthropicBeta{
940 anthropic.AnthropicBetaSkills2025_10_02,
941 },
942 Container: anthropic.BetaMessageNewParamsContainerUnion{
943 OfContainers: &anthropic.BetaContainerParams{
944 Skills: []anthropic.BetaSkillParams{
908 Container: anthropic.MessageCreateParamsContainerUnion{
909 OfContainers: &anthropic.ContainerParams{
910 Skills: []anthropic.SkillParams{
945911 {
946 Type: anthropic.BetaSkillParamsTypeAnthropic,
912 Type: anthropic.SkillParamsTypeAnthropic,
947913 SkillID: "docx",
948914 Version: anthropic.String("latest"),
949915 },
from line 916
950916 },
951917 },
952918 },
953 Messages: []anthropic.BetaMessageParam{
954 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Write a 2-page report on the benefits of renewable energy")),
919 Messages: []anthropic.MessageParam{
920 anthropic.NewUserMessage(anthropic.NewTextBlock("Write a 2-page report on the benefits of renewable energy")),
955921 },
956 Tools: []anthropic.BetaToolUnionParam{
922 Tools: []anthropic.ToolUnionParam{
957923 {
958 OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{},
924 OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{},
959925 },
960926 },
961927 })
from line 931
965931 ```
966932
967933 ```java Java
968 BetaMessage response = client.beta().messages().create(
934 Message response = client.messages().create(
969935 MessageCreateParams.builder()
970936 .model(CLAUDE_OPUS_5)
971937 .maxTokens(16000)
972 .addBeta(AnthropicBeta.SKILLS_2025_10_02)
973938 .container(
974 BetaContainerParams.builder()
939 ContainerParams.builder()
975940 .addSkill(
976 BetaSkillParams.builder()
941 SkillParams.builder()
977942 .type(ANTHROPIC)
978943 .skillId("docx")
979944 .version("latest")
from line 947
982947 .build()
983948 )
984949 .addUserMessage("Write a 2-page report on the benefits of renewable energy")
985 .addTool(BetaCodeExecutionTool20260521.builder().build())
950 .addTool(CodeExecutionTool20260521.builder().build())
986951 .build()
987952 );
988953
from line 974
1009974 ```
1010975
1011976 ```ruby Ruby
1012 response = client.beta.messages.create(
977 response = client.messages.create(
1013978 model: "claude-opus-5",
1014979 max_tokens: 16_000,
1015 betas: ["skills-2025-10-02"],
1016980 container: {
1017981 skills: [{type: "anthropic", skill_id: "docx", version: "latest"}]
1018982 },
from line 999
1035999 -H "content-type: application/json" \
10361000 -H "x-api-key: $ANTHROPIC_API_KEY" \
10371001 -H "anthropic-version: 2023-06-01" \
1038 -H "anthropic-beta: skills-2025-10-02" \
10391002 -d '{
10401003 "model": "claude-opus-5",
10411004 "max_tokens": 16000,
from line 1009
10461009 {"role": "user", "content": "Generate a PDF invoice template"}
10471010 ],
10481011 "tools": [{"type": "code_execution_20260521", "name": "code_execution"}]
1049 }' | jq -r '"stop_reason=\(.stop_reason)"'
1012 }'
10501013 ```
10511014
10521015 ```bash CLI
1053 ant beta:messages create --format json \
1054 --beta skills-2025-10-02 <<'YAML' | jq -r '"stop_reason=\(.stop_reason)"'
1016 ant messages create <<'YAML'
10551017 model: claude-opus-5
10561018 max_tokens: 16000
10571019 container:
from line 1031
10691031 ```
10701032
10711033 ```python Python
1072 response = client.beta.messages.create(
1034 response = client.messages.create(
10731035 model="claude-opus-5",
10741036 max_tokens=16000,
1075 betas=["skills-2025-10-02"],
10761037 container={
10771038 "skills": [{"type": "anthropic", "skill_id": "pdf", "version": "latest"}]
10781039 },
from line 1048
10871048 ```
10881049
10891050 ```typescript TypeScript
1090 const response = await client.beta.messages.create({
1051 const response = await client.messages.create({
10911052 model: "claude-opus-5",
10921053 max_tokens: 16000,
1093 betas: ["skills-2025-10-02"],
10941054 container: {
10951055 skills: [{ type: "anthropic", skill_id: "pdf", version: "latest" }]
10961056 },
from line 1065
11051065 ```
11061066
11071067 ```csharp C#
1108 var response = await client.Beta.Messages.Create(
1068 var response = await client.Messages.Create(
11091069 new MessageCreateParams
11101070 {
11111071 Model = Model.ClaudeOpus5,
11121072 MaxTokens = 16000,
1113 Betas = ["skills-2025-10-02"],
1114 Container = new BetaContainerParams
1073 Container = new ContainerParams
11151074 {
11161075 Skills =
11171076 [
1118 new BetaSkillParams
1077 new SkillParams
11191078 {
1120 Type = BetaSkillParamsType.Anthropic,
1079 Type = SkillParamsType.Anthropic,
11211080 SkillID = "pdf",
11221081 Version = "latest",
11231082 },
from line 1084
11251084 },
11261085 Messages =
11271086 [
1128 new BetaMessageParam
1087 new MessageParam
11291088 {
11301089 Role = Role.User,
11311090 Content = "Generate a PDF invoice template",
11321091 },
11331092 ],
1134 Tools = [new BetaCodeExecutionTool20260521()],
1093 Tools = [new CodeExecutionTool20260521()],
11351094 }
11361095 );
11371096 ```
11381097
11391098 ```go Go
1140 response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{
1099 response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
11411100 Model: anthropic.ModelClaudeOpus5,
11421101 MaxTokens: 16000,
1143 Betas: []anthropic.AnthropicBeta{
1144 anthropic.AnthropicBetaSkills2025_10_02,
1145 },
1146 Container: anthropic.BetaMessageNewParamsContainerUnion{
1147 OfContainers: &anthropic.BetaContainerParams{
1148 Skills: []anthropic.BetaSkillParams{
1102 Container: anthropic.MessageCreateParamsContainerUnion{
1103 OfContainers: &anthropic.ContainerParams{
1104 Skills: []anthropic.SkillParams{
11491105 {
1150 Type: anthropic.BetaSkillParamsTypeAnthropic,
1106 Type: anthropic.SkillParamsTypeAnthropic,
11511107 SkillID: "pdf",
11521108 Version: anthropic.String("latest"),
11531109 },
from line 1110
11541110 },
11551111 },
11561112 },
1157 Messages: []anthropic.BetaMessageParam{
1158 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Generate a PDF invoice template")),
1113 Messages: []anthropic.MessageParam{
1114 anthropic.NewUserMessage(anthropic.NewTextBlock("Generate a PDF invoice template")),
11591115 },
1160 Tools: []anthropic.BetaToolUnionParam{
1116 Tools: []anthropic.ToolUnionParam{
11611117 {
1162 OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{},
1118 OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{},
11631119 },
11641120 },
11651121 })
from line 1125
11691125 ```
11701126
11711127 ```java Java
1172 BetaMessage response = client.beta().messages().create(
1128 Message response = client.messages().create(
11731129 MessageCreateParams.builder()
11741130 .model(CLAUDE_OPUS_5)
11751131 .maxTokens(16000)
1176 .addBeta(AnthropicBeta.SKILLS_2025_10_02)
11771132 .container(
1178 BetaContainerParams.builder()
1133 ContainerParams.builder()
11791134 .addSkill(
1180 BetaSkillParams.builder()
1135 SkillParams.builder()
11811136 .type(ANTHROPIC)
11821137 .skillId("pdf")
11831138 .version("latest")
from line 1141
11861141 .build()
11871142 )
11881143 .addUserMessage("Generate a PDF invoice template")
1189 .addTool(BetaCodeExecutionTool20260521.builder().build())
1144 .addTool(CodeExecutionTool20260521.builder().build())
11901145 .build()
11911146 );
11921147
from line 1168
12131168 ```
12141169
12151170 ```ruby Ruby
1216 response = client.beta.messages.create(
1171 response = client.messages.create(
12171172 model: "claude-opus-5",
12181173 max_tokens: 16_000,
1219 betas: ["skills-2025-10-02"],
12201174 container: {
12211175 skills: [{type: "anthropic", skill_id: "pdf", version: "latest"}]
12221176 },
from line 1196
12421196 Learn how to use Agent Skills to extend Claude's capabilities through the API.
12431197 </Card>
12441198
1245 <Card title="Create custom Skills" icon="code" href="https://platform.claude.com/docs/en/api/skills/create-skill">
1199 <Card title="Create custom Skills" icon="code" href="https://platform.claude.com/docs/en/api/skills/create">
12461200 Upload your own Skills for specialized tasks.
12471201 </Card>
12481202
No line in this hunk matches that.