anthropics / anthropics/skills
Unable to delete skill versions — API returns 500 Internal Server Error
- Dominant language
- Python
- Stars
- 176k
- Forks
- 20.8k
- Avg merge
- 7h 21m
- Merged PRs (30d)
- 5
Description
## **Description**
I am attempting to delete all versions of several custom skills using the Anthropic Agent Skills API (beta `skills-2025-10-02`).
However, all deletion attempts consistently return:
500: Internal Server Error
This prevents complete cleanup of custom skills.
***
## **Reproduction Code**
```python
client = anthropic.Anthropic(
api_key=os.getenv("AZURE_ANTHROPIC_API_KEY"),
base_url=os.getenv("AZURE_ANTHROPIC_BASE_URL"),
http_client=httpx.Client(verify=False) # For corporate proxies with self-signed certs
)
...
for custom_skill in skills:
# Step 1: Delete all versions
versions = client.beta.skills.versions.list(
skill_id=custom_skill.id,
betas=["skills-2025-10-02"]
)
print(f"Found {len(versions.data)} versions for skill ID: {custom_skill.id}")
for version in versions.data:
try:
client.beta.skills.versions.delete(
skill_id=custom_skill.id,
version=version.version,
betas=["skills-2025-10-02"]
)
print(f"Deleted {len(versions.data)} versions for skill ID: {custom_skill.id}")
except Exception as e:
print(f"Error: {e}")
```
***
## **Observed Output**
Found 1 versions for skill ID: skill_01AQqhAizF2pQYDMwhn3P16p
Error: Error code: 500 - {'type': 'error', 'error': {'type': 'api_error', 'message': 'Internal server error'}, 'request_id': 'req_011CYBSaf5R7RFyK7z2UqwXY'}
Found 1 versions for skill ID: skill_01JYuEVCxirnb7TNtzDArdpf
Error: Error code: 500 - {'type': 'error', 'error': {'type': 'api_error', 'message': 'Internal server error'}, 'request_id': 'req_011CYBSampUPU8LMDBiPnLCL'}
Found 1 versions for skill ID: skill_015Kuj3PP7ap7eadeuCkFgxg
Error: Error code: 500 - {'type': 'error', 'error': {'type': 'api_error', 'message': 'Internal server error'}, 'request_id': 'req_011CYBSbunj1tMZqF1EM6exE'}
Found 1 versions for skill ID: skill_019SGa2Y9wRdrENhgZKwCBcx
Error: Error code: 500 - {'type': 'error', 'error': {'type': 'api_error', 'message': 'Internal server error'}, 'request_id': 'req_011CYBSdM813KrJvMLb9yjTb'}
Found 1 versions for skill ID: skill_01S8ubCCHanVxLfMzK42m5xx
Error: Error code: 500 - {'type': 'error', 'error': {'type': 'api_error', 'message': 'Internal server error'}, 'request_id': 'req_011CYBSdkVvfHjjxbZ6Uh5SE'}
***
## **Expected Behavior**
All versions of each skill should be deletable successfully without server errors.
***
## **Additional Information**
* **SDK Version**: `anthropic==0.79.0`
* **Environment**: Azure-hosted Anthropic endpoint with custom base URL
* **Request IDs**:
* `req_011CYBSaf5R7RFyK7z2UqwXY`
* `req_011CYBSampUPU8LMDBiPnLCL`
* `req_011CYBSbunj1tMZqF1EM6exE`
* `req_011CYBSdM813KrJvMLb9yjTb`
* `req_011CYBSdkVvfHjjxbZ6Uh5SE`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.