claudecode-omc 5.6.4 → 5.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/.local/commands/code-review.md +416 -0
  2. package/.local/commands/pr.md +250 -0
  3. package/.local/commands/prp-pr.md +244 -0
  4. package/.local/guidelines/CLAUDE.md +47 -0
  5. package/.local/skills/prompt-optimizer/SKILL.md +23 -4
  6. package/bundled/manifest.json +4 -4
  7. package/bundled/upstream/anthropic-skills/skills/algorithmic-art/LICENSE.txt +1 -1
  8. package/bundled/upstream/anthropic-skills/skills/brand-guidelines/LICENSE.txt +1 -1
  9. package/bundled/upstream/anthropic-skills/skills/canvas-design/LICENSE.txt +1 -1
  10. package/bundled/upstream/anthropic-skills/skills/claude-api/LICENSE.txt +1 -1
  11. package/bundled/upstream/anthropic-skills/skills/claude-api/SKILL.md +120 -58
  12. package/bundled/upstream/anthropic-skills/skills/claude-api/curl/examples.md +9 -9
  13. package/bundled/upstream/anthropic-skills/skills/claude-api/curl/managed-agents.md +336 -0
  14. package/bundled/upstream/anthropic-skills/skills/claude-api/go/managed-agents/README.md +561 -0
  15. package/bundled/upstream/anthropic-skills/skills/claude-api/java/claude-api.md +2 -2
  16. package/bundled/upstream/anthropic-skills/skills/claude-api/java/managed-agents/README.md +442 -0
  17. package/bundled/upstream/anthropic-skills/skills/claude-api/php/claude-api.md +10 -10
  18. package/bundled/upstream/anthropic-skills/skills/claude-api/php/managed-agents/README.md +435 -0
  19. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/README.md +16 -16
  20. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/batches.md +3 -3
  21. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/files-api.md +3 -3
  22. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/streaming.md +7 -7
  23. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/tool-use.md +19 -19
  24. package/bundled/upstream/anthropic-skills/skills/claude-api/python/managed-agents/README.md +332 -0
  25. package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/claude-api.md +4 -4
  26. package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/managed-agents/README.md +389 -0
  27. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/agent-design.md +101 -0
  28. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/error-codes.md +11 -4
  29. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/live-sources.md +60 -48
  30. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-api-reference.md +372 -0
  31. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-client-patterns.md +209 -0
  32. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-core.md +220 -0
  33. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-environments.md +211 -0
  34. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-events.md +195 -0
  35. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-memory.md +197 -0
  36. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-multiagent.md +99 -0
  37. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-onboarding.md +114 -0
  38. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-outcomes.md +106 -0
  39. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-overview.md +67 -0
  40. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-tools.md +315 -0
  41. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-webhooks.md +110 -0
  42. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/model-migration.md +779 -0
  43. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/models.md +16 -14
  44. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/prompt-caching.md +45 -2
  45. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/tool-use-concepts.md +28 -6
  46. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/README.md +15 -15
  47. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/batches.md +2 -2
  48. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/files-api.md +1 -1
  49. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/streaming.md +5 -5
  50. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/tool-use.md +15 -15
  51. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/managed-agents/README.md +359 -0
  52. package/bundled/upstream/anthropic-skills/skills/internal-comms/LICENSE.txt +1 -1
  53. package/bundled/upstream/anthropic-skills/skills/mcp-builder/LICENSE.txt +1 -1
  54. package/bundled/upstream/anthropic-skills/skills/skill-creator/LICENSE.txt +1 -1
  55. package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/LICENSE.txt +1 -1
  56. package/bundled/upstream/anthropic-skills/skills/theme-factory/LICENSE.txt +1 -1
  57. package/bundled/upstream/anthropic-skills/skills/web-artifacts-builder/LICENSE.txt +1 -1
  58. package/bundled/upstream/anthropic-skills/skills/webapp-testing/LICENSE.txt +1 -1
  59. package/bundled/upstream/ecc/.omc-source/bundle.json +2 -3
  60. package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +4 -4
  61. package/bundled/upstream/ecc/agents/a11y-architect.md +10 -2
  62. package/bundled/upstream/ecc/agents/architect.md +9 -0
  63. package/bundled/upstream/ecc/agents/build-error-resolver.md +9 -0
  64. package/bundled/upstream/ecc/agents/chief-of-staff.md +9 -0
  65. package/bundled/upstream/ecc/agents/code-architect.md +9 -0
  66. package/bundled/upstream/ecc/agents/code-explorer.md +10 -1
  67. package/bundled/upstream/ecc/agents/code-reviewer.md +87 -1
  68. package/bundled/upstream/ecc/agents/code-simplifier.md +9 -0
  69. package/bundled/upstream/ecc/agents/comment-analyzer.md +10 -1
  70. package/bundled/upstream/ecc/agents/conversation-analyzer.md +9 -0
  71. package/bundled/upstream/ecc/agents/cpp-build-resolver.md +9 -0
  72. package/bundled/upstream/ecc/agents/cpp-reviewer.md +9 -0
  73. package/bundled/upstream/ecc/agents/csharp-reviewer.md +9 -0
  74. package/bundled/upstream/ecc/agents/dart-build-resolver.md +9 -0
  75. package/bundled/upstream/ecc/agents/database-reviewer.md +9 -0
  76. package/bundled/upstream/ecc/agents/django-build-resolver.md +252 -0
  77. package/bundled/upstream/ecc/agents/django-reviewer.md +169 -0
  78. package/bundled/upstream/ecc/agents/doc-updater.md +9 -0
  79. package/bundled/upstream/ecc/agents/docs-lookup.md +9 -0
  80. package/bundled/upstream/ecc/agents/e2e-runner.md +9 -0
  81. package/bundled/upstream/ecc/agents/fastapi-reviewer.md +79 -0
  82. package/bundled/upstream/ecc/agents/flutter-reviewer.md +9 -0
  83. package/bundled/upstream/ecc/agents/fsharp-reviewer.md +109 -0
  84. package/bundled/upstream/ecc/agents/gan-evaluator.md +9 -0
  85. package/bundled/upstream/ecc/agents/gan-generator.md +9 -0
  86. package/bundled/upstream/ecc/agents/gan-planner.md +9 -0
  87. package/bundled/upstream/ecc/agents/go-build-resolver.md +9 -0
  88. package/bundled/upstream/ecc/agents/go-reviewer.md +9 -0
  89. package/bundled/upstream/ecc/agents/harmonyos-app-resolver.md +182 -0
  90. package/bundled/upstream/ecc/agents/harness-optimizer.md +9 -0
  91. package/bundled/upstream/ecc/agents/healthcare-reviewer.md +9 -0
  92. package/bundled/upstream/ecc/agents/homelab-architect.md +107 -0
  93. package/bundled/upstream/ecc/agents/java-build-resolver.md +133 -11
  94. package/bundled/upstream/ecc/agents/java-reviewer.md +130 -32
  95. package/bundled/upstream/ecc/agents/kotlin-build-resolver.md +9 -0
  96. package/bundled/upstream/ecc/agents/kotlin-reviewer.md +9 -0
  97. package/bundled/upstream/ecc/agents/loop-operator.md +9 -0
  98. package/bundled/upstream/ecc/agents/mle-reviewer.md +162 -0
  99. package/bundled/upstream/ecc/agents/network-architect.md +106 -0
  100. package/bundled/upstream/ecc/agents/network-config-reviewer.md +106 -0
  101. package/bundled/upstream/ecc/agents/network-troubleshooter.md +128 -0
  102. package/bundled/upstream/ecc/agents/opensource-forker.md +9 -0
  103. package/bundled/upstream/ecc/agents/opensource-packager.md +9 -0
  104. package/bundled/upstream/ecc/agents/opensource-sanitizer.md +9 -0
  105. package/bundled/upstream/ecc/agents/performance-optimizer.md +9 -0
  106. package/bundled/upstream/ecc/agents/planner.md +9 -0
  107. package/bundled/upstream/ecc/agents/pr-test-analyzer.md +9 -0
  108. package/bundled/upstream/ecc/agents/python-reviewer.md +9 -0
  109. package/bundled/upstream/ecc/agents/pytorch-build-resolver.md +12 -3
  110. package/bundled/upstream/ecc/agents/refactor-cleaner.md +9 -0
  111. package/bundled/upstream/ecc/agents/rust-build-resolver.md +9 -0
  112. package/bundled/upstream/ecc/agents/rust-reviewer.md +9 -0
  113. package/bundled/upstream/ecc/agents/security-reviewer.md +9 -0
  114. package/bundled/upstream/ecc/agents/seo-specialist.md +10 -1
  115. package/bundled/upstream/ecc/agents/silent-failure-hunter.md +9 -0
  116. package/bundled/upstream/ecc/agents/swift-build-resolver.md +170 -0
  117. package/bundled/upstream/ecc/agents/swift-reviewer.md +116 -0
  118. package/bundled/upstream/ecc/agents/tdd-guide.md +9 -0
  119. package/bundled/upstream/ecc/agents/type-design-analyzer.md +10 -1
  120. package/bundled/upstream/ecc/agents/typescript-reviewer.md +9 -0
  121. package/bundled/upstream/ecc/commands/auto-update.md +28 -0
  122. package/bundled/upstream/ecc/commands/build-fix.md +4 -0
  123. package/bundled/upstream/ecc/commands/checkpoint.md +4 -0
  124. package/bundled/upstream/ecc/commands/code-review.md +3 -3
  125. package/bundled/upstream/ecc/commands/cost-report.md +107 -0
  126. package/bundled/upstream/ecc/commands/cpp-build.md +1 -1
  127. package/bundled/upstream/ecc/commands/cpp-test.md +1 -1
  128. package/bundled/upstream/ecc/commands/ecc-guide.md +93 -0
  129. package/bundled/upstream/ecc/commands/fastapi-review.md +39 -0
  130. package/bundled/upstream/ecc/commands/flutter-build.md +1 -1
  131. package/bundled/upstream/ecc/commands/flutter-test.md +1 -1
  132. package/bundled/upstream/ecc/commands/gan-build.md +4 -0
  133. package/bundled/upstream/ecc/commands/gan-design.md +4 -0
  134. package/bundled/upstream/ecc/commands/go-build.md +1 -1
  135. package/bundled/upstream/ecc/commands/go-test.md +1 -1
  136. package/bundled/upstream/ecc/commands/harness-audit.md +4 -0
  137. package/bundled/upstream/ecc/commands/jira.md +2 -2
  138. package/bundled/upstream/ecc/commands/kotlin-build.md +1 -1
  139. package/bundled/upstream/ecc/commands/kotlin-test.md +1 -1
  140. package/bundled/upstream/ecc/commands/learn.md +4 -0
  141. package/bundled/upstream/ecc/commands/loop-start.md +4 -0
  142. package/bundled/upstream/ecc/commands/loop-status.md +54 -1
  143. package/bundled/upstream/ecc/commands/model-route.md +4 -0
  144. package/bundled/upstream/ecc/commands/multi-backend.md +4 -0
  145. package/bundled/upstream/ecc/commands/multi-execute.md +4 -0
  146. package/bundled/upstream/ecc/commands/multi-frontend.md +4 -0
  147. package/bundled/upstream/ecc/commands/multi-plan.md +4 -0
  148. package/bundled/upstream/ecc/commands/multi-workflow.md +4 -0
  149. package/bundled/upstream/ecc/commands/plan-prd.md +160 -0
  150. package/bundled/upstream/ecc/commands/plan.md +96 -13
  151. package/bundled/upstream/ecc/commands/pm2.md +4 -0
  152. package/bundled/upstream/ecc/commands/pr.md +184 -0
  153. package/bundled/upstream/ecc/commands/project-init.md +86 -0
  154. package/bundled/upstream/ecc/commands/python-review.md +1 -1
  155. package/bundled/upstream/ecc/commands/quality-gate.md +4 -0
  156. package/bundled/upstream/ecc/commands/refactor-clean.md +4 -0
  157. package/bundled/upstream/ecc/commands/rust-build.md +1 -1
  158. package/bundled/upstream/ecc/commands/rust-test.md +1 -1
  159. package/bundled/upstream/ecc/commands/security-scan.md +92 -0
  160. package/bundled/upstream/ecc/commands/sessions.md +6 -6
  161. package/bundled/upstream/ecc/commands/skill-health.md +3 -3
  162. package/bundled/upstream/ecc/commands/test-coverage.md +4 -0
  163. package/bundled/upstream/ecc/commands/update-codemaps.md +4 -0
  164. package/bundled/upstream/ecc/commands/update-docs.md +4 -0
  165. package/bundled/upstream/ecc/skills/accessibility/SKILL.md +1 -1
  166. package/bundled/upstream/ecc/skills/agent-architecture-audit/SKILL.md +256 -0
  167. package/bundled/upstream/ecc/skills/agent-payment-x402/SKILL.md +49 -3
  168. package/bundled/upstream/ecc/skills/agentic-os/SKILL.md +387 -0
  169. package/bundled/upstream/ecc/skills/angular-developer/SKILL.md +154 -0
  170. package/bundled/upstream/ecc/skills/angular-developer/references/angular-animations.md +160 -0
  171. package/bundled/upstream/ecc/skills/angular-developer/references/angular-aria.md +410 -0
  172. package/bundled/upstream/ecc/skills/angular-developer/references/cli.md +86 -0
  173. package/bundled/upstream/ecc/skills/angular-developer/references/component-harnesses.md +59 -0
  174. package/bundled/upstream/ecc/skills/angular-developer/references/component-styling.md +91 -0
  175. package/bundled/upstream/ecc/skills/angular-developer/references/components.md +117 -0
  176. package/bundled/upstream/ecc/skills/angular-developer/references/creating-services.md +97 -0
  177. package/bundled/upstream/ecc/skills/angular-developer/references/data-resolvers.md +69 -0
  178. package/bundled/upstream/ecc/skills/angular-developer/references/define-routes.md +67 -0
  179. package/bundled/upstream/ecc/skills/angular-developer/references/defining-providers.md +72 -0
  180. package/bundled/upstream/ecc/skills/angular-developer/references/di-fundamentals.md +120 -0
  181. package/bundled/upstream/ecc/skills/angular-developer/references/e2e-testing.md +56 -0
  182. package/bundled/upstream/ecc/skills/angular-developer/references/effects.md +83 -0
  183. package/bundled/upstream/ecc/skills/angular-developer/references/hierarchical-injectors.md +43 -0
  184. package/bundled/upstream/ecc/skills/angular-developer/references/host-elements.md +80 -0
  185. package/bundled/upstream/ecc/skills/angular-developer/references/injection-context.md +63 -0
  186. package/bundled/upstream/ecc/skills/angular-developer/references/inputs.md +101 -0
  187. package/bundled/upstream/ecc/skills/angular-developer/references/linked-signal.md +59 -0
  188. package/bundled/upstream/ecc/skills/angular-developer/references/loading-strategies.md +61 -0
  189. package/bundled/upstream/ecc/skills/angular-developer/references/mcp.md +108 -0
  190. package/bundled/upstream/ecc/skills/angular-developer/references/navigate-to-routes.md +69 -0
  191. package/bundled/upstream/ecc/skills/angular-developer/references/outputs.md +86 -0
  192. package/bundled/upstream/ecc/skills/angular-developer/references/reactive-forms.md +122 -0
  193. package/bundled/upstream/ecc/skills/angular-developer/references/rendering-strategies.md +44 -0
  194. package/bundled/upstream/ecc/skills/angular-developer/references/resource.md +77 -0
  195. package/bundled/upstream/ecc/skills/angular-developer/references/route-animations.md +56 -0
  196. package/bundled/upstream/ecc/skills/angular-developer/references/route-guards.md +52 -0
  197. package/bundled/upstream/ecc/skills/angular-developer/references/router-lifecycle.md +45 -0
  198. package/bundled/upstream/ecc/skills/angular-developer/references/router-testing.md +87 -0
  199. package/bundled/upstream/ecc/skills/angular-developer/references/show-routes-with-outlets.md +68 -0
  200. package/bundled/upstream/ecc/skills/angular-developer/references/signal-forms.md +795 -0
  201. package/bundled/upstream/ecc/skills/angular-developer/references/signals-overview.md +94 -0
  202. package/bundled/upstream/ecc/skills/angular-developer/references/tailwind-css.md +69 -0
  203. package/bundled/upstream/ecc/skills/angular-developer/references/template-driven-forms.md +114 -0
  204. package/bundled/upstream/ecc/skills/angular-developer/references/testing-fundamentals.md +65 -0
  205. package/bundled/upstream/ecc/skills/autonomous-agent-harness/SKILL.md +6 -0
  206. package/bundled/upstream/ecc/skills/backend-patterns/SKILL.md +8 -45
  207. package/bundled/upstream/ecc/skills/cisco-ios-patterns/SKILL.md +163 -0
  208. package/bundled/upstream/ecc/skills/configure-ecc/SKILL.md +31 -14
  209. package/bundled/upstream/ecc/skills/continuous-learning/SKILL.md +10 -2
  210. package/bundled/upstream/ecc/skills/continuous-learning-v2/SKILL.md +19 -5
  211. package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer-loop.sh +44 -4
  212. package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer.md +4 -4
  213. package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/start-observer.sh +5 -1
  214. package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +21 -5
  215. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +58 -13
  216. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +97 -4
  217. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/lib/homunculus-dir.sh +31 -0
  218. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/migrate-homunculus.sh +62 -0
  219. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/test_parse_instinct.py +34 -0
  220. package/bundled/upstream/ecc/skills/cost-tracking/SKILL.md +147 -0
  221. package/bundled/upstream/ecc/skills/deep-research/SKILL.md +4 -0
  222. package/bundled/upstream/ecc/skills/defi-amm-security/SKILL.md +6 -0
  223. package/bundled/upstream/ecc/skills/django-celery/SKILL.md +457 -0
  224. package/bundled/upstream/ecc/skills/ecc-guide/SKILL.md +189 -0
  225. package/bundled/upstream/ecc/skills/error-handling/SKILL.md +376 -0
  226. package/bundled/upstream/ecc/skills/exa-search/SKILL.md +4 -0
  227. package/bundled/upstream/ecc/skills/fal-ai-media/SKILL.md +4 -0
  228. package/bundled/upstream/ecc/skills/fastapi-patterns/SKILL.md +327 -0
  229. package/bundled/upstream/ecc/skills/flox-environments/SKILL.md +496 -0
  230. package/bundled/upstream/ecc/skills/frontend-design-direction/SKILL.md +92 -0
  231. package/bundled/upstream/ecc/skills/frontend-slides/animation-patterns.md +122 -0
  232. package/bundled/upstream/ecc/skills/frontend-slides/html-template.md +419 -0
  233. package/bundled/upstream/ecc/skills/frontend-slides/scripts/export-pdf.sh +418 -0
  234. package/bundled/upstream/ecc/skills/frontend-slides/scripts/extract-pptx.py +96 -0
  235. package/bundled/upstream/ecc/skills/frontend-slides/viewport-base.css +153 -0
  236. package/bundled/upstream/ecc/skills/fsharp-testing/SKILL.md +280 -0
  237. package/bundled/upstream/ecc/skills/gateguard/SKILL.md +4 -0
  238. package/bundled/upstream/ecc/skills/hermes-imports/SKILL.md +88 -0
  239. package/bundled/upstream/ecc/skills/homelab-network-readiness/SKILL.md +169 -0
  240. package/bundled/upstream/ecc/skills/homelab-network-setup/SKILL.md +129 -0
  241. package/bundled/upstream/ecc/skills/homelab-pihole-dns/SKILL.md +274 -0
  242. package/bundled/upstream/ecc/skills/homelab-vlan-segmentation/SKILL.md +311 -0
  243. package/bundled/upstream/ecc/skills/homelab-wireguard-vpn/SKILL.md +305 -0
  244. package/bundled/upstream/ecc/skills/ios-icon-gen/SKILL.md +157 -0
  245. package/bundled/upstream/ecc/skills/ios-icon-gen/scripts/generate_icons.swift +258 -0
  246. package/bundled/upstream/ecc/skills/ios-icon-gen/scripts/iconify_gen.sh +235 -0
  247. package/bundled/upstream/ecc/skills/java-coding-standards/SKILL.md +241 -5
  248. package/bundled/upstream/ecc/skills/make-interfaces-feel-better/SKILL.md +151 -0
  249. package/bundled/upstream/ecc/skills/mle-workflow/SKILL.md +346 -0
  250. package/bundled/upstream/ecc/skills/motion-advanced/SKILL.md +596 -0
  251. package/bundled/upstream/ecc/skills/motion-foundations/SKILL.md +299 -0
  252. package/bundled/upstream/ecc/skills/motion-patterns/SKILL.md +435 -0
  253. package/bundled/upstream/ecc/skills/motion-ui/SKILL.md +575 -0
  254. package/bundled/upstream/ecc/skills/mysql-patterns/SKILL.md +412 -0
  255. package/bundled/upstream/ecc/skills/netmiko-ssh-automation/SKILL.md +173 -0
  256. package/bundled/upstream/ecc/skills/network-bgp-diagnostics/SKILL.md +167 -0
  257. package/bundled/upstream/ecc/skills/network-config-validation/SKILL.md +210 -0
  258. package/bundled/upstream/ecc/skills/network-interface-health/SKILL.md +152 -0
  259. package/bundled/upstream/ecc/skills/openclaw-persona-forge/SKILL.md +1 -9
  260. package/bundled/upstream/ecc/skills/plan-orchestrate/SKILL.md +262 -0
  261. package/bundled/upstream/ecc/skills/prisma-patterns/SKILL.md +371 -0
  262. package/bundled/upstream/ecc/skills/production-audit/SKILL.md +206 -0
  263. package/bundled/upstream/ecc/skills/prompt-optimizer/SKILL.md +24 -400
  264. package/bundled/upstream/ecc/skills/quarkus-patterns/SKILL.md +722 -0
  265. package/bundled/upstream/ecc/skills/quarkus-security/SKILL.md +467 -0
  266. package/bundled/upstream/ecc/skills/quarkus-tdd/SKILL.md +811 -0
  267. package/bundled/upstream/ecc/skills/quarkus-verification/SKILL.md +479 -0
  268. package/bundled/upstream/ecc/skills/redis-patterns/SKILL.md +403 -0
  269. package/bundled/upstream/ecc/skills/scientific-db-pubmed-database/SKILL.md +175 -0
  270. package/bundled/upstream/ecc/skills/scientific-db-uspto-database/SKILL.md +177 -0
  271. package/bundled/upstream/ecc/skills/scientific-pkg-gget/SKILL.md +166 -0
  272. package/bundled/upstream/ecc/skills/scientific-thinking-literature-review/SKILL.md +192 -0
  273. package/bundled/upstream/ecc/skills/scientific-thinking-scholar-evaluation/SKILL.md +160 -0
  274. package/bundled/upstream/ecc/skills/search-first/SKILL.md +23 -2
  275. package/bundled/upstream/ecc/skills/security-review/SKILL.md +10 -2
  276. package/bundled/upstream/ecc/skills/skill-comply/scripts/runner.py +28 -3
  277. package/bundled/upstream/ecc/skills/skill-comply/tests/test_runner.py +172 -0
  278. package/bundled/upstream/ecc/skills/skill-scout/SKILL.md +140 -0
  279. package/bundled/upstream/ecc/skills/skill-stocktake/SKILL.md +1 -0
  280. package/bundled/upstream/ecc/skills/strategic-compact/SKILL.md +2 -2
  281. package/bundled/upstream/ecc/skills/tinystruct-patterns/SKILL.md +203 -0
  282. package/bundled/upstream/ecc/skills/tinystruct-patterns/references/architecture.md +90 -0
  283. package/bundled/upstream/ecc/skills/tinystruct-patterns/references/data-handling.md +60 -0
  284. package/bundled/upstream/ecc/skills/tinystruct-patterns/references/database.md +99 -0
  285. package/bundled/upstream/ecc/skills/tinystruct-patterns/references/routing.md +64 -0
  286. package/bundled/upstream/ecc/skills/tinystruct-patterns/references/system-usage.md +97 -0
  287. package/bundled/upstream/ecc/skills/tinystruct-patterns/references/testing.md +72 -0
  288. package/bundled/upstream/ecc/skills/ui-to-vue/SKILL.md +134 -0
  289. package/bundled/upstream/ecc/skills/vite-patterns/SKILL.md +449 -0
  290. package/bundled/upstream/ecc/skills/windows-desktop-e2e/SKILL.md +788 -0
  291. package/bundled/upstream/ecc/skills/x-api/SKILL.md +4 -0
  292. package/bundled/upstream/oh-my-claudecode/.omc-source/bundle.json +20 -0
  293. package/bundled/upstream/oh-my-claudecode/agents/analyst.md +2 -1
  294. package/bundled/upstream/oh-my-claudecode/agents/architect.md +2 -1
  295. package/bundled/upstream/oh-my-claudecode/agents/code-reviewer.md +26 -7
  296. package/bundled/upstream/oh-my-claudecode/agents/critic.md +2 -1
  297. package/bundled/upstream/oh-my-claudecode/agents/debugger.md +2 -1
  298. package/bundled/upstream/oh-my-claudecode/agents/designer.md +14 -1
  299. package/bundled/upstream/oh-my-claudecode/agents/document-specialist.md +1 -1
  300. package/bundled/upstream/oh-my-claudecode/agents/executor.md +2 -1
  301. package/bundled/upstream/oh-my-claudecode/agents/explore.md +2 -1
  302. package/bundled/upstream/oh-my-claudecode/agents/git-master.md +2 -1
  303. package/bundled/upstream/oh-my-claudecode/agents/planner.md +2 -1
  304. package/bundled/upstream/oh-my-claudecode/agents/qa-tester.md +2 -1
  305. package/bundled/upstream/oh-my-claudecode/agents/scientist.md +2 -1
  306. package/bundled/upstream/oh-my-claudecode/agents/security-reviewer.md +2 -1
  307. package/bundled/upstream/oh-my-claudecode/agents/test-engineer.md +2 -1
  308. package/bundled/upstream/oh-my-claudecode/agents/tracer.md +2 -1
  309. package/bundled/upstream/oh-my-claudecode/agents/verifier.md +2 -1
  310. package/bundled/upstream/oh-my-claudecode/agents/writer.md +2 -1
  311. package/bundled/upstream/oh-my-claudecode/skills/AGENTS.md +4 -3
  312. package/bundled/upstream/oh-my-claudecode/skills/ai-slop-cleaner/SKILL.md +12 -0
  313. package/bundled/upstream/oh-my-claudecode/skills/deep-dive/SKILL.md +69 -13
  314. package/bundled/upstream/oh-my-claudecode/skills/deep-interview/SKILL.md +176 -63
  315. package/bundled/upstream/oh-my-claudecode/skills/learner/SKILL.md +3 -1
  316. package/bundled/upstream/oh-my-claudecode/skills/omc-doctor/SKILL.md +22 -3
  317. package/bundled/upstream/oh-my-claudecode/skills/omc-reference/SKILL.md +1 -1
  318. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/01-install-claude-md.md +2 -2
  319. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/02-configure.md +45 -2
  320. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/03-integrations.md +46 -5
  321. package/bundled/upstream/oh-my-claudecode/skills/plan/SKILL.md +19 -17
  322. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/config.sh +1 -1
  323. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/parse.sh +1 -1
  324. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/azure-devops.sh +1 -1
  325. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/bitbucket.sh +1 -1
  326. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/gitea.sh +1 -1
  327. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/github.sh +1 -1
  328. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/gitlab.sh +1 -1
  329. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/interface.sh +1 -1
  330. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/jira.sh +1 -1
  331. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/session.sh +1 -1
  332. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/tmux.sh +1 -1
  333. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/worktree.sh +1 -1
  334. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/psm.sh +1 -1
  335. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/tests/test-psm-prompt-injection.sh +1 -1
  336. package/bundled/upstream/oh-my-claudecode/skills/ralph/SKILL.md +8 -8
  337. package/bundled/upstream/oh-my-claudecode/skills/ralplan/SKILL.md +9 -5
  338. package/bundled/upstream/oh-my-claudecode/skills/skill/SKILL.md +6 -6
  339. package/bundled/upstream/oh-my-claudecode/skills/skillify/SKILL.md +19 -3
  340. package/bundled/upstream/oh-my-claudecode/skills/trace/SKILL.md +3 -1
  341. package/bundled/upstream/oh-my-claudecode/skills/ultrawork/SKILL.md +20 -7
  342. package/bundled/upstream/superpowers/.omc-source/bundle.json +21 -0
  343. package/bundled/upstream/superpowers/hooks/hooks-cursor.json +1 -1
  344. package/bundled/upstream/superpowers/skills/executing-plans/SKILL.md +1 -1
  345. package/bundled/upstream/superpowers/skills/finishing-a-development-branch/SKILL.md +93 -42
  346. package/bundled/upstream/superpowers/skills/requesting-code-review/SKILL.md +7 -9
  347. package/bundled/upstream/superpowers/skills/requesting-code-review/code-reviewer.md +107 -85
  348. package/bundled/upstream/superpowers/skills/subagent-driven-development/SKILL.md +3 -1
  349. package/bundled/upstream/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +2 -3
  350. package/bundled/upstream/superpowers/skills/systematic-debugging/CREATION-LOG.md +1 -1
  351. package/bundled/upstream/superpowers/skills/systematic-debugging/root-cause-tracing.md +1 -1
  352. package/bundled/upstream/superpowers/skills/using-git-worktrees/SKILL.md +95 -98
  353. package/bundled/upstream/superpowers/skills/using-superpowers/references/codex-tools.md +7 -48
  354. package/bundled/upstream/superpowers/skills/using-superpowers/references/copilot-tools.md +1 -11
  355. package/bundled/upstream/superpowers/skills/using-superpowers/references/gemini-tools.md +21 -3
  356. package/bundled/upstream/superpowers/skills/writing-plans/SKILL.md +1 -1
  357. package/package.json +1 -1
  358. package/src/cli/index.js +1 -0
  359. package/src/cli/setup.js +9 -0
  360. package/src/cli/skill-index.js +209 -0
  361. package/src/cli/skill.js +4 -0
  362. package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/README.md +0 -355
  363. package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/patterns.md +0 -359
  364. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/README.md +0 -297
  365. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/patterns.md +0 -209
  366. package/bundled/upstream/ecc/commands/agent-sort.md +0 -23
  367. package/bundled/upstream/ecc/commands/claw.md +0 -23
  368. package/bundled/upstream/ecc/commands/context-budget.md +0 -23
  369. package/bundled/upstream/ecc/commands/devfleet.md +0 -23
  370. package/bundled/upstream/ecc/commands/docs.md +0 -23
  371. package/bundled/upstream/ecc/commands/e2e.md +0 -268
  372. package/bundled/upstream/ecc/commands/eval.md +0 -23
  373. package/bundled/upstream/ecc/commands/orchestrate.md +0 -135
  374. package/bundled/upstream/ecc/commands/prompt-optimize.md +0 -23
  375. package/bundled/upstream/ecc/commands/rules-distill.md +0 -20
  376. package/bundled/upstream/ecc/commands/tdd.md +0 -231
  377. package/bundled/upstream/ecc/commands/verify.md +0 -23
  378. package/bundled/upstream/ecc/skills/claude-api/SKILL.md +0 -337
  379. package/bundled/upstream/ecc/skills/frontend-design/SKILL.md +0 -145
  380. package/bundled/upstream/superpowers/agents/code-reviewer.md +0 -48
  381. package/bundled/upstream/superpowers/commands/brainstorm.md +0 -5
  382. package/bundled/upstream/superpowers/commands/execute-plan.md +0 -5
  383. package/bundled/upstream/superpowers/commands/write-plan.md +0 -5
