@synapta/skills 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/dist/index.js +11 -4
  2. package/package.json +3 -4
  3. package/skills/ATTRIBUTION.md +80 -0
  4. package/skills/accessibility-audit/SKILL.md +325 -0
  5. package/skills/accessibility-audit/reference/wcag-checklist.md +103 -0
  6. package/skills/apns-notifier/SKILL.md +86 -0
  7. package/skills/approval-policy-enforcer/SKILL.md +66 -0
  8. package/skills/apps-sdk-builder/LICENSE.txt +201 -0
  9. package/skills/apps-sdk-builder/SKILL.md +328 -0
  10. package/skills/apps-sdk-builder/agents/openai.yaml +13 -0
  11. package/skills/apps-sdk-builder/references/app-archetypes.md +132 -0
  12. package/skills/apps-sdk-builder/references/apps-sdk-docs-workflow.md +135 -0
  13. package/skills/apps-sdk-builder/references/interactive-state-sync-patterns.md +113 -0
  14. package/skills/apps-sdk-builder/references/repo-contract-and-validation.md +93 -0
  15. package/skills/apps-sdk-builder/references/search-fetch-standard.md +67 -0
  16. package/skills/apps-sdk-builder/references/upstream-example-workflow.md +79 -0
  17. package/skills/apps-sdk-builder/references/window-openai-patterns.md +79 -0
  18. package/skills/apps-sdk-builder/scripts/scaffold_node_ext_apps.mjs +606 -0
  19. package/skills/architecture-selector/SKILL.md +64 -0
  20. package/skills/backlog-planner/SKILL.md +68 -0
  21. package/skills/carplay-entitlement-checker/SKILL.md +82 -0
  22. package/skills/concept-deepener/SKILL.md +86 -0
  23. package/skills/concept-discovery/SKILL.md +517 -0
  24. package/skills/concept-discovery/assets/sample-analysis.json +81 -0
  25. package/skills/concept-discovery/expected_outputs/sample-enum-dictionary.md +25 -0
  26. package/skills/concept-discovery/expected_outputs/sample-page-user-list.md +83 -0
  27. package/skills/concept-discovery/expected_outputs/sample-prd-readme.md +43 -0
  28. package/skills/concept-discovery/references/framework-patterns.md +228 -0
  29. package/skills/concept-discovery/references/prd-quality-checklist.md +65 -0
  30. package/skills/concept-discovery/scripts/codebase_analyzer.py +732 -0
  31. package/skills/concept-discovery/scripts/prd_scaffolder.py +435 -0
  32. package/skills/dast-zap/SKILL.md +453 -0
  33. package/skills/dast-zap/assets/.gitkeep +9 -0
  34. package/skills/dast-zap/assets/github_action.yml +207 -0
  35. package/skills/dast-zap/assets/gitlab_ci.yml +226 -0
  36. package/skills/dast-zap/assets/zap_automation.yaml +196 -0
  37. package/skills/dast-zap/assets/zap_context.xml +192 -0
  38. package/skills/dast-zap/references/EXAMPLE.md +40 -0
  39. package/skills/dast-zap/references/api_testing_guide.md +475 -0
  40. package/skills/dast-zap/references/authentication_guide.md +431 -0
  41. package/skills/dast-zap/references/false_positive_handling.md +427 -0
  42. package/skills/dast-zap/references/owasp_mapping.md +255 -0
  43. package/skills/dep-sbom-scan/SKILL.md +466 -0
  44. package/skills/deploy-cloudflare/SKILL.md +930 -0
  45. package/skills/deploy-docker/SKILL.md +55 -0
  46. package/skills/deploy-fly/SKILL.md +228 -0
  47. package/skills/deploy-k8s/SKILL.md +108 -0
  48. package/skills/deploy-k8s/assets/logo.png +0 -0
  49. package/skills/deploy-k8s/docs/README.md +29 -0
  50. package/skills/deploy-k8s/docs/SUMMARY.md +56 -0
  51. package/skills/deploy-k8s/docs/advanced/token-efficiency.md +61 -0
  52. package/skills/deploy-k8s/docs/architecture/multi-tenancy.md +96 -0
  53. package/skills/deploy-k8s/docs/architecture/storage-and-state.md +102 -0
  54. package/skills/deploy-k8s/docs/architecture/workload-patterns.md +87 -0
  55. package/skills/deploy-k8s/docs/book.json +16 -0
  56. package/skills/deploy-k8s/docs/community/changelog.md +34 -0
  57. package/skills/deploy-k8s/docs/community/contributing.md +67 -0
  58. package/skills/deploy-k8s/docs/core-concepts/failure-modes.md +153 -0
  59. package/skills/deploy-k8s/docs/core-concepts/philosophy.md +83 -0
  60. package/skills/deploy-k8s/docs/core-concepts/workflow.md +124 -0
  61. package/skills/deploy-k8s/docs/examples/bad-patterns.md +47 -0
  62. package/skills/deploy-k8s/docs/examples/do-dont-checklist.md +37 -0
  63. package/skills/deploy-k8s/docs/examples/good-patterns.md +49 -0
  64. package/skills/deploy-k8s/docs/failure-modes/api-drift.md +104 -0
  65. package/skills/deploy-k8s/docs/failure-modes/fragile-rollouts.md +99 -0
  66. package/skills/deploy-k8s/docs/failure-modes/insecure-workload-defaults.md +80 -0
  67. package/skills/deploy-k8s/docs/failure-modes/network-exposure.md +98 -0
  68. package/skills/deploy-k8s/docs/failure-modes/privilege-sprawl.md +91 -0
  69. package/skills/deploy-k8s/docs/failure-modes/resource-starvation.md +85 -0
  70. package/skills/deploy-k8s/docs/getting-started/installation.md +152 -0
  71. package/skills/deploy-k8s/docs/getting-started/quick-start.md +115 -0
  72. package/skills/deploy-k8s/docs/guides/helm-patterns.md +71 -0
  73. package/skills/deploy-k8s/docs/guides/kustomize-patterns.md +65 -0
  74. package/skills/deploy-k8s/docs/guides/observability.md +67 -0
  75. package/skills/deploy-k8s/docs/guides/security-hardening.md +59 -0
  76. package/skills/deploy-k8s/docs/guides/validation-and-policy.md +66 -0
  77. package/skills/deploy-k8s/docs/integrations/mcp-integration.md +52 -0
  78. package/skills/deploy-k8s/docs/package-lock.json +2892 -0
  79. package/skills/deploy-k8s/docs/package.json +13 -0
  80. package/skills/deploy-k8s/references/api-drift.md +298 -0
  81. package/skills/deploy-k8s/references/conditional/aks-patterns.md +70 -0
  82. package/skills/deploy-k8s/references/conditional/eks-patterns.md +79 -0
  83. package/skills/deploy-k8s/references/conditional/gitops-controllers.md +71 -0
  84. package/skills/deploy-k8s/references/conditional/gke-patterns.md +74 -0
  85. package/skills/deploy-k8s/references/conditional/observability-stacks.md +80 -0
  86. package/skills/deploy-k8s/references/conditional/openshift-patterns.md +67 -0
  87. package/skills/deploy-k8s/references/daemonset-operator-patterns.md +155 -0
  88. package/skills/deploy-k8s/references/deployment-patterns.md +146 -0
  89. package/skills/deploy-k8s/references/do-dont-patterns.md +87 -0
  90. package/skills/deploy-k8s/references/examples-bad.md +282 -0
  91. package/skills/deploy-k8s/references/examples-good.md +440 -0
  92. package/skills/deploy-k8s/references/fragile-rollouts.md +303 -0
  93. package/skills/deploy-k8s/references/helm-patterns.md +203 -0
  94. package/skills/deploy-k8s/references/insecure-workload-defaults.md +300 -0
  95. package/skills/deploy-k8s/references/job-patterns.md +120 -0
  96. package/skills/deploy-k8s/references/kustomize-patterns.md +239 -0
  97. package/skills/deploy-k8s/references/multi-tenancy.md +343 -0
  98. package/skills/deploy-k8s/references/network-exposure.md +481 -0
  99. package/skills/deploy-k8s/references/observability.md +302 -0
  100. package/skills/deploy-k8s/references/privilege-sprawl.md +273 -0
  101. package/skills/deploy-k8s/references/resource-starvation.md +374 -0
  102. package/skills/deploy-k8s/references/security-hardening.md +209 -0
  103. package/skills/deploy-k8s/references/stateful-patterns.md +130 -0
  104. package/skills/deploy-k8s/references/storage-and-state.md +330 -0
  105. package/skills/deploy-k8s/references/validation-and-policy.md +242 -0
  106. package/skills/deploy-railway/SKILL.md +235 -0
  107. package/skills/deploy-railway/references/analyze-db-mongo.md +84 -0
  108. package/skills/deploy-railway/references/analyze-db-mysql.md +254 -0
  109. package/skills/deploy-railway/references/analyze-db-postgres.md +479 -0
  110. package/skills/deploy-railway/references/analyze-db-redis.md +208 -0
  111. package/skills/deploy-railway/references/analyze-db.md +344 -0
  112. package/skills/deploy-railway/references/configure.md +309 -0
  113. package/skills/deploy-railway/references/deploy.md +195 -0
  114. package/skills/deploy-railway/references/operate.md +214 -0
  115. package/skills/deploy-railway/references/request.md +248 -0
  116. package/skills/deploy-railway/references/setup.md +312 -0
  117. package/skills/deploy-railway/scripts/analyze-mongo.py +1549 -0
  118. package/skills/deploy-railway/scripts/analyze-mysql.py +1195 -0
  119. package/skills/deploy-railway/scripts/analyze-postgres.py +3058 -0
  120. package/skills/deploy-railway/scripts/analyze-redis.py +1090 -0
  121. package/skills/deploy-railway/scripts/dal.py +671 -0
  122. package/skills/deploy-railway/scripts/enable-pg-stats.py +170 -0
  123. package/skills/deploy-railway/scripts/pg-extensions.py +370 -0
  124. package/skills/deploy-railway/scripts/railway-api.sh +52 -0
  125. package/skills/deploy-ssh/SKILL.md +91 -0
  126. package/skills/deploy-vercel/SKILL.md +304 -0
  127. package/skills/deploy-vercel/resources/deploy-codex.sh +301 -0
  128. package/skills/deploy-vercel/resources/deploy.sh +301 -0
  129. package/skills/docs-runbooks/SKILL.md +399 -0
  130. package/skills/drive-status-renderer/SKILL.md +62 -0
  131. package/skills/iac-scan/SKILL.md +680 -0
  132. package/skills/iac-scan/assets/.gitkeep +9 -0
  133. package/skills/iac-scan/assets/checkov_config.yaml +94 -0
  134. package/skills/iac-scan/assets/github_actions.yml +199 -0
  135. package/skills/iac-scan/assets/gitlab_ci.yml +218 -0
  136. package/skills/iac-scan/assets/pre_commit_config.yaml +92 -0
  137. package/skills/iac-scan/references/EXAMPLE.md +40 -0
  138. package/skills/iac-scan/references/compliance_mapping.md +237 -0
  139. package/skills/iac-scan/references/custom_policies.md +460 -0
  140. package/skills/iac-scan/references/suppression_guide.md +431 -0
  141. package/skills/incident-briefing/SKILL.md +66 -0
  142. package/skills/incident-triage/SKILL.md +481 -0
  143. package/{LICENSE → skills/mcp-builder/LICENSE.txt} +15 -14
  144. package/skills/mcp-builder/SKILL.md +244 -0
  145. package/skills/mcp-builder/reference/evaluation.md +602 -0
  146. package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
  147. package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
  148. package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
  149. package/skills/mcp-builder/scripts/connections.py +151 -0
  150. package/skills/mcp-builder/scripts/evaluation.py +373 -0
  151. package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  152. package/skills/mcp-builder/scripts/requirements.txt +2 -0
  153. package/skills/mobile-pairing/SKILL.md +52 -0
  154. package/skills/ops-sre/SKILL.md +297 -0
  155. package/skills/playwright-qa/LICENSE.txt +201 -0
  156. package/skills/playwright-qa/NOTICE.txt +14 -0
  157. package/skills/playwright-qa/SKILL.md +156 -0
  158. package/skills/playwright-qa/agents/openai.yaml +6 -0
  159. package/skills/playwright-qa/assets/playwright-small.svg +3 -0
  160. package/skills/playwright-qa/assets/playwright.png +0 -0
  161. package/skills/playwright-qa/references/cli.md +116 -0
  162. package/skills/playwright-qa/references/workflows.md +95 -0
  163. package/skills/playwright-qa/scripts/playwright_cli.sh +25 -0
  164. package/skills/release-publish/SKILL.md +85 -0
  165. package/skills/repo-bootstrap/SKILL.md +92 -0
  166. package/skills/repo-bootstrap/assets/example-workflows/validate-agents.yml +89 -0
  167. package/skills/repo-bootstrap/assets/root-thin.md +141 -0
  168. package/skills/repo-bootstrap/assets/root-verbose.md +149 -0
  169. package/skills/repo-bootstrap/assets/scoped/backend-go.md +107 -0
  170. package/skills/repo-bootstrap/assets/scoped/backend-php.md +94 -0
  171. package/skills/repo-bootstrap/assets/scoped/backend-python.md +84 -0
  172. package/skills/repo-bootstrap/assets/scoped/backend-typescript.md +89 -0
  173. package/skills/repo-bootstrap/assets/scoped/claude-code-skill.md +101 -0
  174. package/skills/repo-bootstrap/assets/scoped/cli.md +83 -0
  175. package/skills/repo-bootstrap/assets/scoped/concourse.md +196 -0
  176. package/skills/repo-bootstrap/assets/scoped/ddev.md +68 -0
  177. package/skills/repo-bootstrap/assets/scoped/docker.md +160 -0
  178. package/skills/repo-bootstrap/assets/scoped/documentation.md +98 -0
  179. package/skills/repo-bootstrap/assets/scoped/examples.md +96 -0
  180. package/skills/repo-bootstrap/assets/scoped/frontend-typescript.md +88 -0
  181. package/skills/repo-bootstrap/assets/scoped/github-actions.md +174 -0
  182. package/skills/repo-bootstrap/assets/scoped/gitlab-ci.md +174 -0
  183. package/skills/repo-bootstrap/assets/scoped/oro-bundle.md +209 -0
  184. package/skills/repo-bootstrap/assets/scoped/oro-project.md +170 -0
  185. package/skills/repo-bootstrap/assets/scoped/python-modern.md +170 -0
  186. package/skills/repo-bootstrap/assets/scoped/resources.md +96 -0
  187. package/skills/repo-bootstrap/assets/scoped/skill-repo.md +139 -0
  188. package/skills/repo-bootstrap/assets/scoped/symfony.md +168 -0
  189. package/skills/repo-bootstrap/assets/scoped/testing.md +87 -0
  190. package/skills/repo-bootstrap/assets/scoped/typo3-docs.md +103 -0
  191. package/skills/repo-bootstrap/assets/scoped/typo3-extension.md +133 -0
  192. package/skills/repo-bootstrap/assets/scoped/typo3-project.md +137 -0
  193. package/skills/repo-bootstrap/assets/scoped/typo3-testing.md +80 -0
  194. package/skills/repo-bootstrap/checkpoints.yaml +279 -0
  195. package/skills/repo-bootstrap/evals/evals.json +385 -0
  196. package/skills/repo-bootstrap/references/ai-contribution-guidelines.md +63 -0
  197. package/skills/repo-bootstrap/references/ai-tool-compatibility.md +223 -0
  198. package/skills/repo-bootstrap/references/directory-coverage.md +82 -0
  199. package/skills/repo-bootstrap/references/examples/coding-agent-cli/AGENTS.md +70 -0
  200. package/skills/repo-bootstrap/references/examples/coding-agent-cli/go.mod +3 -0
  201. package/skills/repo-bootstrap/references/examples/coding-agent-cli/scripts-AGENTS.md +389 -0
  202. package/skills/repo-bootstrap/references/examples/express-api-ts/.env.example +13 -0
  203. package/skills/repo-bootstrap/references/examples/express-api-ts/AGENTS.md +91 -0
  204. package/skills/repo-bootstrap/references/examples/express-api-ts/package.json +33 -0
  205. package/skills/repo-bootstrap/references/examples/express-api-ts/pnpm-lock.yaml +3 -0
  206. package/skills/repo-bootstrap/references/examples/express-api-ts/src/AGENTS.md +91 -0
  207. package/skills/repo-bootstrap/references/examples/express-api-ts/src/config.ts +28 -0
  208. package/skills/repo-bootstrap/references/examples/express-api-ts/src/controllers/userController.ts +74 -0
  209. package/skills/repo-bootstrap/references/examples/express-api-ts/src/index.ts +26 -0
  210. package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/errorHandler.ts +45 -0
  211. package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/requestLogger.ts +18 -0
  212. package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/health.ts +18 -0
  213. package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/users.ts +13 -0
  214. package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/errors.ts +40 -0
  215. package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/logger.ts +14 -0
  216. package/skills/repo-bootstrap/references/examples/express-api-ts/tsconfig.json +24 -0
  217. package/skills/repo-bootstrap/references/examples/fastapi-app/.env.example +19 -0
  218. package/skills/repo-bootstrap/references/examples/fastapi-app/AGENTS.md +92 -0
  219. package/skills/repo-bootstrap/references/examples/fastapi-app/pyproject.toml +88 -0
  220. package/skills/repo-bootstrap/references/examples/fastapi-app/src/AGENTS.md +85 -0
  221. package/skills/repo-bootstrap/references/examples/fastapi-app/src/__init__.py +3 -0
  222. package/skills/repo-bootstrap/references/examples/fastapi-app/src/config.py +49 -0
  223. package/skills/repo-bootstrap/references/examples/fastapi-app/src/main.py +66 -0
  224. package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/__init__.py +13 -0
  225. package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/item.py +43 -0
  226. package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/user.py +40 -0
  227. package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/__init__.py +5 -0
  228. package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/health.py +20 -0
  229. package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/items.py +61 -0
  230. package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/users.py +55 -0
  231. package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/__init__.py +6 -0
  232. package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/item_service.py +77 -0
  233. package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/user_service.py +69 -0
  234. package/skills/repo-bootstrap/references/examples/fastapi-app/uv.lock +4 -0
  235. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/.scopes +3 -0
  236. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/AGENTS.md +86 -0
  237. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/package.json +20 -0
  238. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/src/App.tsx +5 -0
  239. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/cmd/api/main.go +7 -0
  240. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/go.mod +2 -0
  241. package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/main.go +7 -0
  242. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/.scopes +3 -0
  243. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/AGENTS.md +89 -0
  244. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/go.mod +2 -0
  245. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/AGENTS.md +90 -0
  246. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/package.json +17 -0
  247. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/App.tsx +1 -0
  248. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Button.tsx +1 -0
  249. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Footer.tsx +1 -0
  250. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Header.tsx +1 -0
  251. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Sidebar.tsx +1 -0
  252. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/main.go +7 -0
  253. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package-lock.json +0 -0
  254. package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package.json +12 -0
  255. package/skills/repo-bootstrap/references/examples/ldap-selfservice/AGENTS.md +70 -0
  256. package/skills/repo-bootstrap/references/examples/ldap-selfservice/go.mod +3 -0
  257. package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-AGENTS.md +371 -0
  258. package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-web-AGENTS.md +448 -0
  259. package/skills/repo-bootstrap/references/examples/php-with-frontend/.scopes +3 -0
  260. package/skills/repo-bootstrap/references/examples/php-with-frontend/AGENTS.md +91 -0
  261. package/skills/repo-bootstrap/references/examples/php-with-frontend/composer.json +8 -0
  262. package/skills/repo-bootstrap/references/examples/php-with-frontend/package.json +15 -0
  263. package/skills/repo-bootstrap/references/examples/php-with-frontend/pnpm-lock.yaml +0 -0
  264. package/skills/repo-bootstrap/references/examples/php-with-frontend/src/Controller.php +3 -0
  265. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/AGENTS.md +92 -0
  266. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/package.json +26 -0
  267. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/App.tsx +3 -0
  268. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Button.tsx +10 -0
  269. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Footer.tsx +9 -0
  270. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Header.tsx +9 -0
  271. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/main.tsx +3 -0
  272. package/skills/repo-bootstrap/references/examples/php-with-frontend/web/tsconfig.json +13 -0
  273. package/skills/repo-bootstrap/references/examples/pnpm-workspace/AGENTS.md +75 -0
  274. package/skills/repo-bootstrap/references/examples/pnpm-workspace/package.json +7 -0
  275. package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/package.json +11 -0
  276. package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/src/index.ts +11 -0
  277. package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-lock.yaml +42 -0
  278. package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-workspace.yaml +2 -0
  279. package/skills/repo-bootstrap/references/examples/simple-ldap-go/AGENTS.md +70 -0
  280. package/skills/repo-bootstrap/references/examples/simple-ldap-go/examples-AGENTS.md +45 -0
  281. package/skills/repo-bootstrap/references/examples/simple-ldap-go/go.mod +3 -0
  282. package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/AGENTS.md +70 -0
  283. package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/Classes-AGENTS.md +392 -0
  284. package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/composer.json +8 -0
  285. package/skills/repo-bootstrap/references/feedback-memory-schema.md +135 -0
  286. package/skills/repo-bootstrap/references/git-hooks-setup.md +79 -0
  287. package/skills/repo-bootstrap/references/output-structure.md +124 -0
  288. package/skills/repo-bootstrap/references/scripts-guide.md +175 -0
  289. package/skills/repo-bootstrap/references/verification-guide.md +137 -0
  290. package/skills/repo-bootstrap/scripts/analyze-git-history.sh +315 -0
  291. package/skills/repo-bootstrap/scripts/check-freshness.sh +230 -0
  292. package/skills/repo-bootstrap/scripts/detect-golden-samples.sh +161 -0
  293. package/skills/repo-bootstrap/scripts/detect-heuristics.sh +93 -0
  294. package/skills/repo-bootstrap/scripts/detect-project.sh +486 -0
  295. package/skills/repo-bootstrap/scripts/detect-scopes.sh +330 -0
  296. package/skills/repo-bootstrap/scripts/detect-utilities.sh +133 -0
  297. package/skills/repo-bootstrap/scripts/extract-adrs.sh +194 -0
  298. package/skills/repo-bootstrap/scripts/extract-agent-configs.sh +331 -0
  299. package/skills/repo-bootstrap/scripts/extract-architecture-rules.sh +522 -0
  300. package/skills/repo-bootstrap/scripts/extract-ci-commands.sh +385 -0
  301. package/skills/repo-bootstrap/scripts/extract-ci-rules.sh +384 -0
  302. package/skills/repo-bootstrap/scripts/extract-commands.sh +358 -0
  303. package/skills/repo-bootstrap/scripts/extract-documentation.sh +308 -0
  304. package/skills/repo-bootstrap/scripts/extract-github-rulesets.sh +96 -0
  305. package/skills/repo-bootstrap/scripts/extract-github-settings.sh +88 -0
  306. package/skills/repo-bootstrap/scripts/extract-ide-settings.sh +228 -0
  307. package/skills/repo-bootstrap/scripts/extract-platform-files.sh +290 -0
  308. package/skills/repo-bootstrap/scripts/extract-quality-configs.sh +442 -0
  309. package/skills/repo-bootstrap/scripts/generate-agents.sh +2424 -0
  310. package/skills/repo-bootstrap/scripts/generate-file-map.sh +153 -0
  311. package/skills/repo-bootstrap/scripts/lib/config-root.sh +211 -0
  312. package/skills/repo-bootstrap/scripts/lib/summary.sh +244 -0
  313. package/skills/repo-bootstrap/scripts/lib/template.sh +397 -0
  314. package/skills/repo-bootstrap/scripts/validate-structure.sh +324 -0
  315. package/skills/repo-bootstrap/scripts/verify-commands.sh +615 -0
  316. package/skills/repo-bootstrap/scripts/verify-content.sh +302 -0
  317. package/skills/schema-api-contracts/SKILL.md +56 -0
  318. package/skills/secret-hygiene/SKILL.md +511 -0
  319. package/skills/secret-hygiene/assets/.gitkeep +9 -0
  320. package/skills/secret-hygiene/assets/config-balanced.toml +81 -0
  321. package/skills/secret-hygiene/assets/config-custom.toml +178 -0
  322. package/skills/secret-hygiene/assets/config-strict.toml +48 -0
  323. package/skills/secret-hygiene/assets/github-action.yml +181 -0
  324. package/skills/secret-hygiene/assets/gitlab-ci.yml +257 -0
  325. package/skills/secret-hygiene/assets/precommit-config.yaml +70 -0
  326. package/skills/secret-hygiene/references/EXAMPLE.md +40 -0
  327. package/skills/secret-hygiene/references/compliance_mapping.md +538 -0
  328. package/skills/secret-hygiene/references/detection_rules.md +276 -0
  329. package/skills/secret-hygiene/references/false_positives.md +598 -0
  330. package/skills/secret-hygiene/references/remediation_guide.md +530 -0
  331. package/skills/stack-selector/SKILL.md +56 -0
  332. package/skills/telegram-control/SKILL.md +110 -0
  333. package/skills/telegram-control/references/architecture.md +184 -0
  334. package/skills/telegram-control/references/convex.md +173 -0
  335. package/skills/telegram-control/references/error_handling.md +212 -0
  336. package/skills/telegram-control/references/initial_setup.md +165 -0
  337. package/skills/telegram-control/references/telegram_api.md +156 -0
  338. package/skills/telegram-control/scripts/cancel_message.ts +53 -0
  339. package/skills/telegram-control/scripts/list_scheduled.ts +103 -0
  340. package/skills/telegram-control/scripts/logger.ts +121 -0
  341. package/skills/telegram-control/scripts/proxy-util.ts +11 -0
  342. package/skills/telegram-control/scripts/schedule_message.ts +216 -0
  343. package/skills/telegram-control/scripts/send_message.ts +115 -0
  344. package/skills/telegram-control/scripts/setup.ts +185 -0
  345. package/skills/telegram-control/scripts/types.ts +75 -0
  346. package/skills/telegram-control/scripts/view_history.ts +74 -0
  347. package/skills/test-strategy/SKILL.md +352 -0
  348. package/skills/threat-model/SKILL.md +303 -0
  349. package/skills/threat-model/examples/example-output.md +196 -0
  350. package/skills/threat-model/template.md +96 -0
  351. package/skills/ts-lint/SKILL.md +80 -0
  352. package/skills/ui-flow/SKILL.md +668 -0
  353. package/skills/voice-command-router/SKILL.md +51 -0
  354. package/skills/widget-live-activity-sync/SKILL.md +66 -0
