From 4cbd0a0a3c11e298298db84850f6a62a04ceedc8 Mon Sep 17 00:00:00 2001 From: yusyus Date: Tue, 11 Nov 2025 23:39:56 +0300 Subject: [PATCH] fix: Add anthropic-beta header and correct field name for skill uploads Fixes #182 Changes: - Add 'anthropic-beta: skills-2025-10-02' header (required by Anthropic Skills API) - Change multipart field name from 'skill' to 'files[]' (correct API format) Without these fixes, all upload attempts returned 404 errors. Verified: - All 379 tests passing (100%) - No regressions in test suite - Upload functionality corrected per API requirements Co-authored-by: Straughter "BatmanOsama" Guthrie Original PR: #183 --- src/skill_seekers/cli/upload_skill.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/skill_seekers/cli/upload_skill.py b/src/skill_seekers/cli/upload_skill.py index 8204d73..0694195 100755 --- a/src/skill_seekers/cli/upload_skill.py +++ b/src/skill_seekers/cli/upload_skill.py @@ -74,7 +74,8 @@ def upload_skill_api(zip_path): api_url = "https://api.anthropic.com/v1/skills" headers = { "x-api-key": api_key, - "anthropic-version": "2023-06-01" + "anthropic-version": "2023-06-01", + "anthropic-beta": "skills-2025-10-02" } try: @@ -86,7 +87,7 @@ def upload_skill_api(zip_path): print("⏳ Uploading to Anthropic API...") files = { - 'skill': (zip_path.name, zip_data, 'application/zip') + 'files[]': (zip_path.name, zip_data, 'application/zip') } response = requests.post(