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,189 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ecc-guide
|
|
3
|
+
description: Guide users through ECC's current agents, skills, commands, hooks, rules, install profiles, and project onboarding by reading the live repository surface before answering.
|
|
4
|
+
origin: community
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ECC Guide
|
|
8
|
+
|
|
9
|
+
Use this skill when a user needs help understanding, navigating, installing, or choosing parts of Everything Claude Code.
|
|
10
|
+
|
|
11
|
+
## When To Use
|
|
12
|
+
|
|
13
|
+
Use this skill when the user:
|
|
14
|
+
|
|
15
|
+
- asks what ECC includes
|
|
16
|
+
- wants help finding a skill, command, agent, hook, rule, or install profile
|
|
17
|
+
- is new to the repository and needs a guided path
|
|
18
|
+
- asks "how do I do X with ECC?"
|
|
19
|
+
- asks which ECC components fit a project
|
|
20
|
+
- needs a lightweight explanation of how commands, skills, agents, hooks, and rules relate
|
|
21
|
+
- is confused by install paths, duplicate installs, reset/uninstall, or selective install options
|
|
22
|
+
|
|
23
|
+
## Core Principle
|
|
24
|
+
|
|
25
|
+
Answer from current files, not memory. ECC changes quickly, so hard-coded catalog counts, feature lists, and install instructions go stale.
|
|
26
|
+
|
|
27
|
+
When the ECC repository is available, inspect the relevant files before giving a concrete answer:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
node scripts/ci/catalog.js --json
|
|
31
|
+
find skills -maxdepth 2 -name SKILL.md | sort
|
|
32
|
+
find commands -maxdepth 1 -name '*.md' | sort
|
|
33
|
+
find agents -maxdepth 1 -name '*.md' | sort
|
|
34
|
+
node scripts/install-plan.js --list-profiles
|
|
35
|
+
node scripts/install-plan.js --list-components --json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Use the smallest set of reads needed for the user's question.
|
|
39
|
+
|
|
40
|
+
## Repository Map
|
|
41
|
+
|
|
42
|
+
- `README.md`: install paths, uninstall/reset guidance, public positioning, FAQs
|
|
43
|
+
- `AGENTS.md`: contributor guidance and project structure
|
|
44
|
+
- `agent.yaml`: exported gitagent surface and command list
|
|
45
|
+
- `commands/`: maintained slash-command compatibility shims
|
|
46
|
+
- `skills/*/SKILL.md`: reusable workflows and domain playbooks
|
|
47
|
+
- `agents/*.md`: delegated subagent role prompts
|
|
48
|
+
- `rules/`: language and harness rules
|
|
49
|
+
- `hooks/README.md`, `hooks/hooks.json`, `scripts/hooks/`: hook behavior and safety gates
|
|
50
|
+
- `manifests/install-*.json`: selective install modules, components, profiles, and target support
|
|
51
|
+
- `docs/`: harness guides, architecture notes, translated docs, release docs
|
|
52
|
+
|
|
53
|
+
## Response Style
|
|
54
|
+
|
|
55
|
+
Lead with the answer, then give the next action. Most users do not need a full catalog dump.
|
|
56
|
+
|
|
57
|
+
Good first response shape:
|
|
58
|
+
|
|
59
|
+
1. what to use
|
|
60
|
+
2. why it fits
|
|
61
|
+
3. exact file or command to inspect
|
|
62
|
+
4. one next command or question
|
|
63
|
+
|
|
64
|
+
Avoid:
|
|
65
|
+
|
|
66
|
+
- listing every skill or command by default
|
|
67
|
+
- repeating large README sections
|
|
68
|
+
- recommending retired command shims when a skill-first path exists
|
|
69
|
+
- claiming a component exists without checking the filesystem
|
|
70
|
+
- replacing install guidance with manual copy commands when the managed installer supports the target
|
|
71
|
+
|
|
72
|
+
## Common Tasks
|
|
73
|
+
|
|
74
|
+
### New User Onboarding
|
|
75
|
+
|
|
76
|
+
Give a short menu:
|
|
77
|
+
|
|
78
|
+
- install or reset ECC
|
|
79
|
+
- pick skills for a project
|
|
80
|
+
- understand commands vs skills
|
|
81
|
+
- inspect hooks and safety behavior
|
|
82
|
+
- run a harness audit
|
|
83
|
+
- find a specific workflow
|
|
84
|
+
|
|
85
|
+
Point to `README.md` for install/reset and `/project-init` for project-specific onboarding.
|
|
86
|
+
|
|
87
|
+
### Feature Discovery
|
|
88
|
+
|
|
89
|
+
For "what should I use for X?":
|
|
90
|
+
|
|
91
|
+
1. Search `skills/`, `commands/`, and `agents/`.
|
|
92
|
+
2. Prefer skills as the primary workflow surface.
|
|
93
|
+
3. Use commands only when they are a maintained compatibility shim or a user explicitly wants slash-command behavior.
|
|
94
|
+
4. Mention agents when delegation is useful.
|
|
95
|
+
|
|
96
|
+
Useful searches:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
rg -n "<query>" skills commands agents docs
|
|
100
|
+
find skills -maxdepth 2 -name SKILL.md | sort
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Install Guidance
|
|
104
|
+
|
|
105
|
+
Use managed install paths:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
node scripts/install-plan.js --list-profiles
|
|
109
|
+
node scripts/install-plan.js --profile minimal --target claude --json
|
|
110
|
+
node scripts/install-apply.js --profile minimal --target claude --dry-run
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
For specific skill installs:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
node scripts/install-plan.js --skills <skill-id> --target claude --json
|
|
117
|
+
node scripts/install-apply.js --skills <skill-id> --target claude --dry-run
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Warn users not to stack plugin installs and full manual/profile installs unless they intentionally want duplicate surfaces.
|
|
121
|
+
|
|
122
|
+
### Project Onboarding
|
|
123
|
+
|
|
124
|
+
Use `/project-init` when the user wants ECC configured for a target repo. The expected sequence is:
|
|
125
|
+
|
|
126
|
+
1. detect the stack from project files
|
|
127
|
+
2. resolve a dry-run install plan
|
|
128
|
+
3. inspect existing `CLAUDE.md` and settings files
|
|
129
|
+
4. ask before applying changes
|
|
130
|
+
5. keep generated guidance minimal and repo-specific
|
|
131
|
+
|
|
132
|
+
### Troubleshooting
|
|
133
|
+
|
|
134
|
+
Ask for the target harness and install path first, then inspect:
|
|
135
|
+
|
|
136
|
+
- plugin install metadata
|
|
137
|
+
- `.claude/`, `.cursor/`, `.codex/`, `.gemini/`, `.opencode/`, `.codebuddy/`, `.joycode/`, or `.qwen/`
|
|
138
|
+
- `hooks/hooks.json`
|
|
139
|
+
- install-state files
|
|
140
|
+
- relevant command/skill files
|
|
141
|
+
|
|
142
|
+
For repo health, suggest:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
npm run harness:audit -- --format text
|
|
146
|
+
npm run observability:ready
|
|
147
|
+
npm test
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Output Templates
|
|
151
|
+
|
|
152
|
+
### Short Recommendation
|
|
153
|
+
|
|
154
|
+
```text
|
|
155
|
+
Use <skill-or-command>. It fits because <reason>.
|
|
156
|
+
|
|
157
|
+
Canonical file: <path>
|
|
158
|
+
Verify with: <command>
|
|
159
|
+
Next: <one concrete action>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Search Results
|
|
163
|
+
|
|
164
|
+
```text
|
|
165
|
+
Best matches:
|
|
166
|
+
- <path>: <why it matters>
|
|
167
|
+
- <path>: <why it matters>
|
|
168
|
+
|
|
169
|
+
Recommendation: <which one to use first and why>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Install Plan Summary
|
|
173
|
+
|
|
174
|
+
```text
|
|
175
|
+
Detected: <stack evidence>
|
|
176
|
+
Target: <harness>
|
|
177
|
+
Plan: <profile/modules/skills>
|
|
178
|
+
Dry run: <command>
|
|
179
|
+
Would change: <paths>
|
|
180
|
+
Needs approval before apply: <yes/no>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Related Surfaces
|
|
184
|
+
|
|
185
|
+
- `/project-init`: stack-aware onboarding plan for a target repo
|
|
186
|
+
- `/harness-audit`: deterministic readiness scorecard
|
|
187
|
+
- `/skill-health`: skill quality review
|
|
188
|
+
- `/skill-create`: generate a new skill from local git history
|
|
189
|
+
- `/security-scan`: inspect Claude/OpenCode configuration security
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: error-handling
|
|
3
|
+
description: Patterns for robust error handling across TypeScript, Python, and Go. Covers typed errors, error boundaries, retries, circuit breakers, and user-facing error messages.
|
|
4
|
+
origin: ECC
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Error Handling Patterns
|
|
8
|
+
|
|
9
|
+
Consistent, robust error handling patterns for production applications.
|
|
10
|
+
|
|
11
|
+
## When to Activate
|
|
12
|
+
|
|
13
|
+
- Designing error types or exception hierarchies for a new module or service
|
|
14
|
+
- Adding retry logic or circuit breakers for unreliable external dependencies
|
|
15
|
+
- Reviewing API endpoints for missing error handling
|
|
16
|
+
- Implementing user-facing error messages and feedback
|
|
17
|
+
- Debugging cascading failures or silent error swallowing
|
|
18
|
+
|
|
19
|
+
## Core Principles
|
|
20
|
+
|
|
21
|
+
1. **Fail fast and loudly** — surface errors at the boundary where they occur; don't bury them
|
|
22
|
+
2. **Typed errors over string messages** — errors are first-class values with structure
|
|
23
|
+
3. **User messages ≠ developer messages** — show friendly text to users, log full context server-side
|
|
24
|
+
4. **Never swallow errors silently** — every `catch` block must either handle, re-throw, or log
|
|
25
|
+
5. **Errors are part of your API contract** — document every error code a client may receive
|
|
26
|
+
|
|
27
|
+
## TypeScript / JavaScript
|
|
28
|
+
|
|
29
|
+
### Typed Error Classes
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
// Define an error hierarchy for your domain
|
|
33
|
+
export class AppError extends Error {
|
|
34
|
+
constructor(
|
|
35
|
+
message: string,
|
|
36
|
+
public readonly code: string,
|
|
37
|
+
public readonly statusCode: number = 500,
|
|
38
|
+
public readonly details?: unknown,
|
|
39
|
+
) {
|
|
40
|
+
super(message)
|
|
41
|
+
this.name = this.constructor.name
|
|
42
|
+
// Maintain correct prototype chain in transpiled ES5 JavaScript.
|
|
43
|
+
// Required for `instanceof` checks (e.g., `error instanceof NotFoundError`)
|
|
44
|
+
// to work correctly when extending the built-in Error class.
|
|
45
|
+
Object.setPrototypeOf(this, new.target.prototype)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export class NotFoundError extends AppError {
|
|
50
|
+
constructor(resource: string, id: string) {
|
|
51
|
+
super(`${resource} not found: ${id}`, 'NOT_FOUND', 404)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export class ValidationError extends AppError {
|
|
56
|
+
constructor(message: string, details: { field: string; message: string }[]) {
|
|
57
|
+
super(message, 'VALIDATION_ERROR', 422, details)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export class UnauthorizedError extends AppError {
|
|
62
|
+
constructor(reason = 'Authentication required') {
|
|
63
|
+
super(reason, 'UNAUTHORIZED', 401)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export class RateLimitError extends AppError {
|
|
68
|
+
constructor(public readonly retryAfterMs: number) {
|
|
69
|
+
super('Rate limit exceeded', 'RATE_LIMITED', 429)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Result Pattern (no-throw style)
|
|
75
|
+
|
|
76
|
+
For operations where failure is expected and common (parsing, external calls):
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
type Result<T, E = AppError> =
|
|
80
|
+
| { ok: true; value: T }
|
|
81
|
+
| { ok: false; error: E }
|
|
82
|
+
|
|
83
|
+
function ok<T>(value: T): Result<T> {
|
|
84
|
+
return { ok: true, value }
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function err<E>(error: E): Result<never, E> {
|
|
88
|
+
return { ok: false, error }
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Usage
|
|
92
|
+
async function fetchUser(id: string): Promise<Result<User>> {
|
|
93
|
+
try {
|
|
94
|
+
const user = await db.users.findUnique({ where: { id } })
|
|
95
|
+
if (!user) return err(new NotFoundError('User', id))
|
|
96
|
+
return ok(user)
|
|
97
|
+
} catch (e) {
|
|
98
|
+
return err(new AppError('Database error', 'DB_ERROR'))
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const result = await fetchUser('abc-123')
|
|
103
|
+
if (!result.ok) {
|
|
104
|
+
// TypeScript knows result.error here
|
|
105
|
+
logger.error('Failed to fetch user', { error: result.error })
|
|
106
|
+
return
|
|
107
|
+
}
|
|
108
|
+
// TypeScript knows result.value here
|
|
109
|
+
console.log(result.value.email)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### API Error Handler (Next.js / Express)
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import { NextRequest, NextResponse } from 'next/server'
|
|
116
|
+
|
|
117
|
+
function handleApiError(error: unknown): NextResponse {
|
|
118
|
+
// Known application error
|
|
119
|
+
if (error instanceof AppError) {
|
|
120
|
+
return NextResponse.json(
|
|
121
|
+
{
|
|
122
|
+
error: {
|
|
123
|
+
code: error.code,
|
|
124
|
+
message: error.message,
|
|
125
|
+
...(error.details ? { details: error.details } : {}),
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
{ status: error.statusCode },
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Zod validation error
|
|
133
|
+
if (error instanceof z.ZodError) {
|
|
134
|
+
return NextResponse.json(
|
|
135
|
+
{
|
|
136
|
+
error: {
|
|
137
|
+
code: 'VALIDATION_ERROR',
|
|
138
|
+
message: 'Request validation failed',
|
|
139
|
+
details: error.issues.map(i => ({
|
|
140
|
+
field: i.path.join('.'),
|
|
141
|
+
message: i.message,
|
|
142
|
+
})),
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{ status: 422 },
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Unexpected error — log details, return generic message
|
|
150
|
+
console.error('Unexpected error:', error)
|
|
151
|
+
return NextResponse.json(
|
|
152
|
+
{ error: { code: 'INTERNAL_ERROR', message: 'An unexpected error occurred' } },
|
|
153
|
+
{ status: 500 },
|
|
154
|
+
)
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export async function POST(req: NextRequest) {
|
|
158
|
+
try {
|
|
159
|
+
// ... handler logic
|
|
160
|
+
} catch (error) {
|
|
161
|
+
return handleApiError(error)
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### React Error Boundary
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
import { Component, ErrorInfo, ReactNode } from 'react'
|
|
170
|
+
|
|
171
|
+
interface Props {
|
|
172
|
+
fallback: ReactNode
|
|
173
|
+
onError?: (error: Error, info: ErrorInfo) => void
|
|
174
|
+
children: ReactNode
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
interface State {
|
|
178
|
+
hasError: boolean
|
|
179
|
+
error: Error | null
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export class ErrorBoundary extends Component<Props, State> {
|
|
183
|
+
state: State = { hasError: false, error: null }
|
|
184
|
+
|
|
185
|
+
static getDerivedStateFromError(error: Error): State {
|
|
186
|
+
return { hasError: true, error }
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
componentDidCatch(error: Error, info: ErrorInfo) {
|
|
190
|
+
this.props.onError?.(error, info)
|
|
191
|
+
console.error('Unhandled React error:', error, info)
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
render() {
|
|
195
|
+
if (this.state.hasError) return this.props.fallback
|
|
196
|
+
return this.props.children
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Usage
|
|
201
|
+
<ErrorBoundary fallback={<p>Something went wrong. Please refresh.</p>}>
|
|
202
|
+
<MyComponent />
|
|
203
|
+
</ErrorBoundary>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Python
|
|
207
|
+
|
|
208
|
+
### Custom Exception Hierarchy
|
|
209
|
+
|
|
210
|
+
```python
|
|
211
|
+
class AppError(Exception):
|
|
212
|
+
"""Base application error."""
|
|
213
|
+
def __init__(self, message: str, code: str, status_code: int = 500):
|
|
214
|
+
super().__init__(message)
|
|
215
|
+
self.code = code
|
|
216
|
+
self.status_code = status_code
|
|
217
|
+
|
|
218
|
+
class NotFoundError(AppError):
|
|
219
|
+
def __init__(self, resource: str, id: str):
|
|
220
|
+
super().__init__(f"{resource} not found: {id}", "NOT_FOUND", 404)
|
|
221
|
+
|
|
222
|
+
class ValidationError(AppError):
|
|
223
|
+
def __init__(self, message: str, details: list[dict] | None = None):
|
|
224
|
+
super().__init__(message, "VALIDATION_ERROR", 422)
|
|
225
|
+
self.details = details or []
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### FastAPI Global Exception Handler
|
|
229
|
+
|
|
230
|
+
```python
|
|
231
|
+
from fastapi import FastAPI, Request
|
|
232
|
+
from fastapi.responses import JSONResponse
|
|
233
|
+
|
|
234
|
+
app = FastAPI()
|
|
235
|
+
|
|
236
|
+
@app.exception_handler(AppError)
|
|
237
|
+
async def app_error_handler(request: Request, exc: AppError) -> JSONResponse:
|
|
238
|
+
return JSONResponse(
|
|
239
|
+
status_code=exc.status_code,
|
|
240
|
+
content={"error": {"code": exc.code, "message": str(exc)}},
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
@app.exception_handler(Exception)
|
|
244
|
+
async def generic_error_handler(request: Request, exc: Exception) -> JSONResponse:
|
|
245
|
+
# Log full details, return generic message
|
|
246
|
+
logger.exception("Unexpected error", exc_info=exc)
|
|
247
|
+
return JSONResponse(
|
|
248
|
+
status_code=500,
|
|
249
|
+
content={"error": {"code": "INTERNAL_ERROR", "message": "An unexpected error occurred"}},
|
|
250
|
+
)
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Go
|
|
254
|
+
|
|
255
|
+
### Sentinel Errors and Error Wrapping
|
|
256
|
+
|
|
257
|
+
```go
|
|
258
|
+
package domain
|
|
259
|
+
|
|
260
|
+
import "errors"
|
|
261
|
+
|
|
262
|
+
// Sentinel errors for type-checking
|
|
263
|
+
var (
|
|
264
|
+
ErrNotFound = errors.New("not found")
|
|
265
|
+
ErrUnauthorized = errors.New("unauthorized")
|
|
266
|
+
ErrConflict = errors.New("conflict")
|
|
267
|
+
)
|
|
268
|
+
|
|
269
|
+
// Wrap errors with context — never lose the original
|
|
270
|
+
func (r *UserRepository) FindByID(ctx context.Context, id string) (*User, error) {
|
|
271
|
+
user, err := r.db.QueryRow(ctx, "SELECT * FROM users WHERE id = $1", id)
|
|
272
|
+
if errors.Is(err, sql.ErrNoRows) {
|
|
273
|
+
return nil, fmt.Errorf("user %s: %w", id, ErrNotFound)
|
|
274
|
+
}
|
|
275
|
+
if err != nil {
|
|
276
|
+
return nil, fmt.Errorf("querying user %s: %w", id, err)
|
|
277
|
+
}
|
|
278
|
+
return user, nil
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// At the handler level, unwrap to determine response
|
|
282
|
+
func (h *Handler) GetUser(w http.ResponseWriter, r *http.Request) {
|
|
283
|
+
user, err := h.service.GetUser(r.Context(), chi.URLParam(r, "id"))
|
|
284
|
+
if err != nil {
|
|
285
|
+
switch {
|
|
286
|
+
case errors.Is(err, domain.ErrNotFound):
|
|
287
|
+
writeError(w, http.StatusNotFound, "not_found", err.Error())
|
|
288
|
+
case errors.Is(err, domain.ErrUnauthorized):
|
|
289
|
+
writeError(w, http.StatusForbidden, "forbidden", "Access denied")
|
|
290
|
+
default:
|
|
291
|
+
slog.Error("unexpected error", "err", err)
|
|
292
|
+
writeError(w, http.StatusInternalServerError, "internal_error", "An unexpected error occurred")
|
|
293
|
+
}
|
|
294
|
+
return
|
|
295
|
+
}
|
|
296
|
+
writeJSON(w, http.StatusOK, user)
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
## Retry with Exponential Backoff
|
|
301
|
+
|
|
302
|
+
```typescript
|
|
303
|
+
interface RetryOptions {
|
|
304
|
+
maxAttempts?: number
|
|
305
|
+
baseDelayMs?: number
|
|
306
|
+
maxDelayMs?: number
|
|
307
|
+
retryIf?: (error: unknown) => boolean
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
async function withRetry<T>(
|
|
311
|
+
fn: () => Promise<T>,
|
|
312
|
+
options: RetryOptions = {},
|
|
313
|
+
): Promise<T> {
|
|
314
|
+
const {
|
|
315
|
+
maxAttempts = 3,
|
|
316
|
+
baseDelayMs = 500,
|
|
317
|
+
maxDelayMs = 10_000,
|
|
318
|
+
retryIf = () => true,
|
|
319
|
+
} = options
|
|
320
|
+
|
|
321
|
+
let lastError: unknown
|
|
322
|
+
|
|
323
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
324
|
+
try {
|
|
325
|
+
return await fn()
|
|
326
|
+
} catch (error) {
|
|
327
|
+
lastError = error
|
|
328
|
+
if (attempt === maxAttempts || !retryIf(error)) throw error
|
|
329
|
+
|
|
330
|
+
const jitter = Math.random() * baseDelayMs
|
|
331
|
+
const delay = Math.min(baseDelayMs * 2 ** (attempt - 1) + jitter, maxDelayMs)
|
|
332
|
+
await new Promise(resolve => setTimeout(resolve, delay))
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
throw lastError
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// Usage: retry transient network errors, not 4xx
|
|
340
|
+
const data = await withRetry(() => fetch('/api/data').then(r => r.json()), {
|
|
341
|
+
maxAttempts: 3,
|
|
342
|
+
retryIf: (error) => !(error instanceof AppError && error.statusCode < 500),
|
|
343
|
+
})
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
## User-Facing Error Messages
|
|
347
|
+
|
|
348
|
+
Map error codes to human-readable messages. Keep technical details out of user-visible text.
|
|
349
|
+
|
|
350
|
+
```typescript
|
|
351
|
+
const USER_ERROR_MESSAGES: Record<string, string> = {
|
|
352
|
+
NOT_FOUND: 'The requested item could not be found.',
|
|
353
|
+
UNAUTHORIZED: 'Please sign in to continue.',
|
|
354
|
+
FORBIDDEN: "You don't have permission to do that.",
|
|
355
|
+
VALIDATION_ERROR: 'Please check your input and try again.',
|
|
356
|
+
RATE_LIMITED: 'Too many requests. Please wait a moment and try again.',
|
|
357
|
+
INTERNAL_ERROR: 'Something went wrong on our end. Please try again later.',
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export function getUserMessage(code: string): string {
|
|
361
|
+
return USER_ERROR_MESSAGES[code] ?? USER_ERROR_MESSAGES.INTERNAL_ERROR
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
## Error Handling Checklist
|
|
366
|
+
|
|
367
|
+
Before merging any code that touches error handling:
|
|
368
|
+
|
|
369
|
+
- [ ] Every `catch` block handles, re-throws, or logs — no silent swallowing
|
|
370
|
+
- [ ] API errors follow the standard envelope `{ error: { code, message } }`
|
|
371
|
+
- [ ] User-facing messages contain no stack traces or internal details
|
|
372
|
+
- [ ] Full error context is logged server-side
|
|
373
|
+
- [ ] Custom error classes extend a base `AppError` with a `code` field
|
|
374
|
+
- [ ] Async functions surface errors to callers — no fire-and-forget without fallback
|
|
375
|
+
- [ ] Retry logic only retries retriable errors (not 4xx client errors)
|
|
376
|
+
- [ ] React components are wrapped in `ErrorBoundary` for rendering errors
|
|
@@ -6,6 +6,10 @@ origin: ECC
|
|
|
6
6
|
|
|
7
7
|
# Exa Search
|
|
8
8
|
|
|
9
|
+
> **Drift-prone skill.** Exa MCP tool names, parameters, and account limits can
|
|
10
|
+
> change. Confirm the exposed tool surface and current Exa docs before relying
|
|
11
|
+
> on a specific search mode, category, or livecrawl behavior.
|
|
12
|
+
|
|
9
13
|
Neural search for web content, code, companies, and people via the Exa MCP server.
|
|
10
14
|
|
|
11
15
|
## When to Activate
|
|
@@ -6,6 +6,10 @@ origin: ECC
|
|
|
6
6
|
|
|
7
7
|
# fal.ai Media Generation
|
|
8
8
|
|
|
9
|
+
> **Drift-prone skill.** fal.ai model IDs, pricing, inputs, and MCP tool names
|
|
10
|
+
> change quickly. Search or fetch the current model metadata before promising a
|
|
11
|
+
> specific model, parameter, output format, or cost.
|
|
12
|
+
|
|
9
13
|
Generate images, videos, and audio using fal.ai models via MCP.
|
|
10
14
|
|
|
11
15
|
## When to Activate
|