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,412 @@
1
+ ---
2
+ name: mysql-patterns
3
+ description: MySQL and MariaDB schema, query, indexing, transaction, replication, and connection-pool patterns for production backends.
4
+ origin: ECC
5
+ ---
6
+
7
+ # MySQL Patterns
8
+
9
+ Use this skill when working on MySQL or MariaDB schema design, migrations,
10
+ slow-query investigation, queue-style transactions, connection pools, or
11
+ production database configuration. Prefer exact version checks before applying a
12
+ feature-specific pattern because MySQL and MariaDB have diverged in several SQL
13
+ details.
14
+
15
+ ## Activation
16
+
17
+ - Designing MySQL or MariaDB tables, indexes, and constraints
18
+ - Reviewing migrations before they run on large production tables
19
+ - Debugging slow queries, lock waits, deadlocks, or connection exhaustion
20
+ - Adding keyset pagination, upserts, full-text search, JSON columns, or queues
21
+ - Configuring application connection pools, read replicas, TLS, or slow logs
22
+
23
+ ## Version Check
24
+
25
+ Start by identifying the engine and version:
26
+
27
+ ```sql
28
+ SELECT VERSION();
29
+ SHOW VARIABLES LIKE 'version_comment';
30
+ ```
31
+
32
+ Keep MySQL and MariaDB guidance separate when syntax differs:
33
+
34
+ - MySQL documents row aliases as the replacement for `VALUES(col)` in
35
+ `ON DUPLICATE KEY UPDATE`; `VALUES(col)` is deprecated there.
36
+ - MariaDB documents `VALUES(col)` as the supported way to reference inserted
37
+ values in `ON DUPLICATE KEY UPDATE`; use it for cross-engine compatibility.
38
+ - `SKIP LOCKED` is appropriate for queue-like work only. It skips locked rows
39
+ and can return an inconsistent view, so do not use it for general accounting
40
+ or integrity-sensitive reads.
41
+
42
+ ## Schema Defaults
43
+
44
+ ```sql
45
+ CREATE TABLE orders (
46
+ id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
47
+ account_id BIGINT UNSIGNED NOT NULL,
48
+ status VARCHAR(32) NOT NULL,
49
+ total DECIMAL(15, 2) NOT NULL,
50
+ created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
51
+ updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
52
+ deleted_at DATETIME NULL,
53
+ PRIMARY KEY (id),
54
+ KEY idx_orders_account_status_created (account_id, status, created_at),
55
+ KEY idx_orders_active (account_id, deleted_at)
56
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
57
+ ```
58
+
59
+ Default choices:
60
+
61
+ | Use Case | Prefer | Avoid |
62
+ | --- | --- | --- |
63
+ | Surrogate primary keys | `BIGINT UNSIGNED AUTO_INCREMENT` | `INT` for tables that can grow beyond 2B rows |
64
+ | UUID lookup keys | `BINARY(16)` with conversion helpers | `VARCHAR(36)` primary keys on hot tables |
65
+ | Money and exact quantities | `DECIMAL(p, s)` | `FLOAT` or `DOUBLE` |
66
+ | User-facing text | `utf8mb4` tables and indexes | MySQL `utf8` / `utf8mb3` defaults |
67
+ | Application timestamps | `DATETIME` with UTC managed by the app | Assuming `DATETIME` stores time zone metadata |
68
+ | Soft deletes | `deleted_at DATETIME NULL` plus scoped indexes | Filtering soft-deleted rows without an index |
69
+ | Extensible status values | lookup table or constrained `VARCHAR` | `ENUM` when values change often |
70
+
71
+ ## Indexing
72
+
73
+ Composite index order usually follows equality predicates first, then range or
74
+ sort columns:
75
+
76
+ ```sql
77
+ CREATE INDEX idx_orders_account_status_created
78
+ ON orders (account_id, status, created_at);
79
+
80
+ SELECT id, total
81
+ FROM orders
82
+ WHERE account_id = ?
83
+ AND status = 'pending'
84
+ AND created_at >= ?
85
+ ORDER BY created_at DESC
86
+ LIMIT 50;
87
+ ```
88
+
89
+ Use `EXPLAIN` before adding or changing an index:
90
+
91
+ ```sql
92
+ EXPLAIN
93
+ SELECT id, total
94
+ FROM orders
95
+ WHERE account_id = 123 AND status = 'pending'
96
+ ORDER BY created_at DESC
97
+ LIMIT 50;
98
+ ```
99
+
100
+ Signals to investigate:
101
+
102
+ | Field | Risk Signal |
103
+ | --- | --- |
104
+ | `type` | `ALL` on a large table |
105
+ | `key` | `NULL` when a selective predicate exists |
106
+ | `rows` | Very high row estimate for an interactive path |
107
+ | `Extra` | `Using temporary`, `Using filesort`, or broad `Using where` |
108
+
109
+ Avoid adding indexes blindly. Each index increases write cost, migration time,
110
+ backup size, and buffer-pool pressure.
111
+
112
+ ## Query Patterns
113
+
114
+ ### Upsert
115
+
116
+ Cross-engine-compatible form:
117
+
118
+ ```sql
119
+ INSERT INTO user_settings (user_id, setting_key, setting_value)
120
+ VALUES (?, ?, ?)
121
+ ON DUPLICATE KEY UPDATE
122
+ setting_value = VALUES(setting_value),
123
+ updated_at = CURRENT_TIMESTAMP;
124
+ ```
125
+
126
+ MySQL row-alias form:
127
+
128
+ ```sql
129
+ INSERT INTO user_settings (user_id, setting_key, setting_value)
130
+ VALUES (?, ?, ?) AS new
131
+ ON DUPLICATE KEY UPDATE
132
+ setting_value = new.setting_value,
133
+ updated_at = CURRENT_TIMESTAMP;
134
+ ```
135
+
136
+ Use the row-alias form only after confirming the target is MySQL. Use
137
+ `VALUES(col)` for MariaDB or mixed MySQL/MariaDB fleets.
138
+
139
+ ### Keyset Pagination
140
+
141
+ ```sql
142
+ SELECT id, name, created_at
143
+ FROM products
144
+ WHERE (created_at, id) < (?, ?)
145
+ ORDER BY created_at DESC, id DESC
146
+ LIMIT 50;
147
+ ```
148
+
149
+ Back it with an index that matches the cursor:
150
+
151
+ ```sql
152
+ CREATE INDEX idx_products_created_id ON products (created_at, id);
153
+ ```
154
+
155
+ Do not use deep `OFFSET` pagination on large tables; it makes the server scan
156
+ and discard rows before returning the page.
157
+
158
+ ### JSON Fields
159
+
160
+ Use JSON columns for extension data, not for fields that need heavy relational
161
+ filtering or constraints.
162
+
163
+ ```sql
164
+ CREATE TABLE events (
165
+ id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
166
+ payload JSON NOT NULL,
167
+ event_type VARCHAR(64)
168
+ GENERATED ALWAYS AS (JSON_UNQUOTE(JSON_EXTRACT(payload, '$.type'))) STORED,
169
+ KEY idx_events_type (event_type)
170
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
171
+ ```
172
+
173
+ For frequently queried JSON paths, expose a generated column and index that
174
+ column. Keep foreign keys, ownership, tenancy, and lifecycle fields relational.
175
+
176
+ ### Full-Text Search
177
+
178
+ ```sql
179
+ ALTER TABLE articles ADD FULLTEXT KEY ft_articles_title_body (title, body);
180
+
181
+ SELECT id, title, MATCH(title, body) AGAINST (? IN NATURAL LANGUAGE MODE) AS score
182
+ FROM articles
183
+ WHERE MATCH(title, body) AGAINST (? IN NATURAL LANGUAGE MODE)
184
+ ORDER BY score DESC
185
+ LIMIT 20;
186
+ ```
187
+
188
+ Use external search when you need typo tolerance, complex ranking, cross-table
189
+ facets, or language-specific analysis beyond built-in full-text behavior.
190
+
191
+ ## Transactions
192
+
193
+ Keep transactions short and lock rows in a consistent order:
194
+
195
+ ```sql
196
+ START TRANSACTION;
197
+
198
+ SELECT id, balance
199
+ FROM accounts
200
+ WHERE id IN (?, ?)
201
+ ORDER BY id
202
+ FOR UPDATE;
203
+
204
+ UPDATE accounts SET balance = balance - ? WHERE id = ?;
205
+ UPDATE accounts SET balance = balance + ? WHERE id = ?;
206
+
207
+ COMMIT;
208
+ ```
209
+
210
+ Deadlock and lock-wait checklist:
211
+
212
+ - Lock rows in a deterministic order across code paths.
213
+ - Do external API calls before opening the transaction, not inside it.
214
+ - Add indexes for predicates used in `UPDATE`, `DELETE`, and locking reads.
215
+ - On deadlock, roll back and retry the whole transaction with a bounded retry
216
+ budget.
217
+ - Capture `SHOW ENGINE INNODB STATUS\G` soon after a deadlock; it is overwritten
218
+ by later events.
219
+
220
+ Queue-style worker claim:
221
+
222
+ ```sql
223
+ START TRANSACTION;
224
+
225
+ SELECT id
226
+ FROM jobs
227
+ WHERE status = 'pending'
228
+ ORDER BY created_at
229
+ LIMIT 1
230
+ FOR UPDATE SKIP LOCKED;
231
+
232
+ UPDATE jobs
233
+ SET status = 'processing', started_at = CURRENT_TIMESTAMP
234
+ WHERE id = ?;
235
+
236
+ COMMIT;
237
+ ```
238
+
239
+ Use `SKIP LOCKED` only for queue-like workloads where skipping a locked row is
240
+ acceptable. It is not a replacement for normal transactional consistency.
241
+
242
+ ## Connection Pools
243
+
244
+ SQLAlchemy example:
245
+
246
+ ```python
247
+ from sqlalchemy import create_engine
248
+
249
+ engine = create_engine(
250
+ "mysql+mysqlconnector://app:secret@db.internal/app",
251
+ pool_size=10,
252
+ max_overflow=5,
253
+ pool_timeout=30,
254
+ pool_recycle=240,
255
+ pool_pre_ping=True,
256
+ connect_args={"connect_timeout": 5},
257
+ )
258
+ ```
259
+
260
+ Node.js `mysql2` example:
261
+
262
+ ```javascript
263
+ import mysql from 'mysql2/promise';
264
+
265
+ const pool = mysql.createPool({
266
+ host: process.env.DB_HOST,
267
+ user: process.env.DB_USER,
268
+ password: process.env.DB_PASSWORD,
269
+ database: process.env.DB_NAME,
270
+ waitForConnections: true,
271
+ connectionLimit: 10,
272
+ queueLimit: 0,
273
+ enableKeepAlive: true,
274
+ keepAliveInitialDelay: 30000,
275
+ });
276
+
277
+ const [rows] = await pool.execute(
278
+ 'SELECT id, total FROM orders WHERE account_id = ? LIMIT 50',
279
+ [accountId],
280
+ );
281
+ ```
282
+
283
+ Keep application pool recycling below the server `wait_timeout`. If the server
284
+ uses `wait_timeout = 300`, a `pool_recycle` around 240 seconds is coherent;
285
+ `pool_pre_ping` still helps recover from network and failover events.
286
+
287
+ ## Diagnostics
288
+
289
+ Useful first-pass commands:
290
+
291
+ ```sql
292
+ SHOW FULL PROCESSLIST;
293
+ SHOW ENGINE INNODB STATUS\G;
294
+ SHOW VARIABLES LIKE 'slow_query_log';
295
+ SHOW VARIABLES LIKE 'long_query_time';
296
+ ```
297
+
298
+ Enable the slow log in a controlled environment:
299
+
300
+ ```sql
301
+ SET GLOBAL slow_query_log = 'ON';
302
+ SET GLOBAL long_query_time = 1;
303
+ SET GLOBAL log_queries_not_using_indexes = 'ON';
304
+ ```
305
+
306
+ Use `EXPLAIN ANALYZE` only when it is safe to execute the query. It runs the
307
+ statement and can be expensive on production-sized data.
308
+
309
+ ## Replication
310
+
311
+ Read replicas can lag. Do not route read-your-own-write paths, checkout flows,
312
+ permission checks, or idempotency-key reads to a replica immediately after a
313
+ write.
314
+
315
+ ```sql
316
+ -- MySQL legacy terminology, still common in existing fleets
317
+ SHOW SLAVE STATUS\G;
318
+
319
+ -- Newer terminology where supported
320
+ SHOW REPLICA STATUS\G;
321
+ ```
322
+
323
+ Check the engine/version before standardizing on one command. Monitor replica
324
+ SQL thread health, IO thread health, and lag, not just whether the TCP
325
+ connection is alive.
326
+
327
+ ## Security
328
+
329
+ ```sql
330
+ CREATE USER 'app'@'%' IDENTIFIED BY 'use-a-secret-manager';
331
+ GRANT SELECT, INSERT, UPDATE, DELETE ON appdb.* TO 'app'@'%';
332
+
333
+ ALTER USER 'app'@'%' REQUIRE SSL;
334
+
335
+ SELECT user, host
336
+ FROM mysql.user
337
+ WHERE user = '';
338
+
339
+ DROP USER IF EXISTS ''@'localhost';
340
+ DROP USER IF EXISTS ''@'%';
341
+ ```
342
+
343
+ Security review points:
344
+
345
+ - Do not grant `ALL PRIVILEGES` or `*.*` to application users.
346
+ - Require TLS for application users when traffic crosses hosts or networks.
347
+ - Store credentials in the platform secret manager, not in examples, scripts, or
348
+ repository files.
349
+ - Separate migration/admin users from runtime application users.
350
+ - Audit public network exposure and bind addresses before tuning performance.
351
+
352
+ ## Configuration
353
+
354
+ Example starting point for a dedicated database host:
355
+
356
+ ```ini
357
+ [mysqld]
358
+ innodb_buffer_pool_size = 4G
359
+ innodb_flush_log_at_trx_commit = 1
360
+ sync_binlog = 1
361
+
362
+ max_connections = 300
363
+ thread_cache_size = 50
364
+
365
+ wait_timeout = 300
366
+ interactive_timeout = 300
367
+ innodb_lock_wait_timeout = 10
368
+
369
+ slow_query_log = ON
370
+ long_query_time = 1
371
+ log_queries_not_using_indexes = ON
372
+
373
+ log_bin = mysql-bin
374
+ binlog_format = ROW
375
+ binlog_expire_logs_seconds = 604800
376
+ ```
377
+
378
+ Treat configuration values as a prompt for review, not a universal preset. Size
379
+ memory, connections, log retention, and durability settings from workload,
380
+ hardware, backup policy, and recovery objectives.
381
+
382
+ ## Anti-Patterns
383
+
384
+ | Anti-Pattern | Risk | Better Pattern |
385
+ | --- | --- | --- |
386
+ | `SELECT *` in hot paths | Over-fetching and brittle clients | Select explicit columns |
387
+ | Deep `OFFSET` pagination | Linear scans and slow pages | Keyset pagination |
388
+ | No index on foreign-key joins | Slow joins and lock-heavy deletes | Index FK columns intentionally |
389
+ | Long transactions | Lock waits and large undo history | Commit small units of work |
390
+ | Direct DML against `mysql.user` | Grant-table corruption risk | Use `CREATE USER`, `ALTER USER`, `DROP USER` |
391
+ | Application user with admin grants | High blast radius | Least-privilege runtime user |
392
+ | Pool recycle above `wait_timeout` | Stale pooled connections | Recycle below timeout and pre-ping |
393
+ | Replica reads after writes | Stale user-facing state | Pin read-after-write flows to primary |
394
+
395
+ ## Output Expectations
396
+
397
+ When this skill is used for review, return:
398
+
399
+ 1. Engine/version assumptions.
400
+ 2. Highest-risk correctness, lock, security, and migration issues.
401
+ 3. Exact SQL or code changes for the safe path.
402
+ 4. Validation plan: `EXPLAIN`, migration dry run, lock/deadlock check, and
403
+ rollback criteria.
404
+ 5. Any MySQL/MariaDB syntax differences that affect the recommendation.
405
+
406
+ ## Related
407
+
408
+ - Skill: `postgres-patterns` - PostgreSQL-specific schema and query patterns
409
+ - Skill: `database-migrations` - migration planning and rollout safety
410
+ - Skill: `backend-patterns` - API and service-layer patterns
411
+ - Skill: `security-review` - secret handling, auth, and least privilege
412
+ - Agent: `database-reviewer` - broader database review workflow
@@ -0,0 +1,173 @@
1
+ ---
2
+ name: netmiko-ssh-automation
3
+ description: Safe Python Netmiko patterns for read-only collection, bounded batch SSH, TextFSM parsing, guarded config changes, timeouts, and network automation error handling.
4
+ origin: community
5
+ ---
6
+
7
+ # Netmiko SSH Automation
8
+
9
+ Use this skill when writing or reviewing Python automation that connects to
10
+ network devices with Netmiko. Keep the default path read-only; config changes
11
+ need a separate change window, peer review, and rollback plan.
12
+
13
+ ## When to Use
14
+
15
+ - Collecting `show` command output across routers, switches, or firewalls.
16
+ - Building a small audit script for interface, routing, or config evidence.
17
+ - Adding timeouts and exception handling to network SSH scripts.
18
+ - Parsing command output with TextFSM when a template exists.
19
+ - Reviewing automation before it touches production devices.
20
+
21
+ ## Safety Defaults
22
+
23
+ - Start with read-only `send_command()` collection.
24
+ - Keep inventory small and explicit; do not sweep whole address ranges.
25
+ - Use environment variables, a vault, or `getpass`; never hardcode credentials.
26
+ - Set connection and read timeouts.
27
+ - Limit concurrency so older devices are not overloaded.
28
+ - Require an explicit operator flag before `send_config_set()`.
29
+ - Do not call `save_config()` until the change has been verified and approved.
30
+
31
+ ## Read-Only Connection Pattern
32
+
33
+ ```python
34
+ import os
35
+ from getpass import getpass
36
+ from netmiko import ConnectHandler
37
+ from netmiko.exceptions import (
38
+ NetmikoAuthenticationException,
39
+ NetmikoTimeoutException,
40
+ ReadTimeout,
41
+ )
42
+
43
+ device = {
44
+ "device_type": "cisco_ios",
45
+ "host": "192.0.2.10",
46
+ "username": os.environ.get("NETMIKO_USERNAME") or input("Username: "),
47
+ "password": os.environ.get("NETMIKO_PASSWORD") or getpass("Password: "),
48
+ "secret": os.environ.get("NETMIKO_ENABLE_SECRET"),
49
+ "conn_timeout": 10,
50
+ "auth_timeout": 20,
51
+ "banner_timeout": 15,
52
+ "read_timeout_override": 30,
53
+ }
54
+
55
+ try:
56
+ with ConnectHandler(**device) as conn:
57
+ if device.get("secret") and not conn.check_enable_mode():
58
+ conn.enable()
59
+ output = conn.send_command("show ip interface brief", read_timeout=30)
60
+ print(output)
61
+ except NetmikoAuthenticationException:
62
+ print("Authentication failed")
63
+ except NetmikoTimeoutException:
64
+ print("SSH connection timed out")
65
+ except ReadTimeout:
66
+ print("Command read timed out")
67
+ ```
68
+
69
+ Use placeholder addresses from documentation ranges in examples. Keep real
70
+ inventory in an ignored local file or a secrets-managed system.
71
+
72
+ ## Batch Collection
73
+
74
+ ```python
75
+ from concurrent.futures import ThreadPoolExecutor, as_completed
76
+ from typing import Any
77
+
78
+ def collect_show(device: dict[str, Any], command: str) -> dict[str, Any]:
79
+ host = device["host"]
80
+ try:
81
+ with ConnectHandler(**device) as conn:
82
+ output = conn.send_command(command, read_timeout=45)
83
+ return {"host": host, "ok": True, "output": output}
84
+ except (NetmikoAuthenticationException, NetmikoTimeoutException, ReadTimeout) as exc:
85
+ return {"host": host, "ok": False, "error": type(exc).__name__}
86
+
87
+ results = []
88
+ with ThreadPoolExecutor(max_workers=8) as pool:
89
+ futures = [pool.submit(collect_show, device, "show version") for device in devices]
90
+ for future in as_completed(futures):
91
+ results.append(future.result())
92
+ ```
93
+
94
+ Keep `max_workers` low unless the device estate and AAA systems are known to
95
+ handle higher connection volume.
96
+
97
+ ## Structured Parsing
98
+
99
+ Netmiko can ask TextFSM, TTP, or Genie to parse supported command output. Treat
100
+ parser output as an optimization, not the only evidence path.
101
+
102
+ ```python
103
+ with ConnectHandler(**device) as conn:
104
+ parsed = conn.send_command(
105
+ "show ip interface brief",
106
+ use_textfsm=True,
107
+ raise_parsing_error=False,
108
+ read_timeout=30,
109
+ )
110
+
111
+ if isinstance(parsed, str):
112
+ print("No parser template matched; store raw output for review")
113
+ else:
114
+ for row in parsed:
115
+ print(row)
116
+ ```
117
+
118
+ If parsing drives a blocking decision, keep the raw command output alongside
119
+ the parsed result so an operator can inspect mismatches.
120
+
121
+ ## Guarded Config Pattern
122
+
123
+ ```python
124
+ import os
125
+
126
+ commands = [
127
+ "interface GigabitEthernet0/1",
128
+ "description CHANGE-1234 UPLINK-TO-CORE",
129
+ ]
130
+
131
+ apply_changes = os.environ.get("APPLY_NETWORK_CHANGES") == "1"
132
+
133
+ if not apply_changes:
134
+ print("Dry run only. Candidate commands:")
135
+ print("\n".join(commands))
136
+ else:
137
+ with ConnectHandler(**device) as conn:
138
+ conn.enable()
139
+ before = conn.send_command("show running-config interface GigabitEthernet0/1")
140
+ output = conn.send_config_set(commands)
141
+ after = conn.send_command("show running-config interface GigabitEthernet0/1")
142
+ print(before)
143
+ print(output)
144
+ print(after)
145
+ print("Verify behavior before saving startup config.")
146
+ ```
147
+
148
+ Saving the config is a separate approval step. In production, include a rollback
149
+ snippet and capture before/after evidence in the change record.
150
+
151
+ ## Review Checklist
152
+
153
+ - Does the script identify an explicit inventory source?
154
+ - Are credentials absent from source, logs, and exception messages?
155
+ - Are `conn_timeout`, `auth_timeout`, and command `read_timeout` set?
156
+ - Are failures reported per device without stopping the whole batch?
157
+ - Does the script avoid broad scans and unbounded concurrency?
158
+ - Are config changes behind a dry-run or explicit operator flag?
159
+ - Is `save_config()` separate from the initial push and tied to verification?
160
+
161
+ ## Anti-Patterns
162
+
163
+ - Hardcoding passwords, enable secrets, or private keys in source.
164
+ - Sending config commands as the default code path.
165
+ - Running automation against a CIDR range instead of a reviewed inventory.
166
+ - Logging full running configs to shared systems without sanitization.
167
+ - Treating parser success as proof that the device state is correct.
168
+
169
+ ## See Also
170
+
171
+ - Skill: `cisco-ios-patterns`
172
+ - Skill: `network-config-validation`
173
+ - Skill: `network-interface-health`