claudecode-omc 5.5.2 → 5.6.1
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/skills/de-ai-writing/SKILL.md +243 -0
- package/.local/skills/de-ai-writing/references/chinese-patterns.md +152 -0
- package/.local/skills/de-ai-writing/references/chinese-signals.md +121 -0
- package/.local/skills/de-ai-writing/references/domain-playbooks.md +120 -0
- package/.local/skills/de-ai-writing/references/wikipedia-signs.md +196 -0
- package/README.md +102 -10
- package/bundled/manifest.json +3 -2
- package/bundled/upstream/ecc/.omc-source/bundle.json +23 -0
- package/bundled/upstream/ecc/.omc-source/last-plan-apply.json +439 -0
- package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +47 -0
- package/bundled/upstream/ecc/agents/a11y-architect.md +141 -0
- package/bundled/upstream/ecc/agents/architect.md +211 -0
- package/bundled/upstream/ecc/agents/build-error-resolver.md +114 -0
- package/bundled/upstream/ecc/agents/chief-of-staff.md +151 -0
- package/bundled/upstream/ecc/agents/code-architect.md +71 -0
- package/bundled/upstream/ecc/agents/code-explorer.md +69 -0
- package/bundled/upstream/ecc/agents/code-reviewer.md +237 -0
- package/bundled/upstream/ecc/agents/code-simplifier.md +47 -0
- package/bundled/upstream/ecc/agents/comment-analyzer.md +45 -0
- package/bundled/upstream/ecc/agents/conversation-analyzer.md +52 -0
- package/bundled/upstream/ecc/agents/cpp-build-resolver.md +90 -0
- package/bundled/upstream/ecc/agents/cpp-reviewer.md +72 -0
- package/bundled/upstream/ecc/agents/csharp-reviewer.md +101 -0
- package/bundled/upstream/ecc/agents/dart-build-resolver.md +201 -0
- package/bundled/upstream/ecc/agents/database-reviewer.md +91 -0
- package/bundled/upstream/ecc/agents/doc-updater.md +107 -0
- package/bundled/upstream/ecc/agents/docs-lookup.md +68 -0
- package/bundled/upstream/ecc/agents/e2e-runner.md +107 -0
- package/bundled/upstream/ecc/agents/flutter-reviewer.md +243 -0
- package/bundled/upstream/ecc/agents/gan-evaluator.md +209 -0
- package/bundled/upstream/ecc/agents/gan-generator.md +131 -0
- package/bundled/upstream/ecc/agents/gan-planner.md +99 -0
- package/bundled/upstream/ecc/agents/go-build-resolver.md +94 -0
- package/bundled/upstream/ecc/agents/go-reviewer.md +76 -0
- package/bundled/upstream/ecc/agents/harness-optimizer.md +35 -0
- package/bundled/upstream/ecc/agents/healthcare-reviewer.md +83 -0
- package/bundled/upstream/ecc/agents/java-build-resolver.md +153 -0
- package/bundled/upstream/ecc/agents/java-reviewer.md +92 -0
- package/bundled/upstream/ecc/agents/kotlin-build-resolver.md +118 -0
- package/bundled/upstream/ecc/agents/kotlin-reviewer.md +159 -0
- package/bundled/upstream/ecc/agents/loop-operator.md +36 -0
- package/bundled/upstream/ecc/agents/opensource-forker.md +198 -0
- package/bundled/upstream/ecc/agents/opensource-packager.md +249 -0
- package/bundled/upstream/ecc/agents/opensource-sanitizer.md +188 -0
- package/bundled/upstream/ecc/agents/performance-optimizer.md +446 -0
- package/bundled/upstream/ecc/agents/planner.md +212 -0
- package/bundled/upstream/ecc/agents/pr-test-analyzer.md +45 -0
- package/bundled/upstream/ecc/agents/python-reviewer.md +98 -0
- package/bundled/upstream/ecc/agents/pytorch-build-resolver.md +120 -0
- package/bundled/upstream/ecc/agents/refactor-cleaner.md +85 -0
- package/bundled/upstream/ecc/agents/rust-build-resolver.md +148 -0
- package/bundled/upstream/ecc/agents/rust-reviewer.md +94 -0
- package/bundled/upstream/ecc/agents/security-reviewer.md +108 -0
- package/bundled/upstream/ecc/agents/seo-specialist.md +62 -0
- package/bundled/upstream/ecc/agents/silent-failure-hunter.md +50 -0
- package/bundled/upstream/ecc/agents/tdd-guide.md +91 -0
- package/bundled/upstream/ecc/agents/type-design-analyzer.md +41 -0
- package/bundled/upstream/ecc/agents/typescript-reviewer.md +112 -0
- package/bundled/upstream/ecc/commands/agent-sort.md +23 -0
- package/bundled/upstream/ecc/commands/aside.md +164 -0
- package/bundled/upstream/ecc/commands/build-fix.md +62 -0
- package/bundled/upstream/ecc/commands/checkpoint.md +74 -0
- package/bundled/upstream/ecc/commands/claw.md +23 -0
- package/bundled/upstream/ecc/commands/code-review.md +289 -0
- package/bundled/upstream/ecc/commands/context-budget.md +23 -0
- package/bundled/upstream/ecc/commands/cpp-build.md +173 -0
- package/bundled/upstream/ecc/commands/cpp-review.md +132 -0
- package/bundled/upstream/ecc/commands/cpp-test.md +251 -0
- package/bundled/upstream/ecc/commands/devfleet.md +23 -0
- package/bundled/upstream/ecc/commands/docs.md +23 -0
- package/bundled/upstream/ecc/commands/e2e.md +268 -0
- package/bundled/upstream/ecc/commands/eval.md +23 -0
- package/bundled/upstream/ecc/commands/evolve.md +178 -0
- package/bundled/upstream/ecc/commands/feature-dev.md +49 -0
- package/bundled/upstream/ecc/commands/flutter-build.md +164 -0
- package/bundled/upstream/ecc/commands/flutter-review.md +116 -0
- package/bundled/upstream/ecc/commands/flutter-test.md +144 -0
- package/bundled/upstream/ecc/commands/gan-build.md +99 -0
- package/bundled/upstream/ecc/commands/gan-design.md +35 -0
- package/bundled/upstream/ecc/commands/go-build.md +183 -0
- package/bundled/upstream/ecc/commands/go-review.md +148 -0
- package/bundled/upstream/ecc/commands/go-test.md +268 -0
- package/bundled/upstream/ecc/commands/gradle-build.md +70 -0
- package/bundled/upstream/ecc/commands/harness-audit.md +73 -0
- package/bundled/upstream/ecc/commands/hookify-configure.md +14 -0
- package/bundled/upstream/ecc/commands/hookify-help.md +46 -0
- package/bundled/upstream/ecc/commands/hookify-list.md +21 -0
- package/bundled/upstream/ecc/commands/hookify.md +50 -0
- package/bundled/upstream/ecc/commands/instinct-export.md +66 -0
- package/bundled/upstream/ecc/commands/instinct-import.md +114 -0
- package/bundled/upstream/ecc/commands/instinct-status.md +59 -0
- package/bundled/upstream/ecc/commands/jira.md +106 -0
- package/bundled/upstream/ecc/commands/kotlin-build.md +174 -0
- package/bundled/upstream/ecc/commands/kotlin-review.md +140 -0
- package/bundled/upstream/ecc/commands/kotlin-test.md +312 -0
- package/bundled/upstream/ecc/commands/learn-eval.md +116 -0
- package/bundled/upstream/ecc/commands/learn.md +70 -0
- package/bundled/upstream/ecc/commands/loop-start.md +32 -0
- package/bundled/upstream/ecc/commands/loop-status.md +24 -0
- package/bundled/upstream/ecc/commands/model-route.md +26 -0
- package/bundled/upstream/ecc/commands/multi-backend.md +158 -0
- package/bundled/upstream/ecc/commands/multi-execute.md +315 -0
- package/bundled/upstream/ecc/commands/multi-frontend.md +158 -0
- package/bundled/upstream/ecc/commands/multi-plan.md +268 -0
- package/bundled/upstream/ecc/commands/multi-workflow.md +191 -0
- package/bundled/upstream/ecc/commands/orchestrate.md +135 -0
- package/bundled/upstream/ecc/commands/plan.md +117 -0
- package/bundled/upstream/ecc/commands/pm2.md +272 -0
- package/bundled/upstream/ecc/commands/projects.md +39 -0
- package/bundled/upstream/ecc/commands/promote.md +41 -0
- package/bundled/upstream/ecc/commands/prompt-optimize.md +23 -0
- package/bundled/upstream/ecc/commands/prp-commit.md +112 -0
- package/bundled/upstream/ecc/commands/prp-implement.md +385 -0
- package/bundled/upstream/ecc/commands/prp-plan.md +502 -0
- package/bundled/upstream/ecc/commands/prp-pr.md +184 -0
- package/bundled/upstream/ecc/commands/prp-prd.md +447 -0
- package/bundled/upstream/ecc/commands/prune.md +31 -0
- package/bundled/upstream/ecc/commands/python-review.md +297 -0
- package/bundled/upstream/ecc/commands/quality-gate.md +29 -0
- package/bundled/upstream/ecc/commands/refactor-clean.md +80 -0
- package/bundled/upstream/ecc/commands/resume-session.md +156 -0
- package/bundled/upstream/ecc/commands/review-pr.md +37 -0
- package/bundled/upstream/ecc/commands/rules-distill.md +20 -0
- package/bundled/upstream/ecc/commands/rust-build.md +187 -0
- package/bundled/upstream/ecc/commands/rust-review.md +142 -0
- package/bundled/upstream/ecc/commands/rust-test.md +308 -0
- package/bundled/upstream/ecc/commands/santa-loop.md +175 -0
- package/bundled/upstream/ecc/commands/save-session.md +275 -0
- package/bundled/upstream/ecc/commands/sessions.md +339 -0
- package/bundled/upstream/ecc/commands/setup-pm.md +80 -0
- package/bundled/upstream/ecc/commands/skill-create.md +174 -0
- package/bundled/upstream/ecc/commands/skill-health.md +54 -0
- package/bundled/upstream/ecc/commands/tdd.md +231 -0
- package/bundled/upstream/ecc/commands/test-coverage.md +69 -0
- package/bundled/upstream/ecc/commands/update-codemaps.md +72 -0
- package/bundled/upstream/ecc/commands/update-docs.md +84 -0
- package/bundled/upstream/ecc/commands/verify.md +23 -0
- package/bundled/upstream/ecc/hooks/README.md +237 -0
- package/bundled/upstream/ecc/hooks/hooks.json +330 -0
- package/bundled/upstream/ecc/skills/accessibility/SKILL.md +146 -0
- package/bundled/upstream/ecc/skills/agent-eval/SKILL.md +145 -0
- package/bundled/upstream/ecc/skills/agent-harness-construction/SKILL.md +73 -0
- package/bundled/upstream/ecc/skills/agent-introspection-debugging/SKILL.md +153 -0
- package/bundled/upstream/ecc/skills/agent-payment-x402/SKILL.md +178 -0
- package/bundled/upstream/ecc/skills/agent-sort/SKILL.md +215 -0
- package/bundled/upstream/ecc/skills/agentic-engineering/SKILL.md +63 -0
- package/bundled/upstream/ecc/skills/ai-first-engineering/SKILL.md +51 -0
- package/bundled/upstream/ecc/skills/ai-regression-testing/SKILL.md +385 -0
- package/bundled/upstream/ecc/skills/android-clean-architecture/SKILL.md +339 -0
- package/bundled/upstream/ecc/skills/api-connector-builder/SKILL.md +120 -0
- package/bundled/upstream/ecc/skills/api-design/SKILL.md +523 -0
- package/bundled/upstream/ecc/skills/architecture-decision-records/SKILL.md +179 -0
- package/bundled/upstream/ecc/skills/article-writing/SKILL.md +79 -0
- package/bundled/upstream/ecc/skills/automation-audit-ops/SKILL.md +142 -0
- package/bundled/upstream/ecc/skills/autonomous-agent-harness/SKILL.md +267 -0
- package/bundled/upstream/ecc/skills/autonomous-loops/SKILL.md +610 -0
- package/bundled/upstream/ecc/skills/backend-patterns/SKILL.md +598 -0
- package/bundled/upstream/ecc/skills/benchmark/SKILL.md +93 -0
- package/bundled/upstream/ecc/skills/blueprint/SKILL.md +105 -0
- package/bundled/upstream/ecc/skills/brand-voice/SKILL.md +97 -0
- package/bundled/upstream/ecc/skills/brand-voice/references/voice-profile-schema.md +55 -0
- package/bundled/upstream/ecc/skills/browser-qa/SKILL.md +87 -0
- package/bundled/upstream/ecc/skills/bun-runtime/SKILL.md +84 -0
- package/bundled/upstream/ecc/skills/canary-watch/SKILL.md +99 -0
- package/bundled/upstream/ecc/skills/carrier-relationship-management/SKILL.md +212 -0
- package/bundled/upstream/ecc/skills/ck/SKILL.md +147 -0
- package/bundled/upstream/ecc/skills/ck/commands/forget.mjs +44 -0
- package/bundled/upstream/ecc/skills/ck/commands/info.mjs +24 -0
- package/bundled/upstream/ecc/skills/ck/commands/init.mjs +143 -0
- package/bundled/upstream/ecc/skills/ck/commands/list.mjs +40 -0
- package/bundled/upstream/ecc/skills/ck/commands/migrate.mjs +202 -0
- package/bundled/upstream/ecc/skills/ck/commands/resume.mjs +36 -0
- package/bundled/upstream/ecc/skills/ck/commands/save.mjs +210 -0
- package/bundled/upstream/ecc/skills/ck/commands/shared.mjs +387 -0
- package/bundled/upstream/ecc/skills/ck/hooks/session-start.mjs +224 -0
- package/bundled/upstream/ecc/skills/claude-api/SKILL.md +337 -0
- package/bundled/upstream/ecc/skills/claude-devfleet/SKILL.md +103 -0
- package/bundled/upstream/ecc/skills/click-path-audit/SKILL.md +244 -0
- package/bundled/upstream/ecc/skills/clickhouse-io/SKILL.md +439 -0
- package/bundled/upstream/ecc/skills/code-tour/SKILL.md +236 -0
- package/bundled/upstream/ecc/skills/codebase-onboarding/SKILL.md +233 -0
- package/bundled/upstream/ecc/skills/coding-standards/SKILL.md +549 -0
- package/bundled/upstream/ecc/skills/compose-multiplatform-patterns/SKILL.md +299 -0
- package/bundled/upstream/ecc/skills/configure-ecc/SKILL.md +367 -0
- package/bundled/upstream/ecc/skills/connections-optimizer/SKILL.md +189 -0
- package/bundled/upstream/ecc/skills/content-engine/SKILL.md +131 -0
- package/bundled/upstream/ecc/skills/content-hash-cache-pattern/SKILL.md +161 -0
- package/bundled/upstream/ecc/skills/context-budget/SKILL.md +135 -0
- package/bundled/upstream/ecc/skills/continuous-agent-loop/SKILL.md +45 -0
- package/bundled/upstream/ecc/skills/continuous-learning/SKILL.md +123 -0
- package/bundled/upstream/ecc/skills/continuous-learning/config.json +18 -0
- package/bundled/upstream/ecc/skills/continuous-learning/evaluate-session.sh +69 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/SKILL.md +346 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer-loop.sh +282 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer.md +198 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/session-guardian.sh +150 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/start-observer.sh +244 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/config.json +8 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +460 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +243 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +1426 -0
- package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/test_parse_instinct.py +984 -0
- package/bundled/upstream/ecc/skills/cost-aware-llm-pipeline/SKILL.md +183 -0
- package/bundled/upstream/ecc/skills/council/SKILL.md +203 -0
- package/bundled/upstream/ecc/skills/cpp-coding-standards/SKILL.md +723 -0
- package/bundled/upstream/ecc/skills/cpp-testing/SKILL.md +324 -0
- package/bundled/upstream/ecc/skills/crosspost/SKILL.md +111 -0
- package/bundled/upstream/ecc/skills/csharp-testing/SKILL.md +321 -0
- package/bundled/upstream/ecc/skills/customer-billing-ops/SKILL.md +140 -0
- package/bundled/upstream/ecc/skills/customs-trade-compliance/SKILL.md +263 -0
- package/bundled/upstream/ecc/skills/dart-flutter-patterns/SKILL.md +563 -0
- package/bundled/upstream/ecc/skills/dashboard-builder/SKILL.md +108 -0
- package/bundled/upstream/ecc/skills/data-scraper-agent/SKILL.md +764 -0
- package/bundled/upstream/ecc/skills/database-migrations/SKILL.md +429 -0
- package/bundled/upstream/ecc/skills/deep-research/SKILL.md +155 -0
- package/bundled/upstream/ecc/skills/defi-amm-security/SKILL.md +160 -0
- package/bundled/upstream/ecc/skills/deployment-patterns/SKILL.md +427 -0
- package/bundled/upstream/ecc/skills/design-system/SKILL.md +82 -0
- package/bundled/upstream/ecc/skills/django-patterns/SKILL.md +734 -0
- package/bundled/upstream/ecc/skills/django-security/SKILL.md +593 -0
- package/bundled/upstream/ecc/skills/django-tdd/SKILL.md +729 -0
- package/bundled/upstream/ecc/skills/django-verification/SKILL.md +469 -0
- package/bundled/upstream/ecc/skills/dmux-workflows/SKILL.md +191 -0
- package/bundled/upstream/ecc/skills/docker-patterns/SKILL.md +364 -0
- package/bundled/upstream/ecc/skills/documentation-lookup/SKILL.md +90 -0
- package/bundled/upstream/ecc/skills/dotnet-patterns/SKILL.md +321 -0
- package/bundled/upstream/ecc/skills/e2e-testing/SKILL.md +326 -0
- package/bundled/upstream/ecc/skills/ecc-tools-cost-audit/SKILL.md +160 -0
- package/bundled/upstream/ecc/skills/email-ops/SKILL.md +121 -0
- package/bundled/upstream/ecc/skills/energy-procurement/SKILL.md +228 -0
- package/bundled/upstream/ecc/skills/enterprise-agent-ops/SKILL.md +50 -0
- package/bundled/upstream/ecc/skills/eval-harness/SKILL.md +270 -0
- package/bundled/upstream/ecc/skills/evm-token-decimals/SKILL.md +130 -0
- package/bundled/upstream/ecc/skills/exa-search/SKILL.md +103 -0
- package/bundled/upstream/ecc/skills/fal-ai-media/SKILL.md +284 -0
- package/bundled/upstream/ecc/skills/finance-billing-ops/SKILL.md +127 -0
- package/bundled/upstream/ecc/skills/flutter-dart-code-review/SKILL.md +435 -0
- package/bundled/upstream/ecc/skills/foundation-models-on-device/SKILL.md +243 -0
- package/bundled/upstream/ecc/skills/frontend-design/SKILL.md +145 -0
- package/bundled/upstream/ecc/skills/frontend-patterns/SKILL.md +642 -0
- package/bundled/upstream/ecc/skills/frontend-slides/SKILL.md +184 -0
- package/bundled/upstream/ecc/skills/frontend-slides/STYLE_PRESETS.md +330 -0
- package/bundled/upstream/ecc/skills/gan-style-harness/SKILL.md +278 -0
- package/bundled/upstream/ecc/skills/gateguard/SKILL.md +121 -0
- package/bundled/upstream/ecc/skills/git-workflow/SKILL.md +715 -0
- package/bundled/upstream/ecc/skills/github-ops/SKILL.md +144 -0
- package/bundled/upstream/ecc/skills/golang-patterns/SKILL.md +674 -0
- package/bundled/upstream/ecc/skills/golang-testing/SKILL.md +720 -0
- package/bundled/upstream/ecc/skills/google-workspace-ops/SKILL.md +95 -0
- package/bundled/upstream/ecc/skills/healthcare-cdss-patterns/SKILL.md +245 -0
- package/bundled/upstream/ecc/skills/healthcare-emr-patterns/SKILL.md +159 -0
- package/bundled/upstream/ecc/skills/healthcare-eval-harness/SKILL.md +207 -0
- package/bundled/upstream/ecc/skills/healthcare-phi-compliance/SKILL.md +145 -0
- package/bundled/upstream/ecc/skills/hexagonal-architecture/SKILL.md +276 -0
- package/bundled/upstream/ecc/skills/hipaa-compliance/SKILL.md +78 -0
- package/bundled/upstream/ecc/skills/hookify-rules/SKILL.md +128 -0
- package/bundled/upstream/ecc/skills/inventory-demand-planning/SKILL.md +247 -0
- package/bundled/upstream/ecc/skills/investor-materials/SKILL.md +96 -0
- package/bundled/upstream/ecc/skills/investor-outreach/SKILL.md +91 -0
- package/bundled/upstream/ecc/skills/iterative-retrieval/SKILL.md +211 -0
- package/bundled/upstream/ecc/skills/java-coding-standards/SKILL.md +147 -0
- package/bundled/upstream/ecc/skills/jira-integration/SKILL.md +293 -0
- package/bundled/upstream/ecc/skills/jpa-patterns/SKILL.md +151 -0
- package/bundled/upstream/ecc/skills/knowledge-ops/SKILL.md +154 -0
- package/bundled/upstream/ecc/skills/kotlin-coroutines-flows/SKILL.md +284 -0
- package/bundled/upstream/ecc/skills/kotlin-exposed-patterns/SKILL.md +719 -0
- package/bundled/upstream/ecc/skills/kotlin-ktor-patterns/SKILL.md +689 -0
- package/bundled/upstream/ecc/skills/kotlin-patterns/SKILL.md +711 -0
- package/bundled/upstream/ecc/skills/kotlin-testing/SKILL.md +824 -0
- package/bundled/upstream/ecc/skills/laravel-patterns/SKILL.md +415 -0
- package/bundled/upstream/ecc/skills/laravel-plugin-discovery/SKILL.md +229 -0
- package/bundled/upstream/ecc/skills/laravel-security/SKILL.md +285 -0
- package/bundled/upstream/ecc/skills/laravel-tdd/SKILL.md +283 -0
- package/bundled/upstream/ecc/skills/laravel-verification/SKILL.md +179 -0
- package/bundled/upstream/ecc/skills/lead-intelligence/SKILL.md +321 -0
- package/bundled/upstream/ecc/skills/lead-intelligence/agents/enrichment-agent.md +85 -0
- package/bundled/upstream/ecc/skills/lead-intelligence/agents/mutual-mapper.md +75 -0
- package/bundled/upstream/ecc/skills/lead-intelligence/agents/outreach-drafter.md +98 -0
- package/bundled/upstream/ecc/skills/lead-intelligence/agents/signal-scorer.md +60 -0
- package/bundled/upstream/ecc/skills/liquid-glass-design/SKILL.md +279 -0
- package/bundled/upstream/ecc/skills/llm-trading-agent-security/SKILL.md +146 -0
- package/bundled/upstream/ecc/skills/logistics-exception-management/SKILL.md +222 -0
- package/bundled/upstream/ecc/skills/manim-video/SKILL.md +89 -0
- package/bundled/upstream/ecc/skills/manim-video/assets/network_graph_scene.py +52 -0
- package/bundled/upstream/ecc/skills/market-research/SKILL.md +75 -0
- package/bundled/upstream/ecc/skills/mcp-server-patterns/SKILL.md +69 -0
- package/bundled/upstream/ecc/skills/messages-ops/SKILL.md +104 -0
- package/bundled/upstream/ecc/skills/nanoclaw-repl/SKILL.md +33 -0
- package/bundled/upstream/ecc/skills/nestjs-patterns/SKILL.md +230 -0
- package/bundled/upstream/ecc/skills/nextjs-turbopack/SKILL.md +44 -0
- package/bundled/upstream/ecc/skills/nodejs-keccak256/SKILL.md +102 -0
- package/bundled/upstream/ecc/skills/nutrient-document-processing/SKILL.md +167 -0
- package/bundled/upstream/ecc/skills/nuxt4-patterns/SKILL.md +100 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/SKILL.md +296 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/gacha.py +224 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/gacha.sh +5 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/references/avatar-style.md +124 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/references/boundary-rules.md +53 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/references/error-handling.md +53 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/references/identity-tension.md +48 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/references/naming-system.md +39 -0
- package/bundled/upstream/ecc/skills/openclaw-persona-forge/references/output-template.md +166 -0
- package/bundled/upstream/ecc/skills/opensource-pipeline/SKILL.md +255 -0
- package/bundled/upstream/ecc/skills/perl-patterns/SKILL.md +504 -0
- package/bundled/upstream/ecc/skills/perl-security/SKILL.md +503 -0
- package/bundled/upstream/ecc/skills/perl-testing/SKILL.md +475 -0
- package/bundled/upstream/ecc/skills/plankton-code-quality/SKILL.md +236 -0
- package/bundled/upstream/ecc/skills/postgres-patterns/SKILL.md +147 -0
- package/bundled/upstream/ecc/skills/product-capability/SKILL.md +141 -0
- package/bundled/upstream/ecc/skills/product-lens/SKILL.md +92 -0
- package/bundled/upstream/ecc/skills/production-scheduling/SKILL.md +238 -0
- package/bundled/upstream/ecc/skills/project-flow-ops/SKILL.md +111 -0
- package/bundled/upstream/ecc/skills/prompt-optimizer/SKILL.md +397 -0
- package/bundled/upstream/ecc/skills/python-patterns/SKILL.md +750 -0
- package/bundled/upstream/ecc/skills/python-testing/SKILL.md +816 -0
- package/bundled/upstream/ecc/skills/pytorch-patterns/SKILL.md +396 -0
- package/bundled/upstream/ecc/skills/quality-nonconformance/SKILL.md +260 -0
- package/bundled/upstream/ecc/skills/ralphinho-rfc-pipeline/SKILL.md +67 -0
- package/bundled/upstream/ecc/skills/regex-vs-llm-structured-text/SKILL.md +220 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/SKILL.md +43 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/3d.md +86 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/animations.md +29 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/assets/charts-bar-chart.tsx +173 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/assets/text-animations-typewriter.tsx +100 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/assets.md +78 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/audio.md +172 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/calculate-metadata.md +104 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/can-decode.md +75 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/charts.md +58 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/compositions.md +146 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/display-captions.md +126 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/extract-frames.md +229 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/fonts.md +152 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/get-audio-duration.md +58 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/get-video-dimensions.md +68 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/get-video-duration.md +58 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/gifs.md +138 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/images.md +130 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/import-srt-captions.md +67 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/lottie.md +67 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/measuring-dom-nodes.md +34 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/measuring-text.md +143 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/sequencing.md +106 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/tailwind.md +11 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/text-animations.md +20 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/timing.md +179 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/transcribe-captions.md +19 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/transitions.md +122 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/trimming.md +52 -0
- package/bundled/upstream/ecc/skills/remotion-video-creation/rules/videos.md +171 -0
- package/bundled/upstream/ecc/skills/repo-scan/SKILL.md +78 -0
- package/bundled/upstream/ecc/skills/research-ops/SKILL.md +112 -0
- package/bundled/upstream/ecc/skills/returns-reverse-logistics/SKILL.md +240 -0
- package/bundled/upstream/ecc/skills/rules-distill/SKILL.md +264 -0
- package/bundled/upstream/ecc/skills/rules-distill/scripts/scan-rules.sh +58 -0
- package/bundled/upstream/ecc/skills/rules-distill/scripts/scan-skills.sh +129 -0
- package/bundled/upstream/ecc/skills/rust-patterns/SKILL.md +499 -0
- package/bundled/upstream/ecc/skills/rust-testing/SKILL.md +500 -0
- package/bundled/upstream/ecc/skills/safety-guard/SKILL.md +75 -0
- package/bundled/upstream/ecc/skills/santa-method/SKILL.md +306 -0
- package/bundled/upstream/ecc/skills/search-first/SKILL.md +161 -0
- package/bundled/upstream/ecc/skills/security-bounty-hunter/SKILL.md +99 -0
- package/bundled/upstream/ecc/skills/security-review/SKILL.md +495 -0
- package/bundled/upstream/ecc/skills/security-review/cloud-infrastructure-security.md +361 -0
- package/bundled/upstream/ecc/skills/security-scan/SKILL.md +165 -0
- package/bundled/upstream/ecc/skills/seo/SKILL.md +154 -0
- package/bundled/upstream/ecc/skills/skill-comply/SKILL.md +58 -0
- package/bundled/upstream/ecc/skills/skill-comply/fixtures/compliant_trace.jsonl +5 -0
- package/bundled/upstream/ecc/skills/skill-comply/fixtures/noncompliant_trace.jsonl +3 -0
- package/bundled/upstream/ecc/skills/skill-comply/fixtures/tdd_spec.yaml +44 -0
- package/bundled/upstream/ecc/skills/skill-comply/prompts/classifier.md +24 -0
- package/bundled/upstream/ecc/skills/skill-comply/prompts/scenario_generator.md +62 -0
- package/bundled/upstream/ecc/skills/skill-comply/prompts/spec_generator.md +42 -0
- package/bundled/upstream/ecc/skills/skill-comply/pyproject.toml +15 -0
- package/bundled/upstream/ecc/skills/skill-comply/scripts/__init__.py +0 -0
- package/bundled/upstream/ecc/skills/skill-comply/scripts/classifier.py +85 -0
- package/bundled/upstream/ecc/skills/skill-comply/scripts/grader.py +124 -0
- package/bundled/upstream/ecc/skills/skill-comply/scripts/parser.py +107 -0
- package/bundled/upstream/ecc/skills/skill-comply/scripts/report.py +170 -0
- package/bundled/upstream/ecc/skills/skill-comply/scripts/run.py +127 -0
- package/bundled/upstream/ecc/skills/skill-comply/scripts/runner.py +161 -0
- package/bundled/upstream/ecc/skills/skill-comply/scripts/scenario_generator.py +70 -0
- package/bundled/upstream/ecc/skills/skill-comply/scripts/spec_generator.py +72 -0
- package/bundled/upstream/ecc/skills/skill-comply/scripts/utils.py +13 -0
- package/bundled/upstream/ecc/skills/skill-comply/tests/test_grader.py +197 -0
- package/bundled/upstream/ecc/skills/skill-comply/tests/test_parser.py +90 -0
- package/bundled/upstream/ecc/skills/skill-stocktake/SKILL.md +193 -0
- package/bundled/upstream/ecc/skills/skill-stocktake/scripts/quick-diff.sh +87 -0
- package/bundled/upstream/ecc/skills/skill-stocktake/scripts/save-results.sh +56 -0
- package/bundled/upstream/ecc/skills/skill-stocktake/scripts/scan.sh +170 -0
- package/bundled/upstream/ecc/skills/social-graph-ranker/SKILL.md +154 -0
- package/bundled/upstream/ecc/skills/springboot-patterns/SKILL.md +314 -0
- package/bundled/upstream/ecc/skills/springboot-security/SKILL.md +272 -0
- package/bundled/upstream/ecc/skills/springboot-tdd/SKILL.md +158 -0
- package/bundled/upstream/ecc/skills/springboot-verification/SKILL.md +231 -0
- package/bundled/upstream/ecc/skills/strategic-compact/SKILL.md +131 -0
- package/bundled/upstream/ecc/skills/strategic-compact/suggest-compact.sh +54 -0
- package/bundled/upstream/ecc/skills/swift-actor-persistence/SKILL.md +143 -0
- package/bundled/upstream/ecc/skills/swift-concurrency-6-2/SKILL.md +216 -0
- package/bundled/upstream/ecc/skills/swift-protocol-di-testing/SKILL.md +190 -0
- package/bundled/upstream/ecc/skills/swiftui-patterns/SKILL.md +259 -0
- package/bundled/upstream/ecc/skills/tdd-workflow/SKILL.md +463 -0
- package/bundled/upstream/ecc/skills/team-builder/SKILL.md +168 -0
- package/bundled/upstream/ecc/skills/terminal-ops/SKILL.md +109 -0
- package/bundled/upstream/ecc/skills/token-budget-advisor/SKILL.md +133 -0
- package/bundled/upstream/ecc/skills/ui-demo/SKILL.md +465 -0
- package/bundled/upstream/ecc/skills/unified-notifications-ops/SKILL.md +187 -0
- package/bundled/upstream/ecc/skills/verification-loop/SKILL.md +126 -0
- package/bundled/upstream/ecc/skills/video-editing/SKILL.md +310 -0
- package/bundled/upstream/ecc/skills/videodb/SKILL.md +374 -0
- package/bundled/upstream/ecc/skills/videodb/reference/api-reference.md +550 -0
- package/bundled/upstream/ecc/skills/videodb/reference/capture-reference.md +407 -0
- package/bundled/upstream/ecc/skills/videodb/reference/capture.md +101 -0
- package/bundled/upstream/ecc/skills/videodb/reference/editor.md +443 -0
- package/bundled/upstream/ecc/skills/videodb/reference/generative.md +331 -0
- package/bundled/upstream/ecc/skills/videodb/reference/rtstream-reference.md +564 -0
- package/bundled/upstream/ecc/skills/videodb/reference/rtstream.md +65 -0
- package/bundled/upstream/ecc/skills/videodb/reference/search.md +230 -0
- package/bundled/upstream/ecc/skills/videodb/reference/streaming.md +406 -0
- package/bundled/upstream/ecc/skills/videodb/reference/use-cases.md +118 -0
- package/bundled/upstream/ecc/skills/videodb/scripts/ws_listener.py +282 -0
- package/bundled/upstream/ecc/skills/visa-doc-translate/README.md +86 -0
- package/bundled/upstream/ecc/skills/visa-doc-translate/SKILL.md +117 -0
- package/bundled/upstream/ecc/skills/workspace-surface-audit/SKILL.md +125 -0
- package/bundled/upstream/ecc/skills/x-api/SKILL.md +230 -0
- package/bundled/upstream/superpowers/.omc-source/last-plan-apply.json +22 -0
- package/package.json +3 -1
- package/src/catalog/source-catalog.js +391 -0
- package/src/cli/artifact.js +3 -2
- package/src/cli/doctor.js +25 -4
- package/src/cli/index.js +19 -0
- package/src/cli/plan.js +220 -0
- package/src/cli/setup.js +209 -12
- package/src/cli/source.js +110 -3
- package/src/config/paths.js +31 -0
- package/src/config/sources.js +103 -10
- package/src/merge/hook-merger.js +1 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: accessibility
|
|
3
|
+
description: Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA
|
|
4
|
+
standards. Use this skill to generate semantic ARIA for Web and accessibility traits for Web and Native platforms (iOS/Android).
|
|
5
|
+
origin: ECC
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Accessibility (WCAG 2.2)
|
|
9
|
+
|
|
10
|
+
This skill ensures that digital interfaces are Perceivable, Operable, Understandable, and Robust (POUR) for all users, including those using screen readers, switch controls, or keyboard navigation. It focuses on the technical implementation of WCAG 2.2 success criteria.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Defining UI component specifications for Web, iOS, or Android.
|
|
15
|
+
- Auditing existing code for accessibility barriers or compliance gaps.
|
|
16
|
+
- Implementing new WCAG 2.2 standards like Target Size (Minimum) and Focus Appearance.
|
|
17
|
+
- Mapping high-level design requirements to technical attributes (ARIA roles, traits, hints).
|
|
18
|
+
|
|
19
|
+
## Core Concepts
|
|
20
|
+
|
|
21
|
+
- **POUR Principles**: The foundation of WCAG (Perceivable, Operable, Understandable, Robust).
|
|
22
|
+
- **Semantic Mapping**: Using native elements over generic containers to provide built-in accessibility.
|
|
23
|
+
- **Accessibility Tree**: The representation of the UI that assistive technologies actually "read."
|
|
24
|
+
- **Focus Management**: Controlling the order and visibility of the keyboard/screen reader cursor.
|
|
25
|
+
- **Labeling & Hints**: Providing context through `aria-label`, `accessibilityLabel`, and `contentDescription`.
|
|
26
|
+
|
|
27
|
+
## How It Works
|
|
28
|
+
|
|
29
|
+
### Step 1: Identify the Component Role
|
|
30
|
+
|
|
31
|
+
Determine the functional purpose (e.g., Is this a button, a link, or a tab?). Use the most semantic native element available before resorting to custom roles.
|
|
32
|
+
|
|
33
|
+
### Step 2: Define Perceivable Attributes
|
|
34
|
+
|
|
35
|
+
- Ensure text contrast meets **4.5:1** (normal) or **3:1** (large/UI).
|
|
36
|
+
- Add text alternatives for non-text content (images, icons).
|
|
37
|
+
- Implement responsive reflow (up to 400% zoom without loss of function).
|
|
38
|
+
|
|
39
|
+
### Step 3: Implement Operable Controls
|
|
40
|
+
|
|
41
|
+
- Ensure a minimum **24x24 CSS pixel** target size (WCAG 2.2 SC 2.5.8).
|
|
42
|
+
- Verify all interactive elements are reachable via keyboard and have a visible focus indicator (SC 2.4.11).
|
|
43
|
+
- Provide single-pointer alternatives for dragging movements.
|
|
44
|
+
|
|
45
|
+
### Step 4: Ensure Understandable Logic
|
|
46
|
+
|
|
47
|
+
- Use consistent navigation patterns.
|
|
48
|
+
- Provide descriptive error messages and suggestions for correction (SC 3.3.3).
|
|
49
|
+
- Implement "Redundant Entry" (SC 3.3.7) to prevent asking for the same data twice.
|
|
50
|
+
|
|
51
|
+
### Step 5: Verify Robust Compatibility
|
|
52
|
+
|
|
53
|
+
- Use correct `Name, Role, Value` patterns.
|
|
54
|
+
- Implement `aria-live` or live regions for dynamic status updates.
|
|
55
|
+
|
|
56
|
+
## Accessibility Architecture Diagram
|
|
57
|
+
|
|
58
|
+
```mermaid
|
|
59
|
+
flowchart TD
|
|
60
|
+
UI["UI Component"] --> Platform{Platform?}
|
|
61
|
+
Platform -->|Web| ARIA["WAI-ARIA + HTML5"]
|
|
62
|
+
Platform -->|iOS| SwiftUI["Accessibility Traits + Labels"]
|
|
63
|
+
Platform -->|Android| Compose["Semantics + ContentDesc"]
|
|
64
|
+
|
|
65
|
+
ARIA --> AT["Assistive Technology (Screen Readers, Switches)"]
|
|
66
|
+
SwiftUI --> AT
|
|
67
|
+
Compose --> AT
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Cross-Platform Mapping
|
|
71
|
+
|
|
72
|
+
| Feature | Web (HTML/ARIA) | iOS (SwiftUI) | Android (Compose) |
|
|
73
|
+
| :----------------- | :----------------------- | :----------------------------------- | :---------------------------------------------------------- |
|
|
74
|
+
| **Primary Label** | `aria-label` / `<label>` | `.accessibilityLabel()` | `contentDescription` |
|
|
75
|
+
| **Secondary Hint** | `aria-describedby` | `.accessibilityHint()` | `Modifier.semantics { stateDescription = ... }` |
|
|
76
|
+
| **Action Role** | `role="button"` | `.accessibilityAddTraits(.isButton)` | `Modifier.semantics { role = Role.Button }` |
|
|
77
|
+
| **Live Updates** | `aria-live="polite"` | `.accessibilityLiveRegion(.polite)` | `Modifier.semantics { liveRegion = LiveRegionMode.Polite }` |
|
|
78
|
+
|
|
79
|
+
## Examples
|
|
80
|
+
|
|
81
|
+
### Web: Accessible Search
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<form role="search">
|
|
85
|
+
<label for="search-input" class="sr-only">Search products</label>
|
|
86
|
+
<input type="search" id="search-input" placeholder="Search..." />
|
|
87
|
+
<button type="submit" aria-label="Submit Search">
|
|
88
|
+
<svg aria-hidden="true">...</svg>
|
|
89
|
+
</button>
|
|
90
|
+
</form>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### iOS: Accessible Action Button
|
|
94
|
+
|
|
95
|
+
```swift
|
|
96
|
+
Button(action: deleteItem) {
|
|
97
|
+
Image(systemName: "trash")
|
|
98
|
+
}
|
|
99
|
+
.accessibilityLabel("Delete item")
|
|
100
|
+
.accessibilityHint("Permanently removes this item from your list")
|
|
101
|
+
.accessibilityAddTraits(.isButton)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Android: Accessible Toggle
|
|
105
|
+
|
|
106
|
+
```kotlin
|
|
107
|
+
Switch(
|
|
108
|
+
checked = isEnabled,
|
|
109
|
+
onCheckedChange = { onToggle() },
|
|
110
|
+
modifier = Modifier.semantics {
|
|
111
|
+
contentDescription = "Enable notifications"
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Anti-Patterns to Avoid
|
|
117
|
+
|
|
118
|
+
- **Div-Buttons**: Using a `<div>` or `<span>` for a click event without adding a role and keyboard support.
|
|
119
|
+
- **Color-Only Meaning**: Indicating an error or status _only_ with a color change (e.g., turning a border red).
|
|
120
|
+
- **Uncontained Modal Focus**: Modals that don't trap focus, allowing keyboard users to navigate background content while the modal is open. Focus must be contained _and_ escapable via the `Escape` key or an explicit close button (WCAG SC 2.1.2).
|
|
121
|
+
- **Redundant Alt Text**: Using "Image of..." or "Picture of..." in alt text (screen readers already announce the role "Image").
|
|
122
|
+
|
|
123
|
+
## Best Practices Checklist
|
|
124
|
+
|
|
125
|
+
- [ ] Interactive elements meet the **24x24px** (Web) or **44x44pt** (Native) target size.
|
|
126
|
+
- [ ] Focus indicators are clearly visible and high-contrast.
|
|
127
|
+
- [ ] Modals **contain focus** while open, and release it cleanly on close (`Escape` key or close button).
|
|
128
|
+
- [ ] Dropdowns and menus restore focus to the trigger element on close.
|
|
129
|
+
- [ ] Forms provide text-based error suggestions.
|
|
130
|
+
- [ ] All icon-only buttons have a descriptive text label.
|
|
131
|
+
- [ ] Content reflows properly when text is scaled.
|
|
132
|
+
|
|
133
|
+
## References
|
|
134
|
+
|
|
135
|
+
- [WCAG 2.2 Guidelines](https://www.w3.org/TR/WCAG22/)
|
|
136
|
+
- [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices/)
|
|
137
|
+
- [iOS Accessibility Programming Guide](https://developer.apple.com/documentation/accessibility)
|
|
138
|
+
- [iOS Human Interface Guidelines - Accessibility](https://developer.apple.com/design/human-interface-guidelines/accessibility)
|
|
139
|
+
- [Android Accessibility Developer Guide](https://developer.android.com/guide/topics/ui/accessibility)
|
|
140
|
+
|
|
141
|
+
## Related Skills
|
|
142
|
+
|
|
143
|
+
- `frontend-patterns`
|
|
144
|
+
- `frontend-design`
|
|
145
|
+
- `liquid-glass-design`
|
|
146
|
+
- `swiftui-patterns`
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-eval
|
|
3
|
+
description: Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics
|
|
4
|
+
origin: ECC
|
|
5
|
+
tools: Read, Write, Edit, Bash, Grep, Glob
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Agent Eval Skill
|
|
9
|
+
|
|
10
|
+
A lightweight CLI tool for comparing coding agents head-to-head on reproducible tasks. Every "which coding agent is best?" comparison runs on vibes — this tool systematizes it.
|
|
11
|
+
|
|
12
|
+
## When to Activate
|
|
13
|
+
|
|
14
|
+
- Comparing coding agents (Claude Code, Aider, Codex, etc.) on your own codebase
|
|
15
|
+
- Measuring agent performance before adopting a new tool or model
|
|
16
|
+
- Running regression checks when an agent updates its model or tooling
|
|
17
|
+
- Producing data-backed agent selection decisions for a team
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
> **Note:** Install agent-eval from its repository after reviewing the source.
|
|
22
|
+
|
|
23
|
+
## Core Concepts
|
|
24
|
+
|
|
25
|
+
### YAML Task Definitions
|
|
26
|
+
|
|
27
|
+
Define tasks declaratively. Each task specifies what to do, which files to touch, and how to judge success:
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
name: add-retry-logic
|
|
31
|
+
description: Add exponential backoff retry to the HTTP client
|
|
32
|
+
repo: ./my-project
|
|
33
|
+
files:
|
|
34
|
+
- src/http_client.py
|
|
35
|
+
prompt: |
|
|
36
|
+
Add retry logic with exponential backoff to all HTTP requests.
|
|
37
|
+
Max 3 retries. Initial delay 1s, max delay 30s.
|
|
38
|
+
judge:
|
|
39
|
+
- type: pytest
|
|
40
|
+
command: pytest tests/test_http_client.py -v
|
|
41
|
+
- type: grep
|
|
42
|
+
pattern: "exponential_backoff|retry"
|
|
43
|
+
files: src/http_client.py
|
|
44
|
+
commit: "abc1234" # pin to specific commit for reproducibility
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Git Worktree Isolation
|
|
48
|
+
|
|
49
|
+
Each agent run gets its own git worktree — no Docker required. This provides reproducibility isolation so agents cannot interfere with each other or corrupt the base repo.
|
|
50
|
+
|
|
51
|
+
### Metrics Collected
|
|
52
|
+
|
|
53
|
+
| Metric | What It Measures |
|
|
54
|
+
|--------|-----------------|
|
|
55
|
+
| Pass rate | Did the agent produce code that passes the judge? |
|
|
56
|
+
| Cost | API spend per task (when available) |
|
|
57
|
+
| Time | Wall-clock seconds to completion |
|
|
58
|
+
| Consistency | Pass rate across repeated runs (e.g., 3/3 = 100%) |
|
|
59
|
+
|
|
60
|
+
## Workflow
|
|
61
|
+
|
|
62
|
+
### 1. Define Tasks
|
|
63
|
+
|
|
64
|
+
Create a `tasks/` directory with YAML files, one per task:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
mkdir tasks
|
|
68
|
+
# Write task definitions (see template above)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 2. Run Agents
|
|
72
|
+
|
|
73
|
+
Execute agents against your tasks:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
agent-eval run --task tasks/add-retry-logic.yaml --agent claude-code --agent aider --runs 3
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Each run:
|
|
80
|
+
1. Creates a fresh git worktree from the specified commit
|
|
81
|
+
2. Hands the prompt to the agent
|
|
82
|
+
3. Runs the judge criteria
|
|
83
|
+
4. Records pass/fail, cost, and time
|
|
84
|
+
|
|
85
|
+
### 3. Compare Results
|
|
86
|
+
|
|
87
|
+
Generate a comparison report:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
agent-eval report --format table
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
Task: add-retry-logic (3 runs each)
|
|
95
|
+
┌──────────────┬───────────┬────────┬────────┬─────────────┐
|
|
96
|
+
│ Agent │ Pass Rate │ Cost │ Time │ Consistency │
|
|
97
|
+
├──────────────┼───────────┼────────┼────────┼─────────────┤
|
|
98
|
+
│ claude-code │ 3/3 │ $0.12 │ 45s │ 100% │
|
|
99
|
+
│ aider │ 2/3 │ $0.08 │ 38s │ 67% │
|
|
100
|
+
└──────────────┴───────────┴────────┴────────┴─────────────┘
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Judge Types
|
|
104
|
+
|
|
105
|
+
### Code-Based (deterministic)
|
|
106
|
+
|
|
107
|
+
```yaml
|
|
108
|
+
judge:
|
|
109
|
+
- type: pytest
|
|
110
|
+
command: pytest tests/ -v
|
|
111
|
+
- type: command
|
|
112
|
+
command: npm run build
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Pattern-Based
|
|
116
|
+
|
|
117
|
+
```yaml
|
|
118
|
+
judge:
|
|
119
|
+
- type: grep
|
|
120
|
+
pattern: "class.*Retry"
|
|
121
|
+
files: src/**/*.py
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Model-Based (LLM-as-judge)
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
judge:
|
|
128
|
+
- type: llm
|
|
129
|
+
prompt: |
|
|
130
|
+
Does this implementation correctly handle exponential backoff?
|
|
131
|
+
Check for: max retries, increasing delays, jitter.
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Best Practices
|
|
135
|
+
|
|
136
|
+
- **Start with 3-5 tasks** that represent your real workload, not toy examples
|
|
137
|
+
- **Run at least 3 trials** per agent to capture variance — agents are non-deterministic
|
|
138
|
+
- **Pin the commit** in your task YAML so results are reproducible across days/weeks
|
|
139
|
+
- **Include at least one deterministic judge** (tests, build) per task — LLM judges add noise
|
|
140
|
+
- **Track cost alongside pass rate** — a 95% agent at 10x the cost may not be the right choice
|
|
141
|
+
- **Version your task definitions** — they are test fixtures, treat them as code
|
|
142
|
+
|
|
143
|
+
## Links
|
|
144
|
+
|
|
145
|
+
- Repository: [github.com/joaquinhuigomez/agent-eval](https://github.com/joaquinhuigomez/agent-eval)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-harness-construction
|
|
3
|
+
description: Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates.
|
|
4
|
+
origin: ECC
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agent Harness Construction
|
|
8
|
+
|
|
9
|
+
Use this skill when you are improving how an agent plans, calls tools, recovers from errors, and converges on completion.
|
|
10
|
+
|
|
11
|
+
## Core Model
|
|
12
|
+
|
|
13
|
+
Agent output quality is constrained by:
|
|
14
|
+
1. Action space quality
|
|
15
|
+
2. Observation quality
|
|
16
|
+
3. Recovery quality
|
|
17
|
+
4. Context budget quality
|
|
18
|
+
|
|
19
|
+
## Action Space Design
|
|
20
|
+
|
|
21
|
+
1. Use stable, explicit tool names.
|
|
22
|
+
2. Keep inputs schema-first and narrow.
|
|
23
|
+
3. Return deterministic output shapes.
|
|
24
|
+
4. Avoid catch-all tools unless isolation is impossible.
|
|
25
|
+
|
|
26
|
+
## Granularity Rules
|
|
27
|
+
|
|
28
|
+
- Use micro-tools for high-risk operations (deploy, migration, permissions).
|
|
29
|
+
- Use medium tools for common edit/read/search loops.
|
|
30
|
+
- Use macro-tools only when round-trip overhead is the dominant cost.
|
|
31
|
+
|
|
32
|
+
## Observation Design
|
|
33
|
+
|
|
34
|
+
Every tool response should include:
|
|
35
|
+
- `status`: success|warning|error
|
|
36
|
+
- `summary`: one-line result
|
|
37
|
+
- `next_actions`: actionable follow-ups
|
|
38
|
+
- `artifacts`: file paths / IDs
|
|
39
|
+
|
|
40
|
+
## Error Recovery Contract
|
|
41
|
+
|
|
42
|
+
For every error path, include:
|
|
43
|
+
- root cause hint
|
|
44
|
+
- safe retry instruction
|
|
45
|
+
- explicit stop condition
|
|
46
|
+
|
|
47
|
+
## Context Budgeting
|
|
48
|
+
|
|
49
|
+
1. Keep system prompt minimal and invariant.
|
|
50
|
+
2. Move large guidance into skills loaded on demand.
|
|
51
|
+
3. Prefer references to files over inlining long documents.
|
|
52
|
+
4. Compact at phase boundaries, not arbitrary token thresholds.
|
|
53
|
+
|
|
54
|
+
## Architecture Pattern Guidance
|
|
55
|
+
|
|
56
|
+
- ReAct: best for exploratory tasks with uncertain path.
|
|
57
|
+
- Function-calling: best for structured deterministic flows.
|
|
58
|
+
- Hybrid (recommended): ReAct planning + typed tool execution.
|
|
59
|
+
|
|
60
|
+
## Benchmarking
|
|
61
|
+
|
|
62
|
+
Track:
|
|
63
|
+
- completion rate
|
|
64
|
+
- retries per task
|
|
65
|
+
- pass@1 and pass@3
|
|
66
|
+
- cost per successful task
|
|
67
|
+
|
|
68
|
+
## Anti-Patterns
|
|
69
|
+
|
|
70
|
+
- Too many tools with overlapping semantics.
|
|
71
|
+
- Opaque tool output with no recovery hints.
|
|
72
|
+
- Error-only output without next steps.
|
|
73
|
+
- Context overloading with irrelevant references.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-introspection-debugging
|
|
3
|
+
description: Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.
|
|
4
|
+
origin: ECC
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agent Introspection Debugging
|
|
8
|
+
|
|
9
|
+
Use this skill when an agent run is failing repeatedly, consuming tokens without progress, looping on the same tools, or drifting away from the intended task.
|
|
10
|
+
|
|
11
|
+
This is a workflow skill, not a hidden runtime. It teaches the agent to debug itself systematically before escalating to a human.
|
|
12
|
+
|
|
13
|
+
## When to Activate
|
|
14
|
+
|
|
15
|
+
- Maximum tool call / loop-limit failures
|
|
16
|
+
- Repeated retries with no forward progress
|
|
17
|
+
- Context growth or prompt drift that starts degrading output quality
|
|
18
|
+
- File-system or environment state mismatch between expectation and reality
|
|
19
|
+
- Tool failures that are likely recoverable with diagnosis and a smaller corrective action
|
|
20
|
+
|
|
21
|
+
## Scope Boundaries
|
|
22
|
+
|
|
23
|
+
Activate this skill for:
|
|
24
|
+
- capturing failure state before retrying blindly
|
|
25
|
+
- diagnosing common agent-specific failure patterns
|
|
26
|
+
- applying contained recovery actions
|
|
27
|
+
- producing a structured human-readable debug report
|
|
28
|
+
|
|
29
|
+
Do not use this skill as the primary source for:
|
|
30
|
+
- feature verification after code changes; use `verification-loop`
|
|
31
|
+
- framework-specific debugging when a narrower ECC skill already exists
|
|
32
|
+
- runtime promises the current harness cannot enforce automatically
|
|
33
|
+
|
|
34
|
+
## Four-Phase Loop
|
|
35
|
+
|
|
36
|
+
### Phase 1: Failure Capture
|
|
37
|
+
|
|
38
|
+
Before trying to recover, record the failure precisely.
|
|
39
|
+
|
|
40
|
+
Capture:
|
|
41
|
+
- error type, message, and stack trace when available
|
|
42
|
+
- last meaningful tool call sequence
|
|
43
|
+
- what the agent was trying to do
|
|
44
|
+
- current context pressure: repeated prompts, oversized pasted logs, duplicated plans, or runaway notes
|
|
45
|
+
- current environment assumptions: cwd, branch, relevant service state, expected files
|
|
46
|
+
|
|
47
|
+
Minimum capture template:
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
## Failure Capture
|
|
51
|
+
- Session / task:
|
|
52
|
+
- Goal in progress:
|
|
53
|
+
- Error:
|
|
54
|
+
- Last successful step:
|
|
55
|
+
- Last failed tool / command:
|
|
56
|
+
- Repeated pattern seen:
|
|
57
|
+
- Environment assumptions to verify:
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Phase 2: Root-Cause Diagnosis
|
|
61
|
+
|
|
62
|
+
Match the failure to a known pattern before changing anything.
|
|
63
|
+
|
|
64
|
+
| Pattern | Likely Cause | Check |
|
|
65
|
+
| --- | --- | --- |
|
|
66
|
+
| Maximum tool calls / repeated same command | loop or no-exit observer path | inspect the last N tool calls for repetition |
|
|
67
|
+
| Context overflow / degraded reasoning | unbounded notes, repeated plans, oversized logs | inspect recent context for duplication and low-signal bulk |
|
|
68
|
+
| `ECONNREFUSED` / timeout | service unavailable or wrong port | verify service health, URL, and port assumptions |
|
|
69
|
+
| `429` / quota exhaustion | retry storm or missing backoff | count repeated calls and inspect retry spacing |
|
|
70
|
+
| file missing after write / stale diff | race, wrong cwd, or branch drift | re-check path, cwd, git status, and actual file existence |
|
|
71
|
+
| tests still failing after “fix” | wrong hypothesis | isolate the exact failing test and re-derive the bug |
|
|
72
|
+
|
|
73
|
+
Diagnosis questions:
|
|
74
|
+
- is this a logic failure, state failure, environment failure, or policy failure?
|
|
75
|
+
- did the agent lose the real objective and start optimizing the wrong subtask?
|
|
76
|
+
- is the failure deterministic or transient?
|
|
77
|
+
- what is the smallest reversible action that would validate the diagnosis?
|
|
78
|
+
|
|
79
|
+
### Phase 3: Contained Recovery
|
|
80
|
+
|
|
81
|
+
Recover with the smallest action that changes the diagnosis surface.
|
|
82
|
+
|
|
83
|
+
Safe recovery actions:
|
|
84
|
+
- stop repeated retries and restate the hypothesis
|
|
85
|
+
- trim low-signal context and keep only the active goal, blockers, and evidence
|
|
86
|
+
- re-check the actual filesystem / branch / process state
|
|
87
|
+
- narrow the task to one failing command, one file, or one test
|
|
88
|
+
- switch from speculative reasoning to direct observation
|
|
89
|
+
- escalate to a human when the failure is high-risk or externally blocked
|
|
90
|
+
|
|
91
|
+
Do not claim unsupported auto-healing actions like “reset agent state” or “update harness config” unless you are actually doing them through real tools in the current environment.
|
|
92
|
+
|
|
93
|
+
Contained recovery checklist:
|
|
94
|
+
|
|
95
|
+
```markdown
|
|
96
|
+
## Recovery Action
|
|
97
|
+
- Diagnosis chosen:
|
|
98
|
+
- Smallest action taken:
|
|
99
|
+
- Why this is safe:
|
|
100
|
+
- What evidence would prove the fix worked:
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Phase 4: Introspection Report
|
|
104
|
+
|
|
105
|
+
End with a report that makes the recovery legible to the next agent or human.
|
|
106
|
+
|
|
107
|
+
```markdown
|
|
108
|
+
## Agent Self-Debug Report
|
|
109
|
+
- Session / task:
|
|
110
|
+
- Failure:
|
|
111
|
+
- Root cause:
|
|
112
|
+
- Recovery action:
|
|
113
|
+
- Result: success | partial | blocked
|
|
114
|
+
- Token / time burn risk:
|
|
115
|
+
- Follow-up needed:
|
|
116
|
+
- Preventive change to encode later:
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Recovery Heuristics
|
|
120
|
+
|
|
121
|
+
Prefer these interventions in order:
|
|
122
|
+
|
|
123
|
+
1. Restate the real objective in one sentence.
|
|
124
|
+
2. Verify the world state instead of trusting memory.
|
|
125
|
+
3. Shrink the failing scope.
|
|
126
|
+
4. Run one discriminating check.
|
|
127
|
+
5. Only then retry.
|
|
128
|
+
|
|
129
|
+
Bad pattern:
|
|
130
|
+
- retrying the same action three times with slightly different wording
|
|
131
|
+
|
|
132
|
+
Good pattern:
|
|
133
|
+
- capture failure
|
|
134
|
+
- classify the pattern
|
|
135
|
+
- run one direct check
|
|
136
|
+
- change the plan only if the check supports it
|
|
137
|
+
|
|
138
|
+
## Integration with ECC
|
|
139
|
+
|
|
140
|
+
- Use `verification-loop` after recovery if code was changed.
|
|
141
|
+
- Use `continuous-learning-v2` when the failure pattern is worth turning into an instinct or later skill.
|
|
142
|
+
- Use `council` when the issue is not technical failure but decision ambiguity.
|
|
143
|
+
- Use `workspace-surface-audit` if the failure came from conflicting local state or repo drift.
|
|
144
|
+
|
|
145
|
+
## Output Standard
|
|
146
|
+
|
|
147
|
+
When this skill is active, do not end with “I fixed it” alone.
|
|
148
|
+
|
|
149
|
+
Always provide:
|
|
150
|
+
- the failure pattern
|
|
151
|
+
- the root-cause hypothesis
|
|
152
|
+
- the recovery action
|
|
153
|
+
- the evidence that the situation is now better or still blocked
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-payment-x402
|
|
3
|
+
description: Add x402 payment execution to AI agents — per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents need to pay for APIs, services, or other agents.
|
|
4
|
+
origin: community
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agent Payment Execution (x402)
|
|
8
|
+
|
|
9
|
+
Enable AI agents to make autonomous payments with built-in spending controls. Uses the x402 HTTP payment protocol and MCP tools so agents can pay for external services, APIs, or other agents without custodial risk.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
Use when: your agent needs to pay for an API call, purchase a service, settle with another agent, enforce per-task spending limits, or manage a non-custodial wallet. Pairs naturally with cost-aware-llm-pipeline and security-review skills.
|
|
14
|
+
|
|
15
|
+
## How It Works
|
|
16
|
+
|
|
17
|
+
### x402 Protocol
|
|
18
|
+
x402 extends HTTP 402 (Payment Required) into a machine-negotiable flow. When a server returns `402`, the agent's payment tool automatically negotiates price, checks budget, signs a transaction, and retries — no human in the loop.
|
|
19
|
+
|
|
20
|
+
### Spending Controls
|
|
21
|
+
Every payment tool call enforces a `SpendingPolicy`:
|
|
22
|
+
- **Per-task budget** — max spend for a single agent action
|
|
23
|
+
- **Per-session budget** — cumulative limit across an entire session
|
|
24
|
+
- **Allowlisted recipients** — restrict which addresses/services the agent can pay
|
|
25
|
+
- **Rate limits** — max transactions per minute/hour
|
|
26
|
+
|
|
27
|
+
### Non-Custodial Wallets
|
|
28
|
+
Agents hold their own keys via ERC-4337 smart accounts. The orchestrator sets policy before delegation; the agent can only spend within bounds. No pooled funds, no custodial risk.
|
|
29
|
+
|
|
30
|
+
## MCP Integration
|
|
31
|
+
|
|
32
|
+
The payment layer exposes standard MCP tools that slot into any Claude Code or agent harness setup.
|
|
33
|
+
|
|
34
|
+
> **Security note**: Always pin the package version. This tool manages private keys — unpinned `npx` installs introduce supply-chain risk.
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"mcpServers": {
|
|
39
|
+
"agentpay": {
|
|
40
|
+
"command": "npx",
|
|
41
|
+
"args": ["agentwallet-sdk@6.0.0"]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Available Tools (agent-callable)
|
|
48
|
+
|
|
49
|
+
| Tool | Purpose |
|
|
50
|
+
|------|---------|
|
|
51
|
+
| `get_balance` | Check agent wallet balance |
|
|
52
|
+
| `send_payment` | Send payment to address or ENS |
|
|
53
|
+
| `check_spending` | Query remaining budget |
|
|
54
|
+
| `list_transactions` | Audit trail of all payments |
|
|
55
|
+
|
|
56
|
+
> **Note**: Spending policy is set by the **orchestrator** before delegating to the agent — not by the agent itself. This prevents agents from escalating their own spending limits. Configure policy via `set_policy` in your orchestration layer or pre-task hook, never as an agent-callable tool.
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
### Budget enforcement in an MCP client
|
|
61
|
+
|
|
62
|
+
When building an orchestrator that calls the agentpay MCP server, enforce budgets before dispatching paid tool calls.
|
|
63
|
+
|
|
64
|
+
> **Prerequisites**: Install the package before adding the MCP config — `npx` without `-y` will prompt for confirmation in non-interactive environments, causing the server to hang: `npm install -g agentwallet-sdk@6.0.0`
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
68
|
+
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
69
|
+
|
|
70
|
+
async function main() {
|
|
71
|
+
// 1. Validate credentials before constructing the transport.
|
|
72
|
+
// A missing key must fail immediately — never let the subprocess start without auth.
|
|
73
|
+
const walletKey = process.env.WALLET_PRIVATE_KEY;
|
|
74
|
+
if (!walletKey) {
|
|
75
|
+
throw new Error("WALLET_PRIVATE_KEY is not set — refusing to start payment server");
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Connect to the agentpay MCP server via stdio transport.
|
|
79
|
+
// Whitelist only the env vars the server needs — never forward all of process.env
|
|
80
|
+
// to a third-party subprocess that manages private keys.
|
|
81
|
+
const transport = new StdioClientTransport({
|
|
82
|
+
command: "npx",
|
|
83
|
+
args: ["agentwallet-sdk@6.0.0"],
|
|
84
|
+
env: {
|
|
85
|
+
PATH: process.env.PATH ?? "",
|
|
86
|
+
NODE_ENV: process.env.NODE_ENV ?? "production",
|
|
87
|
+
WALLET_PRIVATE_KEY: walletKey,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
const agentpay = new Client({ name: "orchestrator", version: "1.0.0" });
|
|
91
|
+
await agentpay.connect(transport);
|
|
92
|
+
|
|
93
|
+
// 2. Set spending policy before delegating to the agent.
|
|
94
|
+
// Always verify success — a silent failure means no controls are active.
|
|
95
|
+
const policyResult = await agentpay.callTool({
|
|
96
|
+
name: "set_policy",
|
|
97
|
+
arguments: {
|
|
98
|
+
per_task_budget: 0.50,
|
|
99
|
+
per_session_budget: 5.00,
|
|
100
|
+
allowlisted_recipients: ["api.example.com"],
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
if (policyResult.isError) {
|
|
104
|
+
throw new Error(
|
|
105
|
+
`Failed to set spending policy — do not delegate: ${JSON.stringify(policyResult.content)}`
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// 3. Use preToolCheck before any paid action
|
|
110
|
+
await preToolCheck(agentpay, 0.01);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Pre-tool hook: fail-closed budget enforcement with four distinct error paths.
|
|
114
|
+
async function preToolCheck(agentpay: Client, apiCost: number): Promise<void> {
|
|
115
|
+
// Path 1: Reject invalid input (NaN/Infinity bypass the < comparison)
|
|
116
|
+
if (!Number.isFinite(apiCost) || apiCost < 0) {
|
|
117
|
+
throw new Error(`Invalid apiCost: ${apiCost} — action blocked`);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Path 2: Transport/connectivity failure
|
|
121
|
+
let result;
|
|
122
|
+
try {
|
|
123
|
+
result = await agentpay.callTool({ name: "check_spending" });
|
|
124
|
+
} catch (err) {
|
|
125
|
+
throw new Error(`Payment service unreachable — action blocked: ${err}`);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Path 3: Tool returned an error (e.g., auth failure, wallet not initialised)
|
|
129
|
+
if (result.isError) {
|
|
130
|
+
throw new Error(
|
|
131
|
+
`check_spending failed — action blocked: ${JSON.stringify(result.content)}`
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Path 4: Parse and validate the response shape
|
|
136
|
+
let remaining: number;
|
|
137
|
+
try {
|
|
138
|
+
const parsed = JSON.parse(
|
|
139
|
+
(result.content as Array<{ text: string }>)[0].text
|
|
140
|
+
);
|
|
141
|
+
if (!Number.isFinite(parsed?.remaining)) {
|
|
142
|
+
throw new TypeError("missing or non-finite 'remaining' field");
|
|
143
|
+
}
|
|
144
|
+
remaining = parsed.remaining;
|
|
145
|
+
} catch (err) {
|
|
146
|
+
throw new Error(
|
|
147
|
+
`check_spending returned unexpected format — action blocked: ${err}`
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Path 5: Budget exceeded
|
|
152
|
+
if (remaining < apiCost) {
|
|
153
|
+
throw new Error(
|
|
154
|
+
`Budget exceeded: need $${apiCost} but only $${remaining} remaining`
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
main().catch((err) => {
|
|
160
|
+
console.error(err);
|
|
161
|
+
process.exitCode = 1;
|
|
162
|
+
});
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Best Practices
|
|
166
|
+
|
|
167
|
+
- **Set budgets before delegation**: When spawning sub-agents, attach a SpendingPolicy via your orchestration layer. Never give an agent unlimited spend.
|
|
168
|
+
- **Pin your dependencies**: Always specify an exact version in your MCP config (e.g., `agentwallet-sdk@6.0.0`). Verify package integrity before deploying to production.
|
|
169
|
+
- **Audit trails**: Use `list_transactions` in post-task hooks to log what was spent and why.
|
|
170
|
+
- **Fail closed**: If the payment tool is unreachable, block the paid action — don't fall back to unmetered access.
|
|
171
|
+
- **Pair with security-review**: Payment tools are high-privilege. Apply the same scrutiny as shell access.
|
|
172
|
+
- **Test with testnets first**: Use Base Sepolia for development; switch to Base mainnet for production.
|
|
173
|
+
|
|
174
|
+
## Production Reference
|
|
175
|
+
|
|
176
|
+
- **npm**: [`agentwallet-sdk`](https://www.npmjs.com/package/agentwallet-sdk)
|
|
177
|
+
- **Merged into NVIDIA NeMo Agent Toolkit**: [PR #17](https://github.com/NVIDIA/NeMo-Agent-Toolkit-Examples/pull/17) — x402 payment tool for NVIDIA's agent examples
|
|
178
|
+
- **Protocol spec**: [x402.org](https://x402.org)
|