@@ -0,0 +1,147 @@
1
+ ---
2
+ name: cost-tracking
3
+ description: Track and report Claude Code token usage, spending, and budgets from a local cost-tracking database. Use when the user asks about costs, spending, usage, tokens, budgets, or cost breakdowns by project, tool, session, or date.
4
+ origin: community
5
+ ---
6
+
7
+ # Cost Tracking
8
+
9
+ Use this skill to analyze Claude Code cost and usage history from a local SQLite
10
+ database. It is intended for users who already have a cost-tracking hook or
11
+ plugin writing usage rows to `~/.claude-cost-tracker/usage.db`.
12
+
13
+ Source: salvaged from stale community PR #1304 by `MayurBhavsar`.
14
+
15
+ ## When to Use
16
+
17
+ - The user asks "how much have I spent?", "what did this session cost?", or
18
+ "what is my token usage?"
19
+ - The user mentions budgets, spending limits, overruns, or cost controls.
20
+ - The user wants a cost breakdown by project, tool, session, model, or date.
21
+ - The user wants to compare today against yesterday or inspect a recent trend.
22
+ - The user asks for a CSV export of recent usage records.
23
+
24
+ ## How It Works
25
+
26
+ First verify prerequisites:
27
+
28
+ ```bash
29
+ command -v sqlite3 >/dev/null && echo "sqlite3 available" || echo "sqlite3 missing"
30
+ test -f ~/.claude-cost-tracker/usage.db && echo "Database found" || echo "Database not found"
31
+ ```
32
+
33
+ If the database is missing, do not fabricate usage data. Tell the user that cost
34
+ tracking is not configured and suggest installing or enabling a trusted local
35
+ cost-tracking hook/plugin.
36
+
37
+ The expected `usage` table usually contains one row per tool call or model
38
+ interaction. Column names vary by tracker, but the examples below assume:
39
+
40
+ | Column | Meaning |
41
+ | --- | --- |
42
+ | `timestamp` | ISO timestamp for the usage event |
43
+ | `project` | Project or repository name |
44
+ | `tool_name` | Tool or event name |
45
+ | `input_tokens` | Input token count, when recorded |
46
+ | `output_tokens` | Output token count, when recorded |
47
+ | `cost_usd` | Precomputed cost in USD |
48
+ | `session_id` | Claude Code session identifier |
49
+ | `model` | Model used for the event |
50
+
51
+ Prefer `cost_usd` over hand-calculating pricing. Model prices and cache pricing
52
+ change over time, and the tracker should be the source of truth for how each row
53
+ was priced.
54
+
55
+ ## Examples
56
+
57
+ ### Quick Summary
58
+
59
+ ```bash
60
+ sqlite3 ~/.claude-cost-tracker/usage.db "
61
+ SELECT
62
+ 'Today: $' || ROUND(COALESCE(SUM(CASE WHEN date(timestamp) = date('now') THEN cost_usd END), 0), 4) ||
63
+ ' | Total: $' || ROUND(COALESCE(SUM(cost_usd), 0), 4) ||
64
+ ' | Calls: ' || COUNT(*) ||
65
+ ' | Sessions: ' || COUNT(DISTINCT session_id)
66
+ FROM usage;
67
+ "
68
+ ```
69
+
70
+ ### Cost By Project
71
+
72
+ ```bash
73
+ sqlite3 -header -column ~/.claude-cost-tracker/usage.db "
74
+ SELECT project, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls
75
+ FROM usage
76
+ GROUP BY project
77
+ ORDER BY cost DESC;
78
+ "
79
+ ```
80
+
81
+ ### Cost By Tool
82
+
83
+ ```bash
84
+ sqlite3 -header -column ~/.claude-cost-tracker/usage.db "
85
+ SELECT tool_name, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls
86
+ FROM usage
87
+ GROUP BY tool_name
88
+ ORDER BY cost DESC;
89
+ "
90
+ ```
91
+
92
+ ### Last Seven Days
93
+
94
+ ```bash
95
+ sqlite3 -header -column ~/.claude-cost-tracker/usage.db "
96
+ SELECT date(timestamp) AS date, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls
97
+ FROM usage
98
+ GROUP BY date(timestamp)
99
+ ORDER BY date DESC
100
+ LIMIT 7;
101
+ "
102
+ ```
103
+
104
+ ### Session Drilldown
105
+
106
+ ```bash
107
+ sqlite3 -header -column ~/.claude-cost-tracker/usage.db "
108
+ SELECT session_id,
109
+ MIN(timestamp) AS started,
110
+ MAX(timestamp) AS ended,
111
+ ROUND(SUM(cost_usd), 4) AS cost,
112
+ COUNT(*) AS calls
113
+ FROM usage
114
+ GROUP BY session_id
115
+ ORDER BY started DESC
116
+ LIMIT 10;
117
+ "
118
+ ```
119
+
120
+ ## Reporting Guidance
121
+
122
+ When presenting cost data, include:
123
+
124
+ 1. Today's spend and yesterday comparison.
125
+ 2. Total spend across the tracked database.
126
+ 3. Top projects ranked by cost.
127
+ 4. Top tools ranked by cost.
128
+ 5. Session count and average cost per session when enough data exists.
129
+
130
+ For small amounts, format currency with four decimal places. For larger amounts,
131
+ two decimals are enough.
132
+
133
+ ## Anti-Patterns
134
+
135
+ - Do not estimate costs from raw token counts when `cost_usd` is present.
136
+ - Do not assume the database exists without checking.
137
+ - Do not run unbounded `SELECT *` exports on large databases.
138
+ - Do not hard-code current model pricing in user-facing answers.
139
+ - Do not recommend installing unreviewed hooks or plugins that execute arbitrary
140
+ code.
141
+
142
+ ## Related
143
+
144
+ - `/cost-report` - Command-form report using the same database.
145
+ - `cost-aware-llm-pipeline` - Model-routing and budget-design patterns.
146
+ - `token-budget-advisor` - Context and token-budget planning.
147
+ - `strategic-compact` - Context compaction to reduce repeated token spend.
@@ -6,6 +6,10 @@ origin: ECC
6
6
 
