claudecode-omc 5.6.5 → 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/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/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
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
# Agent SDK — TypeScript
|
|
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
|
-
npm install @anthropic-ai/claude-agent-sdk
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Quick Start
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
17
|
-
|
|
18
|
-
for await (const message of query({
|
|
19
|
-
prompt: "Explain this codebase",
|
|
20
|
-
options: { allowedTools: ["Read", "Glob", "Grep"] },
|
|
21
|
-
})) {
|
|
22
|
-
if ("result" in message) {
|
|
23
|
-
console.log(message.result);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Built-in Tools
|
|
31
|
-
|
|
32
|
-
| Tool | Description |
|
|
33
|
-
| --------- | ------------------------------------ |
|
|
34
|
-
| Read | Read files in the workspace |
|
|
35
|
-
| Write | Create new files |
|
|
36
|
-
| Edit | Make precise edits to existing files |
|
|
37
|
-
| Bash | Execute shell commands |
|
|
38
|
-
| Glob | Find files by pattern |
|
|
39
|
-
| Grep | Search files by content |
|
|
40
|
-
| WebSearch | Search the web for information |
|
|
41
|
-
| WebFetch | Fetch and analyze web pages |
|
|
42
|
-
| AskUserQuestion | Ask user clarifying questions |
|
|
43
|
-
| Agent | Spawn subagents |
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Permission System
|
|
48
|
-
|
|
49
|
-
```typescript
|
|
50
|
-
for await (const message of query({
|
|
51
|
-
prompt: "Refactor the authentication module",
|
|
52
|
-
options: {
|
|
53
|
-
allowedTools: ["Read", "Edit", "Write"],
|
|
54
|
-
permissionMode: "acceptEdits",
|
|
55
|
-
},
|
|
56
|
-
})) {
|
|
57
|
-
if ("result" in message) console.log(message.result);
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Permission modes:
|
|
62
|
-
|
|
63
|
-
- `"default"`: Prompt for dangerous operations
|
|
64
|
-
- `"plan"`: Planning only, no execution
|
|
65
|
-
- `"acceptEdits"`: Auto-accept file edits
|
|
66
|
-
- `"dontAsk"`: Don't prompt — **denies** anything not pre-approved (not an auto-approve mode)
|
|
67
|
-
- `"bypassPermissions"`: Skip all prompts (requires `allowDangerouslySkipPermissions: true` in options)
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## MCP (Model Context Protocol) Support
|
|
72
|
-
|
|
73
|
-
```typescript
|
|
74
|
-
for await (const message of query({
|
|
75
|
-
prompt: "Open example.com and describe what you see",
|
|
76
|
-
options: {
|
|
77
|
-
mcpServers: {
|
|
78
|
-
playwright: { command: "npx", args: ["@playwright/mcp@latest"] },
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
})) {
|
|
82
|
-
if ("result" in message) console.log(message.result);
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### In-Process MCP Tools
|
|
87
|
-
|
|
88
|
-
You can define custom tools that run in-process using `tool()` and `createSdkMcpServer`:
|
|
89
|
-
|
|
90
|
-
```typescript
|
|
91
|
-
import { query, tool, createSdkMcpServer } from "@anthropic-ai/claude-agent-sdk";
|
|
92
|
-
import { z } from "zod";
|
|
93
|
-
|
|
94
|
-
const myTool = tool("my-tool", "Description", { input: z.string() }, async (args) => {
|
|
95
|
-
return { content: [{ type: "text", text: "result" }] };
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
const server = createSdkMcpServer({ name: "my-server", tools: [myTool] });
|
|
99
|
-
|
|
100
|
-
// Pass to query
|
|
101
|
-
for await (const message of query({
|
|
102
|
-
prompt: "Use my-tool to do something",
|
|
103
|
-
options: { mcpServers: { myServer: server } },
|
|
104
|
-
})) {
|
|
105
|
-
if ("result" in message) console.log(message.result);
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## Hooks
|
|
112
|
-
|
|
113
|
-
```typescript
|
|
114
|
-
import { query, HookCallback } from "@anthropic-ai/claude-agent-sdk";
|
|
115
|
-
import { appendFileSync } from "fs";
|
|
116
|
-
|
|
117
|
-
const logFileChange: HookCallback = async (input) => {
|
|
118
|
-
const filePath = (input as any).tool_input?.file_path ?? "unknown";
|
|
119
|
-
appendFileSync(
|
|
120
|
-
"./audit.log",
|
|
121
|
-
`${new Date().toISOString()}: modified ${filePath}\n`,
|
|
122
|
-
);
|
|
123
|
-
return {};
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
for await (const message of query({
|
|
127
|
-
prompt: "Refactor utils.py to improve readability",
|
|
128
|
-
options: {
|
|
129
|
-
allowedTools: ["Read", "Edit", "Write"],
|
|
130
|
-
permissionMode: "acceptEdits",
|
|
131
|
-
hooks: {
|
|
132
|
-
PostToolUse: [{ matcher: "Edit|Write", hooks: [logFileChange] }],
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
})) {
|
|
136
|
-
if ("result" in message) console.log(message.result);
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Hook event 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.
|
|
141
|
-
|
|
142
|
-
Available hook events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `Notification`, `UserPromptSubmit`, `SessionStart`, `SessionEnd`, `Stop`, `SubagentStart`, `SubagentStop`, `PreCompact`, `PermissionRequest`, `Setup`, `TeammateIdle`, `TaskCompleted`, `ConfigChange`, `Elicitation`, `ElicitationResult`, `WorktreeCreate`, `WorktreeRemove`, `InstructionsLoaded`
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Common Options
|
|
147
|
-
|
|
148
|
-
`query()` takes a top-level `prompt` (string) and an `options` object:
|
|
149
|
-
|
|
150
|
-
```typescript
|
|
151
|
-
query({ prompt: "...", options: { ... } })
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
| Option | Type | Description |
|
|
155
|
-
| ----------------------------------- | ------ | -------------------------------------------------------------------------- |
|
|
156
|
-
| `cwd` | string | Working directory for file operations |
|
|
157
|
-
| `allowedTools` | array | Tools the agent can use (e.g., `["Read", "Edit", "Bash"]`) |
|
|
158
|
-
| `tools` | array \| preset | Built-in tools to make available (`string[]` or `{type:'preset', preset:'claude_code'}`) |
|
|
159
|
-
| `disallowedTools` | array | Tools to explicitly disallow |
|
|
160
|
-
| `permissionMode` | string | How to handle permission prompts |
|
|
161
|
-
| `allowDangerouslySkipPermissions` | bool | Must be `true` to use `permissionMode: "bypassPermissions"` |
|
|
162
|
-
| `mcpServers` | object | MCP servers to connect to |
|
|
163
|
-
| `hooks` | object | Hooks for customizing behavior |
|
|
164
|
-
| `systemPrompt` | string \| preset | Custom system prompt (`string` or `{type:'preset', preset:'claude_code', append?:string}`) |
|
|
165
|
-
| `maxTurns` | number | Maximum agent turns before stopping |
|
|
166
|
-
| `maxBudgetUsd` | number | Maximum budget in USD for the query |
|
|
167
|
-
| `model` | string | Model ID (default: determined by CLI) |
|
|
168
|
-
| `agents` | object | Subagent definitions (`Record<string, AgentDefinition>`) |
|
|
169
|
-
| `outputFormat` | object | Structured output schema |
|
|
170
|
-
| `thinking` | object | Thinking/reasoning control |
|
|
171
|
-
| `betas` | array | Beta features to enable (e.g., `["context-1m-2025-08-07"]`) |
|
|
172
|
-
| `settingSources` | array | Settings to load (e.g., `["project"]`). Default: none (no CLAUDE.md files) |
|
|
173
|
-
| `env` | object | Environment variables to set for the session |
|
|
174
|
-
| `agentProgressSummaries` | bool | Enable periodic AI-generated progress summaries on `task_progress` events |
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## Subagents
|
|
179
|
-
|
|
180
|
-
```typescript
|
|
181
|
-
for await (const message of query({
|
|
182
|
-
prompt: "Use the code-reviewer agent to review this codebase",
|
|
183
|
-
options: {
|
|
184
|
-
allowedTools: ["Read", "Glob", "Grep", "Agent"],
|
|
185
|
-
agents: {
|
|
186
|
-
"code-reviewer": {
|
|
187
|
-
description: "Expert code reviewer for quality and security reviews.",
|
|
188
|
-
prompt: "Analyze code quality and suggest improvements.",
|
|
189
|
-
tools: ["Read", "Glob", "Grep"],
|
|
190
|
-
// Optional: skills, mcpServers for subagent customization
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
})) {
|
|
195
|
-
if ("result" in message) console.log(message.result);
|
|
196
|
-
}
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## Message Types
|
|
202
|
-
|
|
203
|
-
```typescript
|
|
204
|
-
for await (const message of query({
|
|
205
|
-
prompt: "Find TODO comments",
|
|
206
|
-
options: { allowedTools: ["Read", "Glob", "Grep"] },
|
|
207
|
-
})) {
|
|
208
|
-
if ("result" in message) {
|
|
209
|
-
console.log(message.result);
|
|
210
|
-
console.log(`Stop reason: ${message.stop_reason}`); // e.g., "end_turn", "tool_use", "max_tokens"
|
|
211
|
-
} else if (message.type === "system" && message.subtype === "init") {
|
|
212
|
-
const sessionId = message.session_id; // Capture for resuming later
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
Task-related system messages are also emitted for subagent operations:
|
|
218
|
-
- `task_started` — emitted when a subagent task is registered
|
|
219
|
-
- `task_progress` — real-time progress updates with cumulative usage metrics, tool counts, and duration (enable `agentProgressSummaries` option for periodic AI-generated summaries via the `summary` field)
|
|
220
|
-
- `task_notification` — task completion notifications (includes `tool_use_id` for correlating with originating tool calls)
|
|
221
|
-
|
|
222
|
-
---
|
|
223
|
-
|
|
224
|
-
## Session History
|
|
225
|
-
|
|
226
|
-
Retrieve past session data:
|
|
227
|
-
|
|
228
|
-
```typescript
|
|
229
|
-
import { listSessions, getSessionMessages, getSessionInfo } from "@anthropic-ai/claude-agent-sdk";
|
|
230
|
-
|
|
231
|
-
// List all past sessions (supports pagination via limit/offset)
|
|
232
|
-
const sessions = await listSessions({ limit: 20, offset: 0 });
|
|
233
|
-
for (const session of sessions) {
|
|
234
|
-
console.log(`${session.sessionId}: ${session.cwd} (tag: ${session.tag})`);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
// Get metadata for a single session
|
|
238
|
-
const sessionId = sessions[0]?.sessionId;
|
|
239
|
-
const info = await getSessionInfo(sessionId);
|
|
240
|
-
console.log(info.tag, info.createdAt);
|
|
241
|
-
|
|
242
|
-
// Get messages from a specific session (supports pagination via limit/offset)
|
|
243
|
-
const messages = await getSessionMessages(sessionId, { limit: 50, offset: 0 });
|
|
244
|
-
for (const msg of messages) {
|
|
245
|
-
console.log(msg);
|
|
246
|
-
}
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### Session Mutations
|
|
250
|
-
|
|
251
|
-
Rename, tag, or fork sessions:
|
|
252
|
-
|
|
253
|
-
```typescript
|
|
254
|
-
import { renameSession, tagSession, forkSession } from "@anthropic-ai/claude-agent-sdk";
|
|
255
|
-
|
|
256
|
-
// Rename a session
|
|
257
|
-
await renameSession(sessionId, "My refactoring session");
|
|
258
|
-
|
|
259
|
-
// Tag a session
|
|
260
|
-
await tagSession(sessionId, "experiment");
|
|
261
|
-
|
|
262
|
-
// Clear a tag
|
|
263
|
-
await tagSession(sessionId, null);
|
|
264
|
-
|
|
265
|
-
// Fork a session — branch a conversation from a specific point
|
|
266
|
-
const { sessionId: forkedId } = await forkSession(sessionId);
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
## MCP Server Management
|
|
272
|
-
|
|
273
|
-
Manage MCP servers at runtime on a running query:
|
|
274
|
-
|
|
275
|
-
```typescript
|
|
276
|
-
// Reconnect a disconnected MCP server
|
|
277
|
-
await queryHandle.reconnectMcpServer("my-server");
|
|
278
|
-
|
|
279
|
-
// Toggle an MCP server on/off
|
|
280
|
-
await queryHandle.toggleMcpServer("my-server", false); // (name, enabled) — both required
|
|
281
|
-
|
|
282
|
-
// Get status of ALL configured MCP servers — returns an ARRAY
|
|
283
|
-
const statuses: McpServerStatus[] = await queryHandle.mcpServerStatus();
|
|
284
|
-
for (const s of statuses) {
|
|
285
|
-
console.log(s.name, s.scope, s.tools.length, s.error);
|
|
286
|
-
}
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
---
|
|
290
|
-
|
|
291
|
-
## Best Practices
|
|
292
|
-
|
|
293
|
-
1. **Always specify allowedTools** — Explicitly list which tools the agent can use
|
|
294
|
-
2. **Set working directory** — Always specify `cwd` for file operations
|
|
295
|
-
3. **Use appropriate permission modes** — Start with `"default"` and only escalate when needed
|
|
296
|
-
4. **Handle all message types** — Check for `result` property to get agent output
|
|
297
|
-
5. **Limit maxTurns** — Prevent runaway agents with reasonable limits
|
package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/patterns.md
DELETED
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
# Agent SDK Patterns — TypeScript
|
|
2
|
-
|
|
3
|
-
## Basic Agent
|
|
4
|
-
|
|
5
|
-
```typescript
|
|
6
|
-
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
7
|
-
|
|
8
|
-
async function main() {
|
|
9
|
-
for await (const message of query({
|
|
10
|
-
prompt: "Explain what this repository does",
|
|
11
|
-
options: {
|
|
12
|
-
cwd: "/path/to/project",
|
|
13
|
-
allowedTools: ["Read", "Glob", "Grep"],
|
|
14
|
-
},
|
|
15
|
-
})) {
|
|
16
|
-
if ("result" in message) {
|
|
17
|
-
console.log(message.result);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
main();
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Hooks
|
|
28
|
-
|
|
29
|
-
### After Tool Use Hook
|
|
30
|
-
|
|
31
|
-
```typescript
|
|
32
|
-
import { query, HookCallback } from "@anthropic-ai/claude-agent-sdk";
|
|
33
|
-
import { appendFileSync } from "fs";
|
|
34
|
-
|
|
35
|
-
const logFileChange: HookCallback = async (input) => {
|
|
36
|
-
const filePath = (input as any).tool_input?.file_path ?? "unknown";
|
|
37
|
-
appendFileSync(
|
|
38
|
-
"./audit.log",
|
|
39
|
-
`${new Date().toISOString()}: modified ${filePath}\n`,
|
|
40
|
-
);
|
|
41
|
-
return {};
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
for await (const message of query({
|
|
45
|
-
prompt: "Refactor utils.py to improve readability",
|
|
46
|
-
options: {
|
|
47
|
-
allowedTools: ["Read", "Edit", "Write"],
|
|
48
|
-
permissionMode: "acceptEdits",
|
|
49
|
-
hooks: {
|
|
50
|
-
PostToolUse: [{ matcher: "Edit|Write", hooks: [logFileChange] }],
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
})) {
|
|
54
|
-
if ("result" in message) console.log(message.result);
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## Subagents
|
|
61
|
-
|
|
62
|
-
```typescript
|
|
63
|
-
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
64
|
-
|
|
65
|
-
for await (const message of query({
|
|
66
|
-
prompt: "Use the code-reviewer agent to review this codebase",
|
|
67
|
-
options: {
|
|
68
|
-
allowedTools: ["Read", "Glob", "Grep", "Agent"],
|
|
69
|
-
agents: {
|
|
70
|
-
"code-reviewer": {
|
|
71
|
-
description: "Expert code reviewer for quality and security reviews.",
|
|
72
|
-
prompt: "Analyze code quality and suggest improvements.",
|
|
73
|
-
tools: ["Read", "Glob", "Grep"],
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
})) {
|
|
78
|
-
if ("result" in message) console.log(message.result);
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## MCP Server Integration
|
|
85
|
-
|
|
86
|
-
### Browser Automation (Playwright)
|
|
87
|
-
|
|
88
|
-
```typescript
|
|
89
|
-
for await (const message of query({
|
|
90
|
-
prompt: "Open example.com and describe what you see",
|
|
91
|
-
options: {
|
|
92
|
-
mcpServers: {
|
|
93
|
-
playwright: { command: "npx", args: ["@playwright/mcp@latest"] },
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
})) {
|
|
97
|
-
if ("result" in message) console.log(message.result);
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Session Resumption
|
|
104
|
-
|
|
105
|
-
```typescript
|
|
106
|
-
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
107
|
-
|
|
108
|
-
let sessionId: string | undefined;
|
|
109
|
-
|
|
110
|
-
// First query: capture the session ID
|
|
111
|
-
for await (const message of query({
|
|
112
|
-
prompt: "Read the authentication module",
|
|
113
|
-
options: { allowedTools: ["Read", "Glob"] },
|
|
114
|
-
})) {
|
|
115
|
-
if (message.type === "system" && message.subtype === "init") {
|
|
116
|
-
sessionId = message.session_id;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// Resume with full context from the first query
|
|
121
|
-
for await (const message of query({
|
|
122
|
-
prompt: "Now find all places that call it",
|
|
123
|
-
options: { resume: sessionId },
|
|
124
|
-
})) {
|
|
125
|
-
if ("result" in message) console.log(message.result);
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## Session History
|
|
132
|
-
|
|
133
|
-
```typescript
|
|
134
|
-
import { listSessions, getSessionMessages, getSessionInfo } from "@anthropic-ai/claude-agent-sdk";
|
|
135
|
-
|
|
136
|
-
async function main() {
|
|
137
|
-
// List past sessions (supports pagination via limit/offset)
|
|
138
|
-
const sessions = await listSessions();
|
|
139
|
-
for (const session of sessions) {
|
|
140
|
-
console.log(`Session ${session.sessionId} in ${session.cwd} (tag: ${session.tag})`);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// Get metadata for a single session
|
|
144
|
-
if (sessions.length > 0) {
|
|
145
|
-
const info = await getSessionInfo(sessions[0].sessionId);
|
|
146
|
-
console.log(`Created: ${info.createdAt}, Tag: ${info.tag}`);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// Retrieve messages from the most recent session
|
|
150
|
-
if (sessions.length > 0) {
|
|
151
|
-
const messages = await getSessionMessages(sessions[0].sessionId, { limit: 50 });
|
|
152
|
-
for (const msg of messages) {
|
|
153
|
-
console.log(msg);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
main();
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
## Session Mutations
|
|
164
|
-
|
|
165
|
-
```typescript
|
|
166
|
-
import { renameSession, tagSession, forkSession } from "@anthropic-ai/claude-agent-sdk";
|
|
167
|
-
|
|
168
|
-
async function main() {
|
|
169
|
-
const sessionId = "your-session-id";
|
|
170
|
-
|
|
171
|
-
// Rename a session
|
|
172
|
-
await renameSession(sessionId, "Refactoring auth module");
|
|
173
|
-
|
|
174
|
-
// Tag a session for filtering
|
|
175
|
-
await tagSession(sessionId, "experiment-v2");
|
|
176
|
-
|
|
177
|
-
// Clear a tag
|
|
178
|
-
await tagSession(sessionId, null);
|
|
179
|
-
|
|
180
|
-
// Fork a conversation to branch from a point
|
|
181
|
-
const { sessionId: forkedId } = await forkSession(sessionId);
|
|
182
|
-
console.log(`Forked session: ${forkedId}`);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
main();
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
## Custom System Prompt
|
|
191
|
-
|
|
192
|
-
```typescript
|
|
193
|
-
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
194
|
-
|
|
195
|
-
for await (const message of query({
|
|
196
|
-
prompt: "Review this code",
|
|
197
|
-
options: {
|
|
198
|
-
allowedTools: ["Read", "Glob", "Grep"],
|
|
199
|
-
systemPrompt: `You are a senior code reviewer focused on:
|
|
200
|
-
1. Security vulnerabilities
|
|
201
|
-
2. Performance issues
|
|
202
|
-
3. Code maintainability
|
|
203
|
-
|
|
204
|
-
Always provide specific line numbers and suggestions for improvement.`,
|
|
205
|
-
},
|
|
206
|
-
})) {
|
|
207
|
-
if ("result" in message) console.log(message.result);
|
|
208
|
-
}
|
|
209
|
-
```
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Legacy slash-entry shim for the agent-sort skill. Prefer the skill directly.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Agent Sort (Legacy Shim)
|
|
6
|
-
|
|
7
|
-
Use this only if you still invoke `/agent-sort`. The maintained workflow lives in `skills/agent-sort/SKILL.md`.
|
|
8
|
-
|
|
9
|
-
## Canonical Surface
|
|
10
|
-
|
|
11
|
-
- Prefer the `agent-sort` skill directly.
|
|
12
|
-
- Keep this file only as a compatibility entry point.
|
|
13
|
-
|
|
14
|
-
## Arguments
|
|
15
|
-
|
|
16
|
-
`$ARGUMENTS`
|
|
17
|
-
|
|
18
|
-
## Delegation
|
|
19
|
-
|
|
20
|
-
Apply the `agent-sort` skill.
|
|
21
|
-
- Classify ECC surfaces with concrete repo evidence.
|
|
22
|
-
- Keep the result to DAILY vs LIBRARY.
|
|
23
|
-
- If an install change is needed afterward, hand off to `configure-ecc` instead of re-implementing install logic here.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Legacy slash-entry shim for the nanoclaw-repl skill. Prefer the skill directly.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Claw Command (Legacy Shim)
|
|
6
|
-
|
|
7
|
-
Use this only if you still reach for `/claw` from muscle memory. The maintained implementation lives in `skills/nanoclaw-repl/SKILL.md`.
|
|
8
|
-
|
|
9
|
-
## Canonical Surface
|
|
10
|
-
|
|
11
|
-
- Prefer the `nanoclaw-repl` skill directly.
|
|
12
|
-
- Keep this file only as a compatibility entry point while command-first usage is retired.
|
|
13
|
-
|
|
14
|
-
## Arguments
|
|
15
|
-
|
|
16
|
-
`$ARGUMENTS`
|
|
17
|
-
|
|
18
|
-
## Delegation
|
|
19
|
-
|
|
20
|
-
Apply the `nanoclaw-repl` skill and keep the response focused on operating or extending `scripts/claw.js`.
|
|
21
|
-
- If the user wants to run it, use `node scripts/claw.js` or `npm run claw`.
|
|
22
|
-
- If the user wants to extend it, preserve the zero-dependency and markdown-backed session model.
|
|
23
|
-
- If the request is really about long-running orchestration rather than NanoClaw itself, redirect to `dmux-workflows` or `autonomous-agent-harness`.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Legacy slash-entry shim for the context-budget skill. Prefer the skill directly.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Context Budget Optimizer (Legacy Shim)
|
|
6
|
-
|
|
7
|
-
Use this only if you still invoke `/context-budget`. The maintained workflow lives in `skills/context-budget/SKILL.md`.
|
|
8
|
-
|
|
9
|
-
## Canonical Surface
|
|
10
|
-
|
|
11
|
-
- Prefer the `context-budget` skill directly.
|
|
12
|
-
- Keep this file only as a compatibility entry point.
|
|
13
|
-
|
|
14
|
-
## Arguments
|
|
15
|
-
|
|
16
|
-
$ARGUMENTS
|
|
17
|
-
|
|
18
|
-
## Delegation
|
|
19
|
-
|
|
20
|
-
Apply the `context-budget` skill.
|
|
21
|
-
- Pass through `--verbose` if the user supplied it.
|
|
22
|
-
- Assume a 200K context window unless the user specified otherwise.
|
|
23
|
-
- Return the skill's inventory, issue detection, and prioritized savings report without re-implementing the scan here.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Legacy slash-entry shim for the claude-devfleet skill. Prefer the skill directly.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# DevFleet (Legacy Shim)
|
|
6
|
-
|
|
7
|
-
Use this only if you still call `/devfleet`. The maintained workflow lives in `skills/claude-devfleet/SKILL.md`.
|
|
8
|
-
|
|
9
|
-
## Canonical Surface
|
|
10
|
-
|
|
11
|
-
- Prefer the `claude-devfleet` skill directly.
|
|
12
|
-
- Keep this file only as a compatibility entry point while command-first usage is retired.
|
|
13
|
-
|
|
14
|
-
## Arguments
|
|
15
|
-
|
|
16
|
-
`$ARGUMENTS`
|
|
17
|
-
|
|
18
|
-
## Delegation
|
|
19
|
-
|
|
20
|
-
Apply the `claude-devfleet` skill.
|
|
21
|
-
- Plan from the user's description, show the DAG, and get approval before dispatch unless the user already said to proceed.
|
|
22
|
-
- Prefer polling status over blocking waits for long missions.
|
|
23
|
-
- Report mission IDs, files changed, failures, and next steps from structured mission reports.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Legacy slash-entry shim for the documentation-lookup skill. Prefer the skill directly.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Docs Command (Legacy Shim)
|
|
6
|
-
|
|
7
|
-
Use this only if you still reach for `/docs`. The maintained workflow lives in `skills/documentation-lookup/SKILL.md`.
|
|
8
|
-
|
|
9
|
-
## Canonical Surface
|
|
10
|
-
|
|
11
|
-
- Prefer the `documentation-lookup` skill directly.
|
|
12
|
-
- Keep this file only as a compatibility entry point.
|
|
13
|
-
|
|
14
|
-
## Arguments
|
|
15
|
-
|
|
16
|
-
`$ARGUMENTS`
|
|
17
|
-
|
|
18
|
-
## Delegation
|
|
19
|
-
|
|
20
|
-
Apply the `documentation-lookup` skill.
|
|
21
|
-
- If the library or the question is missing, ask for the missing part.
|
|
22
|
-
- Use live documentation through Context7 instead of training data.
|
|
23
|
-
- Return only the current answer and the minimum code/example surface needed.
|