Claude Code API Pattern: Turn a Skill Folder Into a Product Endpoint
How to expose Claude Code work through an API with uploaded inputs, retained logs, typed results, and artifact delivery.
Audience: Product engineers who want Claude Code behind a button, webhook, or backend job.
The problem
Claude Code is a powerful operator, but a product needs an endpoint: submit work, poll status, inspect logs, and receive a parseable result.
Implementation path
Use Argo as the control plane: create a skill, call the run endpoint with prompt and documents, poll run status, read logs when needed, and consume argo.result.v1 when terminal.
Tradeoffs and failure modes
The API boundary forces you to define inputs and outputs, which is exactly what makes the workflow supportable.
API call
curl -X POST "$ARGO_API_URL/api/skills/<skill_id>/run" \
-H "Authorization: Bearer $ARGO_API_TOKEN" \
-F "prompt=Run the playbook against the attached inputs" \
-F "documents=@./sample.pdf"
Run this on Argo