7
7
  # Deep Research
8
8
 
9
+ > **Drift-prone skill.** Firecrawl/Exa MCP tool names, quotas, and result
10
+ > shapes change. Verify the configured MCP tools and current API docs before
11
+ > promising coverage or quoting live source counts.
12
+
9
13
  Produce thorough, cited research reports from multiple web sources using firecrawl and exa MCP tools.
10
14
 
11
15
  ## When to Activate
@@ -20,6 +20,12 @@ Critical vulnerability patterns and hardened implementations for Solidity AMM co
20
20
 
21
21
  Use this as a checklist-plus-pattern library. Review every user entrypoint against the categories below and prefer the hardened examples over hand-rolled variants.
22
22
 
23
+ ## Execution Safety
24
+
25
+ The shell commands in this skill are local audit examples. Run them only in a trusted checkout or disposable sandbox, and do not splice untrusted contract names, paths, RPC URLs, private keys, or user-supplied flags into shell commands. Ask before installing tools or running long fuzzing/static-analysis jobs that may consume significant local or paid resources.
26
+
27
+ Never include secrets, private keys, seed phrases, API tokens, or mainnet signing credentials in command examples, logs, or reports.
28
+
23
29
  ## Examples
24
30
 
25
31
  ### Reentrancy: enforce CEI order
