{"id":49847893,"url":"https://github.com/0xArx/claude-managed-agents-skill","last_synced_at":"2026-05-31T03:00:34.851Z","repository":{"id":350118616,"uuid":"1205395511","full_name":"0xArx/claude-managed-agents-skill","owner":"0xArx","description":"Claude Code skill for building with the Claude Managed Agents API — event loops, production patterns, MCP auth, debugging, and more.","archived":false,"fork":false,"pushed_at":"2026-04-09T00:54:55.000Z","size":35,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-09T01:23:06.898Z","etag":null,"topics":["ai-agent","anthropic","anthropic-api","claude-code","claude-code-skill","claude-managed-agents","claude-skill","llm"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xArx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-08T23:35:06.000Z","updated_at":"2026-04-09T01:05:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/0xArx/claude-managed-agents-skill","commit_stats":null,"previous_names":["0xarx/claude-managed-agents-skill"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/0xArx/claude-managed-agents-skill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xArx%2Fclaude-managed-agents-skill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xArx%2Fclaude-managed-agents-skill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xArx%2Fclaude-managed-agents-skill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xArx%2Fclaude-managed-agents-skill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xArx","download_url":"https://codeload.github.com/0xArx/claude-managed-agents-skill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xArx%2Fclaude-managed-agents-skill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33717419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","anthropic","anthropic-api","claude-code","claude-code-skill","claude-managed-agents","claude-skill","llm"],"created_at":"2026-05-14T13:01:05.182Z","updated_at":"2026-05-31T03:00:34.845Z","avatar_url":"https://github.com/0xArx.png","language":null,"funding_links":[],"categories":["Community Projects"],"sub_categories":[],"readme":"# Claude Managed Agents — Claude Code Skill\n\n![Claude Managed Agents Skill](banner.svg)\n\nA [Claude Code skill](https://docs.anthropic.com/en/docs/claude-code/skills) that gives Claude deep, always-available knowledge of the **Claude Managed Agents API** — Anthropic's hosted infrastructure for running Claude as an autonomous agent in a cloud container.\n\nInstead of you having to paste documentation or explain the API every time, this skill loads the right context automatically whenever you're building with managed agents.\n\n\u003e **Official documentation:** [platform.claude.com/docs/en/managed-agents/overview](https://platform.claude.com/docs/en/managed-agents/overview)\n\u003e This skill is a curated companion to those docs — focused on patterns, gotchas, and production usage.\n\u003e Always refer to the official docs for the latest API changes, new features, and full reference material.\n\n---\n\n## What This Skill Covers\n\n| Topic | Where |\n|---|---|\n| Agent / Environment / Session creation | `SKILL.md` |\n| The event loop, stream ordering, stop_reason handling | `SKILL.md` + `references/events.md` |\n| All event types (user ↔ agent ↔ session ↔ span) | `references/events.md` |\n| Built-in tools, custom tools, tool permissions | `references/tools.md` |\n| MCP server integration (two-step auth pattern) | `references/tools.md` + `references/vaults-and-mcp.md` |\n| Vaults and credential management | `references/vaults-and-mcp.md` |\n| Container specs, pre-installed runtimes, filesystem layout | `references/container-reference.md` |\n| Session CRUD, usage/stats fields, mid-session resource management | `references/session-management.md` |\n| Outcomes, Multiagent orchestration, Memory Stores (research preview) | `references/research-preview.md` |\n| System prompt engineering for agents, cost monitoring, debugging, testing, silent failures | `references/production-patterns.md` |\n| Rate limits, branding guidelines, common mistakes | `SKILL.md` |\n\n---\n\n## Installation\n\n### Option 1 — Clone directly into skills folder\n\n```bash\ngit clone https://github.com/0xArx/claude-managed-agents-skill \\\n  ~/.claude/skills/claude-managed-agents\n```\n\n### Option 2 — Copy manually\n\nDownload or clone this repository, then copy the folder:\n\n```bash\ncp -r claude-managed-agents-skill ~/.claude/skills/claude-managed-agents\n```\n\n### Option 3 — One-liner (curl)\n\n```bash\nmkdir -p ~/.claude/skills \u0026\u0026 \\\n  curl -L https://github.com/0xArx/claude-managed-agents-skill/archive/refs/heads/main.tar.gz \\\n  | tar -xz -C ~/.claude/skills --strip-components=1 \\\n    --one-top-level=claude-managed-agents\n```\n\nThat's it. Claude Code picks up skills automatically from `~/.claude/skills/` — no restart needed.\n\n---\n\n## Requirements\n\n- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) — any recent version\n- An `ANTHROPIC_API_KEY` with access to the `managed-agents-2026-04-01` beta\n\n\u003e **Note:** The managed agents beta is not universally available yet. If you don't have access,\n\u003e [request it here](https://claude.com/form/claude-managed-agents).\n\n---\n\n## How It Works\n\nClaude Code uses a **progressive disclosure** system for skills:\n\n1. The skill `name` and `description` are always in context — Claude uses these to decide when to activate the skill.\n2. `SKILL.md` loads in full whenever the skill triggers — covers the complete build flow.\n3. Reference files (`references/`) load on demand when Claude needs deeper detail on a specific topic.\n\nThis means the skill costs essentially zero context when you're not using it, and loads exactly what's needed when you are.\n\n### When does it trigger?\n\nThe skill activates automatically when you:\n\n- Ask about `client.beta.agents`, `client.beta.sessions`, or `client.beta.environments`\n- Want to stream agent events or build an event loop\n- Ask about tool permission policies, custom tools, or MCP connectors\n- Mention outcomes, multiagent orchestration, or memory stores\n- Ask how to run Claude for long-running or async tasks\n- Want Claude to execute bash, write files, or browse the web autonomously in a container\n\n---\n\n## File Structure\n\n```\nclaude-managed-agents/\n├── SKILL.md                          # Core skill — always loaded when triggered\n└── references/\n    ├── events.md                     # Complete event type reference + full event loop pattern\n    ├── tools.md                      # Built-in tools, custom tools, MCP setup\n    ├── vaults-and-mcp.md             # Vault lifecycle, credential types, MCP auth\n    ├── container-reference.md        # Container specs, runtimes, filesystem layout\n    ├── session-management.md         # Session CRUD, usage/stats, mid-session resources\n    ├── research-preview.md           # Outcomes, Multiagent, Memory Stores\n    └── production-patterns.md        # System prompts, cost monitoring, debugging, testing\n```\n\n---\n\n## Key Things Claude Will Know\n\nMost managed agents bugs come from a handful of non-obvious patterns. This skill teaches Claude all of them:\n\n**Stream ordering** — Open the event stream *before* sending the message, not after. The API buffers events but race conditions in Python are real.\n\n**`stop_reason` on every idle** — `session.status_idle` fires both when the agent is done *and* when it needs your input (tool confirmation, custom tool result). Always check `stop_reason.type`.\n\n**MCP auth split** — The server URL goes on the agent definition. Credentials go in a Vault attached at session creation. Never put auth tokens directly on the agent.\n\n**Agent version locking** — Every `agent.update()` increments the version. You must pass the current `version` back or the update will fail.\n\n**Custom tool hang** — If you define a custom tool and don't handle `agent.custom_tool_use` in your event loop, the agent silently waits forever.\n\n**GitHub token rotation** — Update a GitHub resource mid-session via `sessions.resources.update()`. No need to delete and recreate the session.\n\n**`session.deleted` terminates the stream** — If the session is deleted while you're listening, you'll get a `session.deleted` event and no further events will arrive.\n\n---\n\n## What This Skill Is NOT\n\nThis is a **Claude Code skill** — documentation that helps Claude write code using the Managed Agents API. It is not:\n\n- An agent itself\n- The Anthropic pre-built agent skills (`xlsx`, `pdf`, `docx`, `pptx`) — those are document-processing capabilities agents use during tasks\n- A wrapper or SDK of any kind\n\n---\n\n## API Coverage\n\nBuilt against the `managed-agents-2026-04-01` beta header (April 2026).\n\nResearch Preview features (`outcomes`, `multiagent`, `memory_stores`) require:\n```\nanthropic-beta: managed-agents-2026-04-01-research-preview\n```\nand separate access approval.\n\nFor the full, always-up-to-date API reference, visit the official docs:\n**[platform.claude.com/docs/en/managed-agents/overview](https://platform.claude.com/docs/en/managed-agents/overview)**\n\n---\n\n## Contributing\n\nFound something missing, outdated, or wrong? PRs welcome.\n\nThe skill is intentionally focused on **patterns and gotchas** — the things that aren't obvious from reading the API types. When contributing, ask: *would a developer hit this on their first or second day with the API?* If yes, it belongs here.\n\n**Adding content:**\n- Core concepts and the build flow → `SKILL.md`\n- New event types or stop_reason variants → `references/events.md`\n- Tool configuration patterns → `references/tools.md`\n- Keep each reference file under ~300 lines; split if needed\n\n---\n\n## License\n\nMIT — use it, fork it, remix it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xArx%2Fclaude-managed-agents-skill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xArx%2Fclaude-managed-agents-skill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xArx%2Fclaude-managed-agents-skill/lists"}