claudecode-omc 5.6.4 → 5.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.local/commands/code-review.md +416 -0
- package/.local/commands/pr.md +250 -0
- package/.local/commands/prp-pr.md +244 -0
- package/.local/guidelines/CLAUDE.md +47 -0
- package/.local/skills/prompt-optimizer/SKILL.md +23 -4
- package/bundled/manifest.json +4 -4
- package/bundled/upstream/anthropic-skills/skills/algorithmic-art/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/brand-guidelines/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/canvas-design/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/SKILL.md +120 -58
- package/bundled/upstream/anthropic-skills/skills/claude-api/curl/examples.md +9 -9
- package/bundled/upstream/anthropic-skills/skills/claude-api/curl/managed-agents.md +336 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/go/managed-agents/README.md +561 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/java/claude-api.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/java/managed-agents/README.md +442 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/php/claude-api.md +10 -10
- package/bundled/upstream/anthropic-skills/skills/claude-api/php/managed-agents/README.md +435 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/README.md +16 -16
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/batches.md +3 -3
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/files-api.md +3 -3
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/streaming.md +7 -7
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/tool-use.md +19 -19
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/managed-agents/README.md +332 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/claude-api.md +4 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/managed-agents/README.md +389 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/agent-design.md +101 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/error-codes.md +11 -4
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/live-sources.md +60 -48
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-api-reference.md +372 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-client-patterns.md +209 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-core.md +220 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-environments.md +211 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-events.md +195 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-memory.md +197 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-multiagent.md +99 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-onboarding.md +114 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-outcomes.md +106 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-overview.md +67 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-tools.md +315 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-webhooks.md +110 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/model-migration.md +779 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/models.md +16 -14
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/prompt-caching.md +45 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/shared/tool-use-concepts.md +28 -6
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/README.md +15 -15
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/batches.md +2 -2
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/files-api.md +1 -1
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/streaming.md +5 -5
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/tool-use.md +15 -15
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/managed-agents/README.md +359 -0
- package/bundled/upstream/anthropic-skills/skills/internal-comms/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/mcp-builder/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/skill-creator/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/theme-factory/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/web-artifacts-builder/LICENSE.txt +1 -1
- package/bundled/upstream/anthropic-skills/skills/webapp-testing/LICENSE.txt +1 -1
- package/bundled/upstream/ecc/.omc-source/bundle.json +2 -3
- package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +4 -4
- package/bundled/upstream/ecc/agents/a11y-architect.md +10 -2
- package/bundled/upstream/ecc/agents/architect.md +9 -0
- package/bundled/upstream/ecc/agents/build-error-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/chief-of-staff.md +9 -0
- package/bundled/upstream/ecc/agents/code-architect.md +9 -0
- package/bundled/upstream/ecc/agents/code-explorer.md +10 -1
- package/bundled/upstream/ecc/agents/code-reviewer.md +87 -1
- package/bundled/upstream/ecc/agents/code-simplifier.md +9 -0
- package/bundled/upstream/ecc/agents/comment-analyzer.md +10 -1
- package/bundled/upstream/ecc/agents/conversation-analyzer.md +9 -0
- package/bundled/upstream/ecc/agents/cpp-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/cpp-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/csharp-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/dart-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/database-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/django-build-resolver.md +252 -0
- package/bundled/upstream/ecc/agents/django-reviewer.md +169 -0
- package/bundled/upstream/ecc/agents/doc-updater.md +9 -0
- package/bundled/upstream/ecc/agents/docs-lookup.md +9 -0
- package/bundled/upstream/ecc/agents/e2e-runner.md +9 -0
- package/bundled/upstream/ecc/agents/fastapi-reviewer.md +79 -0
- package/bundled/upstream/ecc/agents/flutter-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/fsharp-reviewer.md +109 -0
- package/bundled/upstream/ecc/agents/gan-evaluator.md +9 -0
- package/bundled/upstream/ecc/agents/gan-generator.md +9 -0
- package/bundled/upstream/ecc/agents/gan-planner.md +9 -0
- package/bundled/upstream/ecc/agents/go-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/go-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/harmonyos-app-resolver.md +182 -0
- package/bundled/upstream/ecc/agents/harness-optimizer.md +9 -0
- package/bundled/upstream/ecc/agents/healthcare-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/homelab-architect.md +107 -0
- package/bundled/upstream/ecc/agents/java-build-resolver.md +133 -11
- package/bundled/upstream/ecc/agents/java-reviewer.md +130 -32
- package/bundled/upstream/ecc/agents/kotlin-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/kotlin-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/loop-operator.md +9 -0
- package/bundled/upstream/ecc/agents/mle-reviewer.md +162 -0
- package/bundled/upstream/ecc/agents/network-architect.md +106 -0
- package/bundled/upstream/ecc/agents/network-config-reviewer.md +106 -0
- package/bundled/upstream/ecc/agents/network-troubleshooter.md +128 -0
- package/bundled/upstream/ecc/agents/opensource-forker.md +9 -0
- package/bundled/upstream/ecc/agents/opensource-packager.md +9 -0
- package/bundled/upstream/ecc/agents/opensource-sanitizer.md +9 -0
- package/bundled/upstream/ecc/agents/performance-optimizer.md +9 -0
- package/bundled/upstream/ecc/agents/planner.md +9 -0
- package/bundled/upstream/ecc/agents/pr-test-analyzer.md +9 -0
- package/bundled/upstream/ecc/agents/python-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/pytorch-build-resolver.md +12 -3
- package/bundled/upstream/ecc/agents/refactor-cleaner.md +9 -0
- package/bundled/upstream/ecc/agents/rust-build-resolver.md +9 -0
- package/bundled/upstream/ecc/agents/rust-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/security-reviewer.md +9 -0
- package/bundled/upstream/ecc/agents/seo-specialist.md +10 -1
- package/bundled/upstream/ecc/agents/silent-failure-hunter.md +9 -0
- package/bundled/upstream/ecc/agents/swift-build-resolver.md +170 -0
- package/bundled/upstream/ecc/agents/swift-reviewer.md +116 -0
- package/bundled/upstream/ecc/agents/tdd-guide.md +9 -0
- package/bundled/upstream/ecc/agents/type-design-analyzer.md +10 -1
- package/bundled/upstream/ecc/agents/typescript-reviewer.md +9 -0
- package/bundled/upstream/ecc/commands/auto-update.md +28 -0
- package/bundled/upstream/ecc/commands/build-fix.md +4 -0
- package/bundled/upstream/ecc/commands/checkpoint.md +4 -0
- package/bundled/upstream/ecc/commands/code-review.md +3 -3
- package/bundled/upstream/ecc/commands/cost-report.md +107 -0
- package/bundled/upstream/ecc/commands/cpp-build.md +1 -1
- package/bundled/upstream/ecc/commands/cpp-test.md +1 -1
- package/bundled/upstream/ecc/commands/ecc-guide.md +93 -0
- package/bundled/upstream/ecc/commands/fastapi-review.md +39 -0
- package/bundled/upstream/ecc/commands/flutter-build.md +1 -1
- package/bundled/upstream/ecc/commands/flutter-test.md +1 -1
- package/bundled/upstream/ecc/commands/gan-build.md +4 -0
- package/bundled/upstream/ecc/commands/gan-design.md +4 -0
- package/bundled/upstream/ecc/commands/go-build.md +1 -1
- package/bundled/upstream/ecc/commands/go-test.md +1 -1
- package/bundled/upstream/ecc/commands/harness-audit.md +4 -0
- package/bundled/upstream/ecc/commands/jira.md +2 -2
- package/bundled/upstream/ecc/commands/kotlin-build.md +1 -1
- package/bundled/upstream/ecc/commands/kotlin-test.md +1 -1
- package/bundled/upstream/ecc/commands/learn.md +4 -0
- package/bundled/upstream/ecc/commands/loop-start.md +4 -0
- package/bundled/upstream/ecc/commands/loop-status.md +54 -1
- package/bundled/upstream/ecc/commands/model-route.md +4 -0
- package/bundled/upstream/ecc/commands/multi-backend.md +4 -0
- package/bundled/upstream/ecc/commands/multi-execute.md +4 -0
- package/bundled/upstream/ecc/commands/multi-frontend.md +4 -0
- package/bundled/upstream/ecc/commands/multi-plan.md +4 -0
- package/bundled/upstream/ecc/commands/multi-workflow.md +4 -0
- package/bundled/upstream/ecc/commands/plan-prd.md +160 -0
- package/bundled/upstream/ecc/commands/plan.md +96 -13
- package/bundled/upstream/ecc/commands/pm2.md +4 -0
- package/bundled/upstream/ecc/commands/pr.md +184 -0
- package/bundled/upstream/ecc/commands/project-init.md +86 -0
- package/bundled/upstream/ecc/commands/python-review.md +1 -1
- package/bundled/upstream/ecc/commands/quality-gate.md +4 -0
- package/bundled/upstream/ecc/commands/refactor-clean.md +4 -0
- package/bundled/upstream/ecc/commands/rust-build.md +1 -1
- package/bundled/upstream/ecc/commands/rust-test.md +1 -1
- package/bundled/upstream/ecc/commands/security-scan.md +92 -0
- package/bundled/upstream/ecc/commands/sessions.md +6 -6
- package/bundled/upstream/ecc/commands/skill-health.md +3 -3
- package/bundled/upstream/ecc/commands/test-coverage.md +4 -0
- package/bundled/upstream/ecc/commands/update-codemaps.md +4 -0
- package/bundled/upstream/ecc/commands/update-docs.md +4 -0
- package/bundled/upstream/ecc/skills/accessibility/SKILL.md +1 -1
- package/bundled/upstream/ecc/skills/agent-architecture-audit/SKILL.md +256 -0
- package/bundled/upstream/ecc/skills/agent-payment-x402/SKILL.md +49 -3
- package/bundled/upstream/ecc/skills/agentic-os/SKILL.md +387 -0
- package/bundled/upstream/ecc/skills/angular-developer/SKILL.md +154 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/angular-animations.md +160 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/angular-aria.md +410 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/cli.md +86 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/component-harnesses.md +59 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/component-styling.md +91 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/components.md +117 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/creating-services.md +97 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/data-resolvers.md +69 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/define-routes.md +67 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/defining-providers.md +72 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/di-fundamentals.md +120 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/e2e-testing.md +56 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/effects.md +83 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/hierarchical-injectors.md +43 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/host-elements.md +80 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/injection-context.md +63 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/inputs.md +101 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/linked-signal.md +59 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/loading-strategies.md +61 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/mcp.md +108 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/navigate-to-routes.md +69 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/outputs.md +86 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/reactive-forms.md +122 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/rendering-strategies.md +44 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/resource.md +77 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/route-animations.md +56 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/route-guards.md +52 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/router-lifecycle.md +45 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/router-testing.md +87 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/show-routes-with-outlets.md +68 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/signal-forms.md +795 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/signals-overview.md +94 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/tailwind-css.md +69 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/template-driven-forms.md +114 -0
- package/bundled/upstream/ecc/skills/angular-developer/references/testing-fundamentals.md +65 -0
- package/bundled/upstream/ecc/skills/autonomous-agent-harness/SKILL.md +6 -0
- package/bundled/upstream/ecc/skills/backend-patterns/SKILL.md +8 -45
- package/bundled/upstream/ecc/skills/cisco-ios-patterns/SKILL.md +163 -0
- package/bundled/upstream/ecc/skills/configure-ecc/SKILL.md +31 -14
- package/bundled/upstream/ecc/skills/continuous-learning/SKILL.md +10 -2
- package/bundled/upstream/ecc/skills/continuous-learning-v2/SKILL.md +19 -5
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer-loop.sh +44 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer.md +4 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/start-observer.sh +5 -1
- package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +21 -5
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +58 -13
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +97 -4
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/lib/homunculus-dir.sh +31 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/migrate-homunculus.sh +62 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/test_parse_instinct.py +34 -0
- package/bundled/upstream/ecc/skills/cost-tracking/SKILL.md +147 -0
- package/bundled/upstream/ecc/skills/deep-research/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/defi-amm-security/SKILL.md +6 -0
- package/bundled/upstream/ecc/skills/django-celery/SKILL.md +457 -0
- package/bundled/upstream/ecc/skills/ecc-guide/SKILL.md +189 -0
- package/bundled/upstream/ecc/skills/error-handling/SKILL.md +376 -0
- package/bundled/upstream/ecc/skills/exa-search/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/fal-ai-media/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/fastapi-patterns/SKILL.md +327 -0
- package/bundled/upstream/ecc/skills/flox-environments/SKILL.md +496 -0
- package/bundled/upstream/ecc/skills/frontend-design-direction/SKILL.md +92 -0
- package/bundled/upstream/ecc/skills/frontend-slides/animation-patterns.md +122 -0
- package/bundled/upstream/ecc/skills/frontend-slides/html-template.md +419 -0
- package/bundled/upstream/ecc/skills/frontend-slides/scripts/export-pdf.sh +418 -0
- package/bundled/upstream/ecc/skills/frontend-slides/scripts/extract-pptx.py +96 -0
- package/bundled/upstream/ecc/skills/frontend-slides/viewport-base.css +153 -0
- package/bundled/upstream/ecc/skills/fsharp-testing/SKILL.md +280 -0
- package/bundled/upstream/ecc/skills/gateguard/SKILL.md +4 -0
- package/bundled/upstream/ecc/skills/hermes-imports/SKILL.md +88 -0
- package/bundled/upstream/ecc/skills/homelab-network-readiness/SKILL.md +169 -0
- package/bundled/upstream/ecc/skills/homelab-network-setup/SKILL.md +129 -0
- package/bundled/upstream/ecc/skills/homelab-pihole-dns/SKILL.md +274 -0
- package/bundled/upstream/ecc/skills/homelab-vlan-segmentation/SKILL.md +311 -0
- package/bundled/upstream/ecc/skills/homelab-wireguard-vpn/SKILL.md +305 -0
- package/bundled/upstream/ecc/skills/ios-icon-gen/SKILL.md +157 -0
- package/bundled/upstream/ecc/skills/ios-icon-gen/scripts/generate_icons.swift +258 -0
- package/bundled/upstream/ecc/skills/ios-icon-gen/scripts/iconify_gen.sh +235 -0
- package/bundled/upstream/ecc/skills/java-coding-standards/SKILL.md +241 -5
- package/bundled/upstream/ecc/skills/make-interfaces-feel-better/SKILL.md +151 -0
- package/bundled/upstream/ecc/skills/mle-workflow/SKILL.md +346 -0
- package/bundled/upstream/ecc/skills/motion-advanced/SKILL.md +596 -0
- package/bundled/upstream/ecc/skills/motion-foundations/SKILL.md +299 -0
- package/bundled/upstream/ecc/skills/motion-patterns/SKILL.md +435 -0
- package/bundled/upstream/ecc/skills/motion-ui/SKILL.md +575 -0
- package/bundled/upstream/ecc/skills/mysql-patterns/SKILL.md +412 -0
- package/bundled/upstream/ecc/skills/netmiko-ssh-automation/SKILL.md +173 -0
- package/bundled/upstream/ecc/skills/network-bgp-diagnostics/SKILL.md +167 -0
- package/bundled/upstream/ecc/skills/network-config-validation/SKILL.md +210 -0
- package/bundled/upstream/ecc/skills/network-interface-health/SKILL.md +152 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/SKILL.md +1 -9
- package/bundled/upstream/ecc/skills/plan-orchestrate/SKILL.md +262 -0
- package/bundled/upstream/ecc/skills/prisma-patterns/SKILL.md +371 -0
- package/bundled/upstream/ecc/skills/production-audit/SKILL.md +206 -0
- package/bundled/upstream/ecc/skills/prompt-optimizer/SKILL.md +24 -400
- package/bundled/upstream/ecc/skills/quarkus-patterns/SKILL.md +722 -0
- package/bundled/upstream/ecc/skills/quarkus-security/SKILL.md +467 -0
- package/bundled/upstream/ecc/skills/quarkus-tdd/SKILL.md +811 -0
- package/bundled/upstream/ecc/skills/quarkus-verification/SKILL.md +479 -0
- package/bundled/upstream/ecc/skills/redis-patterns/SKILL.md +403 -0
- package/bundled/upstream/ecc/skills/scientific-db-pubmed-database/SKILL.md +175 -0
- package/bundled/upstream/ecc/skills/scientific-db-uspto-database/SKILL.md +177 -0
- package/bundled/upstream/ecc/skills/scientific-pkg-gget/SKILL.md +166 -0
- package/bundled/upstream/ecc/skills/scientific-thinking-literature-review/SKILL.md +192 -0
- package/bundled/upstream/ecc/skills/scientific-thinking-scholar-evaluation/SKILL.md +160 -0
- package/bundled/upstream/ecc/skills/search-first/SKILL.md +23 -2
- package/bundled/upstream/ecc/skills/security-review/SKILL.md +10 -2
- package/bundled/upstream/ecc/skills/skill-comply/scripts/runner.py +28 -3
- package/bundled/upstream/ecc/skills/skill-comply/tests/test_runner.py +172 -0
- package/bundled/upstream/ecc/skills/skill-scout/SKILL.md +140 -0
- package/bundled/upstream/ecc/skills/skill-stocktake/SKILL.md +1 -0
- package/bundled/upstream/ecc/skills/strategic-compact/SKILL.md +2 -2
- package/bundled/upstream/ecc/skills/tinystruct-patterns/SKILL.md +203 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/architecture.md +90 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/data-handling.md +60 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/database.md +99 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/routing.md +64 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/system-usage.md +97 -0
- package/bundled/upstream/ecc/skills/tinystruct-patterns/references/testing.md +72 -0
- package/bundled/upstream/ecc/skills/ui-to-vue/SKILL.md +134 -0
- package/bundled/upstream/ecc/skills/vite-patterns/SKILL.md +449 -0
- package/bundled/upstream/ecc/skills/windows-desktop-e2e/SKILL.md +788 -0
- package/bundled/upstream/ecc/skills/x-api/SKILL.md +4 -0
- package/bundled/upstream/oh-my-claudecode/.omc-source/bundle.json +20 -0
- package/bundled/upstream/oh-my-claudecode/agents/analyst.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/architect.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/code-reviewer.md +26 -7
- package/bundled/upstream/oh-my-claudecode/agents/critic.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/debugger.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/designer.md +14 -1
- package/bundled/upstream/oh-my-claudecode/agents/document-specialist.md +1 -1
- package/bundled/upstream/oh-my-claudecode/agents/executor.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/explore.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/git-master.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/planner.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/qa-tester.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/scientist.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/security-reviewer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/test-engineer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/tracer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/verifier.md +2 -1
- package/bundled/upstream/oh-my-claudecode/agents/writer.md +2 -1
- package/bundled/upstream/oh-my-claudecode/skills/AGENTS.md +4 -3
- package/bundled/upstream/oh-my-claudecode/skills/ai-slop-cleaner/SKILL.md +12 -0
- package/bundled/upstream/oh-my-claudecode/skills/deep-dive/SKILL.md +69 -13
- package/bundled/upstream/oh-my-claudecode/skills/deep-interview/SKILL.md +176 -63
- package/bundled/upstream/oh-my-claudecode/skills/learner/SKILL.md +3 -1
- package/bundled/upstream/oh-my-claudecode/skills/omc-doctor/SKILL.md +22 -3
- package/bundled/upstream/oh-my-claudecode/skills/omc-reference/SKILL.md +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/01-install-claude-md.md +2 -2
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/02-configure.md +45 -2
- package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/03-integrations.md +46 -5
- package/bundled/upstream/oh-my-claudecode/skills/plan/SKILL.md +19 -17
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/config.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/parse.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/azure-devops.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/bitbucket.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/gitea.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/github.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/gitlab.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/interface.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/jira.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/session.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/tmux.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/worktree.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/psm.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/tests/test-psm-prompt-injection.sh +1 -1
- package/bundled/upstream/oh-my-claudecode/skills/ralph/SKILL.md +8 -8
- package/bundled/upstream/oh-my-claudecode/skills/ralplan/SKILL.md +9 -5
- package/bundled/upstream/oh-my-claudecode/skills/skill/SKILL.md +6 -6
- package/bundled/upstream/oh-my-claudecode/skills/skillify/SKILL.md +19 -3
- package/bundled/upstream/oh-my-claudecode/skills/trace/SKILL.md +3 -1
- package/bundled/upstream/oh-my-claudecode/skills/ultrawork/SKILL.md +20 -7
- package/bundled/upstream/superpowers/.omc-source/bundle.json +21 -0
- package/bundled/upstream/superpowers/hooks/hooks-cursor.json +1 -1
- package/bundled/upstream/superpowers/skills/executing-plans/SKILL.md +1 -1
- package/bundled/upstream/superpowers/skills/finishing-a-development-branch/SKILL.md +93 -42
- package/bundled/upstream/superpowers/skills/requesting-code-review/SKILL.md +7 -9
- package/bundled/upstream/superpowers/skills/requesting-code-review/code-reviewer.md +107 -85
- package/bundled/upstream/superpowers/skills/subagent-driven-development/SKILL.md +3 -1
- package/bundled/upstream/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +2 -3
- package/bundled/upstream/superpowers/skills/systematic-debugging/CREATION-LOG.md +1 -1
- package/bundled/upstream/superpowers/skills/systematic-debugging/root-cause-tracing.md +1 -1
- package/bundled/upstream/superpowers/skills/using-git-worktrees/SKILL.md +95 -98
- package/bundled/upstream/superpowers/skills/using-superpowers/references/codex-tools.md +7 -48
- package/bundled/upstream/superpowers/skills/using-superpowers/references/copilot-tools.md +1 -11
- package/bundled/upstream/superpowers/skills/using-superpowers/references/gemini-tools.md +21 -3
- package/bundled/upstream/superpowers/skills/writing-plans/SKILL.md +1 -1
- package/package.json +1 -1
- package/src/cli/index.js +1 -0
- package/src/cli/setup.js +9 -0
- package/src/cli/skill-index.js +209 -0
- package/src/cli/skill.js +4 -0
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/README.md +0 -355
- package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/patterns.md +0 -359
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/README.md +0 -297
- package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/patterns.md +0 -209
- package/bundled/upstream/ecc/commands/agent-sort.md +0 -23
- package/bundled/upstream/ecc/commands/claw.md +0 -23
- package/bundled/upstream/ecc/commands/context-budget.md +0 -23
- package/bundled/upstream/ecc/commands/devfleet.md +0 -23
- package/bundled/upstream/ecc/commands/docs.md +0 -23
- package/bundled/upstream/ecc/commands/e2e.md +0 -268
- package/bundled/upstream/ecc/commands/eval.md +0 -23
- package/bundled/upstream/ecc/commands/orchestrate.md +0 -135
- package/bundled/upstream/ecc/commands/prompt-optimize.md +0 -23
- package/bundled/upstream/ecc/commands/rules-distill.md +0 -20
- package/bundled/upstream/ecc/commands/tdd.md +0 -231
- package/bundled/upstream/ecc/commands/verify.md +0 -23
- package/bundled/upstream/ecc/skills/claude-api/SKILL.md +0 -337
- package/bundled/upstream/ecc/skills/frontend-design/SKILL.md +0 -145
- package/bundled/upstream/superpowers/agents/code-reviewer.md +0 -48
- package/bundled/upstream/superpowers/commands/brainstorm.md +0 -5
- package/bundled/upstream/superpowers/commands/execute-plan.md +0 -5
- package/bundled/upstream/superpowers/commands/write-plan.md +0 -5
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const fsp = require('fs/promises');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const os = require('os');
|
|
6
|
+
const { getProjectRoot } = require('../config/paths');
|
|
7
|
+
|
|
8
|
+
const INDEX_FILENAME = '_index.md';
|
|
9
|
+
const MAX_DESCRIPTION_CHARS = 280;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Parse YAML frontmatter from a SKILL.md, returning { name, description }.
|
|
13
|
+
*
|
|
14
|
+
* Handles:
|
|
15
|
+
* - `key: value` single-line
|
|
16
|
+
* - `key: >-` or `key: |` folded/literal block scalars (collects indented
|
|
17
|
+
* continuation lines, joined with spaces)
|
|
18
|
+
* - quoted values: stripped of surrounding quotes
|
|
19
|
+
*
|
|
20
|
+
* Returns null if frontmatter is missing or name field is absent.
|
|
21
|
+
*/
|
|
22
|
+
function parseFrontmatter(skillFile) {
|
|
23
|
+
if (!fs.existsSync(skillFile)) return null;
|
|
24
|
+
|
|
25
|
+
const content = fs.readFileSync(skillFile, 'utf8');
|
|
26
|
+
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
27
|
+
if (!match) return null;
|
|
28
|
+
|
|
29
|
+
const lines = match[1].split('\n');
|
|
30
|
+
const meta = {};
|
|
31
|
+
let currentKey = null;
|
|
32
|
+
let blockMode = false; // when value is `>-` or `|`
|
|
33
|
+
|
|
34
|
+
for (const raw of lines) {
|
|
35
|
+
if (!raw.trim()) continue;
|
|
36
|
+
|
|
37
|
+
// top-level key: detect by leading non-whitespace + colon
|
|
38
|
+
const keyMatch = raw.match(/^([a-zA-Z_-][\w-]*)\s*:\s*(.*)$/);
|
|
39
|
+
const isIndented = /^\s/.test(raw);
|
|
40
|
+
|
|
41
|
+
if (keyMatch && !isIndented) {
|
|
42
|
+
currentKey = keyMatch[1];
|
|
43
|
+
const valueRaw = keyMatch[2].trim();
|
|
44
|
+
if (valueRaw === '>-' || valueRaw === '>' || valueRaw === '|' || valueRaw === '|-') {
|
|
45
|
+
meta[currentKey] = '';
|
|
46
|
+
blockMode = true;
|
|
47
|
+
} else {
|
|
48
|
+
meta[currentKey] = stripQuotes(valueRaw);
|
|
49
|
+
blockMode = false;
|
|
50
|
+
}
|
|
51
|
+
} else if (currentKey && (blockMode || isIndented)) {
|
|
52
|
+
// continuation line
|
|
53
|
+
const continued = raw.trim();
|
|
54
|
+
if (continued) {
|
|
55
|
+
meta[currentKey] = (meta[currentKey] ? meta[currentKey] + ' ' : '') + continued;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (!meta.name) return null;
|
|
61
|
+
return meta;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function stripQuotes(s) {
|
|
65
|
+
if ((s.startsWith('"') && s.endsWith('"')) || (s.startsWith("'") && s.endsWith("'"))) {
|
|
66
|
+
return s.slice(1, -1);
|
|
67
|
+
}
|
|
68
|
+
return s;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function truncateDescription(desc) {
|
|
72
|
+
if (!desc) return '';
|
|
73
|
+
// Collapse whitespace
|
|
74
|
+
const flat = desc.replace(/\s+/g, ' ').trim();
|
|
75
|
+
if (flat.length <= MAX_DESCRIPTION_CHARS) return flat;
|
|
76
|
+
// Truncate at sentence boundary if possible
|
|
77
|
+
const truncated = flat.slice(0, MAX_DESCRIPTION_CHARS);
|
|
78
|
+
const lastPeriod = truncated.lastIndexOf('.');
|
|
79
|
+
if (lastPeriod > MAX_DESCRIPTION_CHARS * 0.6) {
|
|
80
|
+
return truncated.slice(0, lastPeriod + 1);
|
|
81
|
+
}
|
|
82
|
+
return truncated + '…';
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function escapeTableCell(s) {
|
|
86
|
+
return (s || '').replace(/\|/g, '\\|').replace(/\n/g, ' ');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Scan a directory of skills (each subdir contains SKILL.md) and return
|
|
91
|
+
* sorted list of { name, description }.
|
|
92
|
+
*/
|
|
93
|
+
function buildEntries(skillsDir) {
|
|
94
|
+
if (!fs.existsSync(skillsDir)) return [];
|
|
95
|
+
|
|
96
|
+
const entries = fs.readdirSync(skillsDir, { withFileTypes: true });
|
|
97
|
+
const items = [];
|
|
98
|
+
|
|
99
|
+
for (const entry of entries) {
|
|
100
|
+
if (!entry.isDirectory()) continue;
|
|
101
|
+
if (entry.name.startsWith('_') || entry.name.startsWith('.')) continue;
|
|
102
|
+
|
|
103
|
+
const skillFile = path.join(skillsDir, entry.name, 'SKILL.md');
|
|
104
|
+
const meta = parseFrontmatter(skillFile);
|
|
105
|
+
if (!meta) {
|
|
106
|
+
process.stderr.write(` skipped: ${entry.name} (no frontmatter)\n`);
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
items.push({
|
|
110
|
+
name: meta.name,
|
|
111
|
+
description: truncateDescription(meta.description),
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
items.sort((a, b) => a.name.localeCompare(b.name));
|
|
116
|
+
return items;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Render entries as a Markdown table with a header preamble.
|
|
121
|
+
*/
|
|
122
|
+
function renderIndex(skillsDir, entries) {
|
|
123
|
+
const lines = [];
|
|
124
|
+
lines.push('# Skill Index');
|
|
125
|
+
lines.push('');
|
|
126
|
+
lines.push(`Auto-generated by \`omc-manage skill index\`. Do not edit by hand —`);
|
|
127
|
+
lines.push(`rerun \`omc-manage skill index\` after adding or removing skills.`);
|
|
128
|
+
lines.push('');
|
|
129
|
+
lines.push(`Source directory: \`${skillsDir.replace(os.homedir(), '~')}\``);
|
|
130
|
+
lines.push(`Generated: ${new Date().toISOString()}`);
|
|
131
|
+
lines.push(`Entries: ${entries.length}`);
|
|
132
|
+
lines.push('');
|
|
133
|
+
lines.push('## Usage for LLMs');
|
|
134
|
+
lines.push('');
|
|
135
|
+
lines.push('`grep -i "<keyword>" _index.md` to find skills matching an intent.');
|
|
136
|
+
lines.push('Each row is `name | description` — both fields searchable.');
|
|
137
|
+
lines.push('');
|
|
138
|
+
lines.push('| Skill | Description |');
|
|
139
|
+
lines.push('|---|---|');
|
|
140
|
+
for (const e of entries) {
|
|
141
|
+
lines.push(`| \`${escapeTableCell(e.name)}\` | ${escapeTableCell(e.description)} |`);
|
|
142
|
+
}
|
|
143
|
+
lines.push('');
|
|
144
|
+
return lines.join('\n');
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Build and write the index. Returns { path, count }.
|
|
149
|
+
*/
|
|
150
|
+
async function buildAndWriteIndex(skillsDir, { quiet = false } = {}) {
|
|
151
|
+
const entries = buildEntries(skillsDir);
|
|
152
|
+
const indexPath = path.join(skillsDir, INDEX_FILENAME);
|
|
153
|
+
await fsp.writeFile(indexPath, renderIndex(skillsDir, entries), 'utf8');
|
|
154
|
+
if (!quiet) {
|
|
155
|
+
console.log(` wrote ${indexPath.replace(os.homedir(), '~')} (${entries.length} entries)`);
|
|
156
|
+
}
|
|
157
|
+
return { path: indexPath, count: entries.length };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Resolve the skills install directory for the given scope.
|
|
162
|
+
*/
|
|
163
|
+
function resolveSkillsDir(scope) {
|
|
164
|
+
if (scope === 'project') {
|
|
165
|
+
const root = getProjectRoot();
|
|
166
|
+
return path.join(root, '.claude', 'skills');
|
|
167
|
+
}
|
|
168
|
+
// default: user scope
|
|
169
|
+
return path.join(os.homedir(), '.claude', 'skills');
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* CLI entrypoint: `omc-manage skill index [--scope user|project] [--quiet]`
|
|
174
|
+
*/
|
|
175
|
+
async function indexCommand(args, flags = {}) {
|
|
176
|
+
const scope = flags.scope || 'user';
|
|
177
|
+
if (scope !== 'user' && scope !== 'project') {
|
|
178
|
+
console.error(`Error: invalid --scope "${scope}" (expected user or project)`);
|
|
179
|
+
process.exitCode = 1;
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const skillsDir = resolveSkillsDir(scope);
|
|
184
|
+
if (!fs.existsSync(skillsDir)) {
|
|
185
|
+
console.error(`Error: skills directory not found: ${skillsDir}`);
|
|
186
|
+
console.error('Run `omc-manage setup` first to install skills.');
|
|
187
|
+
process.exitCode = 1;
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
console.log(`omc-manage skill index`);
|
|
192
|
+
console.log(`======================`);
|
|
193
|
+
console.log(`Scope: ${scope}`);
|
|
194
|
+
console.log(`Target: ${skillsDir.replace(os.homedir(), '~')}`);
|
|
195
|
+
console.log('');
|
|
196
|
+
|
|
197
|
+
const result = await buildAndWriteIndex(skillsDir, { quiet: flags.quiet });
|
|
198
|
+
|
|
199
|
+
console.log('');
|
|
200
|
+
console.log(`Indexed ${result.count} skills.`);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
module.exports = {
|
|
204
|
+
indexCommand,
|
|
205
|
+
buildAndWriteIndex,
|
|
206
|
+
resolveSkillsDir,
|
|
207
|
+
parseFrontmatter, // exported for tests
|
|
208
|
+
truncateDescription, // exported for tests
|
|
209
|
+
};
|
package/src/cli/skill.js
CHANGED
|
@@ -271,6 +271,10 @@ async function skill(args, flags = {}) {
|
|
|
271
271
|
if (cmd === 'recommend') {
|
|
272
272
|
return recommend(args, flags);
|
|
273
273
|
}
|
|
274
|
+
if (cmd === 'index') {
|
|
275
|
+
const { indexCommand } = require('./skill-index');
|
|
276
|
+
return indexCommand(args.slice(1), flags);
|
|
277
|
+
}
|
|
274
278
|
|
|
275
279
|
// Fall through to artifact subcommands (list, prefer, conflicts)
|
|
276
280
|
flags.type = 'skills';
|
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
# Agent SDK — Python
|
|
2
|
-
|
|
3
|
-
The Claude Agent SDK provides a higher-level interface for building AI agents with built-in tools, safety features, and agentic capabilities.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pip install claude-agent-sdk
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Quick Start
|
|
14
|
-
|
|
15
|
-
```python
|
|
16
|
-
import anyio
|
|
17
|
-
from claude_agent_sdk import query, ClaudeAgentOptions, ResultMessage
|
|
18
|
-
|
|
19
|
-
async def main():
|
|
20
|
-
async for message in query(
|
|
21
|
-
prompt="Explain this codebase",
|
|
22
|
-
options=ClaudeAgentOptions(allowed_tools=["Read", "Glob", "Grep"])
|
|
23
|
-
):
|
|
24
|
-
if isinstance(message, ResultMessage):
|
|
25
|
-
print(message.result)
|
|
26
|
-
|
|
27
|
-
anyio.run(main)
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Built-in Tools
|
|
33
|
-
|
|
34
|
-
| Tool | Description |
|
|
35
|
-
| --------- | ------------------------------------ |
|
|
36
|
-
| Read | Read files in the workspace |
|
|
37
|
-
| Write | Create new files |
|
|
38
|
-
| Edit | Make precise edits to existing files |
|
|
39
|
-
| Bash | Execute shell commands |
|
|
40
|
-
| Glob | Find files by pattern |
|
|
41
|
-
| Grep | Search files by content |
|
|
42
|
-
| WebSearch | Search the web for information |
|
|
43
|
-
| WebFetch | Fetch and analyze web pages |
|
|
44
|
-
| AskUserQuestion | Ask user clarifying questions |
|
|
45
|
-
| Agent | Spawn subagents |
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Primary Interfaces
|
|
50
|
-
|
|
51
|
-
### `query()` — Simple One-Shot Usage
|
|
52
|
-
|
|
53
|
-
The `query()` function is the simplest way to run an agent. It returns an async iterator of messages.
|
|
54
|
-
|
|
55
|
-
```python
|
|
56
|
-
from claude_agent_sdk import query, ClaudeAgentOptions, ResultMessage
|
|
57
|
-
|
|
58
|
-
async for message in query(
|
|
59
|
-
prompt="Explain this codebase",
|
|
60
|
-
options=ClaudeAgentOptions(allowed_tools=["Read", "Glob", "Grep"])
|
|
61
|
-
):
|
|
62
|
-
if isinstance(message, ResultMessage):
|
|
63
|
-
print(message.result)
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### `ClaudeSDKClient` — Full Control
|
|
67
|
-
|
|
68
|
-
`ClaudeSDKClient` provides full control over the agent lifecycle. Use it when you need custom tools, hooks, streaming, or the ability to interrupt execution.
|
|
69
|
-
|
|
70
|
-
```python
|
|
71
|
-
import anyio
|
|
72
|
-
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, AssistantMessage, TextBlock
|
|
73
|
-
|
|
74
|
-
async def main():
|
|
75
|
-
options = ClaudeAgentOptions(allowed_tools=["Read", "Glob", "Grep"])
|
|
76
|
-
async with ClaudeSDKClient(options=options) as client:
|
|
77
|
-
await client.query("Explain this codebase")
|
|
78
|
-
async for message in client.receive_response():
|
|
79
|
-
if isinstance(message, AssistantMessage):
|
|
80
|
-
for block in message.content:
|
|
81
|
-
if isinstance(block, TextBlock):
|
|
82
|
-
print(block.text)
|
|
83
|
-
|
|
84
|
-
anyio.run(main)
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
`ClaudeSDKClient` supports:
|
|
88
|
-
|
|
89
|
-
- **Context manager** (`async with`) for automatic resource cleanup
|
|
90
|
-
- **`client.query(prompt)`** to send a prompt to the agent
|
|
91
|
-
- **`receive_response()`** for streaming messages until completion
|
|
92
|
-
- **`interrupt()`** to stop agent execution mid-task
|
|
93
|
-
- **Required for custom tools** (via SDK MCP servers)
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
## Permission System
|
|
98
|
-
|
|
99
|
-
```python
|
|
100
|
-
from claude_agent_sdk import query, ClaudeAgentOptions, ResultMessage
|
|
101
|
-
|
|
102
|
-
async for message in query(
|
|
103
|
-
prompt="Refactor the authentication module",
|
|
104
|
-
options=ClaudeAgentOptions(
|
|
105
|
-
allowed_tools=["Read", "Edit", "Write"],
|
|
106
|
-
permission_mode="acceptEdits" # Auto-accept file edits
|
|
107
|
-
)
|
|
108
|
-
):
|
|
109
|
-
if isinstance(message, ResultMessage):
|
|
110
|
-
print(message.result)
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Permission modes:
|
|
114
|
-
|
|
115
|
-
- `"default"`: Prompt for dangerous operations
|
|
116
|
-
- `"plan"`: Planning only, no execution
|
|
117
|
-
- `"acceptEdits"`: Auto-accept file edits
|
|
118
|
-
- `"bypassPermissions"`: Skip all prompts (use with caution)
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## MCP (Model Context Protocol) Support
|
|
123
|
-
|
|
124
|
-
```python
|
|
125
|
-
from claude_agent_sdk import query, ClaudeAgentOptions, ResultMessage
|
|
126
|
-
|
|
127
|
-
async for message in query(
|
|
128
|
-
prompt="Open example.com and describe what you see",
|
|
129
|
-
options=ClaudeAgentOptions(
|
|
130
|
-
mcp_servers={
|
|
131
|
-
"playwright": {"command": "npx", "args": ["@playwright/mcp@latest"]}
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
):
|
|
135
|
-
if isinstance(message, ResultMessage):
|
|
136
|
-
print(message.result)
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
## Hooks
|
|
142
|
-
|
|
143
|
-
Customize agent behavior with hooks using callback functions:
|
|
144
|
-
|
|
145
|
-
```python
|
|
146
|
-
from claude_agent_sdk import query, ClaudeAgentOptions, HookMatcher, ResultMessage
|
|
147
|
-
|
|
148
|
-
async def log_file_change(input_data, tool_use_id, context):
|
|
149
|
-
file_path = input_data.get('tool_input', {}).get('file_path', 'unknown')
|
|
150
|
-
print(f"Modified: {file_path}")
|
|
151
|
-
return {}
|
|
152
|
-
|
|
153
|
-
async for message in query(
|
|
154
|
-
prompt="Refactor utils.py",
|
|
155
|
-
options=ClaudeAgentOptions(
|
|
156
|
-
permission_mode="acceptEdits",
|
|
157
|
-
hooks={
|
|
158
|
-
"PostToolUse": [HookMatcher(matcher="Edit|Write", hooks=[log_file_change])]
|
|
159
|
-
}
|
|
160
|
-
)
|
|
161
|
-
):
|
|
162
|
-
if isinstance(message, ResultMessage):
|
|
163
|
-
print(message.result)
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
Hook callback inputs for tool-lifecycle events (`PreToolUse`, `PostToolUse`, `PostToolUseFailure`) include `agent_id` and `agent_type` fields, allowing hooks to identify which agent (main or subagent) triggered the tool call.
|
|
167
|
-
|
|
168
|
-
Available hook events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `UserPromptSubmit`, `Stop`, `SubagentStop`, `PreCompact`, `Notification`, `SubagentStart`, `PermissionRequest`
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
## Common Options
|
|
173
|
-
|
|
174
|
-
`query()` takes a top-level `prompt` (string) and an `options` object (`ClaudeAgentOptions`):
|
|
175
|
-
|
|
176
|
-
```python
|
|
177
|
-
async for message in query(prompt="...", options=ClaudeAgentOptions(...)):
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
| Option | Type | Description |
|
|
181
|
-
| ----------------------------------- | ------ | -------------------------------------------------------------------------- |
|
|
182
|
-
| `cwd` | string | Working directory for file operations |
|
|
183
|
-
| `allowed_tools` | list | Tools the agent can use (e.g., `["Read", "Edit", "Bash"]`) |
|
|
184
|
-
| `tools` | list | Built-in tools to make available (restricts the default set) |
|
|
185
|
-
| `disallowed_tools` | list | Tools to explicitly disallow |
|
|
186
|
-
| `permission_mode` | string | How to handle permission prompts |
|
|
187
|
-
| `mcp_servers` | dict | MCP servers to connect to |
|
|
188
|
-
| `hooks` | dict | Hooks for customizing behavior |
|
|
189
|
-
| `system_prompt` | string | Custom system prompt |
|
|
190
|
-
| `max_turns` | int | Maximum agent turns before stopping |
|
|
191
|
-
| `max_budget_usd` | float | Maximum budget in USD for the query |
|
|
192
|
-
| `model` | string | Model ID (default: determined by CLI) |
|
|
193
|
-
| `agents` | dict | Subagent definitions (`dict[str, AgentDefinition]`) |
|
|
194
|
-
| `output_format` | dict | Structured output schema |
|
|
195
|
-
| `thinking` | dict | Thinking/reasoning control |
|
|
196
|
-
| `betas` | list | Beta features to enable (e.g., `["context-1m-2025-08-07"]`) |
|
|
197
|
-
| `setting_sources` | list | Settings to load (e.g., `["project"]`). Default: none (no CLAUDE.md files) |
|
|
198
|
-
| `env` | dict | Environment variables to set for the session |
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## Message Types
|
|
203
|
-
|
|
204
|
-
```python
|
|
205
|
-
from claude_agent_sdk import query, ClaudeAgentOptions, ResultMessage, SystemMessage
|
|
206
|
-
|
|
207
|
-
async for message in query(
|
|
208
|
-
prompt="Find TODO comments",
|
|
209
|
-
options=ClaudeAgentOptions(allowed_tools=["Read", "Glob", "Grep"])
|
|
210
|
-
):
|
|
211
|
-
if isinstance(message, ResultMessage):
|
|
212
|
-
print(message.result)
|
|
213
|
-
print(f"Stop reason: {message.stop_reason}") # e.g., "end_turn", "max_turns"
|
|
214
|
-
elif isinstance(message, SystemMessage) and message.subtype == "init":
|
|
215
|
-
session_id = message.data.get("session_id") # Capture for resuming later
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
`AssistantMessage` includes per-turn `usage` data (a dict matching the Anthropic API usage shape) for tracking costs:
|
|
219
|
-
|
|
220
|
-
```python
|
|
221
|
-
from claude_agent_sdk import query, ClaudeAgentOptions, AssistantMessage
|
|
222
|
-
|
|
223
|
-
async for message in query(prompt="...", options=ClaudeAgentOptions()):
|
|
224
|
-
if isinstance(message, AssistantMessage) and message.usage:
|
|
225
|
-
print(f"Input: {message.usage['input_tokens']}, Output: {message.usage['output_tokens']}")
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
Typed task message subclasses are available for better type safety when handling subagent task events:
|
|
229
|
-
- `TaskStartedMessage` — emitted when a subagent task is registered
|
|
230
|
-
- `TaskProgressMessage` — real-time progress updates with cumulative usage metrics
|
|
231
|
-
- `TaskNotificationMessage` — task completion notifications
|
|
232
|
-
|
|
233
|
-
`RateLimitEvent` is emitted when the rate limit status transitions (e.g., from `allowed` to `allowed_warning` or `rejected`). Use it to warn users or back off gracefully:
|
|
234
|
-
|
|
235
|
-
```python
|
|
236
|
-
from claude_agent_sdk import query, ClaudeAgentOptions, RateLimitEvent
|
|
237
|
-
|
|
238
|
-
async for message in query(prompt="...", options=ClaudeAgentOptions()):
|
|
239
|
-
if isinstance(message, RateLimitEvent):
|
|
240
|
-
print(f"Rate limit status: {message.rate_limit_info.status}")
|
|
241
|
-
if message.rate_limit_info.resets_at:
|
|
242
|
-
print(f"Resets at: {message.rate_limit_info.resets_at}")
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
## Subagents
|
|
248
|
-
|
|
249
|
-
```python
|
|
250
|
-
from claude_agent_sdk import query, ClaudeAgentOptions, AgentDefinition, ResultMessage
|
|
251
|
-
|
|
252
|
-
async for message in query(
|
|
253
|
-
prompt="Use the code-reviewer agent to review this codebase",
|
|
254
|
-
options=ClaudeAgentOptions(
|
|
255
|
-
allowed_tools=["Read", "Glob", "Grep", "Agent"],
|
|
256
|
-
agents={
|
|
257
|
-
"code-reviewer": AgentDefinition(
|
|
258
|
-
description="Expert code reviewer for quality and security reviews.",
|
|
259
|
-
prompt="Analyze code quality and suggest improvements.",
|
|
260
|
-
tools=["Read", "Glob", "Grep"]
|
|
261
|
-
)
|
|
262
|
-
}
|
|
263
|
-
)
|
|
264
|
-
):
|
|
265
|
-
if isinstance(message, ResultMessage):
|
|
266
|
-
print(message.result)
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
## Error Handling
|
|
272
|
-
|
|
273
|
-
```python
|
|
274
|
-
from claude_agent_sdk import query, ClaudeAgentOptions, CLINotFoundError, CLIConnectionError, ResultMessage
|
|
275
|
-
|
|
276
|
-
try:
|
|
277
|
-
async for message in query(
|
|
278
|
-
prompt="...",
|
|
279
|
-
options=ClaudeAgentOptions(allowed_tools=["Read"])
|
|
280
|
-
):
|
|
281
|
-
if isinstance(message, ResultMessage):
|
|
282
|
-
print(message.result)
|
|
283
|
-
except CLINotFoundError:
|
|
284
|
-
print("Claude Code CLI not found. Install with: pip install claude-agent-sdk")
|
|
285
|
-
except CLIConnectionError as e:
|
|
286
|
-
print(f"Connection error: {e}")
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
---
|
|
290
|
-
|
|
291
|
-
## Session History
|
|
292
|
-
|
|
293
|
-
Retrieve past session data with top-level functions:
|
|
294
|
-
|
|
295
|
-
```python
|
|
296
|
-
from claude_agent_sdk import list_sessions, get_session_messages
|
|
297
|
-
|
|
298
|
-
# List all past sessions (sync function — no await)
|
|
299
|
-
sessions = list_sessions()
|
|
300
|
-
for session in sessions:
|
|
301
|
-
print(f"{session.session_id}: {session.cwd}")
|
|
302
|
-
|
|
303
|
-
# Get messages from a specific session (sync function — no await)
|
|
304
|
-
messages = get_session_messages(session_id="...")
|
|
305
|
-
for msg in messages:
|
|
306
|
-
print(msg)
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
### Session Mutations
|
|
310
|
-
|
|
311
|
-
Rename or tag sessions (sync functions — no await):
|
|
312
|
-
|
|
313
|
-
```python
|
|
314
|
-
from claude_agent_sdk import rename_session, tag_session
|
|
315
|
-
|
|
316
|
-
# Rename a session
|
|
317
|
-
rename_session(session_id="...", title="My refactoring session")
|
|
318
|
-
|
|
319
|
-
# Tag a session (tags are Unicode-sanitized automatically)
|
|
320
|
-
tag_session(session_id="...", tag="experiment")
|
|
321
|
-
|
|
322
|
-
# Clear a tag
|
|
323
|
-
tag_session(session_id="...", tag=None)
|
|
324
|
-
|
|
325
|
-
# Optionally scope to a specific project directory
|
|
326
|
-
rename_session(session_id="...", title="New title", directory="/path/to/project")
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
---
|
|
330
|
-
|
|
331
|
-
## MCP Server Management
|
|
332
|
-
|
|
333
|
-
Manage MCP servers at runtime using `ClaudeSDKClient`:
|
|
334
|
-
|
|
335
|
-
```python
|
|
336
|
-
async with ClaudeSDKClient(options=options) as client:
|
|
337
|
-
# Reconnect a disconnected MCP server
|
|
338
|
-
await client.reconnect_mcp_server("my-server")
|
|
339
|
-
|
|
340
|
-
# Toggle an MCP server on/off
|
|
341
|
-
await client.toggle_mcp_server("my-server", enabled=False)
|
|
342
|
-
|
|
343
|
-
# Get status of all MCP servers
|
|
344
|
-
status = await client.get_mcp_status() # returns McpStatusResponse
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
---
|
|
348
|
-
|
|
349
|
-
## Best Practices
|
|
350
|
-
|
|
351
|
-
1. **Always specify allowed_tools** — Explicitly list which tools the agent can use
|
|
352
|
-
2. **Set working directory** — Always specify `cwd` for file operations
|
|
353
|
-
3. **Use appropriate permission modes** — Start with `"default"` and only escalate when needed
|
|
354
|
-
4. **Handle all message types** — Check for `ResultMessage` to get agent output
|
|
355
|
-
5. **Limit max_turns** — Prevent runaway agents with reasonable limits
|