@tyroneross/build-loop 0.30.3
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/.agents/plugins/marketplace.json +10 -0
- package/.claude-plugin/marketplace.json +38 -0
- package/.claude-plugin/plugin.json +30 -0
- package/.codex-plugin/plugin.json +41 -0
- package/.cursor/rules/build-loop-surface.mdc +22 -0
- package/AGENTS.md +498 -0
- package/LICENSE +202 -0
- package/README.md +403 -0
- package/agents/alignment-checker.md +124 -0
- package/agents/api-assessor.md +136 -0
- package/agents/architecture-scout.md +185 -0
- package/agents/assessment-orchestrator.md +163 -0
- package/agents/build-orchestrator.md +198 -0
- package/agents/database-assessor.md +133 -0
- package/agents/design-contract-specialist.md +239 -0
- package/agents/fact-checker.md +69 -0
- package/agents/fix-critique.md +161 -0
- package/agents/frontend-assessor.md +136 -0
- package/agents/implementer.md +185 -0
- package/agents/independent-auditor.md +143 -0
- package/agents/mock-scanner.md +78 -0
- package/agents/optimize-runner.md +112 -0
- package/agents/overfitting-reviewer.md +96 -0
- package/agents/performance-assessor.md +159 -0
- package/agents/plan-critic.md +85 -0
- package/agents/promotion-reviewer.md +121 -0
- package/agents/recurring-pattern-detector.md +248 -0
- package/agents/retrospective-synthesizer.md +109 -0
- package/agents/root-cause-investigator.md +285 -0
- package/agents/scope-auditor.md +121 -0
- package/agents/security-reviewer.md +151 -0
- package/agents/self-improvement-architect.md +125 -0
- package/agents/synthesis-critic.md +99 -0
- package/agents/transcript-pattern-miner.md +165 -0
- package/agents/ui-validator.md +193 -0
- package/codex-skills/build-loop/SKILL.md +20 -0
- package/codex-skills/debug-loop/SKILL.md +18 -0
- package/codex-skills/handoff/SKILL.md +22 -0
- package/codex-skills/knowledge/SKILL.md +21 -0
- package/codex-skills/optimize/SKILL.md +18 -0
- package/codex-skills/research/SKILL.md +18 -0
- package/commands/agent-rally-point.md +301 -0
- package/commands/assess.md +41 -0
- package/commands/debug.md +20 -0
- package/commands/debugger-detail.md +34 -0
- package/commands/debugger-scan.md +15 -0
- package/commands/debugger-status.md +20 -0
- package/commands/debugger.md +32 -0
- package/commands/handoff.md +113 -0
- package/commands/knowledge-review.md +16 -0
- package/commands/optimize.md +31 -0
- package/commands/plan-verify.md +39 -0
- package/commands/promote-experiment.md +129 -0
- package/commands/research.md +22 -0
- package/commands/run.md +12 -0
- package/commands/self-review.md +51 -0
- package/commands/start-prd.md +57 -0
- package/commands/test.md +34 -0
- package/dist/src/assessment-orchestrator.d.ts +78 -0
- package/dist/src/assessment-orchestrator.d.ts.map +1 -0
- package/dist/src/assessment-orchestrator.js +304 -0
- package/dist/src/assessment-orchestrator.js.map +1 -0
- package/dist/src/audit-miner.d.ts +21 -0
- package/dist/src/audit-miner.d.ts.map +1 -0
- package/dist/src/audit-miner.js +421 -0
- package/dist/src/audit-miner.js.map +1 -0
- package/dist/src/batch-operations.d.ts +30 -0
- package/dist/src/batch-operations.d.ts.map +1 -0
- package/dist/src/batch-operations.js +339 -0
- package/dist/src/batch-operations.js.map +1 -0
- package/dist/src/config.d.ts +83 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +176 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/context-engine.d.ts +45 -0
- package/dist/src/context-engine.d.ts.map +1 -0
- package/dist/src/context-engine.js +135 -0
- package/dist/src/context-engine.js.map +1 -0
- package/dist/src/debug-wrapper.d.ts +58 -0
- package/dist/src/debug-wrapper.d.ts.map +1 -0
- package/dist/src/debug-wrapper.js +285 -0
- package/dist/src/debug-wrapper.js.map +1 -0
- package/dist/src/index.d.ts +31 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +149 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interactive-verifier.d.ts +26 -0
- package/dist/src/interactive-verifier.d.ts.map +1 -0
- package/dist/src/interactive-verifier.js +435 -0
- package/dist/src/interactive-verifier.js.map +1 -0
- package/dist/src/lessons.d.ts +59 -0
- package/dist/src/lessons.d.ts.map +1 -0
- package/dist/src/lessons.js +172 -0
- package/dist/src/lessons.js.map +1 -0
- package/dist/src/log-reader.d.ts +39 -0
- package/dist/src/log-reader.d.ts.map +1 -0
- package/dist/src/log-reader.js +291 -0
- package/dist/src/log-reader.js.map +1 -0
- package/dist/src/logger.d.ts +59 -0
- package/dist/src/logger.d.ts.map +1 -0
- package/dist/src/logger.js +328 -0
- package/dist/src/logger.js.map +1 -0
- package/dist/src/parallel-retrieval.d.ts +52 -0
- package/dist/src/parallel-retrieval.d.ts.map +1 -0
- package/dist/src/parallel-retrieval.js +309 -0
- package/dist/src/parallel-retrieval.js.map +1 -0
- package/dist/src/pattern-extractor.d.ts +30 -0
- package/dist/src/pattern-extractor.d.ts.map +1 -0
- package/dist/src/pattern-extractor.js +386 -0
- package/dist/src/pattern-extractor.js.map +1 -0
- package/dist/src/result-aggregator.d.ts +44 -0
- package/dist/src/result-aggregator.d.ts.map +1 -0
- package/dist/src/result-aggregator.js +315 -0
- package/dist/src/result-aggregator.js.map +1 -0
- package/dist/src/retrieval.d.ts +139 -0
- package/dist/src/retrieval.d.ts.map +1 -0
- package/dist/src/retrieval.js +724 -0
- package/dist/src/retrieval.js.map +1 -0
- package/dist/src/setup/auto-setup.d.ts +15 -0
- package/dist/src/setup/auto-setup.d.ts.map +1 -0
- package/dist/src/setup/auto-setup.js +157 -0
- package/dist/src/setup/auto-setup.js.map +1 -0
- package/dist/src/setup/configure-hooks.d.ts +8 -0
- package/dist/src/setup/configure-hooks.d.ts.map +1 -0
- package/dist/src/setup/configure-hooks.js +16 -0
- package/dist/src/setup/configure-hooks.js.map +1 -0
- package/dist/src/setup/create-slash-commands.d.ts +8 -0
- package/dist/src/setup/create-slash-commands.d.ts.map +1 -0
- package/dist/src/setup/create-slash-commands.js +101 -0
- package/dist/src/setup/create-slash-commands.js.map +1 -0
- package/dist/src/setup/index.d.ts +8 -0
- package/dist/src/setup/index.d.ts.map +1 -0
- package/dist/src/setup/index.js +17 -0
- package/dist/src/setup/index.js.map +1 -0
- package/dist/src/setup/inject-claude-md.d.ts +10 -0
- package/dist/src/setup/inject-claude-md.d.ts.map +1 -0
- package/dist/src/setup/inject-claude-md.js +150 -0
- package/dist/src/setup/inject-claude-md.js.map +1 -0
- package/dist/src/setup/uninstall.d.ts +22 -0
- package/dist/src/setup/uninstall.d.ts.map +1 -0
- package/dist/src/setup/uninstall.js +235 -0
- package/dist/src/setup/uninstall.js.map +1 -0
- package/dist/src/storage.d.ts +192 -0
- package/dist/src/storage.d.ts.map +1 -0
- package/dist/src/storage.js +1037 -0
- package/dist/src/storage.js.map +1 -0
- package/dist/src/string-similarity.d.ts +8 -0
- package/dist/src/string-similarity.d.ts.map +1 -0
- package/dist/src/string-similarity.js +57 -0
- package/dist/src/string-similarity.js.map +1 -0
- package/dist/src/traces/adapters/browser.d.ts +69 -0
- package/dist/src/traces/adapters/browser.d.ts.map +1 -0
- package/dist/src/traces/adapters/browser.js +280 -0
- package/dist/src/traces/adapters/browser.js.map +1 -0
- package/dist/src/traces/adapters/index.d.ts +23 -0
- package/dist/src/traces/adapters/index.d.ts.map +1 -0
- package/dist/src/traces/adapters/index.js +67 -0
- package/dist/src/traces/adapters/index.js.map +1 -0
- package/dist/src/traces/adapters/langchain.d.ts +42 -0
- package/dist/src/traces/adapters/langchain.d.ts.map +1 -0
- package/dist/src/traces/adapters/langchain.js +151 -0
- package/dist/src/traces/adapters/langchain.js.map +1 -0
- package/dist/src/traces/adapters/opentelemetry.d.ts +46 -0
- package/dist/src/traces/adapters/opentelemetry.d.ts.map +1 -0
- package/dist/src/traces/adapters/opentelemetry.js +164 -0
- package/dist/src/traces/adapters/opentelemetry.js.map +1 -0
- package/dist/src/traces/adapters/sentry.d.ts +58 -0
- package/dist/src/traces/adapters/sentry.d.ts.map +1 -0
- package/dist/src/traces/adapters/sentry.js +212 -0
- package/dist/src/traces/adapters/sentry.js.map +1 -0
- package/dist/src/traces/index.d.ts +10 -0
- package/dist/src/traces/index.d.ts.map +1 -0
- package/dist/src/traces/index.js +45 -0
- package/dist/src/traces/index.js.map +1 -0
- package/dist/src/traces/storage.d.ts +78 -0
- package/dist/src/traces/storage.d.ts.map +1 -0
- package/dist/src/traces/storage.js +399 -0
- package/dist/src/traces/storage.js.map +1 -0
- package/dist/src/traces/summarizer.d.ts +83 -0
- package/dist/src/traces/summarizer.d.ts.map +1 -0
- package/dist/src/traces/summarizer.js +247 -0
- package/dist/src/traces/summarizer.js.map +1 -0
- package/dist/src/traces/types.d.ts +365 -0
- package/dist/src/traces/types.d.ts.map +1 -0
- package/dist/src/traces/types.js +14 -0
- package/dist/src/traces/types.js.map +1 -0
- package/dist/src/types.d.ts +495 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +27 -0
- package/dist/src/types.js.map +1 -0
- package/docs/agent-surface-policy.md +45 -0
- package/docs/memory-setup.md +226 -0
- package/hooks/_arch_scan_bg.py +88 -0
- package/hooks/_plugin_drift_check_bg.py +85 -0
- package/hooks/_session_start_lib.sh +42 -0
- package/hooks/git/pre-push +141 -0
- package/hooks/hooks.json +126 -0
- package/hooks/post-commit +30 -0
- package/hooks/pre-commit +29 -0
- package/hooks/pre-edit-apppulse.sh +6 -0
- package/hooks/pre-edit-architecture.sh +106 -0
- package/hooks/pre-edit-rally-point.sh +92 -0
- package/hooks/session-start-apppulse.sh +6 -0
- package/hooks/session-start-architecture.sh +10 -0
- package/hooks/session-start-git-hooks.sh +12 -0
- package/hooks/session-start-plugin-drift.sh +27 -0
- package/hooks/session-start-rally-point.sh +44 -0
- package/hooks/session-start-retrieval.sh +24 -0
- package/hooks/session-start-worktree-gc.sh +105 -0
- package/hooks/test_apppulse_hooks.sh +6 -0
- package/hooks/test_rally_point_hooks.sh +388 -0
- package/hooks/test_sec008_hooks.sh +66 -0
- package/package.json +111 -0
- package/scripts/README.md +301 -0
- package/scripts/_db_url.py +61 -0
- package/scripts/_paths.py +445 -0
- package/scripts/blm.py +162 -0
- package/scripts/blm_api.py +263 -0
- package/scripts/check_cache_sync.py +490 -0
- package/scripts/embed_backend.py +475 -0
- package/scripts/install_memory.py +556 -0
- package/scripts/lessons_index/__init__.py +77 -0
- package/scripts/lessons_index/__main__.py +135 -0
- package/scripts/lessons_index/ingest.py +288 -0
- package/scripts/lessons_index/query.py +285 -0
- package/scripts/lessons_index/schema.py +114 -0
- package/scripts/memory_context/__init__.py +610 -0
- package/scripts/memory_graph/__init__.py +393 -0
- package/scripts/project_resolver.py +172 -0
- package/scripts/prune_codex_plugin_cache.py +23 -0
- package/scripts/prune_plugin_cache.py +359 -0
- package/scripts/semantic_index/__init__.py +482 -0
- package/scripts/semantic_index/_bench_hybrid.py +175 -0
- package/scripts/semantic_index/backfill.py +263 -0
- package/scripts/semantic_index/hybrid.py +174 -0
- package/scripts/semantic_index/test_backfill.py +292 -0
- package/scripts/semantic_index/test_hybrid.py +541 -0
- package/scripts/sync_navgator_lessons.py +666 -0
- package/scripts/sync_plugin_cache.py +388 -0
- package/skills/agent-rally-point/SKILL.md +165 -0
- package/skills/agent-rally-watcher/SKILL.md +83 -0
- package/skills/api-registry-bridge/SKILL.md +59 -0
- package/skills/architecture/dead/SKILL.md +56 -0
- package/skills/architecture/impact/SKILL.md +88 -0
- package/skills/architecture/review/SKILL.md +227 -0
- package/skills/architecture/rules/SKILL.md +72 -0
- package/skills/architecture/scan/SKILL.md +79 -0
- package/skills/architecture/trace/SKILL.md +65 -0
- package/skills/attribution-standard/SKILL.md +122 -0
- package/skills/authentication/SKILL.md +81 -0
- package/skills/authentication/references/better-auth-magic-link.md +135 -0
- package/skills/authentication/references/better-auth-setup.md +224 -0
- package/skills/authentication/references/google-calendar-sync.md +278 -0
- package/skills/authentication/references/google-cloud-console.md +159 -0
- package/skills/authentication/references/google-geocoding-directions.md +126 -0
- package/skills/authentication/references/google-lessons-example-web-app.md +177 -0
- package/skills/authentication/references/google-maps.md +162 -0
- package/skills/authentication/references/google-oauth-setup.md +343 -0
- package/skills/authentication/references/google-places.md +173 -0
- package/skills/authentication/references/lessons-example-web-app-better-auth.md +126 -0
- package/skills/authentication/references/resend-email.md +227 -0
- package/skills/authentication/references/resend-otp-magic-link.md +153 -0
- package/skills/authentication/references/supabase-auth.md +172 -0
- package/skills/auto-decision-capture/SKILL.md +419 -0
- package/skills/build-loop/SKILL.md +516 -0
- package/skills/build-loop/detect-plugins.mjs +82 -0
- package/skills/build-loop/eval-guide.md +65 -0
- package/skills/build-loop/fallbacks.md +549 -0
- package/skills/build-loop/phases/fact-check.md +42 -0
- package/skills/build-loop/phases/ui-validation.md +267 -0
- package/skills/build-loop/references/apple-native-planning.md +439 -0
- package/skills/build-loop/references/capability-routing.md +181 -0
- package/skills/build-loop/references/codex-subagents.md +98 -0
- package/skills/build-loop/references/coordination.md +161 -0
- package/skills/build-loop/references/correction-aware-capture.md +177 -0
- package/skills/build-loop/references/independent-auditor.md +72 -0
- package/skills/build-loop/references/intent-capability-pack.md +170 -0
- package/skills/build-loop/references/intent-exploration-prompts.md +96 -0
- package/skills/build-loop/references/leadership.md +72 -0
- package/skills/build-loop/references/memory.md +284 -0
- package/skills/build-loop/references/modular-systems-pack.md +96 -0
- package/skills/build-loop/references/output-style.md +129 -0
- package/skills/build-loop/references/pay-it-forward-arch.md +98 -0
- package/skills/build-loop/references/phase-1-assess.md +218 -0
- package/skills/build-loop/references/phase-2-plan.md +77 -0
- package/skills/build-loop/references/phase-3-execute.md +47 -0
- package/skills/build-loop/references/phase-4-review.md +310 -0
- package/skills/build-loop/references/phase-5-iterate.md +71 -0
- package/skills/build-loop/references/phase-6-learn.md +56 -0
- package/skills/build-loop/references/recent-design-structures.md +274 -0
- package/skills/build-loop/references/refactor-history/ASSESSMENT.md +85 -0
- package/skills/build-loop/references/refactor-history/STANDALONE_TEST_RUN.md +149 -0
- package/skills/build-loop/references/refactor-history/scenarios/01-simple-bugfix.md +32 -0
- package/skills/build-loop/references/refactor-history/scenarios/02-ui-build-with-iteration.md +48 -0
- package/skills/build-loop/references/refactor-history/scenarios/03-multi-failure-escalation.md +60 -0
- package/skills/build-loop/references/refactor-history/scenarios/04-ui-build-ibr-absent.md +51 -0
- package/skills/build-loop/references/refactor-history/scenarios/05-refactor-navgator-absent.md +71 -0
- package/skills/build-loop/references/refactor-history/scenarios/06-recurring-bug-debugger-absent.md +52 -0
- package/skills/build-loop/references/refactor-history/trace-comparison.md +202 -0
- package/skills/build-loop/references/self-recursive-dev.md +77 -0
- package/skills/build-loop/references/self-review.md +232 -0
- package/skills/build-loop/references/ui-io-contract.md +116 -0
- package/skills/build-loop/scanners/audit-design-rules.mjs +476 -0
- package/skills/build-loop/scanners/require-visual-evidence.mjs +239 -0
- package/skills/build-loop/templates/backlog-item.md +35 -0
- package/skills/build-loop/templates/codex-worker-prompt.md +89 -0
- package/skills/build-loop/templates/ui-subagent-prompt.md +179 -0
- package/skills/build-loop/templates/ux-fix-plan.md +40 -0
- package/skills/building-with-deepagents/SKILL.md +195 -0
- package/skills/building-with-deepagents/references/anti-patterns.md +141 -0
- package/skills/building-with-deepagents/references/api-quick-reference.md +184 -0
- package/skills/capabilities/SKILL.md +91 -0
- package/skills/debug-loop/SKILL.md +278 -0
- package/skills/debug-loop/references/convergence-rules.md +145 -0
- package/skills/debug-loop/references/swiftui-macos-clunky-ui-debugger.html +823 -0
- package/skills/debugging/assess/SKILL.md +111 -0
- package/skills/debugging/debug-loop/SKILL.md +231 -0
- package/skills/debugging/memory/SKILL.md +147 -0
- package/skills/debugging/store/SKILL.md +153 -0
- package/skills/debugging-memory/SKILL.md +440 -0
- package/skills/debugging-memory/examples/incident-example.json +67 -0
- package/skills/debugging-memory/references/incident-documentation.md +280 -0
- package/skills/debugging-memory/references/ios-notification-alarm-playbook.md +300 -0
- package/skills/debugging-memory/references/pattern-extraction.md +163 -0
- package/skills/debugging-memory/references/subagent-integration.md +312 -0
- package/skills/defenseclaw-bridge/SKILL.md +156 -0
- package/skills/defenseclaw-bridge/references/dc-config-mapping.md +162 -0
- package/skills/defenseclaw-bridge/references/output-format.md +108 -0
- package/skills/handoff/SKILL.md +94 -0
- package/skills/ibr-bridge/SKILL.md +68 -0
- package/skills/knowledge/SKILL.md +127 -0
- package/skills/knowledge/references/recall-integration.md +83 -0
- package/skills/knowledge/templates/madr-minimal.md +56 -0
- package/skills/knowledge-review/SKILL.md +112 -0
- package/skills/logging-tracer/SKILL.md +202 -0
- package/skills/logging-tracer/references/log-analysis.md +128 -0
- package/skills/logging-tracer/references/stack-templates.md +274 -0
- package/skills/logging-tracer-bridge/SKILL.md +70 -0
- package/skills/mcp-builder/SKILL.md +278 -0
- package/skills/mcp-builder/references/mcp-security.md +106 -0
- package/skills/model-tiering/SKILL.md +216 -0
- package/skills/native-ax-driver/SKILL.md +220 -0
- package/skills/native-ax-driver/scripts/layout_fill.py +222 -0
- package/skills/native-ax-driver/scripts/native_driver.py +495 -0
- package/skills/native-ax-driver/swift/bl-ax-driver/Package.swift +20 -0
- package/skills/native-ax-driver/swift/bl-ax-driver/Sources/main.swift +542 -0
- package/skills/optimize/SKILL.md +202 -0
- package/skills/optimize/profiles.md +61 -0
- package/skills/plan-verify/SKILL.md +115 -0
- package/skills/plan-verify/test-fixtures/example-app-v20-findings.json +27 -0
- package/skills/plan-verify/test-fixtures/example-app-v20.md +42 -0
- package/skills/plan-verify/test-fixtures/example-app-v22-findings.json +15 -0
- package/skills/plan-verify/test-fixtures/example-app-v22.md +1608 -0
- package/skills/plan-verify/test-fixtures/unrelated-good-plan-findings.json +15 -0
- package/skills/plan-verify/test-fixtures/unrelated-good-plan.md +55 -0
- package/skills/plugin-builder/SKILL.md +329 -0
- package/skills/plugin-builder/references/authoritative-sources.md +104 -0
- package/skills/plugin-builder/references/build-loop-phase-guidance.md +94 -0
- package/skills/plugin-builder/references/components-guide.md +221 -0
- package/skills/plugin-builder/references/distribution.md +317 -0
- package/skills/plugin-builder/references/dual-host-claude-codex.md +220 -0
- package/skills/plugin-builder/references/hooks-reference.md +210 -0
- package/skills/plugin-builder/references/manifest-schema.md +111 -0
- package/skills/plugin-builder/references/plugin-hygiene-lessons.md +307 -0
- package/skills/plugin-tests/SKILL.md +94 -0
- package/skills/prd-bridge/SKILL.md +135 -0
- package/skills/research/SKILL.md +80 -0
- package/skills/security-methodology/SKILL.md +105 -0
- package/skills/security-methodology/references/cross-source-matrix.md +77 -0
- package/skills/security-methodology/references/mitre-atlas-starter.md +83 -0
- package/skills/security-methodology/references/nist-600-1-mapping.md +119 -0
- package/skills/security-methodology/references/owasp-agentic-top-10.md +157 -0
- package/skills/security-methodology/references/owasp-llm-top-10.md +144 -0
- package/skills/security-methodology/references/owasp-web-top-10.md +65 -0
- package/skills/self-improve/SKILL.md +298 -0
- package/skills/spec-writing/SKILL.md +548 -0
- package/skills/spec-writing/scripts/check_checklist.py +478 -0
- package/skills/sync-skills/SKILL.md +132 -0
- package/skills/telemetry/SKILL.md +66 -0
- package/skills/ui-design/SKILL.md +75 -0
- package/skills/ui-design/references/design-patterns-multi.md +165 -0
- package/skills/ui-design/references/design-preferences-from-owned-apps.md +150 -0
- package/skills/ui-design/references/evidence-capture-policy.md +55 -0
- package/skills/ui-design/references/ui-guidance-sources.md +330 -0
- package/skills/ui-design/references/universal-design-principles.alt.md +182 -0
- package/skills/ui-design/references/universal-design-principles.md +419 -0
- package/templates/memory/MEMORY.md.template +55 -0
- package/templates/memory/constitution.md.template +64 -0
- package/templates/memory/manifest.json +47 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Dual-Host Plugin Pattern: Claude Code + Codex
|
|
4
|
+
|
|
5
|
+
Every plugin in the `rosslabs-ai-toolkit` marketplace ships to **both** Claude Code and Codex from a single repository. This reference covers the shared structure, per-host manifests, and what stays agent-neutral.
|
|
6
|
+
|
|
7
|
+
## Why dual-host
|
|
8
|
+
|
|
9
|
+
Codex (OpenAI's coding agent CLI) and Claude Code have converged on plugins as the packaging unit. The internals (skills, MCP servers, markdown commands) are largely agent-neutral. The per-host differences are thin: a manifest file per host, slightly different naming conventions, separate install surfaces.
|
|
10
|
+
|
|
11
|
+
Shipping to both from one repo means:
|
|
12
|
+
- One source of truth for skills, MCP tools, prompts
|
|
13
|
+
- One CI/release pipeline
|
|
14
|
+
- Users on either host get fixes at the same time
|
|
15
|
+
|
|
16
|
+
## Repo layout
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
my-plugin/
|
|
20
|
+
├── .claude-plugin/
|
|
21
|
+
│ └── plugin.json # Claude Code manifest
|
|
22
|
+
├── .codex-plugin/
|
|
23
|
+
│ └── plugin.json # Codex manifest (this file)
|
|
24
|
+
├── .agents/ # Codex workspace-install metadata (optional)
|
|
25
|
+
│ └── plugins/
|
|
26
|
+
│ └── marketplace.json
|
|
27
|
+
├── skills/ # Agent-neutral — both hosts load from here
|
|
28
|
+
│ └── <skill-name>/
|
|
29
|
+
│ └── SKILL.md
|
|
30
|
+
├── commands/ # Mostly agent-neutral markdown
|
|
31
|
+
├── agents/ # Claude-specific (Codex ignores)
|
|
32
|
+
├── hooks/ # Claude-specific (Codex has its own hook system)
|
|
33
|
+
├── .mcp.json # Agent-neutral — both hosts load MCP from here
|
|
34
|
+
└── package.json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Agent-neutral surfaces** (one copy, both hosts consume):
|
|
38
|
+
- `skills/*/SKILL.md` — markdown with YAML frontmatter
|
|
39
|
+
- `.mcp.json` — MCP server configuration
|
|
40
|
+
- `commands/*.md` — when they're pure prompts without Claude-only frontmatter
|
|
41
|
+
|
|
42
|
+
**Claude-specific** (lives in standard Claude Code paths, Codex ignores):
|
|
43
|
+
- `.claude-plugin/plugin.json`
|
|
44
|
+
- `agents/*.md` with Claude frontmatter (`model: sonnet`, `isolation: worktree`, etc.)
|
|
45
|
+
- `hooks/hooks.json` with Claude hook events (`PostToolUse`, `Stop`, etc.)
|
|
46
|
+
|
|
47
|
+
**Codex-specific**:
|
|
48
|
+
- `.codex-plugin/plugin.json`
|
|
49
|
+
- `.agents/plugins/marketplace.json` (workspace-level install metadata)
|
|
50
|
+
|
|
51
|
+
## `.codex-plugin/plugin.json` — required shape
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"name": "my-plugin",
|
|
56
|
+
"version": "1.0.0",
|
|
57
|
+
"description": "Brief description matching what you shipped to Claude",
|
|
58
|
+
"author": {
|
|
59
|
+
"name": "Your Name",
|
|
60
|
+
"url": "https://github.com/you"
|
|
61
|
+
},
|
|
62
|
+
"homepage": "https://github.com/you/my-plugin#readme",
|
|
63
|
+
"repository": "https://github.com/you/my-plugin",
|
|
64
|
+
"license": "MIT",
|
|
65
|
+
"keywords": ["tag1", "tag2"],
|
|
66
|
+
"skills": "./skills",
|
|
67
|
+
"mcpServers": "./.mcp.json",
|
|
68
|
+
"interface": {
|
|
69
|
+
"displayName": "My Plugin",
|
|
70
|
+
"shortDescription": "One-line description shown in Codex marketplace UI.",
|
|
71
|
+
"longDescription": "Full paragraph shown on the plugin detail page. Describe what it does and when a user should install it.",
|
|
72
|
+
"developerName": "Your Company",
|
|
73
|
+
"category": "Coding",
|
|
74
|
+
"capabilities": [
|
|
75
|
+
"Read",
|
|
76
|
+
"Write"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Field rules
|
|
83
|
+
|
|
84
|
+
| Field | Required | Rule |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
| `name` | yes | kebab-case. Match the Claude plugin name — users shouldn't see two different names for the same plugin. |
|
|
87
|
+
| `version` | yes | semver. Keep in sync with `.claude-plugin/plugin.json` version — users think of it as one plugin. |
|
|
88
|
+
| `description` | yes | One-sentence. Matches the Claude manifest's description for consistency. |
|
|
89
|
+
| `skills` | yes if skills exist | Always `"./skills"` — same path Claude uses. |
|
|
90
|
+
| `mcpServers` | yes if MCP exists | Always `"./.mcp.json"` — same file Claude uses. |
|
|
91
|
+
| `commands` | optional | Only if you have agent-neutral markdown commands to expose. |
|
|
92
|
+
| `interface.displayName` | yes | Title case; this is what users see in the Codex marketplace. |
|
|
93
|
+
| `interface.shortDescription` | yes | Under ~150 chars. Marketplace card text. |
|
|
94
|
+
| `interface.longDescription` | yes | Full plugin-detail page. Can reuse `description` if the plugin is simple. |
|
|
95
|
+
| `interface.developerName` | yes | Company/team name. All Ross Labs plugins use `"Ross Labs"`. |
|
|
96
|
+
| `interface.category` | yes | One of: `Coding`, `Productivity`, `Content`, `Research`, `Design`, etc. Pick from Codex's current list. |
|
|
97
|
+
| `interface.capabilities` | yes | Array of coarse permissions Codex should surface at install: `Read`, `Write`. |
|
|
98
|
+
|
|
99
|
+
## `.agents/plugins/marketplace.json` — workspace install metadata (optional)
|
|
100
|
+
|
|
101
|
+
This file lets Codex install the plugin from the **local workspace** (`./`) without publishing to a registry. Use it for plugins under active local development.
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"name": "my-plugin-local-workspace",
|
|
106
|
+
"interface": { "displayName": "My Plugin Workspace" },
|
|
107
|
+
"plugins": [
|
|
108
|
+
{
|
|
109
|
+
"name": "my-plugin",
|
|
110
|
+
"source": { "source": "local", "path": "./" },
|
|
111
|
+
"policy": {
|
|
112
|
+
"installation": "AVAILABLE",
|
|
113
|
+
"authentication": "ON_INSTALL"
|
|
114
|
+
},
|
|
115
|
+
"category": "Coding"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
If you only distribute via the public GitHub marketplace (not local workspace), you can skip this file.
|
|
122
|
+
|
|
123
|
+
## README pattern — announce the Codex surface
|
|
124
|
+
|
|
125
|
+
When you add Codex support to an existing Claude plugin, append a short section to the README so existing users know the Codex install surface exists. Used verbatim across rosslabs-ai-toolkit plugins:
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
## Codex
|
|
129
|
+
|
|
130
|
+
This package ships an additive Codex plugin surface alongside the existing
|
|
131
|
+
Claude Code package. The Claude package remains authoritative for Claude
|
|
132
|
+
behavior; the Codex package adds a parallel `.codex-plugin/plugin.json`
|
|
133
|
+
install surface without changing the Claude runtime.
|
|
134
|
+
|
|
135
|
+
Package root for Codex installs:
|
|
136
|
+
- the repository root (`.`)
|
|
137
|
+
|
|
138
|
+
Primary Codex surface:
|
|
139
|
+
- skills from `./skills` when present
|
|
140
|
+
- MCP config from `./.mcp.json` when present
|
|
141
|
+
|
|
142
|
+
Install the package from this package root using your current Codex plugin
|
|
143
|
+
install flow. The Codex package is additive only: Claude-specific hooks,
|
|
144
|
+
slash commands, and agent wiring remain unchanged for Claude Code.
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## package.json scripts pattern
|
|
148
|
+
|
|
149
|
+
When the plugin has install scripts (most do), pair them so users can pick their host. From NavGator:
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{
|
|
153
|
+
"scripts": {
|
|
154
|
+
"install:claude": "bash scripts/install-plugin.sh --global",
|
|
155
|
+
"install:codex": "bash scripts/install-codex-plugin.sh --user",
|
|
156
|
+
"install:codex-workspace": "bash scripts/install-codex-plugin.sh --workspace"
|
|
157
|
+
},
|
|
158
|
+
"files": [
|
|
159
|
+
"dist/",
|
|
160
|
+
"skills/",
|
|
161
|
+
".claude-plugin/",
|
|
162
|
+
".codex-plugin/",
|
|
163
|
+
".agents/",
|
|
164
|
+
"scripts/install-plugin.sh",
|
|
165
|
+
"scripts/install-codex-plugin.sh"
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
The `files` array is what ships to npm — make sure both manifest directories and both install scripts are listed.
|
|
171
|
+
Before publishing, run the package surface gate in
|
|
172
|
+
`skills/plugin-builder/references/distribution.md`: review
|
|
173
|
+
`npm pack --dry-run --json` output, confirm no build caches or local runtime
|
|
174
|
+
artifacts are included, and validate npmjs and GitHub Packages as separate
|
|
175
|
+
registry surfaces when both are used.
|
|
176
|
+
|
|
177
|
+
## What stays the same
|
|
178
|
+
|
|
179
|
+
Do not duplicate content:
|
|
180
|
+
|
|
181
|
+
- **Skills**: one `skills/<name>/SKILL.md`, both hosts invoke it. YAML frontmatter that's Claude-specific (like `disable-model-invocation`) is silently ignored by Codex.
|
|
182
|
+
- **MCP servers**: one `.mcp.json`, both hosts launch the same server with the same `${CLAUDE_PLUGIN_ROOT}` substitution (Codex uses the same env-var name).
|
|
183
|
+
- **Commands as markdown**: if your `commands/*.md` is a pure prompt without Claude frontmatter, both hosts can read it.
|
|
184
|
+
- **`package.json`**: one source of truth for scripts and `files[]`.
|
|
185
|
+
|
|
186
|
+
## What to duplicate minimally
|
|
187
|
+
|
|
188
|
+
- **Plugin manifest** (`.claude-plugin/plugin.json` and `.codex-plugin/plugin.json`) — two files, same `name` / `version` / `description` / `keywords`. Codex adds an `interface` block; Claude doesn't need it.
|
|
189
|
+
- **README** — one README, add the Codex section at the bottom.
|
|
190
|
+
|
|
191
|
+
## What stays Claude-only
|
|
192
|
+
|
|
193
|
+
- `agents/*.md` with Claude subagent frontmatter (Codex has no equivalent yet)
|
|
194
|
+
- `hooks/hooks.json` with Claude hook events (Codex has a separate hook system — port if you want equivalent behavior, but don't expect parity)
|
|
195
|
+
|
|
196
|
+
## Common mistakes
|
|
197
|
+
|
|
198
|
+
| Mistake | Fix |
|
|
199
|
+
|---|---|
|
|
200
|
+
| Divergent `name` or `version` between Claude and Codex manifests | Keep them identical — same plugin, same version |
|
|
201
|
+
| Duplicating `skills/` under `.codex-plugin/skills/` | One `skills/` at repo root, both manifests point to it via `"skills": "./skills"` |
|
|
202
|
+
| Forgetting `.codex-plugin/` in `package.json` `files[]` | Add it — otherwise `npm publish` ships a broken package for Codex users |
|
|
203
|
+
| Treating GitHub Packages success as npmjs success | Verify each registry separately with `npm view` or an install smoke |
|
|
204
|
+
| Treating `npm publish --dry-run` as proof npmjs trusted publishing is configured | Dry-run is a package check; verify the npm Trusted Publisher owner, repo, workflow filename, environment, and allowed action before real publish |
|
|
205
|
+
| `interface.capabilities` claims more than the plugin uses | Codex surfaces this at install time; claiming unused permissions looks worse, not better |
|
|
206
|
+
| Missing `interface` block entirely | Codex marketplace UI will show raw name/description with no formatting; always include the block |
|
|
207
|
+
| README doesn't mention Codex | Existing users don't discover the new install surface |
|
|
208
|
+
|
|
209
|
+
## Preflight checklist (supplements the plugin-builder checklist)
|
|
210
|
+
|
|
211
|
+
- [ ] `.codex-plugin/plugin.json` exists and validates as JSON
|
|
212
|
+
- [ ] `name` and `version` match `.claude-plugin/plugin.json`
|
|
213
|
+
- [ ] `interface.displayName`, `shortDescription`, `longDescription`, `developerName`, `category`, `capabilities` all set
|
|
214
|
+
- [ ] `skills` and `mcpServers` paths point to the repo-root directories (same ones Claude uses)
|
|
215
|
+
- [ ] `package.json` `files[]` includes `.codex-plugin/` and `.agents/` if used
|
|
216
|
+
- [ ] `npm pack --dry-run --json` inventory has no `.build/`, `node_modules/`, local runtime output, credentials, or unexpected large artifacts
|
|
217
|
+
- [ ] npmjs and GitHub Packages publish/install checks are reported separately when both registries are in use
|
|
218
|
+
- [ ] npmjs Trusted Publisher settings match the workflow owner, repo, workflow filename, environment, and `npm publish` allowed action
|
|
219
|
+
- [ ] README has the Codex section so existing users know about the install surface
|
|
220
|
+
- [ ] Install scripts exist for both hosts (`install:claude`, `install:codex`) when package.json has a `scripts` section
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Hooks Reference
|
|
4
|
+
|
|
5
|
+
## Hook Configuration Format
|
|
6
|
+
|
|
7
|
+
Hooks live in `hooks/hooks.json`:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"hooks": {
|
|
12
|
+
"EventName": [
|
|
13
|
+
{
|
|
14
|
+
"matcher": "ToolPattern",
|
|
15
|
+
"hooks": [
|
|
16
|
+
{
|
|
17
|
+
"type": "command",
|
|
18
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/my-script.sh"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Available Events
|
|
28
|
+
|
|
29
|
+
| Event | Trigger | Common Uses |
|
|
30
|
+
|-------|---------|-------------|
|
|
31
|
+
| `PreToolUse` | Before Claude uses any tool | Validate inputs, block dangerous commands |
|
|
32
|
+
| `PostToolUse` | After successful tool use | Format code, lint, log changes |
|
|
33
|
+
| `PostToolUseFailure` | After tool execution fails | Error recovery, retry logic |
|
|
34
|
+
| `UserPromptSubmit` | When user submits a prompt | Track activity, preprocess |
|
|
35
|
+
| `PermissionRequest` | When permission dialog shown | Auto-approve trusted patterns |
|
|
36
|
+
| `Stop` | When Claude attempts to stop | Write summaries, save context |
|
|
37
|
+
| `SubagentStart` | When subagent starts | Configure subagent behavior |
|
|
38
|
+
| `SubagentStop` | When subagent attempts to stop | Aggregate results |
|
|
39
|
+
| `SessionStart` | At session beginning | Restore context, initialize state |
|
|
40
|
+
| `SessionEnd` | At session end | Cleanup, save state |
|
|
41
|
+
| `PreCompact` | Before conversation compaction | Save important context |
|
|
42
|
+
| `Notification` | When Claude sends notifications | Forward to external services |
|
|
43
|
+
| `TaskCompleted` | When task marked complete | Verify completion, trigger follow-ups |
|
|
44
|
+
| `TeammateIdle` | When team agent about to idle | Redistribute work |
|
|
45
|
+
|
|
46
|
+
## Hook Types
|
|
47
|
+
|
|
48
|
+
### Command Hooks
|
|
49
|
+
Execute shell commands or scripts:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"type": "command",
|
|
54
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/format-code.sh"
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The command receives hook input as JSON on stdin. Use `jq` to extract fields:
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"type": "command",
|
|
62
|
+
"command": "jq -r '.tool_input.file_path' | xargs npm run lint:fix"
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Prompt Hooks
|
|
67
|
+
Evaluate a prompt with an LLM:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"type": "prompt",
|
|
72
|
+
"prompt": "Review the changes made and verify they follow project conventions. $ARGUMENTS"
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Agent Hooks
|
|
77
|
+
Run an agentic verifier with tools:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"type": "agent",
|
|
82
|
+
"prompt": "Verify the implementation is complete and correct."
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Matchers
|
|
87
|
+
|
|
88
|
+
Matchers filter which tools trigger a hook:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"matcher": "Write|Edit",
|
|
93
|
+
"hooks": [...]
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- Use `|` for OR: `"Write|Edit"`
|
|
98
|
+
- Omit matcher to trigger on all tools for that event
|
|
99
|
+
- Tool names are case-sensitive
|
|
100
|
+
|
|
101
|
+
## Environment Variables
|
|
102
|
+
|
|
103
|
+
`${CLAUDE_PLUGIN_ROOT}` — Always use this for plugin paths. Resolves to the actual plugin directory regardless of installation location.
|
|
104
|
+
|
|
105
|
+
## Script Requirements
|
|
106
|
+
|
|
107
|
+
1. Must be executable: `chmod +x scripts/my-script.sh`
|
|
108
|
+
2. Include shebang line: `#!/bin/bash` or `#!/usr/bin/env bash`
|
|
109
|
+
3. Use `${CLAUDE_PLUGIN_ROOT}` for paths
|
|
110
|
+
4. Test manually before integrating
|
|
111
|
+
|
|
112
|
+
## Reliability: minimal PATH, fail-open, advisory-only
|
|
113
|
+
|
|
114
|
+
Hooks fire in a **subprocess with a minimal, non-interactive PATH** — typically `/usr/bin:/bin`, *not* your login shell's PATH. Binaries you installed to `~/.local/bin`, a Node version-manager dir, Homebrew, etc. are **not on PATH** inside a hook. This is the #1 cause of `exit code 127` (command not found) hook failures.
|
|
115
|
+
|
|
116
|
+
Three rules for any hook that calls an external binary (`node`, `jq`, a project CLI):
|
|
117
|
+
|
|
118
|
+
1. **Resolve binaries absolutely or guard every call.** Don't trust inherited PATH. Either hardcode/derive an absolute path (`RALLY_BIN`, `"$(command -v node || echo /opt/homebrew/bin/node)"`), or `command -v <bin> >/dev/null 2>&1 || exit 0` before using it.
|
|
119
|
+
|
|
120
|
+
2. **Fail open for real — and test it.** A hook whose tooling is missing/slow must `exit 0` with no output, never abort. Watch for `set -euo pipefail` + an **unguarded** binary in a command substitution: `meta="$(printf '%s' "$x" | node -e '…')"` aborts the *whole script* with 127 the instant `node` isn't found — even if a later line has `|| true`. Guarding one line doesn't make the script fail-open. Verify under the real hook environment:
|
|
121
|
+
```bash
|
|
122
|
+
printf '{"tool_input":{"file_path":"/tmp/x"}}' | env -i PATH=/usr/bin:/bin bash hooks/my-hook.sh before-write; echo "exit=$?"
|
|
123
|
+
# MUST print exit=0
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
3. **Advisory hooks must not enforce.** A coordination/lint/reminder hook should emit `additionalContext` (SessionStart/UserPromptSubmit, added to context) or `systemMessage`, never `permissionDecision:"deny"` / `decision:"block"`. Reserve blocking (`exit 2`, deny/block) for explicit safety/security/integrity gates, and gate any hard-block behind an opt-in env flag so the default never surprises an agent. Note SessionStart/Notification/Setup **cannot** block regardless.
|
|
127
|
+
|
|
128
|
+
4. **Resolve your own path at runtime if installed out-of-tree.** If a host wrapper references a versioned/cache path (`${CLAUDE_PLUGIN_ROOT}`, `~/.codex/…`), prefer a thin shim that `exec`s the version-controlled script, or `realpath "$0"` inside the script — so the hook can't desync from the code it's supposed to run (see plugin-hygiene-lessons.md §17).
|
|
129
|
+
|
|
130
|
+
## Common Patterns
|
|
131
|
+
|
|
132
|
+
### Auto-Format on Write
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"hooks": {
|
|
136
|
+
"PostToolUse": [
|
|
137
|
+
{
|
|
138
|
+
"matcher": "Write|Edit",
|
|
139
|
+
"hooks": [{
|
|
140
|
+
"type": "command",
|
|
141
|
+
"command": "jq -r '.tool_input.file_path' | xargs npx prettier --write"
|
|
142
|
+
}]
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Save Context on Stop
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"hooks": {
|
|
153
|
+
"Stop": [
|
|
154
|
+
{
|
|
155
|
+
"hooks": [{
|
|
156
|
+
"type": "prompt",
|
|
157
|
+
"prompt": "Write a brief summary of this session's task, progress, and decisions to .claude/bookmarks/context.md"
|
|
158
|
+
}]
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Restore Context on Session Start
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"hooks": {
|
|
169
|
+
"SessionStart": [
|
|
170
|
+
{
|
|
171
|
+
"hooks": [{
|
|
172
|
+
"type": "command",
|
|
173
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/restore-context.sh"
|
|
174
|
+
}]
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Block Dangerous Commands
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"hooks": {
|
|
185
|
+
"PreToolUse": [
|
|
186
|
+
{
|
|
187
|
+
"matcher": "Bash",
|
|
188
|
+
"hooks": [{
|
|
189
|
+
"type": "command",
|
|
190
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/check-safety.sh"
|
|
191
|
+
}]
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Troubleshooting
|
|
199
|
+
|
|
200
|
+
| Issue | Check |
|
|
201
|
+
|-------|-------|
|
|
202
|
+
| Hook not firing | Event name correct? (PascalCase) |
|
|
203
|
+
| Script not executing | Is it executable? (`chmod +x`) |
|
|
204
|
+
| Script can't find files | Using `${CLAUDE_PLUGIN_ROOT}`? |
|
|
205
|
+
| Matcher not matching | Tool name correct and case-sensitive? |
|
|
206
|
+
| Prompt hook not working | Valid prompt with `$ARGUMENTS` if needed? |
|
|
207
|
+
| `exit code 127` on every fire | A binary the script calls (`node`/`jq`/CLI) isn't on the hook's minimal PATH. Resolve it absolutely or `command -v`-guard it; test under `env -i PATH=/usr/bin:/bin`. |
|
|
208
|
+
| Hook aborts instead of failing open | `set -e` + an unguarded command substitution. Guarding one line ≠ fail-open. |
|
|
209
|
+
| Path-with-spaces → 127 | Known issue (anthropics/claude-code #5648); quote the path in the command string. |
|
|
210
|
+
| Advisory hook blocking edits | It's emitting `deny`/`block`; switch to `additionalContext`/`systemMessage` and reserve blocking for safety gates. |
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<!-- SPDX-FileCopyrightText: 2025-2026 Tyrone Ross, Jr <46267523+tyroneross@users.noreply.github.com> | SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
|
|
3
|
+
# Plugin Manifest Schema Reference
|
|
4
|
+
|
|
5
|
+
The `.claude-plugin/plugin.json` file defines plugin metadata and configuration.
|
|
6
|
+
|
|
7
|
+
The manifest is **optional**. If omitted, Claude Code auto-discovers components in default locations and derives the plugin name from the directory name.
|
|
8
|
+
|
|
9
|
+
## Complete Schema
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"name": "plugin-name",
|
|
14
|
+
"version": "1.2.0",
|
|
15
|
+
"description": "Brief plugin description",
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Author Name",
|
|
18
|
+
"email": "author@example.com",
|
|
19
|
+
"url": "https://github.com/author"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://docs.example.com/plugin",
|
|
22
|
+
"repository": "https://github.com/author/plugin",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"keywords": ["keyword1", "keyword2"],
|
|
25
|
+
"commands": ["./custom/commands/special.md"],
|
|
26
|
+
"agents": "./custom/agents/",
|
|
27
|
+
"skills": "./custom/skills/",
|
|
28
|
+
"hooks": "./config/hooks.json",
|
|
29
|
+
"mcpServers": "./mcp-config.json",
|
|
30
|
+
"outputStyles": "./styles/",
|
|
31
|
+
"lspServers": "./.lsp.json"
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Required Fields
|
|
36
|
+
|
|
37
|
+
Only `name` is required if including a manifest.
|
|
38
|
+
|
|
39
|
+
| Field | Type | Description | Example |
|
|
40
|
+
|-------|------|-------------|---------|
|
|
41
|
+
| `name` | string | Unique identifier (kebab-case, no spaces) | `"deployment-tools"` |
|
|
42
|
+
|
|
43
|
+
## Metadata Fields
|
|
44
|
+
|
|
45
|
+
| Field | Type | Description | Example |
|
|
46
|
+
|-------|------|-------------|---------|
|
|
47
|
+
| `version` | string | Semantic version | `"2.1.0"` |
|
|
48
|
+
| `description` | string | Brief explanation | `"Deployment automation tools"` |
|
|
49
|
+
| `author` | object | `{name, email?, url?}` | `{"name": "Dev Team"}` |
|
|
50
|
+
| `homepage` | string | Documentation URL | `"https://docs.example.com"` |
|
|
51
|
+
| `repository` | string | Source code URL | `"https://github.com/user/plugin"` |
|
|
52
|
+
| `license` | string | License identifier | `"MIT"`, `"Apache-2.0"` |
|
|
53
|
+
| `keywords` | array | Discovery tags | `["deployment", "ci-cd"]` |
|
|
54
|
+
|
|
55
|
+
## Component Path Fields
|
|
56
|
+
|
|
57
|
+
| Field | Type | Description |
|
|
58
|
+
|-------|------|-------------|
|
|
59
|
+
| `commands` | string or array | Additional command files/directories |
|
|
60
|
+
| `agents` | string or array | Additional agent files |
|
|
61
|
+
| `skills` | string or array | Additional skill directories |
|
|
62
|
+
| `hooks` | string, array, or object | Hook config paths or inline config |
|
|
63
|
+
| `mcpServers` | string, array, or object | MCP config paths or inline config |
|
|
64
|
+
| `outputStyles` | string or array | Output style files/directories |
|
|
65
|
+
| `lspServers` | string, array, or object | LSP server configs |
|
|
66
|
+
|
|
67
|
+
## Path Behavior Rules
|
|
68
|
+
|
|
69
|
+
- Custom paths **supplement** default directories — they don't replace them
|
|
70
|
+
- All paths must be relative to plugin root and start with `./`
|
|
71
|
+
- Multiple paths can be specified as arrays:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"commands": [
|
|
76
|
+
"./specialized/deploy.md",
|
|
77
|
+
"./utilities/batch-process.md"
|
|
78
|
+
],
|
|
79
|
+
"agents": [
|
|
80
|
+
"./custom-agents/reviewer.md",
|
|
81
|
+
"./custom-agents/tester.md"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Installation Scopes
|
|
87
|
+
|
|
88
|
+
| Scope | Settings file | Use case |
|
|
89
|
+
|-------|--------------|----------|
|
|
90
|
+
| `user` | `~/.claude/settings.json` | Personal, all projects (default) |
|
|
91
|
+
| `project` | `.claude/settings.json` | Team, shared via version control |
|
|
92
|
+
| `local` | `.claude/settings.local.json` | Project-specific, gitignored |
|
|
93
|
+
| `managed` | Managed settings | Org-wide (read-only, update only) |
|
|
94
|
+
|
|
95
|
+
## Version Management
|
|
96
|
+
|
|
97
|
+
Format: `MAJOR.MINOR.PATCH`
|
|
98
|
+
- **MAJOR:** Breaking changes (incompatible API changes)
|
|
99
|
+
- **MINOR:** New features (backward-compatible)
|
|
100
|
+
- **PATCH:** Bug fixes (backward-compatible)
|
|
101
|
+
|
|
102
|
+
Start at `1.0.0` for first stable release. Pre-release: `2.0.0-beta.1`.
|
|
103
|
+
|
|
104
|
+
**Important:** Claude Code uses the version to determine updates. If code changes but version doesn't bump, existing users won't see changes due to caching.
|
|
105
|
+
|
|
106
|
+
## Plugin Caching
|
|
107
|
+
|
|
108
|
+
Marketplace plugins are copied to `~/.claude/plugins/cache` for security. This means:
|
|
109
|
+
- Paths traversing outside plugin root (`../shared-utils`) won't work after install
|
|
110
|
+
- Use symlinks for external dependencies (they're honored during copy)
|
|
111
|
+
- `--plugin-dir` plugins are used in-place (no caching)
|