@@ -0,0 +1,457 @@
1
+ ---
2
+ name: django-celery
3
+ description: Django + Celery async task patterns — configuration, task design, beat scheduling, retries, canvas workflows, monitoring, and testing. Use when adding background jobs, scheduled tasks, or async processing to a Django app.
4
+ origin: ECC
5
+ ---
6
+
7
+ # Django + Celery Async Task Patterns
8
+
9
+ Production-grade patterns for background task processing in Django using Celery with Redis or RabbitMQ.
10
+
11
+ ## When to Activate
12
+
13
+ - Adding background jobs or async processing to a Django app
14
+ - Implementing periodic/scheduled tasks
15
+ - Offloading slow operations (email, PDF generation, API calls) from request cycle
16
+ - Setting up Celery Beat for cron-like scheduling
17
+ - Debugging task failures, retries, or queue backlogs
18
+ - Writing tests for Celery tasks
19
+
20
+ ## Project Setup
21
+
22
+ ### Installation
23
+
24
+ ```bash
25
+ pip install celery[redis] django-celery-results django-celery-beat
26
+ ```
27
+
28
+ ### `celery.py` — App Entrypoint
29
+
30
+ ```python
31
+ # config/celery.py
32
+ import os
33
+ from celery import Celery
34
+
35
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.development')
36
+
37
+ app = Celery('myproject')
38
+ app.config_from_object('django.conf:settings', namespace='CELERY')
39
+ app.autodiscover_tasks() # Discovers tasks.py in each INSTALLED_APP
40
+
41
+ @app.task(bind=True, ignore_result=True)
42
+ def debug_task(self):
43
+ print(f'Request: {self.request!r}')
44
+ ```
45
+
46
+ ```python
47
+ # config/__init__.py
48
+ from .celery import app as celery_app
49
+
50
+ __all__ = ('celery_app',)
51
+ ```
52
+
53
+ ### Django Settings
54
+
55
+ ```python
56
+ # config/settings/base.py
57
+
58
+ # Broker (Redis recommended for production)
59
+ CELERY_BROKER_URL = env('CELERY_BROKER_URL', default='redis://localhost:6379/0')
60
+ CELERY_RESULT_BACKEND = env('CELERY_RESULT_BACKEND', default='django-db')
61
+
62
+ # Serialization
63
+ CELERY_ACCEPT_CONTENT = ['json']
64
+ CELERY_TASK_SERIALIZER = 'json'
65
+ CELERY_RESULT_SERIALIZER = 'json'
66
+
67
+ # Task behavior
68
+ CELERY_TASK_TRACK_STARTED = True
69
+ CELERY_TASK_TIME_LIMIT = 30 * 60 # Hard limit: 30 min
70
+ CELERY_TASK_SOFT_TIME_LIMIT = 25 * 60 # Soft limit: sends SoftTimeLimitExceeded
71
+ CELERY_WORKER_PREFETCH_MULTIPLIER = 1 # Prevent worker hoarding long tasks
72
+ CELERY_TASK_ACKS_LATE = True # Re-queue on worker crash
73
+
74
+ # Result persistence
75
+ CELERY_RESULT_EXPIRES = 60 * 60 * 24 # Keep results 24 hours
76
+
77
+ # Beat scheduler (for periodic tasks)
78
+ CELERY_BEAT_SCHEDULER = 'django_celery_beat.schedulers:DatabaseScheduler'
79
+
80
+ # Installed apps
81
+ INSTALLED_APPS += [
82
+ 'django_celery_results',
83
+ 'django_celery_beat',
84
+ ]
85
+ ```
86
+
87
+ ### Running Workers
88
+
89
+ ```bash
90
+ # Start worker (development)
91
+ celery -A config worker --loglevel=info
92
+
93
+ # Start beat scheduler (periodic tasks)
94
+ celery -A config beat --loglevel=info --scheduler django_celery_beat.schedulers:DatabaseScheduler
95
+
96
+ # Combined worker + beat (dev only, never production)
97
+ celery -A config worker --beat --loglevel=info
98
+
99
+ # Production: multiple workers with concurrency
100
+ celery -A config worker --loglevel=warning --concurrency=4 -Q default,high_priority
101
+ ```
102
+
103
+ ## Task Design Patterns
104
+
105
+ ### Basic Task
106
+
107
+ ```python
108
+ # apps/notifications/tasks.py
109
+ from celery import shared_task
110
+ import logging
111
+
112
+ logger = logging.getLogger(__name__)
113
+
114
+ @shared_task(name='notifications.send_welcome_email')
115
+ def send_welcome_email(user_id: int) -> None:
116
+ """Send welcome email to newly registered user."""
117
+ from apps.users.models import User
118
+ from apps.notifications.services import EmailService
119
+
120
+ try:
121
+ user = User.objects.get(pk=user_id)
122
+ except User.DoesNotExist:
123
+ logger.warning('send_welcome_email: user %s not found', user_id)
124
+ return # Idempotent — do not raise, task already impossible to complete
125
+
126
+ EmailService.send_welcome(user)
127
+ logger.info('Welcome email sent to user %s', user_id)
128
+ ```
129
+
130
+ ### Retryable Task
131
+
132
+ ```python
133
+ @shared_task(
134
+ bind=True,
135
+ name='integrations.sync_to_crm',
136
+ max_retries=5,
137
+ default_retry_delay=60, # seconds before first retry
138
+ autoretry_for=(ConnectionError, TimeoutError),
139
+ retry_backoff=True, # exponential backoff
140
+ retry_backoff_max=600, # cap at 10 minutes
141
+ retry_jitter=True, # randomise to avoid thundering herd
142
+ )
143
+ def sync_contact_to_crm(self, contact_id: int) -> dict:
144
+ """Sync contact to external CRM with retry on transient failures."""
145
+ from apps.crm.services import CRMClient
146
+
147
+ try:
148
+ result = CRMClient().sync(contact_id)
149
+ return result
150
+ except CRMClient.RateLimitError as exc:
151
+ # Specific retry delay from response header
152
+ raise self.retry(exc=exc, countdown=int(exc.retry_after))
153
+ ```
154
+
155
+ ### Idempotent Task Pattern
156
+
157
+ Design tasks so they can safely run multiple times with the same inputs:
158
+
159
+ ```python
160
+ @shared_task(name='orders.mark_shipped')
161
+ def mark_order_shipped(order_id: int, tracking_number: str) -> None:
162
+ """Mark order as shipped — safe to run multiple times."""
163
+ from apps.orders.models import Order
164
+
165
+ updated = Order.objects.filter(
166
+ pk=order_id,
167
+ status=Order.Status.PROCESSING, # Guard: only update if not already shipped
168
+ ).update(
169
+ status=Order.Status.SHIPPED,
170
+ tracking_number=tracking_number,
171
+ )
172
+
173
+ if not updated:
174
+ logger.info('mark_order_shipped: order %s already shipped or not found', order_id)
175
+ ```
176
+
177
+ ### Task with Soft Time Limit
178
+
179
+ ```python
180
+ from celery.exceptions import SoftTimeLimitExceeded
181
+
182
+ @shared_task(
183
+ bind=True,
184
+ name='reports.generate_pdf',
185
+ soft_time_limit=120,
186
+ time_limit=150,
187
+ )
188
+ def generate_pdf_report(self, report_id: int) -> str:
189
+ """Generate PDF report with graceful timeout handling."""
190
+ from apps.reports.services import PDFGenerator
191
+
192
+ try:
193
+ path = PDFGenerator.build(report_id)
194
+ return path
195
+ except SoftTimeLimitExceeded:
196
+ # Clean up partial files before hard kill
197
+ PDFGenerator.cleanup(report_id)
198
+ raise
199
+ ```
200
+
201
+ ## Calling Tasks
202
+
203
+ ```python
204
+ from datetime import timedelta
205
+ from django.utils import timezone
206
+
207
+ # Fire and forget (async)
208
+ send_welcome_email.delay(user.pk)
209
+
210
+ # Schedule in the future
211
+ send_reminder.apply_async(args=[user.pk], countdown=3600) # 1 hour from now
212
+ send_reminder.apply_async(args=[user.pk], eta=timezone.now() + timedelta(days=1))
213
+
214
+ # Apply with queue routing
215
+ sync_contact_to_crm.apply_async(args=[contact.pk], queue='high_priority')
216
+
217
+ # Run synchronously (tests / debugging only)
218
+ result = generate_pdf_report.apply(args=[report.pk])
219
+ ```
220
+
221
+ ## Beat Scheduling (Periodic Tasks)
222
+
223
+ ### Code-Defined Schedule
224
+
225
+ ```python
226
+ # config/settings/base.py
227
+ from celery.schedules import crontab
228
+
229
+ CELERY_BEAT_SCHEDULE = {
230
+ 'cleanup-expired-sessions': {
231
+ 'task': 'users.cleanup_expired_sessions',
232
+ 'schedule': crontab(hour=2, minute=0), # 2am daily
233
+ },
234
+ 'sync-inventory': {
235
+ 'task': 'products.sync_inventory',
236
+ 'schedule': 60.0, # every 60 seconds
237
+ },
238
+ 'weekly-digest': {
239
+ 'task': 'notifications.send_weekly_digest',
240
+ 'schedule': crontab(day_of_week='monday', hour=8, minute=0),
241
+ },
242
+ }
243
+ ```
244
+
245
+ ### Database-Defined Schedule (via django-celery-beat)
246
+
247
+ ```python
248
+ # Manage periodic tasks from Django admin or code
249
+ from django_celery_beat.models import PeriodicTask, CrontabSchedule
250
+ import json
251
+
252
+ schedule, _ = CrontabSchedule.objects.get_or_create(
253
+ hour='*/6', minute='0',
254
+ timezone='UTC',
255
+ )
256
+
257
+ PeriodicTask.objects.update_or_create(
258
+ name='Sync inventory every 6 hours',
259
+ defaults={
260
+ 'crontab': schedule,
261
+ 'task': 'products.sync_inventory',
262
+ 'args': json.dumps([]),
263
+ 'enabled': True,
264
+ }
265
+ )
266
+ ```
267
+
268
+ ## Canvas: Chaining and Grouping Tasks
269
+
270
+ ```python
271
+ from celery import chain, group, chord
272
+
273
+ # Chain: run tasks sequentially, passing results
274
+ pipeline = chain(
275
+ fetch_data.s(source_id),
276
+ transform_data.s(), # receives fetch_data result as first arg
277
+ load_to_warehouse.s(),
278
+ )
279
+ pipeline.delay()
280
+
281
+ # Group: run tasks in parallel
282
+ parallel = group(
283
+ send_welcome_email.s(user_id)
284
+ for user_id in new_user_ids
285
+ )
286
+ parallel.delay()
287
+
288
+ # Chord: parallel tasks + callback when all complete
289
+ result = chord(
290
+ group(process_chunk.s(chunk) for chunk in data_chunks),
291
+ aggregate_results.s(), # called with list of chunk results
292
+ )
293
+ result.delay()
294
+ ```
295
+
296
+ ## Error Handling and Dead Letter Queue
297
+
298
+ ```python
299
+ # apps/core/tasks.py
300
+ from celery.signals import task_failure
301
+
302
+ @task_failure.connect
303
+ def on_task_failure(sender, task_id, exception, args, kwargs, traceback, einfo, **kw):
304
+ """Log all task failures to Sentry / alerting."""
305
+ import sentry_sdk
306
+ with sentry_sdk.new_scope() as scope:
307
+ scope.set_context('celery', {
308
+ 'task': sender.name,
309
+ 'task_id': task_id,
310
+ 'args': args,
311
+ 'kwargs': kwargs,
312
+ })
313
+ sentry_sdk.capture_exception(exception)
314
+ ```
315
+
316
+ ```python
317
+ # Route failed tasks to dead-letter queue after max retries
318
+ @shared_task(
319
+ bind=True,
320
+ max_retries=3,
321
+ name='payments.charge_card',
322
+ )
323
+ def charge_card(self, order_id: int) -> None:
324
+ from apps.payments.models import Order, FailedCharge
325
+
326
+ try:
327
+ _do_charge(order_id)
328
+ except Exception as exc:
329
+ if self.request.retries >= self.max_retries:
330
+ # Persist to dead-letter table for manual review
331
+ FailedCharge.objects.create(
332
+ order_id=order_id,
333
+ error=str(exc),
334
+ task_id=self.request.id,
335
+ )
336
+ return # Don't raise — task is permanently failed
337
+ raise self.retry(exc=exc)
338
+ ```
339
+
340
+ ## Testing Celery Tasks
341
+
342
+ ### Unit Testing (No Broker)
343
+
344
+ ```python
345
+ # tests/test_tasks.py
346
+ import pytest
347
+ from unittest.mock import patch, MagicMock
348
+ from apps.notifications.tasks import send_welcome_email
349
+
350
+ class TestSendWelcomeEmail:
351
+
352
+ @pytest.mark.django_db
353
+ def test_sends_email_to_existing_user(self, user):
354
+ with patch('apps.notifications.services.EmailService') as mock_email:
355
+ send_welcome_email(user.pk)
356
+ mock_email.send_welcome.assert_called_once_with(user)
357
+
358
+ @pytest.mark.django_db
359
+ def test_skips_missing_user_gracefully(self):
360
+ """Should not raise when user is deleted between enqueue and execute."""
361
+ send_welcome_email(99999) # Non-existent user — must not raise
362
+ ```
363
+
364
+ ### Integration Testing with CELERY_TASK_ALWAYS_EAGER
365
+
366
+ ```python
367
+ # config/settings/test.py
368
+ CELERY_TASK_ALWAYS_EAGER = True # Run tasks synchronously in tests
369
+ CELERY_TASK_EAGER_PROPAGATES = True # Re-raise exceptions from tasks
370
+
371
+ # tests/test_integration.py
372
+ @pytest.mark.django_db
373
+ def test_registration_triggers_welcome_email(client):
374
+ with patch('apps.notifications.services.EmailService') as mock_email:
375
+ response = client.post('/api/users/', {
376
+ 'email': 'new@example.com',
377
+ 'password': 'strongpass123',
378
+ })
379
+
380
+ assert response.status_code == 201
381
+ mock_email.send_welcome.assert_called_once()
382
+ ```
383
+
384
+ ### Testing Retries
385
+
386
+ ```python
387
+ @pytest.mark.django_db
388
+ def test_task_retries_on_connection_error():
389
+ with patch('apps.crm.services.CRMClient.sync') as mock_sync:
390
+ mock_sync.side_effect = ConnectionError('timeout')
391
+
392
+ with pytest.raises(ConnectionError):
393
+ sync_contact_to_crm.apply(args=[1], throw=True)
394
+
395
+ assert mock_sync.call_count == 1 # First attempt only when eager
396
+ ```
397
+
398
+ ## Monitoring
399
+
400
+ ```bash
401
+ # Inspect active workers and queues
402
+ celery -A config inspect active
403
+ celery -A config inspect stats
404
+ celery -A config inspect reserved
405
+
406
+ # Check queue lengths (Redis)
407
+ redis-cli llen celery
408
+
409
+ # Flower: web-based real-time monitor
410
+ pip install flower
411
+ celery -A config flower --port=5555
412
+ ```
413
+
414
+ ## Anti-Patterns
415
+
416
+ ```python
417
+ # BAD: Passing model instances — they may be stale by execution time
418
+ send_welcome_email.delay(user) # Never pass ORM objects
419
+ send_welcome_email.delay(user.pk) # Always pass PKs
420
+
421
+ # BAD: Calling tasks synchronously in production views
422
+ result = generate_report.apply() # Blocks the request thread
423
+
424
+ # BAD: Non-idempotent task without guards
425
+ @shared_task
426
+ def charge_and_fulfill(order_id):
427
+ order.charge() # May charge twice if task retries!
428
+ order.fulfill()
429
+
430
+ # GOOD: Idempotent with status guard
431
+ @shared_task
432
+ def charge_and_fulfill(order_id):
433
+ order = Order.objects.select_for_update().get(pk=order_id)
434
+ if order.status != Order.Status.PENDING:
435
+ return # Already processed
436
+ order.charge()
437
+ order.fulfill()
438
+ ```
439
+
440
+ ## Production Checklist
441
+
442
+ | Check | Setting |
443
+ |-------|---------|
444
+ | Worker restarts on crash | `supervisord` or `systemd` unit |
445
+ | `CELERY_TASK_ACKS_LATE = True` | Re-queue tasks on worker crash |
446
+ | `CELERY_WORKER_PREFETCH_MULTIPLIER = 1` | Fair distribution of long tasks |
447
+ | Separate queues per priority | `-Q default,high_priority,low_priority` |
448
+ | `CELERY_TASK_SOFT_TIME_LIMIT` set | Graceful timeout before hard kill |
449
+ | Sentry integration | Capture all `task_failure` signals |
450
+ | Flower or other monitor | Visibility into queue depths |
451
+ | Beat runs on single node only | Prevents duplicate scheduled task execution |
452
+
453
+ ## Related Skills
454
+
455
+ - `django-patterns` — ORM, service layer, and project structure
456
+ - `django-tdd` — Testing Django models, views, and services
457
+ - `python-testing` — pytest configuration and fixtures