@synapta/skills 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -4
- package/package.json +3 -4
- package/skills/ATTRIBUTION.md +80 -0
- package/skills/accessibility-audit/SKILL.md +325 -0
- package/skills/accessibility-audit/reference/wcag-checklist.md +103 -0
- package/skills/apns-notifier/SKILL.md +86 -0
- package/skills/approval-policy-enforcer/SKILL.md +66 -0
- package/skills/apps-sdk-builder/LICENSE.txt +201 -0
- package/skills/apps-sdk-builder/SKILL.md +328 -0
- package/skills/apps-sdk-builder/agents/openai.yaml +13 -0
- package/skills/apps-sdk-builder/references/app-archetypes.md +132 -0
- package/skills/apps-sdk-builder/references/apps-sdk-docs-workflow.md +135 -0
- package/skills/apps-sdk-builder/references/interactive-state-sync-patterns.md +113 -0
- package/skills/apps-sdk-builder/references/repo-contract-and-validation.md +93 -0
- package/skills/apps-sdk-builder/references/search-fetch-standard.md +67 -0
- package/skills/apps-sdk-builder/references/upstream-example-workflow.md +79 -0
- package/skills/apps-sdk-builder/references/window-openai-patterns.md +79 -0
- package/skills/apps-sdk-builder/scripts/scaffold_node_ext_apps.mjs +606 -0
- package/skills/architecture-selector/SKILL.md +64 -0
- package/skills/backlog-planner/SKILL.md +68 -0
- package/skills/carplay-entitlement-checker/SKILL.md +82 -0
- package/skills/concept-discovery/SKILL.md +517 -0
- package/skills/concept-discovery/assets/sample-analysis.json +81 -0
- package/skills/concept-discovery/expected_outputs/sample-enum-dictionary.md +25 -0
- package/skills/concept-discovery/expected_outputs/sample-page-user-list.md +83 -0
- package/skills/concept-discovery/expected_outputs/sample-prd-readme.md +43 -0
- package/skills/concept-discovery/references/framework-patterns.md +228 -0
- package/skills/concept-discovery/references/prd-quality-checklist.md +65 -0
- package/skills/concept-discovery/scripts/codebase_analyzer.py +732 -0
- package/skills/concept-discovery/scripts/prd_scaffolder.py +435 -0
- package/skills/dast-zap/SKILL.md +453 -0
- package/skills/dast-zap/assets/.gitkeep +9 -0
- package/skills/dast-zap/assets/github_action.yml +207 -0
- package/skills/dast-zap/assets/gitlab_ci.yml +226 -0
- package/skills/dast-zap/assets/zap_automation.yaml +196 -0
- package/skills/dast-zap/assets/zap_context.xml +192 -0
- package/skills/dast-zap/references/EXAMPLE.md +40 -0
- package/skills/dast-zap/references/api_testing_guide.md +475 -0
- package/skills/dast-zap/references/authentication_guide.md +431 -0
- package/skills/dast-zap/references/false_positive_handling.md +427 -0
- package/skills/dast-zap/references/owasp_mapping.md +255 -0
- package/skills/dep-sbom-scan/SKILL.md +466 -0
- package/skills/deploy-cloudflare/SKILL.md +930 -0
- package/skills/deploy-docker/SKILL.md +55 -0
- package/skills/deploy-fly/SKILL.md +228 -0
- package/skills/deploy-k8s/SKILL.md +108 -0
- package/skills/deploy-k8s/assets/logo.png +0 -0
- package/skills/deploy-k8s/docs/README.md +29 -0
- package/skills/deploy-k8s/docs/SUMMARY.md +56 -0
- package/skills/deploy-k8s/docs/advanced/token-efficiency.md +61 -0
- package/skills/deploy-k8s/docs/architecture/multi-tenancy.md +96 -0
- package/skills/deploy-k8s/docs/architecture/storage-and-state.md +102 -0
- package/skills/deploy-k8s/docs/architecture/workload-patterns.md +87 -0
- package/skills/deploy-k8s/docs/book.json +16 -0
- package/skills/deploy-k8s/docs/community/changelog.md +34 -0
- package/skills/deploy-k8s/docs/community/contributing.md +67 -0
- package/skills/deploy-k8s/docs/core-concepts/failure-modes.md +153 -0
- package/skills/deploy-k8s/docs/core-concepts/philosophy.md +83 -0
- package/skills/deploy-k8s/docs/core-concepts/workflow.md +124 -0
- package/skills/deploy-k8s/docs/examples/bad-patterns.md +47 -0
- package/skills/deploy-k8s/docs/examples/do-dont-checklist.md +37 -0
- package/skills/deploy-k8s/docs/examples/good-patterns.md +49 -0
- package/skills/deploy-k8s/docs/failure-modes/api-drift.md +104 -0
- package/skills/deploy-k8s/docs/failure-modes/fragile-rollouts.md +99 -0
- package/skills/deploy-k8s/docs/failure-modes/insecure-workload-defaults.md +80 -0
- package/skills/deploy-k8s/docs/failure-modes/network-exposure.md +98 -0
- package/skills/deploy-k8s/docs/failure-modes/privilege-sprawl.md +91 -0
- package/skills/deploy-k8s/docs/failure-modes/resource-starvation.md +85 -0
- package/skills/deploy-k8s/docs/getting-started/installation.md +152 -0
- package/skills/deploy-k8s/docs/getting-started/quick-start.md +115 -0
- package/skills/deploy-k8s/docs/guides/helm-patterns.md +71 -0
- package/skills/deploy-k8s/docs/guides/kustomize-patterns.md +65 -0
- package/skills/deploy-k8s/docs/guides/observability.md +67 -0
- package/skills/deploy-k8s/docs/guides/security-hardening.md +59 -0
- package/skills/deploy-k8s/docs/guides/validation-and-policy.md +66 -0
- package/skills/deploy-k8s/docs/integrations/mcp-integration.md +52 -0
- package/skills/deploy-k8s/docs/package-lock.json +2892 -0
- package/skills/deploy-k8s/docs/package.json +13 -0
- package/skills/deploy-k8s/references/api-drift.md +298 -0
- package/skills/deploy-k8s/references/conditional/aks-patterns.md +70 -0
- package/skills/deploy-k8s/references/conditional/eks-patterns.md +79 -0
- package/skills/deploy-k8s/references/conditional/gitops-controllers.md +71 -0
- package/skills/deploy-k8s/references/conditional/gke-patterns.md +74 -0
- package/skills/deploy-k8s/references/conditional/observability-stacks.md +80 -0
- package/skills/deploy-k8s/references/conditional/openshift-patterns.md +67 -0
- package/skills/deploy-k8s/references/daemonset-operator-patterns.md +155 -0
- package/skills/deploy-k8s/references/deployment-patterns.md +146 -0
- package/skills/deploy-k8s/references/do-dont-patterns.md +87 -0
- package/skills/deploy-k8s/references/examples-bad.md +282 -0
- package/skills/deploy-k8s/references/examples-good.md +440 -0
- package/skills/deploy-k8s/references/fragile-rollouts.md +303 -0
- package/skills/deploy-k8s/references/helm-patterns.md +203 -0
- package/skills/deploy-k8s/references/insecure-workload-defaults.md +300 -0
- package/skills/deploy-k8s/references/job-patterns.md +120 -0
- package/skills/deploy-k8s/references/kustomize-patterns.md +239 -0
- package/skills/deploy-k8s/references/multi-tenancy.md +343 -0
- package/skills/deploy-k8s/references/network-exposure.md +481 -0
- package/skills/deploy-k8s/references/observability.md +302 -0
- package/skills/deploy-k8s/references/privilege-sprawl.md +273 -0
- package/skills/deploy-k8s/references/resource-starvation.md +374 -0
- package/skills/deploy-k8s/references/security-hardening.md +209 -0
- package/skills/deploy-k8s/references/stateful-patterns.md +130 -0
- package/skills/deploy-k8s/references/storage-and-state.md +330 -0
- package/skills/deploy-k8s/references/validation-and-policy.md +242 -0
- package/skills/deploy-railway/SKILL.md +235 -0
- package/skills/deploy-railway/references/analyze-db-mongo.md +84 -0
- package/skills/deploy-railway/references/analyze-db-mysql.md +254 -0
- package/skills/deploy-railway/references/analyze-db-postgres.md +479 -0
- package/skills/deploy-railway/references/analyze-db-redis.md +208 -0
- package/skills/deploy-railway/references/analyze-db.md +344 -0
- package/skills/deploy-railway/references/configure.md +309 -0
- package/skills/deploy-railway/references/deploy.md +195 -0
- package/skills/deploy-railway/references/operate.md +214 -0
- package/skills/deploy-railway/references/request.md +248 -0
- package/skills/deploy-railway/references/setup.md +312 -0
- package/skills/deploy-railway/scripts/analyze-mongo.py +1549 -0
- package/skills/deploy-railway/scripts/analyze-mysql.py +1195 -0
- package/skills/deploy-railway/scripts/analyze-postgres.py +3058 -0
- package/skills/deploy-railway/scripts/analyze-redis.py +1090 -0
- package/skills/deploy-railway/scripts/dal.py +671 -0
- package/skills/deploy-railway/scripts/enable-pg-stats.py +170 -0
- package/skills/deploy-railway/scripts/pg-extensions.py +370 -0
- package/skills/deploy-railway/scripts/railway-api.sh +52 -0
- package/skills/deploy-ssh/SKILL.md +91 -0
- package/skills/deploy-vercel/SKILL.md +304 -0
- package/skills/deploy-vercel/resources/deploy-codex.sh +301 -0
- package/skills/deploy-vercel/resources/deploy.sh +301 -0
- package/skills/docs-runbooks/SKILL.md +399 -0
- package/skills/drive-status-renderer/SKILL.md +62 -0
- package/skills/iac-scan/SKILL.md +680 -0
- package/skills/iac-scan/assets/.gitkeep +9 -0
- package/skills/iac-scan/assets/checkov_config.yaml +94 -0
- package/skills/iac-scan/assets/github_actions.yml +199 -0
- package/skills/iac-scan/assets/gitlab_ci.yml +218 -0
- package/skills/iac-scan/assets/pre_commit_config.yaml +92 -0
- package/skills/iac-scan/references/EXAMPLE.md +40 -0
- package/skills/iac-scan/references/compliance_mapping.md +237 -0
- package/skills/iac-scan/references/custom_policies.md +460 -0
- package/skills/iac-scan/references/suppression_guide.md +431 -0
- package/skills/incident-briefing/SKILL.md +66 -0
- package/skills/incident-triage/SKILL.md +481 -0
- package/{LICENSE → skills/mcp-builder/LICENSE.txt} +15 -14
- package/skills/mcp-builder/SKILL.md +244 -0
- package/skills/mcp-builder/reference/evaluation.md +602 -0
- package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/skills/mcp-builder/scripts/connections.py +151 -0
- package/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/skills/mobile-pairing/SKILL.md +52 -0
- package/skills/ops-sre/SKILL.md +297 -0
- package/skills/playwright-qa/LICENSE.txt +201 -0
- package/skills/playwright-qa/NOTICE.txt +14 -0
- package/skills/playwright-qa/SKILL.md +156 -0
- package/skills/playwright-qa/agents/openai.yaml +6 -0
- package/skills/playwright-qa/assets/playwright-small.svg +3 -0
- package/skills/playwright-qa/assets/playwright.png +0 -0
- package/skills/playwright-qa/references/cli.md +116 -0
- package/skills/playwright-qa/references/workflows.md +95 -0
- package/skills/playwright-qa/scripts/playwright_cli.sh +25 -0
- package/skills/release-publish/SKILL.md +85 -0
- package/skills/repo-bootstrap/SKILL.md +92 -0
- package/skills/repo-bootstrap/assets/example-workflows/validate-agents.yml +89 -0
- package/skills/repo-bootstrap/assets/root-thin.md +141 -0
- package/skills/repo-bootstrap/assets/root-verbose.md +149 -0
- package/skills/repo-bootstrap/assets/scoped/backend-go.md +107 -0
- package/skills/repo-bootstrap/assets/scoped/backend-php.md +94 -0
- package/skills/repo-bootstrap/assets/scoped/backend-python.md +84 -0
- package/skills/repo-bootstrap/assets/scoped/backend-typescript.md +89 -0
- package/skills/repo-bootstrap/assets/scoped/claude-code-skill.md +101 -0
- package/skills/repo-bootstrap/assets/scoped/cli.md +83 -0
- package/skills/repo-bootstrap/assets/scoped/concourse.md +196 -0
- package/skills/repo-bootstrap/assets/scoped/ddev.md +68 -0
- package/skills/repo-bootstrap/assets/scoped/docker.md +160 -0
- package/skills/repo-bootstrap/assets/scoped/documentation.md +98 -0
- package/skills/repo-bootstrap/assets/scoped/examples.md +96 -0
- package/skills/repo-bootstrap/assets/scoped/frontend-typescript.md +88 -0
- package/skills/repo-bootstrap/assets/scoped/github-actions.md +174 -0
- package/skills/repo-bootstrap/assets/scoped/gitlab-ci.md +174 -0
- package/skills/repo-bootstrap/assets/scoped/oro-bundle.md +209 -0
- package/skills/repo-bootstrap/assets/scoped/oro-project.md +170 -0
- package/skills/repo-bootstrap/assets/scoped/python-modern.md +170 -0
- package/skills/repo-bootstrap/assets/scoped/resources.md +96 -0
- package/skills/repo-bootstrap/assets/scoped/skill-repo.md +139 -0
- package/skills/repo-bootstrap/assets/scoped/symfony.md +168 -0
- package/skills/repo-bootstrap/assets/scoped/testing.md +87 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-docs.md +103 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-extension.md +133 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-project.md +137 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-testing.md +80 -0
- package/skills/repo-bootstrap/checkpoints.yaml +279 -0
- package/skills/repo-bootstrap/evals/evals.json +385 -0
- package/skills/repo-bootstrap/references/ai-contribution-guidelines.md +63 -0
- package/skills/repo-bootstrap/references/ai-tool-compatibility.md +223 -0
- package/skills/repo-bootstrap/references/directory-coverage.md +82 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/scripts-AGENTS.md +389 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/.env.example +13 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/package.json +33 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/pnpm-lock.yaml +3 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/config.ts +28 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/controllers/userController.ts +74 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/index.ts +26 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/errorHandler.ts +45 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/requestLogger.ts +18 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/health.ts +18 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/users.ts +13 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/errors.ts +40 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/logger.ts +14 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/tsconfig.json +24 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/.env.example +19 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/AGENTS.md +92 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/pyproject.toml +88 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/AGENTS.md +85 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/__init__.py +3 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/config.py +49 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/main.py +66 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/__init__.py +13 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/item.py +43 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/user.py +40 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/__init__.py +5 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/health.py +20 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/items.py +61 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/users.py +55 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/__init__.py +6 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/item_service.py +77 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/user_service.py +69 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/uv.lock +4 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/AGENTS.md +86 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/package.json +20 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/src/App.tsx +5 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/cmd/api/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/go.mod +2 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/AGENTS.md +89 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/go.mod +2 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/AGENTS.md +90 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/package.json +17 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/App.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Button.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Footer.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Header.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Sidebar.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package-lock.json +0 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package.json +12 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-AGENTS.md +371 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-web-AGENTS.md +448 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/composer.json +8 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/package.json +15 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/pnpm-lock.yaml +0 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/src/Controller.php +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/AGENTS.md +92 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/package.json +26 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/App.tsx +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Button.tsx +10 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Footer.tsx +9 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Header.tsx +9 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/main.tsx +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/tsconfig.json +13 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/AGENTS.md +75 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/package.json +7 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/package.json +11 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/src/index.ts +11 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-lock.yaml +42 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-workspace.yaml +2 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/examples-AGENTS.md +45 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/Classes-AGENTS.md +392 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/composer.json +8 -0
- package/skills/repo-bootstrap/references/feedback-memory-schema.md +135 -0
- package/skills/repo-bootstrap/references/git-hooks-setup.md +79 -0
- package/skills/repo-bootstrap/references/output-structure.md +124 -0
- package/skills/repo-bootstrap/references/scripts-guide.md +175 -0
- package/skills/repo-bootstrap/references/verification-guide.md +137 -0
- package/skills/repo-bootstrap/scripts/analyze-git-history.sh +315 -0
- package/skills/repo-bootstrap/scripts/check-freshness.sh +230 -0
- package/skills/repo-bootstrap/scripts/detect-golden-samples.sh +161 -0
- package/skills/repo-bootstrap/scripts/detect-heuristics.sh +93 -0
- package/skills/repo-bootstrap/scripts/detect-project.sh +486 -0
- package/skills/repo-bootstrap/scripts/detect-scopes.sh +330 -0
- package/skills/repo-bootstrap/scripts/detect-utilities.sh +133 -0
- package/skills/repo-bootstrap/scripts/extract-adrs.sh +194 -0
- package/skills/repo-bootstrap/scripts/extract-agent-configs.sh +331 -0
- package/skills/repo-bootstrap/scripts/extract-architecture-rules.sh +522 -0
- package/skills/repo-bootstrap/scripts/extract-ci-commands.sh +385 -0
- package/skills/repo-bootstrap/scripts/extract-ci-rules.sh +384 -0
- package/skills/repo-bootstrap/scripts/extract-commands.sh +358 -0
- package/skills/repo-bootstrap/scripts/extract-documentation.sh +308 -0
- package/skills/repo-bootstrap/scripts/extract-github-rulesets.sh +96 -0
- package/skills/repo-bootstrap/scripts/extract-github-settings.sh +88 -0
- package/skills/repo-bootstrap/scripts/extract-ide-settings.sh +228 -0
- package/skills/repo-bootstrap/scripts/extract-platform-files.sh +290 -0
- package/skills/repo-bootstrap/scripts/extract-quality-configs.sh +442 -0
- package/skills/repo-bootstrap/scripts/generate-agents.sh +2424 -0
- package/skills/repo-bootstrap/scripts/generate-file-map.sh +153 -0
- package/skills/repo-bootstrap/scripts/lib/config-root.sh +211 -0
- package/skills/repo-bootstrap/scripts/lib/summary.sh +244 -0
- package/skills/repo-bootstrap/scripts/lib/template.sh +397 -0
- package/skills/repo-bootstrap/scripts/validate-structure.sh +324 -0
- package/skills/repo-bootstrap/scripts/verify-commands.sh +615 -0
- package/skills/repo-bootstrap/scripts/verify-content.sh +302 -0
- package/skills/schema-api-contracts/SKILL.md +56 -0
- package/skills/secret-hygiene/SKILL.md +511 -0
- package/skills/secret-hygiene/assets/.gitkeep +9 -0
- package/skills/secret-hygiene/assets/config-balanced.toml +81 -0
- package/skills/secret-hygiene/assets/config-custom.toml +178 -0
- package/skills/secret-hygiene/assets/config-strict.toml +48 -0
- package/skills/secret-hygiene/assets/github-action.yml +181 -0
- package/skills/secret-hygiene/assets/gitlab-ci.yml +257 -0
- package/skills/secret-hygiene/assets/precommit-config.yaml +70 -0
- package/skills/secret-hygiene/references/EXAMPLE.md +40 -0
- package/skills/secret-hygiene/references/compliance_mapping.md +538 -0
- package/skills/secret-hygiene/references/detection_rules.md +276 -0
- package/skills/secret-hygiene/references/false_positives.md +598 -0
- package/skills/secret-hygiene/references/remediation_guide.md +530 -0
- package/skills/stack-selector/SKILL.md +56 -0
- package/skills/telegram-control/SKILL.md +110 -0
- package/skills/telegram-control/references/architecture.md +184 -0
- package/skills/telegram-control/references/convex.md +173 -0
- package/skills/telegram-control/references/error_handling.md +212 -0
- package/skills/telegram-control/references/initial_setup.md +165 -0
- package/skills/telegram-control/references/telegram_api.md +156 -0
- package/skills/telegram-control/scripts/cancel_message.ts +53 -0
- package/skills/telegram-control/scripts/list_scheduled.ts +103 -0
- package/skills/telegram-control/scripts/logger.ts +121 -0
- package/skills/telegram-control/scripts/proxy-util.ts +11 -0
- package/skills/telegram-control/scripts/schedule_message.ts +216 -0
- package/skills/telegram-control/scripts/send_message.ts +115 -0
- package/skills/telegram-control/scripts/setup.ts +185 -0
- package/skills/telegram-control/scripts/types.ts +75 -0
- package/skills/telegram-control/scripts/view_history.ts +74 -0
- package/skills/test-strategy/SKILL.md +352 -0
- package/skills/threat-model/SKILL.md +303 -0
- package/skills/threat-model/examples/example-output.md +196 -0
- package/skills/threat-model/template.md +96 -0
- package/skills/ts-lint/SKILL.md +80 -0
- package/skills/ui-flow/SKILL.md +668 -0
- package/skills/voice-command-router/SKILL.md +51 -0
- package/skills/widget-live-activity-sync/SKILL.md +66 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Storage and State
|
|
2
|
+
|
|
3
|
+
Misconfigured storage is the only Kubernetes failure mode that can cause irreversible data loss. Unlike compute issues (which resolve by restarting pods) or network issues (which resolve by fixing policies), a deleted PersistentVolume with `reclaimPolicy: Delete` destroys the underlying disk permanently. Every storage decision must account for data durability.
|
|
4
|
+
|
|
5
|
+
## The PV/PVC Model
|
|
6
|
+
|
|
7
|
+
Kubernetes abstracts storage through three resources:
|
|
8
|
+
|
|
9
|
+
- **PersistentVolume (PV):** Represents a piece of provisioned storage -- a cloud disk, an NFS share, or a local SSD. PVs are cluster-scoped, not namespaced.
|
|
10
|
+
- **PersistentVolumeClaim (PVC):** A namespaced request for storage. Specifies size, access mode, and StorageClass. The control plane binds the PVC to a PV that satisfies its requirements.
|
|
11
|
+
- **StorageClass:** Defines how PVs are dynamically provisioned. Specifies the CSI driver, parameters (disk type, encryption), reclaim policy, and binding mode.
|
|
12
|
+
|
|
13
|
+
Dynamic provisioning is the default workflow: a PVC references a StorageClass, the CSI driver provisions a volume, and the control plane creates a PV and binds it to the PVC automatically.
|
|
14
|
+
|
|
15
|
+
## StorageClass: Critical Fields
|
|
16
|
+
|
|
17
|
+
Two StorageClass defaults are dangerous for production data:
|
|
18
|
+
|
|
19
|
+
**`reclaimPolicy: Delete`** (the default) destroys the underlying volume when the PVC is deleted. A single `kubectl delete pvc` command permanently deletes the data. Production StorageClasses must use `Retain`, which preserves the volume for manual recovery.
|
|
20
|
+
|
|
21
|
+
**`volumeBindingMode: Immediate`** (the default) provisions the volume before a pod is scheduled. This can place the volume in a different availability zone than the pod, causing the pod to stay Pending indefinitely. `WaitForFirstConsumer` provisions the volume in the same zone as the pod.
|
|
22
|
+
|
|
23
|
+
Always set `allowVolumeExpansion: true` so PVCs can be resized without recreation. PVCs can be expanded but never shrunk.
|
|
24
|
+
|
|
25
|
+
## Access Modes
|
|
26
|
+
|
|
27
|
+
| Mode | Abbreviation | Meaning | Supported by |
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
| `ReadWriteOnce` | RWO | One node mounts read-write | All block storage (EBS, PD, Azure Disk) |
|
|
30
|
+
| `ReadOnlyMany` | ROX | Many nodes mount read-only | NFS, CephFS, cloud file storage |
|
|
31
|
+
| `ReadWriteMany` | RWX | Many nodes mount read-write | NFS, CephFS, EFS, Azure Files |
|
|
32
|
+
| `ReadWriteOncePod` | RWOP | Exactly one pod mounts read-write | CSI drivers supporting RWOP (1.29+ GA) |
|
|
33
|
+
|
|
34
|
+
The most common mistake: requesting `ReadWriteMany` with a block storage provisioner. Block storage is physically attached to a single node and cannot support RWX. The PVC stays in `Pending` state with no clear error message. Use a file storage solution (EFS, Filestore, Azure Files) for shared access.
|
|
35
|
+
|
|
36
|
+
For databases, prefer `ReadWriteOncePod` over `ReadWriteOnce`. RWO allows multiple pods on the same node to mount the volume, which can cause data corruption. RWOP restricts access to exactly one pod.
|
|
37
|
+
|
|
38
|
+
## Dynamic Provisioning and CSI Drivers
|
|
39
|
+
|
|
40
|
+
Each cloud provider and storage platform has a CSI driver:
|
|
41
|
+
|
|
42
|
+
| Environment | Block storage CSI | File storage CSI |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| AWS EKS | `ebs.csi.aws.com` | `efs.csi.aws.com` |
|
|
45
|
+
| GKE | `pd.csi.storage.gke.io` | `filestore.csi.storage.gke.io` |
|
|
46
|
+
| Azure AKS | `disk.csi.azure.com` | `file.csi.azure.com` |
|
|
47
|
+
| Bare metal | Longhorn, Rook-Ceph, OpenEBS | Rook-CephFS, NFS provisioner |
|
|
48
|
+
|
|
49
|
+
All major CSI drivers support snapshots, volume expansion, and encryption. Always enable encryption (`parameters.encrypted: "true"`) for production StorageClasses.
|
|
50
|
+
|
|
51
|
+
## VolumeSnapshot for Backup and Restore
|
|
52
|
+
|
|
53
|
+
VolumeSnapshots provide point-in-time copies of PVCs. They are the primary mechanism for data protection before destructive operations:
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
apiVersion: snapshot.storage.k8s.io/v1
|
|
57
|
+
kind: VolumeSnapshot
|
|
58
|
+
metadata:
|
|
59
|
+
name: db-snapshot-2025-04-12
|
|
60
|
+
spec:
|
|
61
|
+
volumeSnapshotClassName: csi-snapclass
|
|
62
|
+
source:
|
|
63
|
+
persistentVolumeClaimName: data-postgres-0
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
To restore, create a new PVC with `dataSource` referencing the snapshot. The CSI driver provisions a new volume from the snapshot data.
|
|
67
|
+
|
|
68
|
+
Critical rules for snapshots:
|
|
69
|
+
- Always snapshot before PVC deletion, StorageClass migration, or major upgrades.
|
|
70
|
+
- Snapshots may be crash-consistent, not application-consistent. For databases, run logical backups (pg_dump, mysqldump) alongside snapshots.
|
|
71
|
+
- Test restore procedures regularly. A backup never restored is not a backup.
|
|
72
|
+
|
|
73
|
+
## Ephemeral Storage: emptyDir
|
|
74
|
+
|
|
75
|
+
`emptyDir` volumes are tied to the pod lifecycle -- deleted when the pod is removed. Use them for scratch space, caches, and temporary files required by `readOnlyRootFilesystem: true`.
|
|
76
|
+
|
|
77
|
+
Always set `sizeLimit` on emptyDir volumes. Without it, a runaway process can fill the node's disk and trigger eviction of every pod on that node. For in-memory emptyDirs (`medium: Memory`), the size counts against the container's memory limit.
|
|
78
|
+
|
|
79
|
+
## StatefulSet volumeClaimTemplates
|
|
80
|
+
|
|
81
|
+
StatefulSets create one PVC per replica automatically. PVCs created by `volumeClaimTemplates` are intentionally not deleted when the StatefulSet is deleted or scaled down -- this protects data. To reclaim storage, delete the PVCs manually after verifying the data is no longer needed.
|
|
82
|
+
|
|
83
|
+
The `persistentVolumeClaimRetentionPolicy` field (1.27+) can configure automatic PVC deletion on scale-down or StatefulSet deletion, but use it with extreme caution in production.
|
|
84
|
+
|
|
85
|
+
## fsGroup and Permissions
|
|
86
|
+
|
|
87
|
+
When running containers as non-root with `readOnlyRootFilesystem: true`, mounted PVCs may not be writable because the volume's filesystem ownership does not match the container's user. Set `fsGroup` in the pod security context to ensure the mounted volume is writable by the pod's group:
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
securityContext:
|
|
91
|
+
runAsUser: 10000
|
|
92
|
+
runAsGroup: 10000
|
|
93
|
+
fsGroup: 10000
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Without `fsGroup`, the pod mounts the volume but cannot write to it, causing application errors that appear to be permission issues inside the container.
|
|
97
|
+
|
|
98
|
+
## Further Reading
|
|
99
|
+
|
|
100
|
+
- [Persistent Volumes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)
|
|
101
|
+
- [Storage Classes](https://kubernetes.io/docs/concepts/storage/storage-classes/)
|
|
102
|
+
- [KubeShark Resource Starvation](../failure-modes/resource-starvation.md)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Workload Patterns
|
|
2
|
+
|
|
3
|
+
Kubernetes provides five workload resource types, each designed for a specific execution model. Choosing the wrong type forces workarounds that break update semantics, storage management, and scaling behavior. This guide provides a decision framework for selecting the right workload type.
|
|
4
|
+
|
|
5
|
+
## Decision Matrix
|
|
6
|
+
|
|
7
|
+
| Workload Type | Execution Model | Pod Identity | Storage | Scaling |
|
|
8
|
+
|---|---|---|---|---|
|
|
9
|
+
| **Deployment** | Long-running, stateless | Interchangeable (random suffix) | Shared or none | HPA, manual replicas |
|
|
10
|
+
| **StatefulSet** | Long-running, stateful | Stable ordinal (0, 1, 2...) | Per-pod PVC via volumeClaimTemplates | Manual or custom |
|
|
11
|
+
| **DaemonSet** | One pod per node | Per-node | hostPath or emptyDir | Automatic (node count) |
|
|
12
|
+
| **Job** | Run-to-completion | Disposable | Temporary | completions + parallelism |
|
|
13
|
+
| **CronJob** | Scheduled run-to-completion | Disposable | Temporary | schedule-driven |
|
|
14
|
+
|
|
15
|
+
## Deployment
|
|
16
|
+
|
|
17
|
+
**Use when:** Pods are interchangeable and need no stable identity or persistent local storage. Web servers, REST/gRPC APIs, microservices, frontend proxies, stateless queue workers.
|
|
18
|
+
|
|
19
|
+
**Key considerations:**
|
|
20
|
+
- Always set `replicas >= 2` for production with a PodDisruptionBudget.
|
|
21
|
+
- Use `topologySpreadConstraints` to distribute across zones and nodes.
|
|
22
|
+
- Pair with HPA for elastic scaling. Set `scaleDown.stabilizationWindowSeconds` to prevent flapping.
|
|
23
|
+
- Never put `app.kubernetes.io/version` in `selector.matchLabels` -- selectors are immutable and this breaks upgrades.
|
|
24
|
+
|
|
25
|
+
**Common mistake:** Using a Deployment with a RWO PersistentVolumeClaim and `replicas > 1`. Only one pod can mount a RWO volume at a time. The second replica stays Pending. Use a StatefulSet with per-pod volumes or switch to RWX storage.
|
|
26
|
+
|
|
27
|
+
## StatefulSet
|
|
28
|
+
|
|
29
|
+
**Use when:** Pods need stable network identity (predictable DNS per pod), stable per-pod storage (PVC follows the pod across reschedules), or ordered deployment. Databases (PostgreSQL, MySQL), message brokers (Kafka, RabbitMQ), consensus systems (etcd, ZooKeeper).
|
|
30
|
+
|
|
31
|
+
**Key considerations:**
|
|
32
|
+
- Requires a headless Service (`clusterIP: None`) for per-pod DNS: `<pod>.<service>.<ns>.svc.cluster.local`.
|
|
33
|
+
- `volumeClaimTemplates` create one PVC per pod. PVCs are never auto-deleted on scale-down to protect data.
|
|
34
|
+
- `podManagementPolicy: OrderedReady` (default) creates pods sequentially. Use `Parallel` when pods initialize independently.
|
|
35
|
+
- Set `terminationGracePeriodSeconds` to 60-120 seconds for databases. The default 30 seconds is insufficient for clean shutdown.
|
|
36
|
+
|
|
37
|
+
**Common mistake:** Using a StatefulSet when a Deployment with a single PVC or an external database would suffice. If you only need storage (not per-pod identity), a Deployment is simpler. StatefulSets add operational complexity for ordered rollouts, scale-down behavior, and PVC lifecycle management.
|
|
38
|
+
|
|
39
|
+
## DaemonSet
|
|
40
|
+
|
|
41
|
+
**Use when:** Exactly one pod must run on every qualifying node. Log collectors (Fluent Bit, Vector), monitoring agents (node-exporter, Datadog), network plugins (Cilium), CSI node drivers, security agents (Falco).
|
|
42
|
+
|
|
43
|
+
**Key considerations:**
|
|
44
|
+
- DaemonSets have no `replicas` field. The scheduler places one pod per qualifying node automatically.
|
|
45
|
+
- Resources are multiplied across every node. 100m CPU x 200 nodes = 20 CPU cores cluster-wide. Be conservative with requests.
|
|
46
|
+
- Use `nodeSelector` or `nodeAffinity` to target specific node pools. Add tolerations for tainted nodes (control-plane, GPU).
|
|
47
|
+
- Use a custom PriorityClass (not `system-node-critical`) for application-level agents.
|
|
48
|
+
|
|
49
|
+
**Common mistake:** Specifying a `replicas` field. DaemonSets do not support it -- the API rejects the manifest.
|
|
50
|
+
|
|
51
|
+
## Job
|
|
52
|
+
|
|
53
|
+
**Use when:** Work runs to completion and then stops. Database migrations, data exports, ETL pipelines, one-time scripts, ML training runs.
|
|
54
|
+
|
|
55
|
+
**Key considerations:**
|
|
56
|
+
- `restartPolicy` must be `Never` or `OnFailure`. The default `Always` is rejected by the API for Jobs.
|
|
57
|
+
- Always set `activeDeadlineSeconds` to prevent runaway jobs.
|
|
58
|
+
- Always set `ttlSecondsAfterFinished` to auto-clean completed Jobs and their pods.
|
|
59
|
+
- Jobs may retry on failure. Every Job must be idempotent -- assume at-least-once execution.
|
|
60
|
+
- Use `podFailurePolicy` (1.26+) to distinguish retryable from fatal errors.
|
|
61
|
+
|
|
62
|
+
**Common mistake:** Using `restartPolicy: Always`, which is the default for pods but invalid for Jobs. LLMs frequently omit `restartPolicy` in Job specs, relying on the default that the API rejects.
|
|
63
|
+
|
|
64
|
+
## CronJob
|
|
65
|
+
|
|
66
|
+
**Use when:** Work runs on a recurring schedule. Report generation, cache warming, log rotation, periodic health checks, certificate renewal.
|
|
67
|
+
|
|
68
|
+
**Key considerations:**
|
|
69
|
+
- Set `concurrencyPolicy: Forbid` by default. Overlapping runs cause resource exhaustion and data corruption.
|
|
70
|
+
- Set `startingDeadlineSeconds` to skip runs that are too late (prevents burst of overdue jobs after controller downtime).
|
|
71
|
+
- Set `timeZone` explicitly. Without it, the schedule uses the controller's clock (typically UTC).
|
|
72
|
+
- CronJobs have three label levels (CronJob, jobTemplate, pod template). All three need consistent labels.
|
|
73
|
+
|
|
74
|
+
**Common mistake:** Leaving `concurrencyPolicy` at the default `Allow`, which permits overlapping runs. A CronJob that takes 10 minutes, scheduled every 5 minutes, will accumulate concurrent instances until the cluster runs out of resources.
|
|
75
|
+
|
|
76
|
+
## Anti-Patterns
|
|
77
|
+
|
|
78
|
+
- **StatefulSet for stateless workloads.** Adds unnecessary complexity. Use a Deployment.
|
|
79
|
+
- **Deployment for one-shot tasks.** The pod restarts forever after completion. Use a Job.
|
|
80
|
+
- **DaemonSet when only some nodes need the workload.** Use `nodeSelector` to target the correct subset, not a blanket DaemonSet with no selector.
|
|
81
|
+
- **CronJob for long-running daemons.** If the workload should run continuously, use a Deployment with HPA.
|
|
82
|
+
|
|
83
|
+
## Further Reading
|
|
84
|
+
|
|
85
|
+
- [Workloads](https://kubernetes.io/docs/concepts/workloads/)
|
|
86
|
+
- [KubeShark Good Patterns](../examples/good-patterns.md)
|
|
87
|
+
- [KubeShark Bad Patterns](../examples/bad-patterns.md)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Kubernetes Skill for Claude Code — KubeShark Documentation",
|
|
3
|
+
"plugins": ["-sharing", "search-pro", "-lunr", "-search"],
|
|
4
|
+
"pluginsConfig": {
|
|
5
|
+
"search-pro": {}
|
|
6
|
+
},
|
|
7
|
+
"structure": {
|
|
8
|
+
"readme": "README.md",
|
|
9
|
+
"summary": "SUMMARY.md"
|
|
10
|
+
},
|
|
11
|
+
"links": {
|
|
12
|
+
"sidebar": {
|
|
13
|
+
"GitHub": "https://github.com/LukasNiessen/kubernetes-skill"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the Kubernetes Skill (KubeShark) are documented here. This project uses [Semantic Versioning](https://semver.org/).
|
|
4
|
+
|
|
5
|
+
For the repository-level changelog, see [CHANGELOG.md](https://github.com/LukasNiessen/kubernetes-skill/blob/main/CHANGELOG.md).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## v1.0.0
|
|
10
|
+
|
|
11
|
+
Initial release of KubeShark.
|
|
12
|
+
|
|
13
|
+
### Failure Modes
|
|
14
|
+
- 6 primary failure modes: insecure workload defaults, resource starvation, network exposure, privilege sprawl, fragile rollouts, API drift
|
|
15
|
+
- 7-step failure-mode-first diagnostic workflow (diagnose before generate)
|
|
16
|
+
|
|
17
|
+
### Reference Files
|
|
18
|
+
- 20 granular reference files covering failure modes, workload patterns, cross-cutting concerns, tooling, and examples
|
|
19
|
+
- LLM mistake checklists in every reference file that covers a risk domain
|
|
20
|
+
|
|
21
|
+
### Pattern Banks
|
|
22
|
+
- 8 production-ready good examples with annotated YAML
|
|
23
|
+
- 8 common anti-pattern bad examples with explanations
|
|
24
|
+
- Do/Don't checklist spanning 9 categories
|
|
25
|
+
|
|
26
|
+
### Tooling
|
|
27
|
+
- Helm chart pattern guidance with template conventions
|
|
28
|
+
- Kustomize overlay and patch patterns
|
|
29
|
+
- Validation and policy enforcement (kubeconform, Kyverno, OPA/Gatekeeper, Polaris)
|
|
30
|
+
|
|
31
|
+
### Infrastructure
|
|
32
|
+
- HonKit documentation site
|
|
33
|
+
- GitHub Actions CI validation and docs deployment
|
|
34
|
+
- Conventional commits and semantic versioning
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for contributing to Kubernetes Skill (KubeShark). This is a condensed guide. For the full version, see [CONTRIBUTING.md](https://github.com/LukasNiessen/kubernetes-skill/blob/main/CONTRIBUTING.md).
|
|
4
|
+
|
|
5
|
+
## Core Principle
|
|
6
|
+
|
|
7
|
+
Every change must map to a failure mode. Before submitting, answer three questions:
|
|
8
|
+
|
|
9
|
+
1. Which failure mode does this prevent?
|
|
10
|
+
2. What measurable quality gain does it provide?
|
|
11
|
+
3. Is the token cost justified?
|
|
12
|
+
|
|
13
|
+
## Development Flow
|
|
14
|
+
|
|
15
|
+
1. **Branch** -- create a feature or fix branch from `main`
|
|
16
|
+
2. **Change** -- make focused changes; keep PRs small and single-purpose
|
|
17
|
+
3. **Check** -- run local checks (see below)
|
|
18
|
+
4. **PR** -- open a pull request using the PR template
|
|
19
|
+
|
|
20
|
+
## Local Checks
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Verify no placeholder text remains
|
|
24
|
+
rg -n "FIXME|placeholder-text" README.md SKILL.md references/*.md
|
|
25
|
+
|
|
26
|
+
# Verify required files exist
|
|
27
|
+
python - <<'PY'
|
|
28
|
+
from pathlib import Path
|
|
29
|
+
assert Path('SKILL.md').exists()
|
|
30
|
+
assert Path('README.md').exists()
|
|
31
|
+
for p in [
|
|
32
|
+
'references/insecure-workload-defaults.md',
|
|
33
|
+
'references/resource-starvation.md',
|
|
34
|
+
'references/network-exposure.md',
|
|
35
|
+
'references/privilege-sprawl.md',
|
|
36
|
+
'references/fragile-rollouts.md',
|
|
37
|
+
'references/api-drift.md',
|
|
38
|
+
]:
|
|
39
|
+
assert Path(p).exists(), f'missing {p}'
|
|
40
|
+
print('basic structure OK')
|
|
41
|
+
PY
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Content Rules
|
|
45
|
+
|
|
46
|
+
- Keep examples original and clearly distinct
|
|
47
|
+
- Prefer failure-mode framing over generic best-practice text
|
|
48
|
+
- Avoid cloud-provider-specific deep dives unless they directly reduce a known LLM failure mode
|
|
49
|
+
- Keep claims precise; avoid vague "always" language when tradeoffs exist
|
|
50
|
+
- Default to the PSS restricted profile in all examples
|
|
51
|
+
|
|
52
|
+
## Required for PR Approval
|
|
53
|
+
|
|
54
|
+
- Clear mapping to one or more failure modes
|
|
55
|
+
- No contradictory guidance across references
|
|
56
|
+
- Updated links and indexes if files were moved or renamed
|
|
57
|
+
- Validation workflow passing (`.github/workflows/validate.yml`)
|
|
58
|
+
|
|
59
|
+
## Security
|
|
60
|
+
|
|
61
|
+
- Never commit credentials, tokens, or secret values
|
|
62
|
+
- Do not paste real cluster state or kubeconfig data
|
|
63
|
+
- Do not include real IP addresses, hostnames, or cloud account identifiers
|
|
64
|
+
|
|
65
|
+
## Reporting Issues
|
|
66
|
+
|
|
67
|
+
Open an issue with: the observed hallucination or failure pattern, a minimal reproducible prompt/context, and the expected behavior.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Failure Modes
|
|
2
|
+
|
|
3
|
+
KubeShark organizes Kubernetes risks into six named failure modes. Every piece of guidance in the skill maps to at least one of these. Content that does not reduce the probability of any failure mode is excluded.
|
|
4
|
+
|
|
5
|
+
These are not arbitrary categories. They represent the six most common ways LLM-generated Kubernetes manifests cause real damage in production.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Insecure Workload Defaults
|
|
10
|
+
|
|
11
|
+
Containers running with overly permissive security settings because no explicit security context was provided.
|
|
12
|
+
|
|
13
|
+
**Symptoms:**
|
|
14
|
+
- Containers running as root (UID 0)
|
|
15
|
+
- Pods admitted without any `securityContext`
|
|
16
|
+
- Linux capabilities not dropped (`CAP_NET_RAW`, `CAP_SYS_ADMIN` still present)
|
|
17
|
+
- `hostPath` volumes mounted into workload pods
|
|
18
|
+
- Privileged containers that can escape to the node
|
|
19
|
+
- PodSecurity admission rejecting manifests at deploy time
|
|
20
|
+
|
|
21
|
+
**Common causes:**
|
|
22
|
+
- Upstream example manifests and Helm chart defaults rarely include security contexts
|
|
23
|
+
- LLMs train on those permissive examples and reproduce them verbatim
|
|
24
|
+
- `securityContext` has both pod-level and container-level fields; omitting either leaves gaps
|
|
25
|
+
- Confusion between PSS levels (privileged, baseline, restricted)
|
|
26
|
+
|
|
27
|
+
**Risk pattern:** A Deployment without a security context deploys successfully, runs as root, and becomes a container escape vector when a CVE is exploited. The cluster accepts it without complaint.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 2. Resource Starvation
|
|
32
|
+
|
|
33
|
+
Workloads deployed without proper resource requests and limits, leading to scheduling failures, evictions, and cascading outages.
|
|
34
|
+
|
|
35
|
+
**Symptoms:**
|
|
36
|
+
- OOMKilled containers exceeding memory limits
|
|
37
|
+
- Pods stuck in Pending because the scheduler cannot find a node
|
|
38
|
+
- Node pressure evictions killing BestEffort pods
|
|
39
|
+
- CPU throttling causing invisible latency spikes
|
|
40
|
+
- Noisy neighbors starving co-located pods
|
|
41
|
+
- HPA flapping between replica counts
|
|
42
|
+
|
|
43
|
+
**Common causes:**
|
|
44
|
+
- Missing requests and limits entirely (BestEffort QoS, first to be evicted)
|
|
45
|
+
- Arbitrary round numbers (`cpu: 1`, `memory: 1Gi`) without profiling
|
|
46
|
+
- No PodDisruptionBudget -- voluntary disruptions take down all replicas
|
|
47
|
+
- CPU limits set too close to requests, causing constant CFS throttling
|
|
48
|
+
- No LimitRange to catch misconfigured pods at admission
|
|
49
|
+
|
|
50
|
+
**Risk pattern:** A pod without resource requests gets scheduled on an overcommitted node. Under load, the kubelet evicts it. The replacement pod lands on another overcommitted node. The cycle continues until the workload is effectively unavailable.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 3. Network Exposure
|
|
55
|
+
|
|
56
|
+
Cluster networking left in the default open state, exposing all pods to all other pods and potentially to the internet.
|
|
57
|
+
|
|
58
|
+
**Symptoms:**
|
|
59
|
+
- All pods can reach all pods (Kubernetes default)
|
|
60
|
+
- Unexpected external exposure via `NodePort` or `LoadBalancer` Services
|
|
61
|
+
- DNS resolution failures from wrong Service names or missing namespace qualifiers
|
|
62
|
+
- Silent routing to nothing when Service selectors do not match pod labels
|
|
63
|
+
- Lateral movement after compromise because no NetworkPolicy exists
|
|
64
|
+
- Ingress 404s or 502s from path/backend mismatches
|
|
65
|
+
|
|
66
|
+
**Common causes:**
|
|
67
|
+
- Kubernetes has no network segmentation by default -- every pod can reach every other pod
|
|
68
|
+
- LLMs generate `NodePort` and `LoadBalancer` Services when `ClusterIP` is sufficient
|
|
69
|
+
- Service selectors silently fail when labels do not match (zero errors, zero traffic)
|
|
70
|
+
- No policy means allow-all, not deny-all
|
|
71
|
+
- Egress policies are forgotten -- ingress-only policies still allow unrestricted outbound
|
|
72
|
+
|
|
73
|
+
**Risk pattern:** A compromised pod in one namespace freely connects to the database in another namespace. No NetworkPolicy exists, so every service in the cluster is reachable. The blast radius of a single vulnerability is the entire cluster.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 4. Privilege Sprawl
|
|
78
|
+
|
|
79
|
+
RBAC permissions, ServiceAccount tokens, and secret access granted far beyond what workloads actually require.
|
|
80
|
+
|
|
81
|
+
**Symptoms:**
|
|
82
|
+
- ClusterRoleBinding with `cluster-admin` attached to a workload ServiceAccount
|
|
83
|
+
- Rules containing `verbs: ["*"]` or `resources: ["*"]`
|
|
84
|
+
- Pods running with the `default` ServiceAccount (shared identity across the namespace)
|
|
85
|
+
- `automountServiceAccountToken: true` on pods that never call the Kubernetes API
|
|
86
|
+
- Secrets injected as environment variables (visible in `kubectl describe pod` and crash dumps)
|
|
87
|
+
|
|
88
|
+
**Common causes:**
|
|
89
|
+
- Copy-pasting `cluster-admin` bindings from quickstart guides
|
|
90
|
+
- Using wildcards to "get it working" and never scoping down
|
|
91
|
+
- Not creating dedicated ServiceAccounts per workload
|
|
92
|
+
- Misunderstanding that Kubernetes Secrets are base64-encoded, not encrypted
|
|
93
|
+
- Injecting secrets via `env` instead of volume mounts or external operators
|
|
94
|
+
|
|
95
|
+
**Risk pattern:** A web application pod runs with the default ServiceAccount, which has a ClusterRoleBinding to `cluster-admin` left over from initial setup. An SSRF vulnerability in the application allows an attacker to read the mounted token and take full control of the cluster.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 5. Fragile Rollouts
|
|
100
|
+
|
|
101
|
+
Deployments that break during updates due to misconfigured probes, mutable image tags, or missing graceful shutdown handling.
|
|
102
|
+
|
|
103
|
+
**Symptoms:**
|
|
104
|
+
- Cascading restarts across all pods (liveness probe checks an external dependency)
|
|
105
|
+
- Dropped connections and 502s during deploys (readiness probe passes too early)
|
|
106
|
+
- All replicas unavailable simultaneously (`maxUnavailable` too high)
|
|
107
|
+
- Version drift across pods (`:latest` tag with cached layers)
|
|
108
|
+
- Pods killed before finishing in-flight requests (no preStop hook)
|
|
109
|
+
- Slow-starting apps killed in restart loops (no startup probe)
|
|
110
|
+
|
|
111
|
+
**Common causes:**
|
|
112
|
+
- Misunderstanding the difference between liveness and readiness probes
|
|
113
|
+
- Checking external dependencies (databases, APIs) in liveness probes
|
|
114
|
+
- Using `:latest` tags, which are mutable and nondeterministic
|
|
115
|
+
- Not setting `terminationGracePeriodSeconds` or preStop hooks
|
|
116
|
+
- `maxUnavailable` and `maxSurge` left at defaults without considering replica count
|
|
117
|
+
|
|
118
|
+
**Risk pattern:** A Deployment with a liveness probe that checks database connectivity deploys successfully. The database has a brief network blip. Every pod fails its liveness check simultaneously. Kubernetes restarts all pods at once, causing a full outage that outlasts the original database blip.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 6. API Drift
|
|
123
|
+
|
|
124
|
+
Manifests using wrong, deprecated, or removed API versions that fail silently or break on cluster upgrades.
|
|
125
|
+
|
|
126
|
+
**Symptoms:**
|
|
127
|
+
- `no matches for kind "Ingress" in version "extensions/v1beta1"` (removed API)
|
|
128
|
+
- `Warning: policy/v1beta1 PodDisruptionBudget is deprecated` (deprecated, not yet removed)
|
|
129
|
+
- Fields silently ignored after upgrade (existed in beta, removed in stable)
|
|
130
|
+
- Helm templates render valid YAML but `kubectl apply` fails
|
|
131
|
+
- `kubeconform` reports schema violations
|
|
132
|
+
|
|
133
|
+
**Common causes:**
|
|
134
|
+
- LLM training data contains outdated manifests from blog posts and Stack Overflow
|
|
135
|
+
- Copy-paste from tutorials written for the Kubernetes 1.18-1.21 era
|
|
136
|
+
- Helm charts pinned to old API versions without `Capabilities` checks
|
|
137
|
+
- Not running schema validation against the target cluster version
|
|
138
|
+
- Confusing "deprecated" (still works, prints warning) with "removed" (hard failure)
|
|
139
|
+
|
|
140
|
+
**Risk pattern:** An LLM generates a manifest with `apiVersion: extensions/v1beta1` for an Ingress resource. This was removed in Kubernetes 1.22. The manifest looks correct, passes YAML linting, but fails on any modern cluster. The correct version is `networking.k8s.io/v1`.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## How Failure Modes Are Used
|
|
145
|
+
|
|
146
|
+
Failure modes drive the entire KubeShark workflow:
|
|
147
|
+
|
|
148
|
+
1. **Step 2 (Diagnose)** selects the relevant failure modes based on the task.
|
|
149
|
+
2. **Step 3 (Load references)** pulls the reference files that correspond to the diagnosed failure modes.
|
|
150
|
+
3. **Step 4 (Propose)** structures recommendations around preventing the specific risks identified.
|
|
151
|
+
4. **Step 7 (Output contract)** lists which failure modes were addressed, making the response auditable.
|
|
152
|
+
|
|
153
|
+
Most tasks involve multiple failure modes. A Deployment creation task typically triggers insecure workload defaults, resource starvation, and fragile rollouts at minimum. The workflow ensures none are overlooked.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Philosophy
|
|
2
|
+
|
|
3
|
+
This page describes the design rationale behind KubeShark. For the full treatment, see [PHILOSOPHY.md](https://github.com/LukasNiessen/kubernetes-skill/blob/main/PHILOSOPHY.md) in the repository root.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Failure-Mode-First vs. Reference Manuals
|
|
8
|
+
|
|
9
|
+
The core insight: telling an LLM *what good Kubernetes looks like* is less effective than telling it *how to think about Kubernetes problems*.
|
|
10
|
+
|
|
11
|
+
A static reference manual gives the model information but no diagnostic process. There is no risk assessment step, no structured output, and no way to verify that the right concerns were addressed. The model reads the reference and generates whatever it thinks fits.
|
|
12
|
+
|
|
13
|
+
KubeShark takes the opposite approach. The core `SKILL.md` is an operational workflow, not a knowledge dump. It forces a diagnostic sequence: capture context, identify failure modes, load only relevant references, propose fixes with risk controls, validate, and deliver a structured output contract. The model diagnoses before it generates.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Why Kubernetes Needs This More Than Terraform
|
|
18
|
+
|
|
19
|
+
Terraform fails explicitly. A misconfiguration surfaces at `terraform plan` or `terraform apply` with a clear error message. Kubernetes is different in three critical ways:
|
|
20
|
+
|
|
21
|
+
**Silent failures are common.** A Service with the wrong selector deploys successfully but routes to nothing. A NetworkPolicy with a mistyped label silently does nothing. A probe pointing to the wrong port passes creation but fails at runtime. The cluster accepts the manifest without complaint -- failures surface only when traffic arrives.
|
|
22
|
+
|
|
23
|
+
**Runtime is continuous.** Terraform is plan-and-apply. Kubernetes is a continuous reconciliation loop. A misconfigured liveness probe does not just fail once -- it restarts the pod every 30 seconds forever. A missing PodDisruptionBudget does not just affect one deploy -- it allows every future rolling update to take down all replicas simultaneously.
|
|
24
|
+
|
|
25
|
+
**The blast radius is multi-dimensional.** Terraform operates at infrastructure provisioning time. Kubernetes operates across provisioning, deployment, runtime, networking, scheduling, and security simultaneously. An LLM must reason about all these dimensions for every resource it generates.
|
|
26
|
+
|
|
27
|
+
These properties make a diagnostic workflow essential. Without one, the LLM produces syntactically valid but operationally dangerous manifests -- and the cluster silently accepts them.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Token Efficiency as Design Constraint
|
|
32
|
+
|
|
33
|
+
Context window space is a finite resource. Every token spent on skill content is a token unavailable for the user's actual manifests, conversation history, and tool results.
|
|
34
|
+
|
|
35
|
+
KubeShark is designed for minimal activation cost:
|
|
36
|
+
|
|
37
|
+
- **SKILL.md is ~85 lines (~650 tokens).** It contains no YAML examples, no inline manifests, and no tutorial material. It is purely procedural.
|
|
38
|
+
- **20 granular reference files.** The model loads only the 1-2 files relevant to the diagnosed failure mode per query.
|
|
39
|
+
- **No duplication.** A query about probe configuration never loads the RBAC guidance. A query about Helm chart structure never loads the NetworkPolicy patterns.
|
|
40
|
+
|
|
41
|
+
A single large reference file would force the model to process thousands of irrelevant tokens. Twenty small files let it load precisely what it needs.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## LLM-Aware Guardrails
|
|
46
|
+
|
|
47
|
+
Every reference file that covers a risk domain includes an **LLM mistake checklist** -- a list of specific errors that language models make when generating Kubernetes configurations:
|
|
48
|
+
|
|
49
|
+
- Omitting `securityContext` entirely, producing manifests that run as root
|
|
50
|
+
- Setting liveness probes that check external dependencies, causing cascading restarts
|
|
51
|
+
- Using `apiVersion: extensions/v1beta1` for Ingress (removed in 1.22)
|
|
52
|
+
- Generating RBAC with wildcard verbs and resources on ClusterRoleBindings
|
|
53
|
+
- Omitting resource requests and limits, or using arbitrary round numbers
|
|
54
|
+
- Using `:latest` image tags without `imagePullPolicy` override
|
|
55
|
+
- Creating Services with selectors that do not match any pod labels
|
|
56
|
+
|
|
57
|
+
These checklists exist because the model needs to know *what it gets wrong*, not just *what is correct*. A reference that only shows the right pattern still allows the model to hallucinate the wrong one. A reference that explicitly names the hallucination pattern reduces it.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Output Contracts for Auditability
|
|
62
|
+
|
|
63
|
+
Every KubeShark response ends with a structured output contract: assumptions, failure modes addressed, remediation choices and tradeoffs, validation plan, and rollback notes.
|
|
64
|
+
|
|
65
|
+
This is a deliberate design choice. Kubernetes manifests applied to a cluster have real operational consequences. The output contract makes every response auditable -- a reviewer can check whether the model's assumptions matched reality, whether the right risks were identified, and whether the rollback path is viable, all before applying anything.
|
|
66
|
+
|
|
67
|
+
Without an output contract, the user receives a manifest and must independently assess whether it is safe. The contract shifts that burden: the model states what it assumed and what it did not account for.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Default Security Posture
|
|
72
|
+
|
|
73
|
+
KubeShark defaults to the Pod Security Standards **restricted** profile. Every generated workload includes:
|
|
74
|
+
|
|
75
|
+
- `runAsNonRoot: true`
|
|
76
|
+
- `allowPrivilegeEscalation: false`
|
|
77
|
+
- `readOnlyRootFilesystem: true`
|
|
78
|
+
- `capabilities: { drop: ["ALL"] }`
|
|
79
|
+
- `seccompProfile: { type: RuntimeDefault }`
|
|
80
|
+
|
|
81
|
+
The restricted profile prevents the largest class of container escape vulnerabilities. Deviations are allowed only when the user explicitly requests them, and the deviation is documented in the output contract with justification.
|
|
82
|
+
|
|
83
|
+
This is a secure-by-default posture. It is easier to relax security with documented justification than to retroactively harden manifests that were generated permissively.
|