@@ -0,0 +1,124 @@
1
+ # Workflow
2
+
3
+ KubeShark operates through a 7-step workflow defined in `SKILL.md`. The workflow runs top to bottom on every Kubernetes task. This page explains what each step does and why it exists.
4
+
5
+ ---
6
+
7
+ ## Step 1: Capture Execution Context
8
+
9
+ Before writing any YAML, KubeShark records the environment it is operating in. This prevents the most common LLM failure: generating manifests that assume a generic cluster and ignore the user's actual setup.
10
+
11
+ **Context captured:**
12
+
13
+ | Dimension | Examples | Why it matters |
14
+ |-----------|----------|----------------|
15
+ | Cluster version | 1.29, 1.30, 1.31 | API availability differs across versions; deprecated APIs cause hard failures |
16
+ | Distribution | EKS, GKE, AKS, k3s, vanilla | Each has distribution-specific defaults, storage classes, and networking behaviors |
17
+ | Namespace | `default`, `production`, `monitoring` | Determines resource quotas, network policies, and RBAC scope |
18
+ | Environment | dev, staging, prod | Controls security strictness, resource sizing, and validation rigor |
19
+ | Workload type | Deployment, StatefulSet, Job, CronJob, DaemonSet | Different workload types have different failure patterns and configuration requirements |
20
+ | Deployment method | Raw YAML, Helm, Kustomize, operator-managed | Determines output format and which tooling references to load |
21
+ | Policy enforcement | Pod Security Admission, Kyverno, OPA/Gatekeeper | Affects what security controls are required versus optional |
22
+ | Cloud provider and CNI | AWS/VPC CNI, GCP/Calico, Azure/Azure CNI | Impacts networking, storage classes, load balancer annotations, and service mesh compatibility |
23
+
24
+ When any dimension is unknown, KubeShark states the assumption explicitly rather than guessing silently. These assumptions appear in the output contract (Step 7) so the user can verify them.
25
+
26
+ ---
27
+
28
+ ## Step 2: Diagnose Failure Modes
29
+
30
+ This is the step that distinguishes KubeShark from a reference manual. Before generating anything, the workflow identifies which of the six failure modes are relevant to the task.
31
+
32
+ **The six failure modes:**
33
+
34
+ 1. **Insecure workload defaults** -- missing security contexts, PSS violations, host access, excessive capabilities
35
+ 2. **Resource starvation** -- missing requests/limits, no QoS strategy, absent PodDisruptionBudgets, scheduling chaos
36
+ 3. **Network exposure** -- flat networking, missing NetworkPolicies, wrong Service types, DNS misconfigurations
37
+ 4. **Privilege sprawl** -- overly permissive RBAC, leaked secrets, unscoped ServiceAccount tokens
38
+ 5. **Fragile rollouts** -- misconfigured probes, mutable image tags, unsafe update strategies, missing graceful shutdown
39
+ 6. **API drift** -- wrong apiVersion, deprecated APIs, schema violations, tool-specific structural errors
40
+
41
+ Most tasks trigger multiple failure modes. A "create a Deployment with an Ingress" request involves at least insecure workload defaults, network exposure, and fragile rollouts. The diagnosis step ensures none of these are overlooked.
42
+
43
+ See [Failure Modes](failure-modes.md) for a detailed breakdown of each.
44
+
45
+ ---
46
+
47
+ ## Step 3: Load Targeted References
48
+
49
+ KubeShark includes 20 reference files, but only 1-2 are loaded per query. This is a deliberate token efficiency decision: loading all references would burn thousands of tokens on irrelevant guidance.
50
+
51
+ **Reference selection logic:**
52
+
53
+ - A probe configuration question loads `fragile-rollouts.md` -- it never touches `privilege-sprawl.md` or `network-exposure.md`.
54
+ - A Helm chart task loads `helm-patterns.md` and the failure-mode reference for the workload being charted.
55
+ - A security review loads `insecure-workload-defaults.md` and `security-hardening.md`.
56
+
57
+ **Reference categories:**
58
+
59
+ | Category | Files | Loaded when |
60
+ |----------|-------|-------------|
61
+ | Primary failure modes | 6 files (one per failure mode) | The corresponding failure mode is diagnosed in Step 2 |
62
+ | Workload patterns | Deployment, StatefulSet, Job, DaemonSet patterns | Generating a specific workload type |
63
+ | Cross-cutting concerns | Security hardening, observability, multi-tenancy, storage | The task spans multiple domains |
64
+ | Tooling | Helm patterns, Kustomize patterns, validation and policy | Using a specific deployment tool |
65
+ | Pattern banks | Good examples, bad examples, do/don't checklist | Reviewing code or learning patterns |
66
+
67
+ Each reference file is self-contained. No file depends on another being loaded simultaneously.
68
+
69
+ ---
70
+
71
+ ## Step 4: Propose Fix Path
72
+
73
+ For every recommendation, KubeShark provides three things:
74
+
75
+ 1. **Why this addresses the failure mode** -- the causal link between the fix and the diagnosed risk.
76
+ 2. **What could still go wrong** -- runtime behavior, edge cases, and deployment-time risks that remain even after the fix.
77
+ 3. **Guardrails** -- validation commands, policy checks, and rollback paths that protect against the remaining risks.
78
+
79
+ This structure prevents a common LLM pattern: recommending a fix without acknowledging its limitations. A liveness probe fix that does not mention the risk of checking external dependencies is incomplete. A NetworkPolicy recommendation that does not mention egress is incomplete.
80
+
81
+ ---
82
+
83
+ ## Step 5: Generate Artifacts
84
+
85
+ When the task calls for implementation, KubeShark produces the appropriate artifacts:
86
+
87
+ - **Kubernetes manifests** -- YAML with security contexts, resource limits, proper labels, and annotations
88
+ - **Helm values and templates** -- chart structure following Helm best practices
89
+ - **Kustomize overlays** -- base/overlay structure with proper patch formats
90
+ - **NetworkPolicies** -- default-deny with explicit allow rules
91
+ - **RBAC resources** -- least-privilege Roles and RoleBindings with dedicated ServiceAccounts
92
+ - **PodDisruptionBudgets** -- tuned to workload replica count and availability requirements
93
+ - **Policy rules** -- Kyverno ClusterPolicies or OPA/Gatekeeper ConstraintTemplates
94
+
95
+ All generated manifests default to the Pod Security Standards restricted profile: `runAsNonRoot: true`, `allowPrivilegeEscalation: false`, `readOnlyRootFilesystem: true`, `drop: ["ALL"]` capabilities, and `RuntimeDefault` seccomp profile.
96
+
97
+ ---
98
+
99
+ ## Step 6: Validate
100
+
101
+ KubeShark never recommends applying directly to production without validation. Every response includes validation steps matched to the deployment method and risk level:
102
+
103
+ - **`kubectl apply --dry-run=server`** or **`kubectl diff`** -- catches API-level errors without making changes
104
+ - **`kubeconform`** -- schema validation against the target cluster version to catch API drift
105
+ - **Cross-resource consistency checks** -- verifies that labels, selectors, ports, and names align across Deployments, Services, Ingress, PDBs, HPAs, and NetworkPolicies
106
+ - **Policy scan** -- PSS profile compliance check, Kyverno audit, or OPA/Gatekeeper dry-run
107
+
108
+ Cross-resource consistency is especially important because Kubernetes silently accepts mismatched selectors. A Service with a selector that matches no pods deploys without error -- the failure only surfaces when traffic arrives.
109
+
110
+ ---
111
+
112
+ ## Step 7: Output Contract
113
+
114
+ Every KubeShark response ends with a structured output contract containing five sections:
115
+
116
+ | Section | Purpose |
117
+ |---------|---------|
118
+ | **Assumptions and cluster version floor** | States what was assumed about the cluster, distribution, and environment so the user can verify |
119
+ | **Selected failure modes** | Lists which of the 6 failure modes were diagnosed as relevant |
120
+ | **Chosen remediation and tradeoffs** | Explains what was recommended and what was explicitly traded off |
121
+ | **Validation/test plan** | Provides the specific commands and checks to verify the output |
122
+ | **Rollback/recovery notes** | Describes how to undo the changes if something goes wrong -- `kubectl rollout undo`, revision history, data safety considerations |
123
+
124
+ The output contract makes every response auditable. A reviewer can check whether the assumptions match reality, whether the right failure modes were identified, and whether the rollback path is viable -- all before applying anything to the cluster.
@@ -0,0 +1,47 @@
1
+ # Bad Patterns -- Common LLM Anti-Patterns
2
+
3
+ These eight anti-patterns represent manifests that LLMs frequently generate. Each one compiles and appears valid but has serious issues in production. The danger of these patterns is that Kubernetes accepts them without error -- the failure only surfaces at runtime or under load.
4
+
5
+ For full annotated YAML with detailed explanations of what is wrong in each case, see [references/examples-bad.md](https://github.com/LukasNiessen/kubernetes-skill/blob/main/references/examples-bad.md).
6
+
7
+ ## 1. Deployment Running as Root with No Security Context
8
+
9
+ No `securityContext` at pod or container level -- container runs as root by default. Missing `runAsNonRoot`, `allowPrivilegeEscalation: false`, `readOnlyRootFilesystem`, capabilities drop, seccomp profile. Also lacks resource requests, probes, and standard labels. Uses `:latest` tag.
10
+
11
+ **Failure modes:** Insecure workload defaults, resource starvation, fragile rollouts.
12
+
13
+ ## 2. Service with Selector That Matches No Pods
14
+
15
+ Service selector includes `version: v1` but pods have `version: v2`. Kubernetes does not warn about selector mismatches -- the Service silently has zero endpoints. A frequent LLM mistake when updating version labels on the Deployment without updating the Service.
16
+
17
+ ## 3. ClusterRoleBinding with cluster-admin for a Single-Namespace App
18
+
19
+ Binds a single-namespace application ServiceAccount to `cluster-admin`, granting unrestricted access to the entire cluster. If the service account token is compromised, the attacker owns every namespace, every resource, every verb.
20
+
21
+ **Failure mode:** Privilege sprawl.
22
+
23
+ ## 4. Liveness Probe Checking External Database
24
+
25
+ Liveness probe depends on `pg_isready` against an external database. If the database is briefly unavailable, Kubernetes kills all API pods, causing cascading failure: database blip leads to thundering herd reconnects and further overload.
26
+
27
+ ## 5. Deployment with :latest Tag and No imagePullPolicy
28
+
29
+ Uses the mutable `:latest` tag. Different nodes may pull different versions, causing inconsistent behavior across replicas. Rollbacks are impossible because every revision points to the same tag.
30
+
31
+ ## 6. Ingress Using Removed API Version
32
+
33
+ Uses `extensions/v1beta1` (removed in Kubernetes 1.22) with the deprecated `kubernetes.io/ingress.class` annotation, old backend syntax (`serviceName`/`servicePort`), and missing `pathType`. LLMs frequently generate this because training data contains many examples of the old API.
34
+
35
+ **Failure mode:** API drift.
36
+
37
+ ## 7. Secret Data in a ConfigMap
38
+
39
+ Stores database passwords, API keys, and AWS credentials in a ConfigMap instead of a Secret. ConfigMaps are stored unencrypted in etcd and appear in plain text in `kubectl describe`, logs, and version control.
40
+
41
+ ## 8. PVC with ReadWriteMany on an Unsupported Provider
42
+
43
+ Requests `ReadWriteMany` access mode with a `gp3` (AWS EBS) storage class. EBS volumes only support `ReadWriteOnce`. The PVC will be stuck in `Pending` state with no clear error. LLMs frequently pair RWX with block storage classes because they do not track provider-specific storage capabilities.
44
+
45
+ ---
46
+
47
+ Each anti-pattern maps to one or more of KubeShark's six failure modes. The reference file includes the exact broken YAML so you can study the specific mistakes and understand why Kubernetes does not catch them at admission time.
@@ -0,0 +1,37 @@
1
+ # Do/Don't Quick Reference Checklist
2
+
3
+ A terse, actionable checklist of Kubernetes best practices organized by category. Each line is a standalone rule. The default security posture is the PSS restricted profile.
4
+
5
+ For the full checklist with every rule, see [references/do-dont-patterns.md](https://github.com/LukasNiessen/kubernetes-skill/blob/main/references/do-dont-patterns.md).
6
+
7
+ ## Categories Covered
8
+
9
+ The checklist spans eight categories that map directly to KubeShark's failure modes:
10
+
11
+ | Category | Key concern |
12
+ |---|---|
13
+ | **Security Contexts** | runAsNonRoot, capabilities, seccomp, read-only filesystem |
14
+ | **RBAC** | Namespace-scoped roles, least-privilege verbs, no wildcards |
15
+ | **Resource Management** | Requests/limits, ResourceQuota, LimitRange, QoS class |
16
+ | **Networking** | Default-deny NetworkPolicy, DNS egress, ingressClassName |
17
+ | **Probes and Rollouts** | Readiness/liveness separation, revision history, zero-downtime |
18
+ | **Image Management** | Immutable tags, imagePullPolicy, private registry secrets |
19
+ | **Storage** | Access mode vs storage class, volumeClaimTemplates, no hostPath |
20
+ | **Configuration** | Secrets not ConfigMaps, ExternalSecrets, hash-based naming |
21
+ | **Namespaces and Isolation** | PSA labels, ResourceQuota per namespace, trust boundaries |
22
+
23
+ ## How to Use
24
+
25
+ Use this checklist as a final review pass before applying any manifest to a cluster. Each DO/DON'T rule is self-contained -- you can check them individually without reading the surrounding context. The checklist is designed for both human review and LLM self-verification during manifest generation.
26
+
27
+ ## Relationship to Failure Modes
28
+
29
+ The categories map directly to KubeShark's six named failure modes:
30
+
31
+ - **Security Contexts, RBAC** -- insecure workload defaults, privilege sprawl
32
+ - **Resource Management** -- resource starvation
33
+ - **Networking** -- network exposure
34
+ - **Probes and Rollouts, Image Management** -- fragile rollouts
35
+ - **Storage, Configuration, Namespaces** -- cross-cutting concerns that affect multiple failure modes
36
+
37
+ Every rule in the checklist exists because it prevents a specific, observed failure pattern. No generic advice is included unless it maps to a real failure mode.
@@ -0,0 +1,49 @@
1
+ # Good Patterns -- Production-Ready Examples
2
+
3
+ These eight patterns demonstrate production-ready Kubernetes manifests that follow the PSS restricted profile, include proper labels, and set explicit resource constraints. Each pattern is annotated with key points explaining why specific choices were made.
4
+
5
+ For the full annotated YAML of every pattern below, see [references/examples-good.md](https://github.com/LukasNiessen/kubernetes-skill/blob/main/references/examples-good.md).
6
+
7
+ ## 1. Minimal Production Deployment
8
+
9
+ A complete Deployment with full security context (pod-level and container-level), resource bounds, liveness and readiness probes, topology spread constraints, and standard `app.kubernetes.io/*` labels. Demonstrates the `readOnlyRootFilesystem` pattern with an emptyDir `/tmp` mount.
10
+
11
+ **Key takeaway:** Both pod-level and container-level `securityContext` are required. Topology spread prevents all replicas landing on one node.
12
+
13
+ ## 2. Default-Deny NetworkPolicy
14
+
15
+ A two-resource pattern: a blanket deny-all policy (empty `podSelector`) followed by a targeted allow policy. Demonstrates allowing specific ingress from an ingress controller, scoped egress to a database, and mandatory DNS egress to kube-dns.
16
+
17
+ **Key takeaway:** Always allow DNS egress (UDP/TCP 53 to kube-dns) or name resolution breaks silently.
18
+
19
+ ## 3. Scoped RBAC for CI Deployer
20
+
21
+ Namespace-scoped Role and RoleBinding for a CI pipeline ServiceAccount. Only grants the specific verbs and resources needed for deployment -- no `delete`, no `cluster-admin`, no ClusterRoleBinding.
22
+
23
+ ## 4. CronJob with Lifecycle Controls
24
+
25
+ A CronJob with `concurrencyPolicy: Forbid`, `startingDeadlineSeconds`, `activeDeadlineSeconds`, `ttlSecondsAfterFinished`, history limits, and proper security context. Demonstrates safe scheduled job configuration that prevents overlapping runs and auto-cleans completed pods.
26
+
27
+ **Key takeaway:** `activeDeadlineSeconds` kills jobs that hang; `ttlSecondsAfterFinished` auto-cleans completed pods.
28
+
29
+ ## 5. Ingress with TLS and Path-Based Routing
30
+
31
+ Uses the current `networking.k8s.io/v1` API with `ingressClassName` (not the deprecated annotation), TLS configuration, and path-based routing with explicit `pathType`. More specific paths listed first.
32
+
33
+ ## 6. HPA with Scale-Down Stabilization
34
+
35
+ An HPA using `autoscaling/v2` with separate scale-up and scale-down behaviors. Scale-down is conservative (300s stabilization window, 25% per minute limit) while scale-up is aggressive. Targets both CPU and memory utilization.
36
+
37
+ ## 7. Namespace with Quota, LimitRange, and PSA Labels
38
+
39
+ A complete namespace setup: PSA labels enforcing the restricted profile, a ResourceQuota capping total resource consumption, and a LimitRange providing defaults and bounds for containers that omit resource specs.
40
+
41
+ ## 8. ExternalSecret for Vault Integration
42
+
43
+ Namespace-scoped SecretStore with Vault backend using Kubernetes auth, and an ExternalSecret that syncs credentials with a refresh interval. Demonstrates `deletionPolicy: Retain` to prevent accidental secret loss.
44
+
45
+ **Key takeaway:** Use namespace-scoped SecretStore (not ClusterSecretStore) unless multiple namespaces genuinely share the same Vault path.
46
+
47
+ ---
48
+
49
+ Each of these patterns addresses one or more of KubeShark's six named failure modes. Use them as starting points and adapt to your cluster's specific requirements.
@@ -0,0 +1,104 @@
1
+ # FM6: API Drift
2
+
3
+ Kubernetes follows a strict API deprecation lifecycle: beta APIs are introduced, stable APIs replace them, and beta APIs are eventually removed. LLMs hallucinate removed API versions more than any other type of Kubernetes error because their training data contains years of blog posts, tutorials, and Stack Overflow answers written for older cluster versions.
4
+
5
+ ## The Deprecation Lifecycle
6
+
7
+ Every API migration follows the same pattern:
8
+
9
+ 1. **Beta API introduced** -- a new resource or feature enters as `v1beta1` under an API group.
10
+ 2. **Stable API introduced** -- the resource graduates to `v1`. The beta version is deprecated in the same release or shortly after.
11
+ 3. **Beta API removed** -- typically 2-3 minor versions after deprecation, per the Kubernetes deprecation policy. From this point, the API server rejects manifests using the old version with a hard error.
12
+
13
+ "Deprecated" means the API still works but prints a warning. "Removed" means it fails. LLMs do not distinguish between these states.
14
+
15
+ ## Major Migrations LLMs Get Wrong
16
+
17
+ ### Ingress: `extensions/v1beta1` to `networking.k8s.io/v1`
18
+
19
+ Removed in Kubernetes 1.22. This is the most frequently hallucinated API version because Ingress existed as a beta for years (1.1 through 1.21) and generated enormous amounts of training data.
20
+
21
+ The structural changes in v1 are not just a version swap:
22
+ - `spec.backend` renamed to `spec.defaultBackend`.
23
+ - `serviceName` and `servicePort` (flat fields) replaced by `service.name` and `service.port.number` (nested).
24
+ - `pathType` is required on every path -- it was optional in beta.
25
+ - `ingressClassName` replaces the `kubernetes.io/ingress.class` annotation.
26
+
27
+ An LLM that generates `extensions/v1beta1` will also use the old field structure, compounding the error.
28
+
29
+ ### PodDisruptionBudget: `policy/v1beta1` to `policy/v1`
30
+
31
+ Removed in Kubernetes 1.25. The v1 API makes `spec.selector` immutable after creation and adds `spec.unhealthyPodEvictionPolicy`. LLMs frequently generate `policy/v1beta1` because PDB examples in training data predate 1.25.
32
+
33
+ ### HorizontalPodAutoscaler: `autoscaling/v2beta1` and `v2beta2` to `autoscaling/v2`
34
+
35
+ `v2beta1` removed in 1.25, `v2beta2` removed in 1.26. The key structural change: `targetAverageUtilization` (a top-level field in beta) moves to `target.averageUtilization` (nested under `target` in v2). LLMs mix beta and stable field structures unpredictably.
36
+
37
+ ### Other Removed APIs
38
+
39
+ | Resource | Old API | Stable API | Removed in |
40
+ |---|---|---|---|
41
+ | CronJob | `batch/v1beta1` | `batch/v1` | 1.25 |
42
+ | EndpointSlice | `discovery.k8s.io/v1beta1` | `discovery.k8s.io/v1` | 1.25 |
43
+ | CSIDriver | `storage.k8s.io/v1beta1` | `storage.k8s.io/v1` | 1.22 |
44
+ | FlowSchema | `flowcontrol.apiserver.k8s.io/v1beta1` | `v1` | 1.26 |
45
+
46
+ ## Schema Validation
47
+
48
+ There are two levels of manifest validity, and LLM-generated manifests can fail at either:
49
+
50
+ - **Structural validity:** Does the YAML conform to the schema for this API version? Caught by `kubeconform` or `--dry-run=server`. Wrong field names, wrong nesting, unknown fields.
51
+ - **Semantic validity:** Does the manifest make sense in context? Does the referenced Service exist? Is the port correct? Caught only at apply time or with policy tools.
52
+
53
+ `kubeconform` validates manifests against the OpenAPI schema for a specific Kubernetes version. Always pin the version to match your target cluster:
54
+
55
+ ```bash
56
+ kubeconform -kubernetes-version 1.30.0 -strict manifests/
57
+ ```
58
+
59
+ The `-strict` flag rejects unknown fields, which catches the common case where an LLM generates fields from one API version in a manifest tagged with a different version.
60
+
61
+ ## Helm-Specific Drift
62
+
63
+ Helm templates can produce syntactically valid YAML that uses the wrong API version. The template renders without error, but `kubectl apply` fails on the cluster. Use `Capabilities.APIVersions` to branch on cluster version:
64
+
65
+ {% raw %}
66
+ ```yaml
67
+ {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
68
+ apiVersion: networking.k8s.io/v1
69
+ {{- else }}
70
+ apiVersion: networking.k8s.io/v1beta1
71
+ {{- end }}
72
+ ```
73
+ {% endraw %}
74
+
75
+ Another common Helm drift error: broken Go template expressions that fail silently. {% raw %}`{{ .Values.replicas }}`{% endraw %} evaluates to empty (not an error) if `replicas` is not defined in `values.yaml`. Always use defaults: {% raw %}`{{ .Values.replicas | default 3 }}`{% endraw %}.
76
+
77
+ ## Kustomize-Specific Drift
78
+
79
+ Kustomize strategic merge patches specify a `target` with `group`, `version`, and `kind`. If the API group in the patch does not match the resource, the patch silently fails to apply -- no error, no warning, just unpatched output.
80
+
81
+ ## What LLMs Get Wrong
82
+
83
+ 1. **`extensions/v1beta1` for Ingress.** Removed since 1.22, but still the most common LLM-generated Ingress API version.
84
+ 2. **Beta HPA API versions.** Mixing `autoscaling/v2beta1` field structures with `autoscaling/v2` API version, or vice versa.
85
+ 3. **Flat Ingress backend fields.** Using `serviceName`/`servicePort` instead of the nested `service.name`/`service.port.number` structure.
86
+ 4. **Missing `pathType` on Ingress paths.** Required in `networking.k8s.io/v1` but optional in beta. LLMs trained on beta examples omit it.
87
+ 5. **`batch/v1beta1` for CronJob.** Removed since 1.25, but CronJob tutorials from the beta era are abundant in training data.
88
+ 6. **No schema validation in the workflow.** LLMs generate manifests without suggesting validation, so errors are discovered only at deploy time.
89
+
90
+ ## Prevention
91
+
92
+ The most effective defense against API drift is automated validation in the CI pipeline:
93
+
94
+ 1. **`kubeconform`** with `-strict` and `-kubernetes-version` matching the target cluster.
95
+ 2. **`pluto`** scans manifests, Helm charts, and running clusters for deprecated and removed APIs.
96
+ 3. **`--dry-run=server`** validates against the live API server schema, catching CRD and admission webhook issues that offline tools miss.
97
+
98
+ Run all three: kubeconform in CI, pluto as a pre-commit check, and dry-run=server in the deployment pipeline.
99
+
100
+ ## Further Reading
101
+
102
+ - [Kubernetes Deprecation Policy](https://kubernetes.io/docs/reference/using-api/deprecation-policy/)
103
+ - [API Migration Guide](https://kubernetes.io/docs/reference/using-api/deprecation-guide/)
104
+ - [KubeShark Validation and Policy Guide](../guides/validation-and-policy.md)
@@ -0,0 +1,99 @@
1
+ # FM5: Fragile Rollouts
2
+
3
+ A bad rollout is worse than no rollout. Misconfigured probes, mutable image tags, and missing graceful shutdown logic turn routine deployments into outages. Fragile rollouts are the failure mode most likely to cause user-facing downtime because they activate during the exact moment the system is changing.
4
+
5
+ ## The Three Probe Types
6
+
7
+ Kubernetes provides three probes, each with a distinct purpose. Confusing them is the leading cause of cascading failures:
8
+
9
+ - **Liveness probe:** "Is the process alive?" If it fails, the kubelet kills and restarts the container. This probe must check only the process itself -- never external dependencies.
10
+ - **Readiness probe:** "Can this pod serve traffic?" If it fails, the pod is removed from Service endpoints. This is where dependency checks belong -- if the database is down, the pod should stop receiving requests but should not be killed.
11
+ - **Startup probe:** "Has initialization finished?" Disables liveness and readiness checks until it succeeds. Required for applications with slow startup (JVM warmup, ML model loading, large cache priming).
12
+
13
+ ## Cascading Failure From Liveness Probes
14
+
15
+ The single most dangerous rollout misconfiguration is a liveness probe that checks an external dependency. When the database goes down:
16
+
17
+ 1. The liveness probe fails on all pods simultaneously.
18
+ 2. The kubelet restarts all pods.
19
+ 3. Pods restart, database is still down, liveness fails again.
20
+ 4. The entire service enters `CrashLoopBackOff` with exponential backoff.
21
+ 5. When the database recovers, the service takes minutes to recover because of the backoff timer.
22
+
23
+ If the liveness probe only checked "is the main thread responsive?", the pods would have stayed up and resumed serving immediately when the database returned. The readiness probe would have removed them from traffic in the meantime.
24
+
25
+ ## The `:latest` Tag Trap
26
+
27
+ Using `:latest` as an image tag introduces three problems:
28
+
29
+ 1. **Nondeterminism:** Different nodes may cache different image layers. After a rollout, some pods run version A and others run version B, depending on which nodes had cached layers.
30
+ 2. **Impossible rollbacks:** `kubectl rollout undo` re-deploys the same `:latest` tag, which may now point to a newer (broken) image.
31
+ 3. **Silent drift:** No change is detected by the Deployment controller because the tag has not changed, even though the image content has.
32
+
33
+ With `imagePullPolicy: IfNotPresent` (the default for non-`:latest` tags), nodes use cached images. With `:latest`, the default policy is `Always`, but some environments override this, creating inconsistent behavior.
34
+
35
+ The fix: always use immutable tags -- semantic versions (`v2.4.1`), git SHAs, or digests (`@sha256:...`).
36
+
37
+ ## Rolling Update Strategy
38
+
39
+ The `strategy.rollingUpdate` fields control how many pods are replaced simultaneously:
40
+
41
+ - **`maxSurge`**: How many extra pods above the desired count during the update. Higher values speed up rollouts but consume more resources.
42
+ - **`maxUnavailable`**: How many pods can be unavailable during the update. Set to `0` for zero-downtime deployments (requires `maxSurge >= 1`).
43
+ - **`minReadySeconds`**: How long a new pod must be Ready before it counts as Available. Catches pods that start successfully but crash shortly after (e.g., failing to connect to a dependency after initialization).
44
+
45
+ For critical services, use `maxSurge: 1, maxUnavailable: 0`. This ensures capacity never drops below the desired count during a rollout.
46
+
47
+ ## Graceful Shutdown
48
+
49
+ When Kubernetes terminates a pod, two things happen in parallel:
50
+ 1. The pod is removed from Service endpoints (asynchronous).
51
+ 2. The container receives `SIGTERM`.
52
+
53
+ Because endpoint removal is asynchronous, the pod may still receive traffic for several seconds after `SIGTERM`. Without a `preStop` hook, the application begins shutting down while requests are still arriving, causing dropped connections and 502 errors.
54
+
55
+ The fix is a `preStop` sleep of 3-5 seconds to allow endpoint propagation before the application begins its shutdown sequence:
56
+
57
+ ```yaml
58
+ lifecycle:
59
+ preStop:
60
+ exec:
61
+ command: ["sh", "-c", "sleep 5"]
62
+ ```
63
+
64
+ Set `terminationGracePeriodSeconds` to a value that exceeds the preStop sleep plus the application's drain time. The default of 30 seconds is often insufficient for applications with long-lived connections.
65
+
66
+ ## Init Containers for Dependency Waiting
67
+
68
+ Dependencies should be waited on in init containers, not liveness probes. An init container blocks pod startup until the dependency is available, then exits. This keeps the probe system focused on runtime health, not startup prerequisites:
69
+
70
+ ```yaml
71
+ initContainers:
72
+ - name: wait-for-db
73
+ image: busybox:1.36
74
+ command: ["sh", "-c", "until nc -z postgres 5432; do sleep 2; done"]
75
+ ```
76
+
77
+ ## What LLMs Get Wrong
78
+
79
+ 1. **Liveness probe checking database connectivity.** The number one cause of cascading outages. Liveness should check only process health.
80
+ 2. **Same endpoint for liveness and readiness.** These probes have different purposes and should hit different endpoints (`/healthz` for liveness, `/ready` for readiness).
81
+ 3. **No startup probe for slow applications.** JVM apps, Python ML services, and applications loading large datasets need 60-120+ seconds to start. Without a startup probe, the liveness probe kills them during initialization.
82
+ 4. **`failureThreshold: 1` on liveness.** A single blip (GC pause, network hiccup) kills the pod. Use at least 3.
83
+ 5. **`:latest` tag with no registry prefix.** `image: myapp:latest` with no registry means the kubelet looks in the default registry, which varies by runtime configuration.
84
+ 6. **Missing `preStop` hook.** Traffic arrives after SIGTERM, causing dropped connections.
85
+ 7. **`maxUnavailable` too high.** With 3 replicas and `maxUnavailable: 2`, only 1 pod serves traffic during rollout -- a single failure causes a complete outage.
86
+
87
+ ## Real-World Impact
88
+
89
+ - **Cloudflare outage (2019):** A misconfigured health check caused a cascading restart of edge proxies across multiple data centers, resulting in a global 30-minute outage.
90
+ - **GitLab incident (2021):** A canary deployment with no readiness probe sent traffic to pods still loading their configuration, causing elevated error rates for 45 minutes.
91
+ - **Shopify Black Friday (2020):** Aggressive liveness probes combined with database latency caused pod restarts during peak traffic, requiring manual intervention to stabilize.
92
+
93
+ Rollout fragility is entirely preventable. Every field -- probes, strategy, shutdown hooks, image tags -- has a correct configuration that eliminates the corresponding failure mode.
94
+
95
+ ## Further Reading
96
+
97
+ - [Configure Liveness, Readiness, and Startup Probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
98
+ - [KubeShark Good Patterns](../examples/good-patterns.md)
99
+ - [KubeShark Bad Patterns](../examples/bad-patterns.md)
@@ -0,0 +1,80 @@
1
+ # FM1: Insecure Workload Defaults
2
+
3
+ Kubernetes does not ship with secure defaults. Pods created without explicit security contexts run as root, retain all Linux capabilities, and have writable root filesystems. This is the single most impactful failure mode for LLM-generated manifests because training data overwhelmingly consists of insecure examples.
4
+
5
+ ## Why This Matters
6
+
7
+ OWASP Kubernetes Top Ten ranks "Insecure Workload Configurations" as **K01** -- the number one risk. A compromised container running as root with full capabilities can escape to the host node, access the cloud metadata service, pivot to other workloads, and exfiltrate secrets. Every missing security control compounds the blast radius.
8
+
9
+ ## Security Context: Pod-Level vs Container-Level
10
+
11
+ Kubernetes splits security settings across two scopes, and both must be configured:
12
+
13
+ - **Pod-level** (`spec.securityContext`): applies to all containers including init containers. This is where `runAsNonRoot`, `runAsUser`, `runAsGroup`, `fsGroup`, and `seccompProfile` belong.
14
+ - **Container-level** (`spec.containers[].securityContext`): per-container overrides. This is where `allowPrivilegeEscalation`, `readOnlyRootFilesystem`, and `capabilities` belong.
15
+
16
+ Omitting either level leaves gaps. A pod-level `runAsNonRoot: true` without container-level `capabilities.drop: [ALL]` still retains dangerous capabilities like `CAP_NET_RAW` (used for ARP spoofing and network sniffing within the cluster).
17
+
18
+ ## Pod Security Standards
19
+
20
+ Kubernetes enforces security through Pod Security Admission (PSA), which evaluates pods against three profiles:
21
+
22
+ | Profile | Purpose | Typical use |
23
+ |---|---|---|
24
+ | **Restricted** | Full hardening: non-root, drop all caps, read-only FS, seccomp required | All application workloads (the KubeShark default) |
25
+ | **Baseline** | Prevents known privilege escalations but allows running as root | Legacy apps that cannot run as non-root |
26
+ | **Privileged** | No restrictions at all | CNI plugins, CSI drivers, node-level agents only |
27
+
28
+ PSA is enforced via namespace labels. A namespace without these labels has no enforcement -- pods run with whatever the manifest specifies, including fully privileged.
29
+
30
+ ## Capabilities and Privilege Escalation
31
+
32
+ Linux capabilities grant fine-grained privileges. The default Docker/containerd capability set includes `CAP_NET_RAW`, `CAP_SETUID`, `CAP_SETGID`, and others that attackers exploit for container escapes. The hardened baseline is:
33
+
34
+ ```yaml
35
+ securityContext:
36
+ capabilities:
37
+ drop:
38
+ - ALL
39
+ ```
40
+
41
+ If a workload genuinely needs a specific capability (e.g., `NET_BIND_SERVICE` to bind port 443), add only that one capability back. Never leave the default set in place.
42
+
43
+ The `allowPrivilegeEscalation: false` field is equally critical. Without it, a process inside the container can gain more privileges than its parent process through setuid binaries or other escalation vectors. This field must be set at the container level -- setting it at the pod level has no effect.
44
+
45
+ ## Host Namespace Access
46
+
47
+ Setting `hostNetwork`, `hostPID`, or `hostIPC` to `true` breaks the container isolation boundary entirely. `hostNetwork` exposes the pod to the node's network stack and bypasses all NetworkPolicy enforcement. `hostPID` lets the container see and signal every process on the node. These fields must be `false` (the default) for all application workloads.
48
+
49
+ ## AppArmor and Seccomp
50
+
51
+ Seccomp restricts which system calls a container can make. The `RuntimeDefault` profile blocks dangerous syscalls like `ptrace` and `mount` while allowing normal application behavior. Under PSS restricted, `seccompProfile.type: RuntimeDefault` is mandatory at the pod level.
52
+
53
+ AppArmor provides mandatory access control on top of seccomp. As of Kubernetes 1.30, AppArmor has graduated to a first-class field (`securityContext.appArmorProfile`), replacing the older annotation-based approach (`container.apparmor.security.beta.kubernetes.io/<name>`). For clusters running 1.30+, use the native field. For older clusters, use the annotation. LLMs frequently mix these two approaches in the same manifest.
54
+
55
+ Custom seccomp profiles (`type: Localhost`) can further restrict syscall access beyond `RuntimeDefault`, but require the profile to be available on every node. Use `RuntimeDefault` as the starting point unless specific workload requirements demand a custom profile.
56
+
57
+ ## What LLMs Get Wrong
58
+
59
+ LLMs reproduce patterns from their training data, which is dominated by quickstart guides and blog posts without security hardening. The most frequent errors:
60
+
61
+ 1. **Omitting security context entirely.** The most common mistake. The generated manifest has no `securityContext` at either level.
62
+ 2. **Setting `runAsNonRoot` but not `runAsUser`.** The kubelet checks the image metadata at runtime -- if the image specifies `USER root`, the pod fails to start with a confusing error.
63
+ 3. **Dropping capabilities partially.** Dropping `SYS_ADMIN` but not all capabilities still leaves `NET_RAW`, `SETUID`, and others.
64
+ 4. **Forgetting init containers.** Security context on main containers but not init containers leaves a privilege escalation window during pod startup.
65
+ 5. **Confusing pod-level and container-level fields.** Putting `allowPrivilegeEscalation` at the pod level (where it is ignored) instead of the container level.
66
+ 6. **Missing `readOnlyRootFilesystem`.** Without it, an attacker can write binaries into the container filesystem. Combine with `emptyDir` mounts for `/tmp` and any other write paths.
67
+
68
+ ## Real-World Impact
69
+
70
+ - **Tesla cryptojacking (2018):** Kubernetes dashboard exposed without authentication, pods deployed with no security context, cryptominers ran as root on GPU nodes.
71
+ - **Shopify bug bounty (2020):** A container escape via `CAP_SYS_ADMIN` in a pod that did not drop capabilities, granting access to the underlying node.
72
+ - **Capital One breach (2019):** While not Kubernetes-specific, the pattern is identical -- overly permissive workload identity plus missing runtime restrictions enabled lateral movement from a single SSRF to full S3 access.
73
+
74
+ The common thread: every breach was amplified by workloads running with more privileges than they needed. Secure defaults are not optional -- they are the primary defense against turning a single vulnerability into a cluster-wide compromise.
75
+
76
+ ## Further Reading
77
+
78
+ - [OWASP Kubernetes Top Ten - K01](https://owasp.org/www-project-kubernetes-top-ten/)
79
+ - [Pod Security Standards](https://kubernetes.io/docs/concepts/security/pod-security-standards/)
80
+ - [KubeShark Security Hardening Guide](../guides/security-hardening.md)