Page history
skills
managed-agents/skills
History
managed-agents/skills Changed · +6 / -8 lines
from line 32
``` ```bash CLI - ant skills create \ - --file example_skill.zip + ant skills create --file example_skill.zip ``` ```python Python
from line 148
``` ```php PHP - // The PHP SDK exposes the Skills API under the beta namespace; field names can differ from other SDKs. use Anthropic\Client; use Anthropic\Core\FileParam; $client = new Client(); - $skill = $client->beta->skills->create( + $skill = $client->skills->create( files: [ - FileParam::fromResource(fopen('example_skill.zip', 'r')) + FileParam::fromResource(fopen('example_skill.zip', 'r')), ], ); echo "Created skill: {$skill->id}\n"; - echo "Latest version: {$skill->latestVersion}\n"; + echo "Latest version: {$skill->latestVersionID}\n"; ``` ```ruby Ruby
from line 347
model: 'claude-opus-5', system: 'You are a financial analysis agent.', skills: [ - ['type' => 'anthropic', 'skill_id' => 'xlsx'], - ['type' => 'custom', 'skill_id' => 'skill_01AbCdEfGhIjKlMnOpQrStUv', 'version' => 'latest'], + ['type' => 'anthropic', 'skillID' => 'xlsx'], + ['type' => 'custom', 'skillID' => 'skill_01AbCdEfGhIjKlMnOpQrStUv', 'version' => 'latest'], ], ); ```
managed-agents/skills Changed · +1 / -4 lines
from line 21
A custom skill is a directory containing a `SKILL.md` file plus any supporting files, uploaded to your workspace as a zip archive or as individual files. Creating the skill returns the `skill_*` ID you reference when attaching it to an agent. Anthropic pre-built skills are already available in every workspace and don't require this step. To use only pre-built skills, skip to [Attach skills to an agent](https://platform.claude.com/docs/en/managed-agents/skills#attach-skills-to-an-agent). -The Skills API doesn't require a beta header. Requests that still send `anthropic-beta: skills-2025-10-02` keep working and return the earlier response fields. - These examples omit the optional `display_name` field, so the skill's display name is derived from the `name` field in `SKILL.md`. An explicit `display_name` can be up to 255 characters and doesn't need to be unique within your workspace. <CodeGroup defaultLanguage="CLI">
from line 149
``` ```php PHP - <?php - + // The PHP SDK exposes the Skills API under the beta namespace; field names can differ from other SDKs. use Anthropic\Client; use Anthropic\Core\FileParam;
managed-agents/skills Changed · +40 / -35 lines
from line 1
--- title: Skills url: https://platform.claude.com/docs/en/managed-agents/skills -description: Attach reusable, filesystem-based expertise to your agent for domain-specific workflows. +description: Attach pre-built or custom skills to an agent in Claude Managed Agents to give it reusable, filesystem-based expertise for domain-specific workflows. --- Skills are reusable, filesystem-based resources that give your agent domain-specific expertise: workflows, context, and best practices that turn a general-purpose agent into a specialist. Each skill you add incurs a modest cost on the session's context window, adding instructions and metadata that help the model use the skill. Learn more in the [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) overview.
from line 21
A custom skill is a directory containing a `SKILL.md` file plus any supporting files, uploaded to your workspace as a zip archive or as individual files. Creating the skill returns the `skill_*` ID you reference when attaching it to an agent. Anthropic pre-built skills are already available in every workspace and don't require this step. To use only pre-built skills, skip to [Attach skills to an agent](https://platform.claude.com/docs/en/managed-agents/skills#attach-skills-to-an-agent). -The Skills API doesn't require a beta header. The cURL example still sends `anthropic-beta: skills-2025-10-02`, and the CLI and SDK `beta` commands add it automatically; requests that include it continue to work unchanged. +The Skills API doesn't require a beta header. Requests that still send `anthropic-beta: skills-2025-10-02` keep working and return the earlier response fields. -These examples omit the optional `display_title` field, so the skill's title is derived from `SKILL.md`. An explicitly passed `display_title` must be unique among the custom skills in your workspace. +These examples omit the optional `display_name` field, so the skill's display name is derived from the `name` field in `SKILL.md`. An explicit `display_name` can be up to 255 characters and doesn't need to be unique within your workspace. <CodeGroup defaultLanguage="CLI"> ```bash cURL
from line 30
curl -X POST "https://api.anthropic.com/v1/skills" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -F "files[]=@example_skill.zip" ``` ```bash CLI - ant beta:skills create \ + ant skills create \ --file example_skill.zip ```
from line 44
client = anthropic.Anthropic() - skill = client.beta.skills.create( + skill = client.skills.create( files=files_from_dir("example_skill"), ) print(f"Created skill: {skill.id}") - print(f"Latest version: {skill.latest_version}") + print(f"Latest version: {skill.latest_version_id}") ``` ```typescript TypeScript
from line 59
const client = new Anthropic(); - const skill = await client.beta.skills.create({ + const skill = await client.skills.create({ files: [await toFile(fs.createReadStream("example_skill.zip"), "example_skill.zip")] }); console.log(`Created skill: ${skill.id}`); - console.log(`Latest version: ${skill.latest_version}`); + console.log(`Latest version: ${skill.latest_version_id}`); ``` ```csharp C# using System.IO; using Anthropic; - using Anthropic.Models.Beta.Skills; + using Anthropic.Models.Skills; AnthropicClient client = new();
from line 81
], }; - var skill = await client.Beta.Skills.Create(parameters); + var skill = await client.Skills.Create(parameters); Console.WriteLine($"Created skill: {skill.ID}"); - Console.WriteLine($"Latest version: {skill.LatestVersion}"); + Console.WriteLine($"Latest version: {skill.LatestVersionID}"); ``` ```go Go
from line 109
} defer zipFile.Close() - skill, err := client.Beta.Skills.New(context.TODO(), anthropic.BetaSkillNewParams{ + skill, err := client.Skills.New(context.TODO(), anthropic.SkillNewParams{ Files: []io.Reader{zipFile}, }) if err != nil {
from line 117
} fmt.Printf("Created skill: %s\n", skill.ID) - fmt.Printf("Latest version: %s\n", skill.LatestVersion) + fmt.Printf("Latest version: %s\n", skill.LatestVersionID) } ```
from line 125
import com.anthropic.client.AnthropicClient; import com.anthropic.client.okhttp.AnthropicOkHttpClient; import com.anthropic.core.MultipartField; - import com.anthropic.models.beta.skills.SkillCreateParams; - import com.anthropic.models.beta.skills.SkillCreateResponse; + import com.anthropic.models.skills.Skill; + import com.anthropic.models.skills.SkillCreateParams; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files;
from line 143
.build()) .build(); - SkillCreateResponse skill = client.beta().skills().create(params); + Skill skill = client.skills().create(params); IO.println("Created skill: " + skill.id()); - IO.println("Latest version: " + skill.latestVersion().orElseThrow()); + IO.println("Latest version: " + skill.latestVersionId()); } ```
from line 173
client = Anthropic::Client.new - skill = client.beta.skills.create( + skill = client.skills.create( files: [ File.open("example_skill.zip", "rb") ]
from line 180
) puts "Created skill: #{skill.id}" - puts "Latest version: #{skill.latest_version}" + puts "Latest version: #{skill.latest_version_id}" ``` </CodeGroup> -To list, retrieve, delete, and version custom skills, see [Managing custom skills](https://platform.claude.com/docs/en/build-with-claude/skills-guide#managing-custom-skills). For the full request and response schemas, see the [Create Skill API reference](https://platform.claude.com/docs/en/api/beta/skills/create). Skill bundles upload directly to the Skills API rather than through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files). +To list, retrieve, delete, and version custom skills, see [Managing custom skills](https://platform.claude.com/docs/en/build-with-claude/skills-guide#managing-custom-skills). For the full request and response schemas, see the [Create Skill API reference](https://platform.claude.com/docs/en/api/skills/create). Skill bundles upload directly to the Skills API rather than through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files). ## Attach skills to an agent
from line 222
) ``` - ```bash CLI - ant beta:agents create <<'YAML' - name: Financial Analyst - model: claude-opus-5 - system: You are a financial analysis agent. - skills: - - type: anthropic - skill_id: xlsx - - type: custom - skill_id: skill_01AbCdEfGhIjKlMnOpQrStUv - version: latest - YAML - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ant beta:agents create < agent.yaml + ``` + + <File filename="agent.yaml"> + ```yaml + name: Financial Analyst + model: claude-opus-5 + system: You are a financial analysis agent. + skills: + - type: anthropic + skill_id: xlsx + - type: custom + skill_id: skill_01AbCdEfGhIjKlMnOpQrStUv + version: latest + ``` + </File> + </MultiFileExample> ```python Python agent = client.beta.agents.create(
managed-agents/skills Changed · +1 / -1 lines
from line 21
A custom skill is a directory containing a `SKILL.md` file plus any supporting files, uploaded to your workspace as a zip archive or as individual files. Creating the skill returns the `skill_*` ID you reference when attaching it to an agent. Anthropic pre-built skills are already available in every workspace and don't require this step. To use only pre-built skills, skip to [Attach skills to an agent](https://platform.claude.com/docs/en/managed-agents/skills#attach-skills-to-an-agent). -When you call the Skills API directly with cURL, pass the `anthropic-beta: skills-2025-10-02` header explicitly. The CLI and SDKs send it automatically. +The Skills API doesn't require a beta header. The cURL example still sends `anthropic-beta: skills-2025-10-02`, and the CLI and SDK `beta` commands add it automatically; requests that include it continue to work unchanged. These examples omit the optional `display_title` field, so the skill's title is derived from `SKILL.md`. An explicitly passed `display_title` must be unique among the custom skills in your workspace.
managed-agents/skills Changed · +16 / -12 lines
from line 380
Discovery finds skills at exactly `.claude/skills/<skill-name>/SKILL.md`, one directory level deep at the repository root: -```text wrap -your-repo/ -├── .claude/ -│ └── skills/ -│ ├── code-review/ -│ │ └── SKILL.md -│ └── release-process/ -│ ├── SKILL.md -│ └── scripts/ -│ └── run_checks.sh -└── src/ -``` +* `your-repo/` + + * `.claude/` + + * `skills/` + + * `code-review/` + * `SKILL.md` + + * `release-process/` + + * `SKILL.md` + * `scripts/` + * `run_checks.sh` + + * `src/` Locations that don't match this layout aren't discovered at session start:
managed-agents/skills First recorded · 582 lines, first recorded
## Create a custom skill ## Attach skills to an agent ## Load skills from a GitHub repository ## Next steps
The first capture of this source. The page was already there, and this is what it said.
---
title: Skills
url: https://platform.claude.com/docs/en/managed-agents/skills
description: Attach reusable, filesystem-based expertise to your agent for domain-specific workflows.
---
Skills are reusable, filesystem-based resources that give your agent domain-specific expertise: workflows, context, and best practices that turn a general-purpose agent into a specialist. Each skill you add incurs a modest cost on the session's context window, adding instructions and metadata that help the model use the skill. Learn more in the [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) overview.
Skills reach your agent in two ways: attach them through the agent's `skills` array, or [load them from a GitHub repository](https://platform.claude.com/docs/en/managed-agents/skills#load-skills-from-a-github-repository) mounted on the session. Attached skills come in two types. All skills work the same way: your agent invokes them automatically when they are relevant to the task.
* **Pre-built Anthropic skills:** Common document tasks such as PowerPoint, Excel, Word, and PDF handling (`pptx`, `xlsx`, `docx`, `pdf`).
* **Custom skills:** Skills you author and upload to your workspace.
To learn how to author custom skills, see [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and [Skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices). To upload a custom skill to your workspace, see [Create a custom skill](https://platform.claude.com/docs/en/managed-agents/skills#create-a-custom-skill).
<Note>
Managed Agents API requests require the `managed-agents-2026-04-01` beta header, except memory store endpoints, which use `agent-memory-2026-07-22` instead. The SDK sets the correct beta header automatically. See [Beta headers](https://platform.claude.com/docs/en/api/beta-headers#endpoint-specific-headers).
</Note>
## Create a custom skill
A custom skill is a directory containing a `SKILL.md` file plus any supporting files, uploaded to your workspace as a zip archive or as individual files. Creating the skill returns the `skill_*` ID you reference when attaching it to an agent. Anthropic pre-built skills are already available in every workspace and don't require this step. To use only pre-built skills, skip to [Attach skills to an agent](https://platform.claude.com/docs/en/managed-agents/skills#attach-skills-to-an-agent).
When you call the Skills API directly with cURL, pass the `anthropic-beta: skills-2025-10-02` header explicitly. The CLI and SDKs send it automatically.
These examples omit the optional `display_title` field, so the skill's title is derived from `SKILL.md`. An explicitly passed `display_title` must be unique among the custom skills in your workspace.
<CodeGroup defaultLanguage="CLI">
```bash cURL
curl -X POST "https://api.anthropic.com/v1/skills" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: skills-2025-10-02" \
-F "files[]=@example_skill.zip"
```
```bash CLI
ant beta:skills create \
--file example_skill.zip
```
```python Python
import anthropic
from anthropic.lib import files_from_dir
client = anthropic.Anthropic()
skill = client.beta.skills.create(
files=files_from_dir("example_skill"),
)
print(f"Created skill: {skill.id}")
print(f"Latest version: {skill.latest_version}")
```
```typescript TypeScript
import Anthropic from "@anthropic-ai/sdk";
import { toFile } from "@anthropic-ai/sdk";
import fs from "node:fs";
const client = new Anthropic();
const skill = await client.beta.skills.create({
files: [await toFile(fs.createReadStream("example_skill.zip"), "example_skill.zip")]
});
console.log(`Created skill: ${skill.id}`);
console.log(`Latest version: ${skill.latest_version}`);
```
```csharp C#
using System.IO;
using Anthropic;
using Anthropic.Models.Beta.Skills;
AnthropicClient client = new();
var parameters = new SkillCreateParams
{
Files = [
new FileStream("example_skill.zip", FileMode.Open, FileAccess.Read)
],
};
var skill = await client.Beta.Skills.Create(parameters);
Console.WriteLine($"Created skill: {skill.ID}");
Console.WriteLine($"Latest version: {skill.LatestVersion}");
```
```go Go
package main
import (
"context"
"fmt"
"io"
"log"
"os"
"github.com/anthropics/anthropic-sdk-go"
)
func main() {
client := anthropic.NewClient()
zipFile, err := os.Open("example_skill.zip")
if err != nil {
log.Fatal(err)
}
defer zipFile.Close()
skill, err := client.Beta.Skills.New(context.TODO(), anthropic.BetaSkillNewParams{
Files: []io.Reader{zipFile},
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("Created skill: %s\n", skill.ID)
fmt.Printf("Latest version: %s\n", skill.LatestVersion)
}
```
```java Java
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.core.MultipartField;
import com.anthropic.models.beta.skills.SkillCreateParams;
import com.anthropic.models.beta.skills.SkillCreateResponse;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
void main() throws IOException {
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
SkillCreateParams params = SkillCreateParams.builder()
.addFile(MultipartField.<InputStream>builder()
.value(Files.newInputStream(Path.of("example_skill.zip")))
.filename("example_skill.zip")
.contentType("application/zip")
.build())
.build();
SkillCreateResponse skill = client.beta().skills().create(params);
IO.println("Created skill: " + skill.id());
IO.println("Latest version: " + skill.latestVersion().orElseThrow());
}
```
```php PHP
<?php
use Anthropic\Client;
use Anthropic\Core\FileParam;
$client = new Client();
$skill = $client->beta->skills->create(
files: [
FileParam::fromResource(fopen('example_skill.zip', 'r'))
],
);
echo "Created skill: {$skill->id}\n";
echo "Latest version: {$skill->latestVersion}\n";
```
```ruby Ruby
require "anthropic"
client = Anthropic::Client.new
skill = client.beta.skills.create(
files: [
File.open("example_skill.zip", "rb")
]
)
puts "Created skill: #{skill.id}"
puts "Latest version: #{skill.latest_version}"
```
</CodeGroup>
To list, retrieve, delete, and version custom skills, see [Managing custom skills](https://platform.claude.com/docs/en/build-with-claude/skills-guide#managing-custom-skills). For the full request and response schemas, see the [Create Skill API reference](https://platform.claude.com/docs/en/api/beta/skills/create). Skill bundles upload directly to the Skills API rather than through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files).
## Attach skills to an agent
Attach skills when creating an agent. Each [session](https://platform.claude.com/docs/en/managed-agents/sessions) supports up to 500 skills, counted as the deduplicated set across every agent in the session (see [Multiagent orchestration](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration)).
<Note>
Mounting more skills increases the time it takes for the session's sandbox to start. Attach only the skills each agent needs for its task.
</Note>
Each entry in the `skills` array uses the following fields:
| Field | Description |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `type` | Either `anthropic` for pre-built skills or `custom` for workspace-authored skills. |
| `skill_id` | The skill identifier. For Anthropic skills, use the short name (for example, `xlsx`). For custom skills, use the `skill_*` ID returned at creation (see [Create a custom skill](https://platform.claude.com/docs/en/managed-agents/skills#create-a-custom-skill)). |
| `version` | Pin to a specific version or use `latest`. Optional. Defaults to `latest` when omitted. Applies to both Anthropic and custom skills. |
<CodeGroup defaultLanguage="CLI">
```bash cURL
agent=$(curl -sS https://api.anthropic.com/v1/agents \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
--json @- <<'EOF'
{
"name": "Financial Analyst",
"model": "claude-opus-5",
"system": "You are a financial analysis agent.",
"skills": [
{"type": "anthropic", "skill_id": "xlsx"},
{"type": "custom", "skill_id": "skill_01AbCdEfGhIjKlMnOpQrStUv", "version": "latest"}
]
}
EOF
)
```
```bash CLI
ant beta:agents create <<'YAML'
name: Financial Analyst
model: claude-opus-5
system: You are a financial analysis agent.
skills:
- type: anthropic
skill_id: xlsx
- type: custom
skill_id: skill_01AbCdEfGhIjKlMnOpQrStUv
version: latest
YAML
```
```python Python
agent = client.beta.agents.create(
name="Financial Analyst",
model="claude-opus-5",
system="You are a financial analysis agent.",
skills=[
{
"type": "anthropic",
"skill_id": "xlsx",
},
{
"type": "custom",
"skill_id": "skill_01AbCdEfGhIjKlMnOpQrStUv",
"version": "latest",
},
],
)
```
```typescript TypeScript
const agent = await client.beta.agents.create({
name: "Financial Analyst",
model: "claude-opus-5",
system: "You are a financial analysis agent.",
skills: [
{
type: "anthropic",
skill_id: "xlsx"
},
{
type: "custom",
skill_id: "skill_01AbCdEfGhIjKlMnOpQrStUv",
version: "latest"
}
]
});
```
```csharp C#
using Anthropic.Models.Beta.Agents;
var agent = await client.Beta.Agents.Create(new()
{
Name = "Financial Analyst",
Model = BetaManagedAgentsModel.ClaudeOpus5,
System = "You are a financial analysis agent.",
Skills =
[
new BetaManagedAgentsAnthropicSkillParams { Type = BetaManagedAgentsAnthropicSkillParamsType.Anthropic, SkillID = "xlsx" },
new BetaManagedAgentsCustomSkillParams { Type = BetaManagedAgentsCustomSkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", Version = "latest" },
],
});
```
```go Go
agent, err := client.Beta.Agents.New(ctx, anthropic.BetaAgentNewParams{
Name: "Financial Analyst",
Model: anthropic.BetaManagedAgentsModelConfigParams{
ID: anthropic.BetaManagedAgentsModelClaudeOpus5,
},
System: anthropic.String("You are a financial analysis agent."),
Cut at 300 lines.