AGENT SKILL

resources

Creates and manages a custom Skill on the Anthropic platform (beta). Skills are uploaded from local files and can be attached to Managed Agents.

License 许可
MPL-2.0
最近更新
2026-11-15
Stars
★ 19
Forks
11

01 前言 Front Matter

page_title
anthropic_skill Resource - anthropic
description
Creates and manages a custom Skill on the Anthropic platform (beta). Skills are uploaded from local files and can be attached to Managed Agents.
subcategory
Skills

02 资源文件 31

03 SKILL.md 正文

anthropic_skill (Resource)

Creates and manages a custom Skill on the Anthropic platform (beta). Skills are uploaded from local files and can be attached to Managed Agents.

API: POST/GET/DELETE /v1/skills[/{id}] (Skills API). Auth: Standard API key (api_key / ANTHROPIC_API_KEY). Beta header: anthropic-beta: skills-2025-10-02. Cost: Free for management, billable when used.

Example Usage

resource "anthropic_skill" "example" {
  display_title = "Example Skill"
  # Explicit patterns avoid sweeping the Terraform config itself into the
  # bundle. The provider preserves each file's path relative to the bundle
  # root, so SKILL.md can reference files in subdirectories at runtime.
  files = [
    for f in setunion(
      fileset(path.module, "SKILL.md"),
      fileset(path.module, "references/**"),
    ) : "${path.module}/${f}"
  ]
  force_destroy = true
}

output "skill_id" {
  description = "ID of the skill."
  value       = anthropic_skill.example.id
}

output "skill_source" {
  description = "Source of the skill."
  value       = anthropic_skill.example.source
}

<!-- schema generated by tfplugindocs -->

Schema

Required

  • files (List of String) Local file paths to upload for the skill. Must include a SKILL.md file at the root of the directory.

Optional

  • display_title (String) Human-readable display title for the skill. Not included in the prompt sent to the model.
  • force_destroy (Boolean) When true, all skill versions are deleted before the skill is destroyed, allowing Terraform to remove a skill that still has versions. Defaults to false. Set to true only if you intend for all versions to be permanently deleted.

~> Note: This only deletes versions when the skill is destroyed, not when setting this parameter to true. Once this parameter is set to true, there must be a successful terraform apply run before a destroy is required to update this value in the resource state. Without a successful terraform apply after this parameter is set, this flag will have no effect. If setting this field in the same operation that would require replacing the skill or destroying the skill, this flag will not work. Additionally, when importing a skill, a successful terraform apply is required to set this value in state before it will take effect on a destroy operation.

Read-Only

  • created_at (String) ISO 8601 timestamp of when the skill was created.
  • id (String) Unique skill identifier assigned by the API.
  • latest_version (String) The latest version identifier for the skill.
  • source (String) Source of the skill. For user-created skills this is "custom".
  • updated_at (String) ISO 8601 timestamp of when the skill was last updated.

Import

Import an existing skill using its ID:

terraform import anthropic_skill.example <skill_id>

04 同仓库更多 Skills