@arthai/agents 1.0.0
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/README.md +123 -0
- package/VERSION +1 -0
- package/agents/ai-consultant.md +999 -0
- package/agents/architect.md +174 -0
- package/agents/code-reviewer.md +115 -0
- package/agents/competitive-analyst.md +688 -0
- package/agents/content-strategist.md +607 -0
- package/agents/design-studio-create.md +304 -0
- package/agents/design-studio-critique.md +258 -0
- package/agents/design-studio-think.md +79 -0
- package/agents/domain-hunter.md +519 -0
- package/agents/explore-light.md +52 -0
- package/agents/frontend.md +261 -0
- package/agents/gtm-expert.md +811 -0
- package/agents/meeting-prep.md +318 -0
- package/agents/ops.md +149 -0
- package/agents/product-manager.md +563 -0
- package/agents/python-backend.md +286 -0
- package/agents/qa-baseline-updater.md +45 -0
- package/agents/qa-challenger.md +97 -0
- package/agents/qa-domain.md +145 -0
- package/agents/qa-e2e.md +184 -0
- package/agents/qa-test-promoter.md +97 -0
- package/agents/qa.md +226 -0
- package/agents/setup.md +134 -0
- package/agents/sre.md +165 -0
- package/agents/stakeholder-reporter.md +94 -0
- package/agents/user-researcher.md +602 -0
- package/bin/cli.js +322 -0
- package/bundles/canvas.json +16 -0
- package/bundles/compass.json +16 -0
- package/bundles/counsel.json +31 -0
- package/bundles/cruise.json +11 -0
- package/bundles/forge.json +26 -0
- package/bundles/prime.json +10 -0
- package/bundles/prism.json +23 -0
- package/bundles/scalpel.json +17 -0
- package/bundles/sentinel.json +19 -0
- package/bundles/shield.json +14 -0
- package/bundles/spark.json +19 -0
- package/compiler.sh +305 -0
- package/dist/plugins/canvas/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/canvas/agents/design-studio-create.md +304 -0
- package/dist/plugins/canvas/agents/design-studio-critique.md +258 -0
- package/dist/plugins/canvas/agents/design-studio-think.md +79 -0
- package/dist/plugins/canvas/agents/frontend.md +261 -0
- package/dist/plugins/canvas/skills/planning/SKILL.md +436 -0
- package/dist/plugins/compass/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/compass/agents/content-strategist.md +607 -0
- package/dist/plugins/compass/agents/gtm-expert.md +811 -0
- package/dist/plugins/compass/agents/product-manager.md +563 -0
- package/dist/plugins/compass/agents/user-researcher.md +602 -0
- package/dist/plugins/compass/skills/planning/SKILL.md +436 -0
- package/dist/plugins/counsel/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/counsel/agents/ai-consultant.md +999 -0
- package/dist/plugins/counsel/agents/competitive-analyst.md +688 -0
- package/dist/plugins/counsel/agents/meeting-prep.md +318 -0
- package/dist/plugins/counsel/agents/stakeholder-reporter.md +94 -0
- package/dist/plugins/counsel/hooks/check-deliverable.sh +65 -0
- package/dist/plugins/counsel/hooks/ensure-client-dir.sh +59 -0
- package/dist/plugins/counsel/hooks/hooks.json +28 -0
- package/dist/plugins/counsel/skills/client-discovery/SKILL.md +266 -0
- package/dist/plugins/counsel/skills/consulting/SKILL.md +282 -0
- package/dist/plugins/counsel/skills/deliverable-builder/SKILL.md +928 -0
- package/dist/plugins/counsel/skills/engagement-tracker/SKILL.md +380 -0
- package/dist/plugins/counsel/skills/market-research/SKILL.md +300 -0
- package/dist/plugins/counsel/skills/opportunity-map/SKILL.md +307 -0
- package/dist/plugins/counsel/skills/pitch-generator/SKILL.md +378 -0
- package/dist/plugins/counsel/skills/roi-calculator/SKILL.md +469 -0
- package/dist/plugins/counsel/skills/share/SKILL.md +211 -0
- package/dist/plugins/counsel/skills/solution-architect/SKILL.md +566 -0
- package/dist/plugins/counsel/skills/templates/SKILL.md +194 -0
- package/dist/plugins/counsel/skills/welcome/SKILL.md +136 -0
- package/dist/plugins/counsel/skills/wizard/SKILL.md +411 -0
- package/dist/plugins/cruise/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/cruise/skills/autopilot/SKILL.md +425 -0
- package/dist/plugins/forge/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/forge/agents/architect.md +174 -0
- package/dist/plugins/forge/agents/code-reviewer.md +115 -0
- package/dist/plugins/forge/agents/frontend.md +261 -0
- package/dist/plugins/forge/agents/product-manager.md +563 -0
- package/dist/plugins/forge/agents/python-backend.md +286 -0
- package/dist/plugins/forge/agents/qa.md +226 -0
- package/dist/plugins/forge/hooks/hooks.json +28 -0
- package/dist/plugins/forge/hooks/post-test-summary.sh +115 -0
- package/dist/plugins/forge/hooks/triage-router.sh +740 -0
- package/dist/plugins/forge/skills/implement/SKILL.md +532 -0
- package/dist/plugins/forge/skills/planning/SKILL.md +436 -0
- package/dist/plugins/forge/skills/pr/SKILL.md +275 -0
- package/dist/plugins/forge/skills/precheck/SKILL.md +159 -0
- package/dist/plugins/forge/skills/qa/SKILL.md +127 -0
- package/dist/plugins/forge/skills/review-pr/SKILL.md +367 -0
- package/dist/plugins/prime/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/prime/agents/ai-consultant.md +999 -0
- package/dist/plugins/prime/agents/architect.md +174 -0
- package/dist/plugins/prime/agents/code-reviewer.md +115 -0
- package/dist/plugins/prime/agents/competitive-analyst.md +688 -0
- package/dist/plugins/prime/agents/content-strategist.md +607 -0
- package/dist/plugins/prime/agents/design-studio-create.md +304 -0
- package/dist/plugins/prime/agents/design-studio-critique.md +258 -0
- package/dist/plugins/prime/agents/design-studio-think.md +79 -0
- package/dist/plugins/prime/agents/explore-light.md +52 -0
- package/dist/plugins/prime/agents/frontend.md +261 -0
- package/dist/plugins/prime/agents/gtm-expert.md +811 -0
- package/dist/plugins/prime/agents/meeting-prep.md +318 -0
- package/dist/plugins/prime/agents/ops.md +149 -0
- package/dist/plugins/prime/agents/product-manager.md +563 -0
- package/dist/plugins/prime/agents/python-backend.md +286 -0
- package/dist/plugins/prime/agents/qa-baseline-updater.md +45 -0
- package/dist/plugins/prime/agents/qa-challenger.md +97 -0
- package/dist/plugins/prime/agents/qa-domain.md +145 -0
- package/dist/plugins/prime/agents/qa-e2e.md +184 -0
- package/dist/plugins/prime/agents/qa-test-promoter.md +97 -0
- package/dist/plugins/prime/agents/qa.md +226 -0
- package/dist/plugins/prime/agents/setup.md +134 -0
- package/dist/plugins/prime/agents/sre.md +165 -0
- package/dist/plugins/prime/agents/stakeholder-reporter.md +94 -0
- package/dist/plugins/prime/agents/user-researcher.md +602 -0
- package/dist/plugins/prime/hooks/check-deliverable.sh +65 -0
- package/dist/plugins/prime/hooks/ensure-client-dir.sh +59 -0
- package/dist/plugins/prime/hooks/hooks.json +184 -0
- package/dist/plugins/prime/hooks/post-deploy-health.sh +83 -0
- package/dist/plugins/prime/hooks/post-diff-test-compare.sh +125 -0
- package/dist/plugins/prime/hooks/post-edit-lint.sh +92 -0
- package/dist/plugins/prime/hooks/post-git-state.sh +54 -0
- package/dist/plugins/prime/hooks/post-merge-cleanup.sh +101 -0
- package/dist/plugins/prime/hooks/post-test-summary.sh +115 -0
- package/dist/plugins/prime/hooks/pre-bash-guard.sh +142 -0
- package/dist/plugins/prime/hooks/pre-edit-guard.sh +121 -0
- package/dist/plugins/prime/hooks/pre-task-context.sh +113 -0
- package/dist/plugins/prime/hooks/session-bootstrap.sh +379 -0
- package/dist/plugins/prime/hooks/session-end.sh +107 -0
- package/dist/plugins/prime/hooks/session-summary.sh +97 -0
- package/dist/plugins/prime/hooks/sync-agents.sh +269 -0
- package/dist/plugins/prime/hooks/triage-router.sh +740 -0
- package/dist/plugins/prime/skills/arth/SKILL.md +165 -0
- package/dist/plugins/prime/skills/autopilot/SKILL.md +425 -0
- package/dist/plugins/prime/skills/calibrate/SKILL.md +1807 -0
- package/dist/plugins/prime/skills/ci-fix/SKILL.md +293 -0
- package/dist/plugins/prime/skills/client-discovery/SKILL.md +266 -0
- package/dist/plugins/prime/skills/consulting/SKILL.md +282 -0
- package/dist/plugins/prime/skills/custom-domain/SKILL.md +261 -0
- package/dist/plugins/prime/skills/deliverable-builder/SKILL.md +928 -0
- package/dist/plugins/prime/skills/discord-ops/SKILL.md +125 -0
- package/dist/plugins/prime/skills/engagement-tracker/SKILL.md +380 -0
- package/dist/plugins/prime/skills/explore.md +43 -0
- package/dist/plugins/prime/skills/fix/SKILL.md +1058 -0
- package/dist/plugins/prime/skills/implement/SKILL.md +532 -0
- package/dist/plugins/prime/skills/incident/SKILL.md +910 -0
- package/dist/plugins/prime/skills/issue/SKILL.md +134 -0
- package/dist/plugins/prime/skills/market-research/SKILL.md +300 -0
- package/dist/plugins/prime/skills/onboard/SKILL.md +344 -0
- package/dist/plugins/prime/skills/opportunity-map/SKILL.md +307 -0
- package/dist/plugins/prime/skills/pitch-generator/SKILL.md +378 -0
- package/dist/plugins/prime/skills/planning/SKILL.md +436 -0
- package/dist/plugins/prime/skills/pr/SKILL.md +275 -0
- package/dist/plugins/prime/skills/precheck/SKILL.md +159 -0
- package/dist/plugins/prime/skills/qa/SKILL.md +127 -0
- package/dist/plugins/prime/skills/qa-incident/SKILL.md +54 -0
- package/dist/plugins/prime/skills/qa-learn/SKILL.md +47 -0
- package/dist/plugins/prime/skills/restart/SKILL.md +70 -0
- package/dist/plugins/prime/skills/review-pr/SKILL.md +367 -0
- package/dist/plugins/prime/skills/roi-calculator/SKILL.md +469 -0
- package/dist/plugins/prime/skills/scan/SKILL.md +232 -0
- package/dist/plugins/prime/skills/setup/SKILL.md +691 -0
- package/dist/plugins/prime/skills/share/SKILL.md +211 -0
- package/dist/plugins/prime/skills/solution-architect/SKILL.md +566 -0
- package/dist/plugins/prime/skills/sre/SKILL.md +362 -0
- package/dist/plugins/prime/skills/sync/SKILL.md +188 -0
- package/dist/plugins/prime/skills/templates/SKILL.md +194 -0
- package/dist/plugins/prime/skills/welcome/SKILL.md +136 -0
- package/dist/plugins/prime/skills/wizard/SKILL.md +411 -0
- package/dist/plugins/prism/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/prism/agents/qa-baseline-updater.md +45 -0
- package/dist/plugins/prism/agents/qa-challenger.md +97 -0
- package/dist/plugins/prism/agents/qa-domain.md +145 -0
- package/dist/plugins/prism/agents/qa-e2e.md +184 -0
- package/dist/plugins/prism/agents/qa-test-promoter.md +97 -0
- package/dist/plugins/prism/agents/qa.md +226 -0
- package/dist/plugins/prism/hooks/hooks.json +26 -0
- package/dist/plugins/prism/hooks/post-diff-test-compare.sh +125 -0
- package/dist/plugins/prism/hooks/post-test-summary.sh +115 -0
- package/dist/plugins/prism/skills/qa/SKILL.md +127 -0
- package/dist/plugins/prism/skills/qa-incident/SKILL.md +54 -0
- package/dist/plugins/prism/skills/qa-learn/SKILL.md +47 -0
- package/dist/plugins/scalpel/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/scalpel/agents/code-reviewer.md +115 -0
- package/dist/plugins/scalpel/hooks/hooks.json +26 -0
- package/dist/plugins/scalpel/hooks/pre-edit-guard.sh +121 -0
- package/dist/plugins/scalpel/skills/ci-fix/SKILL.md +293 -0
- package/dist/plugins/scalpel/skills/fix/SKILL.md +1058 -0
- package/dist/plugins/scalpel/skills/issue/SKILL.md +134 -0
- package/dist/plugins/sentinel/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/sentinel/agents/ops.md +149 -0
- package/dist/plugins/sentinel/agents/sre.md +165 -0
- package/dist/plugins/sentinel/hooks/hooks.json +26 -0
- package/dist/plugins/sentinel/hooks/post-deploy-health.sh +83 -0
- package/dist/plugins/sentinel/hooks/post-git-state.sh +54 -0
- package/dist/plugins/sentinel/skills/incident/SKILL.md +910 -0
- package/dist/plugins/sentinel/skills/restart/SKILL.md +70 -0
- package/dist/plugins/sentinel/skills/sre/SKILL.md +362 -0
- package/dist/plugins/shield/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/shield/hooks/hooks.json +60 -0
- package/dist/plugins/shield/hooks/pre-bash-guard.sh +142 -0
- package/dist/plugins/shield/hooks/pre-edit-guard.sh +121 -0
- package/dist/plugins/shield/hooks/session-bootstrap.sh +379 -0
- package/dist/plugins/shield/hooks/triage-router.sh +740 -0
- package/dist/plugins/spark/.claude-plugin/plugin.json +6 -0
- package/dist/plugins/spark/agents/explore-light.md +52 -0
- package/dist/plugins/spark/agents/setup.md +134 -0
- package/dist/plugins/spark/hooks/hooks.json +16 -0
- package/dist/plugins/spark/hooks/session-bootstrap.sh +379 -0
- package/dist/plugins/spark/skills/calibrate/SKILL.md +1807 -0
- package/dist/plugins/spark/skills/onboard/SKILL.md +344 -0
- package/dist/plugins/spark/skills/scan/SKILL.md +232 -0
- package/dist/plugins/spark/skills/setup/SKILL.md +691 -0
- package/hook-defs.json +104 -0
- package/hooks/check-deliverable.sh +65 -0
- package/hooks/ensure-client-dir.sh +59 -0
- package/hooks/hooks.json +16 -0
- package/hooks/post-deploy-health.sh +83 -0
- package/hooks/post-diff-test-compare.sh +125 -0
- package/hooks/post-edit-lint.sh +92 -0
- package/hooks/post-git-state.sh +54 -0
- package/hooks/post-merge-cleanup.sh +101 -0
- package/hooks/post-test-summary.sh +115 -0
- package/hooks/pre-bash-guard.sh +142 -0
- package/hooks/pre-edit-guard.sh +121 -0
- package/hooks/pre-task-context.sh +113 -0
- package/hooks/session-bootstrap.sh +379 -0
- package/hooks/session-end.sh +107 -0
- package/hooks/session-start.sh +46 -0
- package/hooks/session-summary.sh +97 -0
- package/hooks/sync-agents.sh +269 -0
- package/hooks/triage-router.sh +740 -0
- package/install.sh +3185 -0
- package/package.json +40 -0
- package/portable.manifest +112 -0
- package/skills/arth/SKILL.md +165 -0
- package/skills/autopilot/SKILL.md +425 -0
- package/skills/calibrate/SKILL.md +1807 -0
- package/skills/ci-fix/SKILL.md +293 -0
- package/skills/client-discovery/SKILL.md +266 -0
- package/skills/consulting/SKILL.md +282 -0
- package/skills/continue/SKILL.md +174 -0
- package/skills/custom-domain/SKILL.md +261 -0
- package/skills/deliverable-builder/SKILL.md +928 -0
- package/skills/discord-ops/SKILL.md +125 -0
- package/skills/engagement-tracker/SKILL.md +380 -0
- package/skills/explore.md +43 -0
- package/skills/fix/SKILL.md +1058 -0
- package/skills/implement/SKILL.md +532 -0
- package/skills/incident/SKILL.md +910 -0
- package/skills/issue/SKILL.md +134 -0
- package/skills/market-research/SKILL.md +300 -0
- package/skills/onboard/SKILL.md +344 -0
- package/skills/opportunity-map/SKILL.md +307 -0
- package/skills/pitch-generator/SKILL.md +378 -0
- package/skills/planning/SKILL.md +436 -0
- package/skills/pr/SKILL.md +275 -0
- package/skills/precheck/SKILL.md +159 -0
- package/skills/qa/SKILL.md +127 -0
- package/skills/qa-incident/SKILL.md +54 -0
- package/skills/qa-learn/SKILL.md +47 -0
- package/skills/railway/central-station/SKILL.md +226 -0
- package/skills/railway/central-station/references/environment-config.md +183 -0
- package/skills/railway/central-station/references/monorepo.md +216 -0
- package/skills/railway/central-station/references/railpack.md +257 -0
- package/skills/railway/central-station/references/variables.md +170 -0
- package/skills/railway/database/SKILL.md +284 -0
- package/skills/railway/database/references/environment-config.md +183 -0
- package/skills/railway/database/references/monorepo.md +216 -0
- package/skills/railway/database/references/railpack.md +257 -0
- package/skills/railway/database/references/variables.md +170 -0
- package/skills/railway/database/scripts/railway-api.sh +41 -0
- package/skills/railway/deploy/SKILL.md +128 -0
- package/skills/railway/deploy/references/environment-config.md +183 -0
- package/skills/railway/deploy/references/monorepo.md +216 -0
- package/skills/railway/deploy/references/railpack.md +257 -0
- package/skills/railway/deploy/references/variables.md +170 -0
- package/skills/railway/deployment/SKILL.md +222 -0
- package/skills/railway/deployment/references/environment-config.md +183 -0
- package/skills/railway/deployment/references/monorepo.md +216 -0
- package/skills/railway/deployment/references/railpack.md +257 -0
- package/skills/railway/deployment/references/variables.md +170 -0
- package/skills/railway/domain/SKILL.md +137 -0
- package/skills/railway/domain/references/environment-config.md +183 -0
- package/skills/railway/domain/references/monorepo.md +216 -0
- package/skills/railway/domain/references/railpack.md +257 -0
- package/skills/railway/domain/references/variables.md +170 -0
- package/skills/railway/environment/SKILL.md +266 -0
- package/skills/railway/environment/references/environment-config.md +183 -0
- package/skills/railway/environment/references/monorepo.md +216 -0
- package/skills/railway/environment/references/railpack.md +257 -0
- package/skills/railway/environment/references/variables.md +170 -0
- package/skills/railway/metrics/SKILL.md +211 -0
- package/skills/railway/metrics/references/environment-config.md +183 -0
- package/skills/railway/metrics/references/monorepo.md +216 -0
- package/skills/railway/metrics/references/railpack.md +257 -0
- package/skills/railway/metrics/references/variables.md +170 -0
- package/skills/railway/metrics/scripts/railway-api.sh +41 -0
- package/skills/railway/new/SKILL.md +489 -0
- package/skills/railway/new/references/environment-config.md +183 -0
- package/skills/railway/new/references/monorepo.md +216 -0
- package/skills/railway/new/references/railpack.md +257 -0
- package/skills/railway/new/references/variables.md +170 -0
- package/skills/railway/projects/SKILL.md +142 -0
- package/skills/railway/projects/references/environment-config.md +183 -0
- package/skills/railway/projects/references/monorepo.md +216 -0
- package/skills/railway/projects/references/railpack.md +257 -0
- package/skills/railway/projects/references/variables.md +170 -0
- package/skills/railway/projects/scripts/railway-api.sh +41 -0
- package/skills/railway/railway-docs/SKILL.md +47 -0
- package/skills/railway/railway-docs/references/environment-config.md +183 -0
- package/skills/railway/railway-docs/references/monorepo.md +216 -0
- package/skills/railway/railway-docs/references/railpack.md +257 -0
- package/skills/railway/railway-docs/references/variables.md +170 -0
- package/skills/railway/service/SKILL.md +249 -0
- package/skills/railway/service/references/environment-config.md +183 -0
- package/skills/railway/service/references/monorepo.md +216 -0
- package/skills/railway/service/references/railpack.md +257 -0
- package/skills/railway/service/references/variables.md +170 -0
- package/skills/railway/service/scripts/railway-api.sh +41 -0
- package/skills/railway/status/SKILL.md +91 -0
- package/skills/railway/status/references/environment-config.md +183 -0
- package/skills/railway/status/references/monorepo.md +216 -0
- package/skills/railway/status/references/railpack.md +257 -0
- package/skills/railway/status/references/variables.md +170 -0
- package/skills/railway/templates/SKILL.md +275 -0
- package/skills/railway/templates/references/environment-config.md +183 -0
- package/skills/railway/templates/references/monorepo.md +216 -0
- package/skills/railway/templates/references/railpack.md +257 -0
- package/skills/railway/templates/references/variables.md +170 -0
- package/skills/railway/templates/scripts/railway-api.sh +41 -0
- package/skills/restart/SKILL.md +70 -0
- package/skills/review-pr/SKILL.md +367 -0
- package/skills/roi-calculator/SKILL.md +469 -0
- package/skills/scan/SKILL.md +232 -0
- package/skills/setup/SKILL.md +691 -0
- package/skills/share/SKILL.md +211 -0
- package/skills/solution-architect/SKILL.md +566 -0
- package/skills/sre/SKILL.md +362 -0
- package/skills/superpowers/brainstorming/SKILL.md +96 -0
- package/skills/superpowers/dispatching-parallel-agents/SKILL.md +180 -0
- package/skills/superpowers/executing-plans/SKILL.md +84 -0
- package/skills/superpowers/finishing-a-development-branch/SKILL.md +200 -0
- package/skills/superpowers/receiving-code-review/SKILL.md +213 -0
- package/skills/superpowers/requesting-code-review/SKILL.md +105 -0
- package/skills/superpowers/requesting-code-review/code-reviewer.md +146 -0
- package/skills/superpowers/subagent-driven-development/SKILL.md +242 -0
- package/skills/superpowers/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
- package/skills/superpowers/subagent-driven-development/implementer-prompt.md +78 -0
- package/skills/superpowers/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/superpowers/systematic-debugging/SKILL.md +296 -0
- package/skills/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/superpowers/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/superpowers/systematic-debugging/find-polluter.sh +63 -0
- package/skills/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/superpowers/systematic-debugging/test-academic.md +14 -0
- package/skills/superpowers/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/superpowers/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/superpowers/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/superpowers/test-driven-development/SKILL.md +371 -0
- package/skills/superpowers/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/superpowers/using-git-worktrees/SKILL.md +218 -0
- package/skills/superpowers/using-superpowers/SKILL.md +95 -0
- package/skills/superpowers/verification-before-completion/SKILL.md +139 -0
- package/skills/superpowers/writing-plans/SKILL.md +116 -0
- package/skills/superpowers/writing-skills/SKILL.md +655 -0
- package/skills/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/superpowers/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/superpowers/writing-skills/persuasion-principles.md +187 -0
- package/skills/superpowers/writing-skills/render-graphs.js +168 -0
- package/skills/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
- package/skills/sync/SKILL.md +188 -0
- package/skills/templates/SKILL.md +194 -0
- package/skills/welcome/SKILL.md +136 -0
- package/skills/wizard/SKILL.md +411 -0
- package/templates/CLAUDE.md.managed-block +123 -0
- package/templates/CLAUDE.md.template +111 -0
- package/templates/consulting/engagement-tracker-template.md +181 -0
- package/templates/consulting/executive-summary-template.md +83 -0
- package/templates/consulting/maturity-assessment-template.md +182 -0
- package/templates/consulting/proposal-template.md +209 -0
- package/templates/consulting/roi-model-template.md +139 -0
- package/templates/consulting/solution-architecture-template.md +313 -0
- package/templates/settings.json +130 -0
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sre
|
|
3
|
+
description: "Run SRE operations. Usage: /sre [command]. Commands: status, health, logs, deploy-check, ci, sleep, wake, debug, rebuild, dialog"
|
|
4
|
+
user-invocable: true
|
|
5
|
+
arguments: "<command> <options>"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# SRE Skill
|
|
9
|
+
|
|
10
|
+
Wraps the SRE agent for infrastructure operations. Reads project context from CLAUDE.md to route to the right tools.
|
|
11
|
+
|
|
12
|
+
## Project Context Discovery (Deep)
|
|
13
|
+
|
|
14
|
+
Before ANY operation, discover the full infrastructure landscape. This runs on every /sre invocation
|
|
15
|
+
to ensure context is current.
|
|
16
|
+
|
|
17
|
+
### Step 1: Read existing context
|
|
18
|
+
|
|
19
|
+
Read in this order (skip gracefully if missing):
|
|
20
|
+
1. `CLAUDE.md` — Infrastructure table, services, health endpoints
|
|
21
|
+
2. `.claude/project-profile.md` — Architecture, deploy platform (from /calibrate)
|
|
22
|
+
3. `.claude/knowledge/agents/sre.md` — Past incidents, platform patterns learned
|
|
23
|
+
4. `.claude/knowledge/shared/decisions.md` — Infrastructure decisions made
|
|
24
|
+
5. `.claude/qa-knowledge/incidents/` — Past production incidents
|
|
25
|
+
|
|
26
|
+
### Step 2: Detect deploy platform (if not in profile)
|
|
27
|
+
|
|
28
|
+
Scan project files to identify the FULL infrastructure stack:
|
|
29
|
+
|
|
30
|
+
**Cloud Provider Detection:**
|
|
31
|
+
| Signal | Provider | What to check |
|
|
32
|
+
|--------|----------|--------------|
|
|
33
|
+
| `AWS_*` env vars, `~/.aws/`, `samconfig.toml`, `cdk.json` | AWS | Regions, services, IAM roles |
|
|
34
|
+
| `GOOGLE_*` env vars, `app.yaml`, `cloudbuild.yaml` | GCP | Projects, regions, services |
|
|
35
|
+
| `AZURE_*` env vars, `azure-pipelines.yml` | Azure | Subscriptions, resource groups |
|
|
36
|
+
|
|
37
|
+
**Platform Detection:**
|
|
38
|
+
| Signal | Platform | CLI | MCP Available |
|
|
39
|
+
|--------|----------|-----|--------------|
|
|
40
|
+
| `railway.json`, `railway.toml`, `Procfile` | Railway | `railway` | Railway MCP |
|
|
41
|
+
| `vercel.json`, `.vercel/` | Vercel | `vercel` | Vercel MCP |
|
|
42
|
+
| `fly.toml` | Fly.io | `flyctl` | — |
|
|
43
|
+
| `render.yaml` | Render | `render` | — |
|
|
44
|
+
| `heroku.yml`, `Procfile` + Heroku remote | Heroku | `heroku` | — |
|
|
45
|
+
| `netlify.toml` | Netlify | `netlify` | — |
|
|
46
|
+
| `terraform/`, `*.tf` | Terraform (IaC) | `terraform` | AWS/GCP MCP |
|
|
47
|
+
| `pulumi/`, `Pulumi.yaml` | Pulumi (IaC) | `pulumi` | AWS/GCP MCP |
|
|
48
|
+
| `cdk/`, `cdk.json` | AWS CDK | `cdk` | AWS MCP |
|
|
49
|
+
| `k8s/`, `helm/`, `Chart.yaml`, `kustomize/` | Kubernetes | `kubectl`, `helm` | K8s MCP |
|
|
50
|
+
| `docker-compose.yml` + no platform | Docker only | `docker` | Docker MCP |
|
|
51
|
+
| `serverless.yml` | Serverless Framework | `sls` | AWS/GCP MCP |
|
|
52
|
+
| `firebase.json` | Firebase | `firebase` | Firebase MCP |
|
|
53
|
+
| `supabase/config.toml` | Supabase | `supabase` | Supabase MCP |
|
|
54
|
+
|
|
55
|
+
**Database Detection:**
|
|
56
|
+
| Signal | Database | Monitoring |
|
|
57
|
+
|--------|----------|-----------|
|
|
58
|
+
| `DATABASE_URL` contains `postgres` | PostgreSQL | pg_stat, connection pool health |
|
|
59
|
+
| `DATABASE_URL` contains `mysql` | MySQL | slow query log, connection health |
|
|
60
|
+
| `MONGODB_URI` | MongoDB | mongosh status, replica set health |
|
|
61
|
+
| `REDIS_URL` | Redis | `redis-cli info`, memory, connections |
|
|
62
|
+
| `ELASTICSEARCH_URL` | Elasticsearch | cluster health, index status |
|
|
63
|
+
|
|
64
|
+
**Monitoring/Observability Detection:**
|
|
65
|
+
| Signal | Tool | What it provides |
|
|
66
|
+
|--------|------|-----------------|
|
|
67
|
+
| `SENTRY_DSN` or `@sentry/` import | Sentry | Error tracking, performance |
|
|
68
|
+
| `DATADOG_*` env vars | Datadog | APM, logs, metrics |
|
|
69
|
+
| `NEW_RELIC_*` env vars | New Relic | APM, infrastructure |
|
|
70
|
+
| `GRAFANA_*` or `grafana/` | Grafana | Dashboards, alerting |
|
|
71
|
+
| `PROMETHEUS_*` or `prometheus/` | Prometheus | Metrics collection |
|
|
72
|
+
| `PAGERDUTY_*` env vars | PagerDuty | Incident management |
|
|
73
|
+
| `OPSGENIE_*` env vars | OpsGenie | Alert routing |
|
|
74
|
+
|
|
75
|
+
**CI/CD Detection (used by /ci-fix but discovered here for completeness):**
|
|
76
|
+
| Signal | CI Platform | CLI |
|
|
77
|
+
|--------|------------|-----|
|
|
78
|
+
| `.github/workflows/` | GitHub Actions | `gh run` |
|
|
79
|
+
| `.gitlab-ci.yml` | GitLab CI | `glab ci` |
|
|
80
|
+
| `Jenkinsfile` | Jenkins | Jenkins API |
|
|
81
|
+
| `.circleci/config.yml` | CircleCI | `circleci` CLI |
|
|
82
|
+
| `bitbucket-pipelines.yml` | Bitbucket Pipelines | Bitbucket API |
|
|
83
|
+
| `.buildkite/` | Buildkite | `buildkite-agent` |
|
|
84
|
+
| `azure-pipelines.yml` | Azure DevOps | `az pipelines` |
|
|
85
|
+
| `.travis.yml` | Travis CI | Travis API |
|
|
86
|
+
|
|
87
|
+
### Step 3: Recommend missing tools
|
|
88
|
+
|
|
89
|
+
Based on what was detected, recommend tools the project SHOULD have:
|
|
90
|
+
|
|
91
|
+
**Format:**
|
|
92
|
+
```
|
|
93
|
+
SRE Recommendations for {project}:
|
|
94
|
+
|
|
95
|
+
Platform: {detected platform}
|
|
96
|
+
Database: {detected databases}
|
|
97
|
+
Monitoring: {detected or MISSING}
|
|
98
|
+
CI/CD: {detected CI platform}
|
|
99
|
+
|
|
100
|
+
Missing (recommended):
|
|
101
|
+
⚠ No monitoring detected — recommend Sentry (free tier, 5K errors/mo)
|
|
102
|
+
Install: pip install sentry-sdk / npm install @sentry/node
|
|
103
|
+
⚠ No Redis health monitoring — recommend redis-cli in health checks
|
|
104
|
+
⚠ No MCP server for {platform} — would enable direct platform queries
|
|
105
|
+
/calibrate can install this automatically
|
|
106
|
+
|
|
107
|
+
Data sources to connect:
|
|
108
|
+
• {platform} logs → available via {CLI/MCP}
|
|
109
|
+
• {database} metrics → available via {query/MCP}
|
|
110
|
+
• {monitoring tool} alerts → available via {API/MCP}
|
|
111
|
+
• Health endpoints: {list from CLAUDE.md or recommend adding}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Step 4: Write discoveries to knowledge base
|
|
115
|
+
|
|
116
|
+
After discovery, update these files (if `.claude/knowledge/` exists):
|
|
117
|
+
- Append to `knowledge/agents/sre.md`: platform detected, services found, health endpoints
|
|
118
|
+
- If first time: create the file with initial platform context
|
|
119
|
+
|
|
120
|
+
## Argument Parsing
|
|
121
|
+
|
|
122
|
+
Parse from the argument string:
|
|
123
|
+
- `command`: Optional. One of: `status`, `health`, `logs`, `deploy-check`, `ci`, `sleep`, `wake`, `debug`, `rebuild`, `dialog`. Defaults to `status` if omitted.
|
|
124
|
+
- Options vary by command (see below).
|
|
125
|
+
|
|
126
|
+
## Commands
|
|
127
|
+
|
|
128
|
+
### `/sre` or `/sre status`
|
|
129
|
+
Full system status — all services, all environments.
|
|
130
|
+
|
|
131
|
+
Spawn SRE agent:
|
|
132
|
+
```
|
|
133
|
+
subagent_type: "sre"
|
|
134
|
+
model: "sonnet"
|
|
135
|
+
prompt: "Run a full status check. Read CLAUDE.md ## Environments table. For each environment, check status using the appropriate method from the Access Methods table in project-profile.md.
|
|
136
|
+
1. Check deployment platform service status (Railway MCP, Vercel CLI, etc.)
|
|
137
|
+
2. Hit all health endpoints listed in CLAUDE.md
|
|
138
|
+
3. Check latest GitHub Actions: gh run list --branch main --limit 3
|
|
139
|
+
Report a structured pass/fail table."
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### `/sre health`
|
|
143
|
+
Quick health check — just hit endpoints.
|
|
144
|
+
|
|
145
|
+
Spawn SRE agent:
|
|
146
|
+
```
|
|
147
|
+
subagent_type: "sre"
|
|
148
|
+
model: "sonnet"
|
|
149
|
+
prompt: "Quick health check. Read CLAUDE.md ## Environments table. Hit the health endpoint for every listed environment (URL + Health column). Report pass/fail per environment. Skip environments with <!-- TODO --> URLs."
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### `/sre logs [service]`
|
|
153
|
+
View recent deploy logs. Default service: first service in Infrastructure table.
|
|
154
|
+
|
|
155
|
+
Spawn SRE agent:
|
|
156
|
+
```
|
|
157
|
+
subagent_type: "sre"
|
|
158
|
+
model: "sonnet"
|
|
159
|
+
prompt: "Get recent deploy logs for '{service or default}'. Read CLAUDE.md for infrastructure details. Use platform-appropriate tools (Railway MCP, Vercel CLI, etc.). Filter for errors and summarize issues found."
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### `/sre deploy-check`
|
|
163
|
+
Verify latest deployment succeeded end-to-end.
|
|
164
|
+
|
|
165
|
+
Spawn SRE agent:
|
|
166
|
+
```
|
|
167
|
+
subagent_type: "sre"
|
|
168
|
+
model: "sonnet"
|
|
169
|
+
prompt: "Full deployment verification. Read CLAUDE.md for infrastructure.
|
|
170
|
+
1. Check recent CI runs: gh run list --branch main --limit 5
|
|
171
|
+
2. Check deployment platform for latest deploys
|
|
172
|
+
3. Hit all health endpoints
|
|
173
|
+
4. Compare migration state if applicable
|
|
174
|
+
Report structured pass/fail for each step."
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### `/sre ci`
|
|
178
|
+
Check CI/CD pipeline status and diagnose failures.
|
|
179
|
+
|
|
180
|
+
Spawn SRE agent:
|
|
181
|
+
```
|
|
182
|
+
subagent_type: "sre"
|
|
183
|
+
model: "sonnet"
|
|
184
|
+
prompt: "Check CI/CD status:
|
|
185
|
+
1. gh run list --branch main --limit 5
|
|
186
|
+
2. If any failed: gh run view <id> --log-failed
|
|
187
|
+
3. Report which workflows passed/failed, failure details, suggested fixes."
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### `/sre sleep`
|
|
191
|
+
Sleep staging to save costs (platform-specific).
|
|
192
|
+
|
|
193
|
+
Spawn SRE agent:
|
|
194
|
+
```
|
|
195
|
+
subagent_type: "sre"
|
|
196
|
+
model: "sonnet"
|
|
197
|
+
prompt: "Sleep the specified environment (default: first staging-type environment from CLAUDE.md ## Environments table). Read CLAUDE.md for environment details. Use platform-appropriate commands. Verify services scaled to 0. Report estimated savings."
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### `/sre wake`
|
|
201
|
+
Wake staging environment.
|
|
202
|
+
|
|
203
|
+
Spawn SRE agent:
|
|
204
|
+
```
|
|
205
|
+
subagent_type: "sre"
|
|
206
|
+
model: "sonnet"
|
|
207
|
+
prompt: "Wake the specified environment (default: first staging-type environment from CLAUDE.md ## Environments table). Read CLAUDE.md for environment details. Use platform-appropriate commands. Wait for health checks to pass. Report status."
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### `/sre debug [description]`
|
|
211
|
+
Systematic debugging of a production issue.
|
|
212
|
+
|
|
213
|
+
Spawn SRE agent:
|
|
214
|
+
```
|
|
215
|
+
subagent_type: "sre"
|
|
216
|
+
model: "sonnet"
|
|
217
|
+
prompt: "Debug this issue: '{description}'. Read CLAUDE.md for infrastructure.
|
|
218
|
+
Read CLAUDE.md ## Environments table. For each environment, check status using the appropriate
|
|
219
|
+
method from the Access Methods table in project-profile.md.
|
|
220
|
+
|
|
221
|
+
Systematic approach:
|
|
222
|
+
1. CONFIRM — check health endpoints + metrics for all environments in the Environments table
|
|
223
|
+
2. SCOPE — which service(s) and environment(s) affected?
|
|
224
|
+
3. DIAGNOSE — RED method (Rate/Errors/Duration) for API, USE method (Utilization/Saturation/Errors) for infra
|
|
225
|
+
4. Check deployment logs for errors
|
|
226
|
+
5. Check GitHub Actions for recent failures
|
|
227
|
+
6. ROOT CAUSE — what specifically caused the issue?
|
|
228
|
+
7. CLASSIFY FIX TYPE — determine if this is:
|
|
229
|
+
a. Infra-only fix (restart, config change, scale, DNS) → fix directly, verify health
|
|
230
|
+
b. Code bug → escalate to /fix (do NOT fix code directly — /fix has verification pipeline)
|
|
231
|
+
8. IF INFRA FIX:
|
|
232
|
+
- Apply the fix (restart, config change, etc.)
|
|
233
|
+
- Verify health endpoints for affected environments
|
|
234
|
+
- Ask user to smoke-test if config was changed
|
|
235
|
+
- Write incident report
|
|
236
|
+
9. IF CODE BUG:
|
|
237
|
+
- Document findings (root cause, affected files, evidence)
|
|
238
|
+
- Escalate to /fix with all context — /fix will handle QA, testing, and PR
|
|
239
|
+
- Do NOT write code or create PRs from /sre debug
|
|
240
|
+
|
|
241
|
+
After root cause is identified, also write a QA incident file at
|
|
242
|
+
.claude/qa-knowledge/incidents/{YYYY-MM-DD}-{slug}.md with root cause, how QA missed it, and regression test recommendation."
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**Post-debug handoff:**
|
|
246
|
+
|
|
247
|
+
After `/sre debug` completes:
|
|
248
|
+
|
|
249
|
+
| Fix type | What happens next |
|
|
250
|
+
|----------|------------------|
|
|
251
|
+
| Infra fix applied | Verify health → ask user to smoke-test → "What's next?" |
|
|
252
|
+
| Code bug identified | Route to `/fix {description} --severity {severity}` with all gathered evidence. `/fix` handles: root cause verification → scope lock → behavior contract → implement → QA → user test → PR |
|
|
253
|
+
| Inconclusive | Present findings → ask user: "Should I investigate further, or route to /fix?" |
|
|
254
|
+
|
|
255
|
+
**What's next (after infra fix):**
|
|
256
|
+
```
|
|
257
|
+
Fix applied and verified. Environments healthy.
|
|
258
|
+
|
|
259
|
+
What's next?
|
|
260
|
+
[1] Monitor — /sre health in 5 min to confirm fix holds
|
|
261
|
+
[2] Investigate further — check related systems
|
|
262
|
+
[3] See project status — /onboard
|
|
263
|
+
[4] Done for now
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### `/sre dialog`
|
|
267
|
+
Analyze the latest local agent interview dialog. Checks verbosity, Q-tag leaks, NOTES leaks, and TTS filter activity.
|
|
268
|
+
|
|
269
|
+
**Do NOT spawn an agent.** Run directly:
|
|
270
|
+
|
|
271
|
+
1. Read `/tmp/agent.log`
|
|
272
|
+
2. Extract all `Agent said:` lines (deduplicate — each appears twice in logs)
|
|
273
|
+
3. Report:
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
## Interview Dialog Analysis
|
|
277
|
+
|
|
278
|
+
| # | Turn | Response (truncated) | Words | Chars |
|
|
279
|
+
|---|------|---------------------|-------|-------|
|
|
280
|
+
| 1 | Intro | "Hi! I'm Sarah..." | 37 | 186 |
|
|
281
|
+
| 2 | Reaction | "Great answer!..." | 12 | 58 |
|
|
282
|
+
...
|
|
283
|
+
|
|
284
|
+
**Verbosity**: avg X words/turn (target: <40, Feb 8 baseline: 15-20)
|
|
285
|
+
**Q-tag leaks**: [Q1]-[Q5] found in raw output? YES/NO
|
|
286
|
+
**NOTES leaks**: [NOTES] blocks in raw output? YES/NO
|
|
287
|
+
**TTS filter**: [TTS-FILTER] log entries found? (shows filter activity)
|
|
288
|
+
**Truncation**: Any responses cut off mid-sentence? (sign of token limit)
|
|
289
|
+
**max_completion_tokens**: Read from agent/main.py line with max_completion_tokens
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
4. If verbosity avg > 40 words, recommend lowering `max_completion_tokens`
|
|
293
|
+
5. If Q-tag leaks found, check if `[TTS-FILTER]` logs show they were stripped before TTS
|
|
294
|
+
|
|
295
|
+
### `/sre rebuild`
|
|
296
|
+
Clean rebuild of a monorepo — nuke caches, rebuild all packages, restart services.
|
|
297
|
+
|
|
298
|
+
This is the nuclear option when turbo/next/tsc caching causes stale builds, phantom errors, or "works locally but not in dev server" issues.
|
|
299
|
+
|
|
300
|
+
Steps to execute directly (do NOT spawn an agent — run these yourself):
|
|
301
|
+
|
|
302
|
+
1. **Read CLAUDE.md** for project root, build commands, and Local Dev Services table.
|
|
303
|
+
|
|
304
|
+
2. **Stop running services** using the stop/kill commands from CLAUDE.md:
|
|
305
|
+
```bash
|
|
306
|
+
# Read Local Dev Services table for ports and kill running processes
|
|
307
|
+
lsof -ti:<port> | xargs kill -9 2>/dev/null
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
3. **Nuke all caches**:
|
|
311
|
+
```bash
|
|
312
|
+
cd <project-root> && rm -rf node_modules/.cache .next .turbo packages/*/dist packages/*/.next packages/*/.turbo
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
4. **Rebuild from scratch** using the project's build command from CLAUDE.md:
|
|
316
|
+
```bash
|
|
317
|
+
cd <project-root> && <build-command>
|
|
318
|
+
```
|
|
319
|
+
For monorepos, if the top-level build fails, try building packages individually in dependency order (read `pnpm-workspace.yaml` or `package.json` workspaces to determine order).
|
|
320
|
+
|
|
321
|
+
5. **Restart services** using start commands from CLAUDE.md Local Dev Services table.
|
|
322
|
+
|
|
323
|
+
6. **Verify**:
|
|
324
|
+
- Hit health endpoints from CLAUDE.md (or the ports listed in Local Dev Services table)
|
|
325
|
+
- Check no build errors in output
|
|
326
|
+
|
|
327
|
+
Report success/failure with before/after comparison (which packages rebuilt, any errors).
|
|
328
|
+
|
|
329
|
+
## Knowledge Base Integration
|
|
330
|
+
|
|
331
|
+
### On every /sre invocation:
|
|
332
|
+
1. **Read** `.claude/knowledge/agents/sre.md` for past incidents and patterns
|
|
333
|
+
2. **Read** `.claude/qa-knowledge/incidents/` for production issues in this area
|
|
334
|
+
|
|
335
|
+
### After /sre debug:
|
|
336
|
+
1. **Write** incident to `.claude/qa-knowledge/incidents/{date}-{slug}.md`
|
|
337
|
+
2. **Append** to `.claude/knowledge/agents/sre.md`:
|
|
338
|
+
```
|
|
339
|
+
### {date} — {incident title}
|
|
340
|
+
**Platform**: {platform}
|
|
341
|
+
**Root cause**: {what happened}
|
|
342
|
+
**Fix**: {what was done}
|
|
343
|
+
**Prevention**: {how to avoid next time}
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### After first discovery on a project:
|
|
347
|
+
1. **Write** platform summary to `knowledge/agents/sre.md`
|
|
348
|
+
2. **Update** `project-profile.md` if infrastructure section is incomplete
|
|
349
|
+
3. **Recommend** MCP servers to /calibrate's recommendations
|
|
350
|
+
|
|
351
|
+
## /calibrate Integration
|
|
352
|
+
|
|
353
|
+
When `/calibrate` runs, it reads all agent definitions to build recommendations.
|
|
354
|
+
The SRE skill contributes:
|
|
355
|
+
|
|
356
|
+
1. **Platform detection results** → /calibrate uses for MCP server recommendations
|
|
357
|
+
2. **Missing monitoring tools** → /calibrate includes in "recommended tools"
|
|
358
|
+
3. **Health endpoint inventory** → /calibrate writes to project profile
|
|
359
|
+
4. **CI/CD platform** → /calibrate uses for ci-fix configuration
|
|
360
|
+
|
|
361
|
+
If `/calibrate` has already run, /sre reads `project-profile.md` instead of re-discovering.
|
|
362
|
+
If `/calibrate` hasn't run, /sre does its own discovery and recommends running `/calibrate`.
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync
|
|
3
|
+
description: "Sync claude-agents tooling. Usage: /sync (pull latest), /sync status, /sync push <path> (contribute back)"
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /sync — Claude Agents Sync
|
|
8
|
+
|
|
9
|
+
Manage the shared claude-agents tooling between your project and the central repo.
|
|
10
|
+
|
|
11
|
+
## Commands
|
|
12
|
+
|
|
13
|
+
### `/sync` (no args) — Pull & re-sync
|
|
14
|
+
|
|
15
|
+
Pull the latest from `~/.claude-agents/` and re-sync symlinks into the current project.
|
|
16
|
+
|
|
17
|
+
Steps:
|
|
18
|
+
1. `cd ~/.claude-agents && git pull --ff-only`
|
|
19
|
+
2. Run `~/.claude-agents/install.sh` on the current project directory
|
|
20
|
+
3. Report what was created, updated, or skipped
|
|
21
|
+
|
|
22
|
+
### `/sync status` — Show status
|
|
23
|
+
|
|
24
|
+
Run `~/.claude-agents/install.sh --status` on the current project directory.
|
|
25
|
+
Report which files are symlinked, overridden, or missing.
|
|
26
|
+
|
|
27
|
+
### `/sync push <target>` — Contribute back
|
|
28
|
+
|
|
29
|
+
Push a modified agent, skill, or hook from the current project back to `~/.claude-agents/`.
|
|
30
|
+
|
|
31
|
+
The `<target>` can be:
|
|
32
|
+
- A name: `/sync push pr`, `/sync push onboard`, `/sync push ops`
|
|
33
|
+
- A path: `/sync push skills/pr/SKILL.md`, `/sync push agents/ops.md`
|
|
34
|
+
- Omitted: `/sync push` — auto-detect what changed (see step 1)
|
|
35
|
+
|
|
36
|
+
#### Step 1: Resolve the target to a file path
|
|
37
|
+
|
|
38
|
+
| Target | How to resolve |
|
|
39
|
+
|--------|---------------|
|
|
40
|
+
| No target given | Run `git diff --name-only HEAD` in the project repo. Filter for `.claude/agents/`, `.claude/skills/`, `.claude/hooks/`. If multiple, ask user which one. |
|
|
41
|
+
| A name (e.g., `pr`) | Search for it: `.claude/skills/<name>/SKILL.md`, `.claude/agents/<name>.md`, `.claude/hooks/<name>.sh` — use the first that exists as a regular file (not symlink). |
|
|
42
|
+
| A path (e.g., `skills/pr/SKILL.md`) | Prepend `.claude/` if needed → `.claude/skills/pr/SKILL.md` |
|
|
43
|
+
|
|
44
|
+
The resolved path must be a **regular file** (not a symlink). If it's a symlink pointing to `~/.claude-agents/`, tell the user: "This file is managed by claude-agents. Edit it directly at `~/.claude-agents/<path>` instead."
|
|
45
|
+
|
|
46
|
+
#### Step 2: Determine the item type and destination
|
|
47
|
+
|
|
48
|
+
| Source path pattern | Type | Destination in claude-agents |
|
|
49
|
+
|--------------------|------|------------------------------|
|
|
50
|
+
| `.claude/agents/<name>.md` | agent | `agents/<name>.md` |
|
|
51
|
+
| `.claude/skills/<name>/SKILL.md` | skill | `skills/<name>/SKILL.md` |
|
|
52
|
+
| `.claude/skills/<name>/` (directory) | skill-dir | `skills/<name>/` |
|
|
53
|
+
| `.claude/hooks/<name>.sh` | hook | `hooks/<name>.sh` |
|
|
54
|
+
|
|
55
|
+
#### Step 3: Check for project-specific content
|
|
56
|
+
|
|
57
|
+
Read the file. Warn if it contains hardcoded paths (`/Users/`, `~/prepme`), project-specific env vars, service names, or URLs. Ask user to clean up or proceed.
|
|
58
|
+
|
|
59
|
+
#### Step 4: Copy and commit
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Determine branch name
|
|
63
|
+
# If destination exists in claude-agents → update/<name>
|
|
64
|
+
# If new → add/<name>
|
|
65
|
+
BRANCH="update/<name>" # or add/<name>
|
|
66
|
+
|
|
67
|
+
cd ~/.claude-agents
|
|
68
|
+
git checkout -b "$BRANCH"
|
|
69
|
+
|
|
70
|
+
# Copy from project to toolkit
|
|
71
|
+
cp <source> <destination> # single file
|
|
72
|
+
cp -r <source-dir> <destination-dir> # directory
|
|
73
|
+
|
|
74
|
+
# If new item, add to manifest
|
|
75
|
+
grep -q "<relative-path>" portable.manifest || echo "<type> <relative-path>" >> portable.manifest
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
#### Step 4b: Register new hooks in install.sh (HOOKS ONLY)
|
|
79
|
+
|
|
80
|
+
**If the item type is `hook` AND it is a NEW hook** (not already in install.sh), you MUST register it in `install.sh`. Skipping this will cause the `15-manifest-coverage` CI test to fail.
|
|
81
|
+
|
|
82
|
+
**4b.1: Detect hook metadata from the script**
|
|
83
|
+
|
|
84
|
+
Read the first 10 lines of the hook script. Look for a comment declaring the hook type:
|
|
85
|
+
- `# SessionEnd hook` → event: `SessionEnd`, matcher: `""`
|
|
86
|
+
- `# SessionStart hook` → event: `SessionStart`, matcher: `""`
|
|
87
|
+
- `# UserPromptSubmit hook` → event: `UserPromptSubmit`, matcher: `""`
|
|
88
|
+
- `# PreToolUse hook (Bash)` → event: `PreToolUse`, matcher: `"Bash"`
|
|
89
|
+
- `# PreToolUse hook (Edit)` → event: `PreToolUse`, matcher: `"Edit"`
|
|
90
|
+
- `# PostToolUse hook (Bash)` → event: `PostToolUse`, matcher: `"Bash"`
|
|
91
|
+
- Pattern: `# <Event> hook` or `# <Event> hook (<Matcher>)`
|
|
92
|
+
|
|
93
|
+
If no event comment is found, the hook is a **helper script** (called by other hooks, not by Claude Code directly). Helper scripts only need steps 4b.2 and 4b.3 — skip 4b.4, 4b.5, and 4b.6.
|
|
94
|
+
|
|
95
|
+
**4b.2: Determine the category**
|
|
96
|
+
|
|
97
|
+
Ask the user which category. Common mappings:
|
|
98
|
+
- `hooks` — routing, delegation, worktree sync (e.g., triage-router, sync-worktree, session-end)
|
|
99
|
+
- `guardrails` — safety guards, linting, bootstrap (e.g., pre-bash-guard, post-edit-lint, session-bootstrap)
|
|
100
|
+
- `core` — sync infrastructure (e.g., sync-agents)
|
|
101
|
+
- `railway` — Railway-specific (e.g., sync-railway-worktree)
|
|
102
|
+
|
|
103
|
+
**4b.3: Edit `get_category_items()` in install.sh**
|
|
104
|
+
|
|
105
|
+
Find the case branch for the chosen category and append `hooks/<name>.sh` to the echo string.
|
|
106
|
+
|
|
107
|
+
Example — adding `session-end.sh` to the `hooks` category:
|
|
108
|
+
```
|
|
109
|
+
# Before:
|
|
110
|
+
hooks)
|
|
111
|
+
echo "hooks/triage-router.sh hooks/sync-worktree.sh"
|
|
112
|
+
;;
|
|
113
|
+
|
|
114
|
+
# After:
|
|
115
|
+
hooks)
|
|
116
|
+
echo "hooks/triage-router.sh hooks/sync-worktree.sh hooks/session-end.sh"
|
|
117
|
+
;;
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Also update `get_category_label()` to increment the count, and `get_category_desc()` to mention the new hook.
|
|
121
|
+
|
|
122
|
+
**4b.4: Edit `get_category_hooks()` in install.sh** (settings.json hooks only)
|
|
123
|
+
|
|
124
|
+
Add the hook name (without `hooks/` prefix and `.sh` suffix) to the category's echo string.
|
|
125
|
+
|
|
126
|
+
Example:
|
|
127
|
+
```
|
|
128
|
+
# Before:
|
|
129
|
+
hooks) echo "triage-router" ;;
|
|
130
|
+
|
|
131
|
+
# After:
|
|
132
|
+
hooks) echo "triage-router session-end" ;;
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**4b.5: Add to `HOOK_DEFS` in install.sh**
|
|
136
|
+
|
|
137
|
+
Find the `HOOK_DEFS = {` Python dict (inside the `merge_settings_hooks` heredoc) and add a new entry before the closing `}`. Use `$CLAUDE_PROJECT_DIR/.claude/hooks/<name>.sh` as the command path. Set timeout to 15 for session hooks, 5 for tool hooks.
|
|
138
|
+
|
|
139
|
+
Example entry:
|
|
140
|
+
```python
|
|
141
|
+
"session-end": {
|
|
142
|
+
"event": "SessionEnd",
|
|
143
|
+
"entry": {
|
|
144
|
+
"matcher": "",
|
|
145
|
+
"hooks": [{
|
|
146
|
+
"type": "command",
|
|
147
|
+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/session-end.sh",
|
|
148
|
+
"timeout": 15
|
|
149
|
+
}]
|
|
150
|
+
},
|
|
151
|
+
"fingerprint": "session-end.sh"
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**4b.6: Add to uninstall fallback list**
|
|
156
|
+
|
|
157
|
+
Find the `hooks_to_remove=` fallback string in `handle_uninstall()` and add the hook name.
|
|
158
|
+
|
|
159
|
+
#### Step 4c: Commit and push
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
git add <destination> portable.manifest install.sh
|
|
163
|
+
git commit -m "feat: add <name> hook with install.sh registration"
|
|
164
|
+
git push -u origin "$BRANCH"
|
|
165
|
+
gh pr create --title "Add <name> hook" --body "Contributed from <project> repo"
|
|
166
|
+
|
|
167
|
+
# Return to previous branch
|
|
168
|
+
git checkout -
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
#### Step 5: Report the PR URL
|
|
172
|
+
|
|
173
|
+
### `/sync setup` — Re-run interactive setup
|
|
174
|
+
|
|
175
|
+
Re-run the interactive category selection menu for the current project.
|
|
176
|
+
|
|
177
|
+
Steps:
|
|
178
|
+
1. Run `~/.claude-agents/install.sh --setup` on the current project directory
|
|
179
|
+
2. The menu will show with current selections pre-populated
|
|
180
|
+
3. User can add or remove categories
|
|
181
|
+
4. Report what changed
|
|
182
|
+
|
|
183
|
+
## Important Rules
|
|
184
|
+
|
|
185
|
+
- **Never push directly to main** in claude-agents — always branch + PR
|
|
186
|
+
- **Always check for project-specific content** before contributing
|
|
187
|
+
- **After PR merges**, the file will auto-sync to all projects on next session start
|
|
188
|
+
- The original file in the project stays as a regular file until the next sync converts it to a symlink
|