Claude skill, self-hosted: overview and architecture
What the self-hosted path builds, the two HTTP surfaces it can serve, and which one AMC connects to.
The claude-skills-agent-creator skill turns an existing Claude skill into a containerized HTTP service. Inside the container, Anthropic's claude-agent-sdk loads the skill and runs it. You build the image and host the container yourself. There is no Foundry hosting on this path.
The creator is itself a Claude Code skill. You hand it a skill folder (one that contains a SKILL.md) and answer a few questions. It copies its own templates into a new agent directory and fills in the placeholders. It does not build the image or deploy anything.
Two host surfaces: pick one
A generated agent serves exactly one of two HTTP surfaces. The creator always asks which one you want.
| Surface | Endpoints | Served by | Who calls it |
|---|---|---|---|
| Plain HTTP (the creator's default, called A2A in the skill) | GET /health, POST /execute (NDJSON stream), POST /tasks/{task_id}/cancel | http_agent_server.py plus __main__.py | An orchestrator that speaks the /execute NDJSON contract |
| AMC variant | GET /health, GET /workflows, POST /runs, GET /runs/{id}/status, GET /runs/{id}/events (SSE), and the rest of the AMC contract | app.py built on amc_sdk.build_app | Agent Mission Control |
Architecture
AMC ──HTTP + JSON + SSE──▶ app.py (amc_sdk.build_app, port 8080)
│
▼
claude_skills_agent.py (the SDK core)
│ query(prompt, options)
▼
claude-agent-sdk ──▶ bundled Claude Code CLI ──▶ Claude
│ (Anthropic API or Microsoft Foundry)
▼
/app/.claude/skills/<skill-name>/SKILL.md (baked into the image)The core is the same for both surfaces. It runs claude-agent-sdk with cwd=/app and setting_sources=["project"], so the SDK discovers the skill at /app/.claude/skills/<skill-name>/. Only the host layer around it changes: http_agent_server.py for plain HTTP, or amc_sdk for AMC.
- Brain:
claude-agent-sdk>=0.2.138. The Claude Code CLI ships inside the wheel as a native binary, so the image needs no Node.js. - Credentials: Anthropic API direct, or Claude on Microsoft Foundry. Both come in at runtime as environment variables, never baked into the image.
- Skill: copied unchanged into the image. When the skill expects a particular filesystem, the Dockerfile reshapes the filesystem instead of patching the skill.
- Permissions:
permission_mode="dontAsk"denies any tool outside the allowlist instead of prompting, and the container runs as a non-root user.
How this differs from the Foundry-hosted path
The same skill can also run inside Microsoft Foundry, hosted by Microsoft Agent Framework. Both paths use claude-agent-sdk as the brain and turn an existing skill into a deployed agent. They differ only in where the agent runs: here it runs in a container you operate and expose over HTTP. For the Foundry variant, see Claude skill on Microsoft Foundry.
What the creator asks you
| Input | Choices |
|---|---|
| Source skill path | Absolute path to the skill folder. If the skill also ships as a plugin, copy from the bare folder, not the .plugin wrapper. |
| Credentials backend | Foundry (the creator's default) or Anthropic-direct. |
| Trigger mode | Single-purpose (always run the skill) or multi-purpose (hint the skill and let Claude decide). See The agent core and prompt strategies. |
| Host surface | Plain HTTP (/execute) or the AMC variant. Always asked. |
It does not ask for a port. A plain-HTTP agent takes the next free port from the port convention; the AMC variant always uses 8080.
The generation pipeline
- Analyze the skill. Read
SKILL.mdandscripts/: the frontmattername:anddescription:, hardcoded paths (grep -r "/sessions/" scripts/), third-party Python imports, binaries the scripts call, credential needs, and where outputs go. - Decide naming. Directory, class, package, and image names derive from the skill's
name:. See Project layout and placeholders. - Generate the scaffold. Copy verbatim files unchanged. Fill each
.tplfile and write it without the.tplsuffix. - Patch the skill-specific blocks: the prompt strategy, Dockerfile prep, tool labels, and outputs handling.
- Verify that the generated Python parses, and optionally run
tests/test_run.pyif credentials are available. - Record the port for a plain-HTTP agent.
Rules the generated agent keeps
- Never modify
http_agent_server.py. It is the shared transport contract. - Never bake secrets into the image.
.envis excluded by.dockerignore. - Never patch the source skill. Match the filesystem to what it expects.
- Never ship
tests/in the image..dockerignoreexcludes it.
For how agents connect to AMC in general, read How agents connect and The integration contract. To compare build paths, see Choose a build path.
Related
Last updated 2026-10-21