@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.
- 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-deepener/SKILL.md +86 -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,98 @@
|
|
|
1
|
+
# FM3: Network Exposure
|
|
2
|
+
|
|
3
|
+
Kubernetes networking is flat by default. Every pod can reach every other pod on any port, across all namespaces. There is no firewall, no segmentation, no access control until you explicitly create NetworkPolicy resources. This default-open posture means a single compromised container can reach databases, internal APIs, and cloud metadata endpoints without restriction.
|
|
4
|
+
|
|
5
|
+
## The Default-Open Problem
|
|
6
|
+
|
|
7
|
+
Unlike traditional networks where firewalls deny traffic by default, Kubernetes starts with full connectivity. Installing a CNI plugin that supports NetworkPolicy (Calico, Cilium, Antrea) is necessary but not sufficient -- the plugin only enforces policies that exist. A namespace with zero NetworkPolicy objects allows all traffic regardless of the CNI plugin.
|
|
8
|
+
|
|
9
|
+
The correct baseline is a default-deny policy in every namespace, followed by explicit allow rules for required communication paths.
|
|
10
|
+
|
|
11
|
+
## Service Types and Exposure Risk
|
|
12
|
+
|
|
13
|
+
| Type | Exposure | Risk level |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| `ClusterIP` | Internal only | Low -- reachable only within the cluster |
|
|
16
|
+
| `NodePort` | Every node IP on a high port | High -- bypasses Ingress, no TLS, no auth |
|
|
17
|
+
| `LoadBalancer` | Public IP via cloud provider | Critical -- directly internet-facing |
|
|
18
|
+
| `ExternalName` | DNS alias to external service | Low -- no proxying, but DNS rebinding possible |
|
|
19
|
+
|
|
20
|
+
LLMs frequently generate `LoadBalancer` or `NodePort` Services when `ClusterIP` is sufficient. Always default to `ClusterIP` and expose externally only through an Ingress controller with TLS termination.
|
|
21
|
+
|
|
22
|
+
## The Silent Selector Mismatch
|
|
23
|
+
|
|
24
|
+
The most frustrating Kubernetes networking bug produces no error, no warning, and no log entry. When a Service `selector` does not match any pod labels, the Service gets zero Endpoints. Traffic sent to the Service simply vanishes -- connections time out or receive connection refused errors.
|
|
25
|
+
|
|
26
|
+
This happens because:
|
|
27
|
+
- The pod label says `app: api-server` but the Service selector says `app: api` (typo).
|
|
28
|
+
- The selector includes a version label that changes on deploy (e.g., `version: v2` in the selector, but the new pods have `version: v3`).
|
|
29
|
+
- Labels are case-sensitive: `App: api-server` does not match `app: api-server`.
|
|
30
|
+
|
|
31
|
+
Always verify with `kubectl get endpoints <service-name>` after any Service or Deployment change.
|
|
32
|
+
|
|
33
|
+
## NetworkPolicy AND/OR Logic
|
|
34
|
+
|
|
35
|
+
The most common NetworkPolicy mistake is confusing AND and OR semantics in `from`/`to` rules:
|
|
36
|
+
|
|
37
|
+
- **Same list item = AND:** A `namespaceSelector` and `podSelector` in the same `from` entry must both match.
|
|
38
|
+
- **Separate list items = OR:** Two separate `from` entries are unioned -- traffic matching either rule is allowed.
|
|
39
|
+
|
|
40
|
+
Getting this wrong can either block legitimate traffic or open traffic to the entire cluster. A single misplaced hyphen in YAML changes the behavior completely.
|
|
41
|
+
|
|
42
|
+
## Egress Policies and DNS
|
|
43
|
+
|
|
44
|
+
A default-deny egress policy blocks all outbound traffic including DNS resolution. If you forget to allow DNS (port 53 UDP and TCP to kube-system), every service lookup fails and the application appears to have network connectivity issues when it actually has a policy misconfiguration.
|
|
45
|
+
|
|
46
|
+
Always include a DNS egress rule when writing egress policies:
|
|
47
|
+
|
|
48
|
+
```yaml
|
|
49
|
+
egress:
|
|
50
|
+
- to:
|
|
51
|
+
- namespaceSelector:
|
|
52
|
+
matchLabels:
|
|
53
|
+
kubernetes.io/metadata.name: kube-system
|
|
54
|
+
ports:
|
|
55
|
+
- protocol: UDP
|
|
56
|
+
port: 53
|
|
57
|
+
- protocol: TCP
|
|
58
|
+
port: 53
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## DNS Performance and ndots
|
|
62
|
+
|
|
63
|
+
Kubernetes defaults to `ndots: 5`, meaning any hostname with fewer than 5 dots triggers search domain expansion. For a call to `api.stripe.com` (2 dots), the resolver first tries `api.stripe.com.production.svc.cluster.local`, then `api.stripe.com.svc.cluster.local`, then `api.stripe.com.cluster.local`, and finally the actual address. This multiplies DNS queries by 4-5x for every external call.
|
|
64
|
+
|
|
65
|
+
Fix with `dnsConfig.options: [{name: ndots, value: "2"}]` or append a trailing dot to external hostnames (`api.stripe.com.`).
|
|
66
|
+
|
|
67
|
+
## Lateral Movement After Compromise
|
|
68
|
+
|
|
69
|
+
Without NetworkPolicy, an attacker who compromises a single pod can:
|
|
70
|
+
1. Scan the entire cluster network to discover services.
|
|
71
|
+
2. Access databases directly (bypassing application-level auth).
|
|
72
|
+
3. Reach the cloud metadata endpoint (169.254.169.254) to steal IAM credentials.
|
|
73
|
+
4. Pivot to other namespaces to access higher-privilege workloads.
|
|
74
|
+
5. Exfiltrate data to external endpoints without restriction.
|
|
75
|
+
|
|
76
|
+
NetworkPolicy is the primary control against lateral movement. It reduces the blast radius of any single compromise from "the entire cluster" to "the pods this workload is explicitly allowed to reach."
|
|
77
|
+
|
|
78
|
+
## What LLMs Get Wrong
|
|
79
|
+
|
|
80
|
+
1. **No NetworkPolicy at all.** The most common error. The generated manifests include Deployments and Services but no network segmentation.
|
|
81
|
+
2. **Ingress-only policies.** Writing a policy with only ingress rules still allows unrestricted egress. Always specify both `policyTypes: [Ingress, Egress]`.
|
|
82
|
+
3. **Forgetting DNS egress.** Blocking all egress without a DNS exception breaks all service discovery.
|
|
83
|
+
4. **NodePort as default.** Generating `type: NodePort` when `ClusterIP` would suffice, exposing the service on every node.
|
|
84
|
+
5. **Missing `ingressClassName`.** Omitting it in an Ingress resource relies on a default IngressClass that may not exist, causing silent 404s.
|
|
85
|
+
6. **Wrong port mapping.** Confusing the Service `port`, `targetPort`, and Ingress backend `port.number`. The Ingress backend references the Service port, not the container port.
|
|
86
|
+
7. **`hostNetwork: true` without justification.** Bypasses all NetworkPolicy enforcement entirely.
|
|
87
|
+
|
|
88
|
+
## Real-World Impact
|
|
89
|
+
|
|
90
|
+
Lateral movement is the primary attack vector in Kubernetes breaches. The 2022 Sysdig threat report found that 87% of container images contained a high or critical vulnerability, and the average time from initial compromise to lateral movement was under 10 minutes in clusters without NetworkPolicy.
|
|
91
|
+
|
|
92
|
+
Network segmentation is not optional security hardening -- it is the minimum viable defense for any multi-service deployment.
|
|
93
|
+
|
|
94
|
+
## Further Reading
|
|
95
|
+
|
|
96
|
+
- [Network Policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/)
|
|
97
|
+
- [KubeShark Security Hardening Guide](../guides/security-hardening.md)
|
|
98
|
+
- [KubeShark Do/Don't Checklist](../examples/do-dont-checklist.md)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# FM4: Privilege Sprawl
|
|
2
|
+
|
|
3
|
+
Privilege sprawl occurs when workloads accumulate more Kubernetes API access than they need. It compounds the impact of every other failure mode -- a compromised container with `cluster-admin` permissions turns a single vulnerability into a full cluster takeover. RBAC misconfigurations are silent, hard to audit, and rarely reviewed after initial setup.
|
|
4
|
+
|
|
5
|
+
## RBAC Fundamentals
|
|
6
|
+
|
|
7
|
+
Kubernetes RBAC has four resource types:
|
|
8
|
+
|
|
9
|
+
- **Role**: grants permissions within a single namespace.
|
|
10
|
+
- **ClusterRole**: grants permissions cluster-wide or across all namespaces.
|
|
11
|
+
- **RoleBinding**: binds a Role (or ClusterRole) to subjects within one namespace.
|
|
12
|
+
- **ClusterRoleBinding**: binds a ClusterRole to subjects across the entire cluster.
|
|
13
|
+
|
|
14
|
+
The principle of least privilege means using namespace-scoped Roles unless the workload genuinely needs cluster-wide access. Most application workloads need zero Kubernetes API access at all.
|
|
15
|
+
|
|
16
|
+
## Wildcard Permissions
|
|
17
|
+
|
|
18
|
+
Rules containing `verbs: ["*"]`, `resources: ["*"]`, or `apiGroups: ["*"]` grant unrestricted access. A single wildcard rule can negate every other security control in the cluster. Wildcards appear frequently in quickstart guides and Helm chart defaults because they "just work" -- but they grant far more access than any workload needs.
|
|
19
|
+
|
|
20
|
+
Always enumerate specific verbs (`get`, `list`, `watch`, `create`, `update`, `patch`, `delete`), specific resources (`pods`, `configmaps`, `deployments`), and specific API groups (`""`, `apps`, `batch`). Use `resourceNames` to restrict access to specific named resources when possible.
|
|
21
|
+
|
|
22
|
+
## The Default ServiceAccount Problem
|
|
23
|
+
|
|
24
|
+
Every namespace has a `default` ServiceAccount. Every pod that does not specify `serviceAccountName` uses it. Every pod that uses it shares the same identity. This means:
|
|
25
|
+
|
|
26
|
+
- A single RoleBinding granting permissions to the `default` SA affects every pod in the namespace.
|
|
27
|
+
- If any pod in the namespace is compromised, the attacker inherits whatever permissions the `default` SA has.
|
|
28
|
+
- RBAC audit trails cannot distinguish between workloads using the same SA.
|
|
29
|
+
|
|
30
|
+
The fix: create a dedicated ServiceAccount for every workload. Set `automountServiceAccountToken: false` on both the ServiceAccount and the Pod spec for workloads that never call the Kubernetes API (which is most of them).
|
|
31
|
+
|
|
32
|
+
## automountServiceAccountToken
|
|
33
|
+
|
|
34
|
+
By default, Kubernetes mounts a service account token into every pod at `/var/run/secrets/kubernetes.io/serviceaccount/token`. This token grants whatever permissions the SA has. For workloads that never call the Kubernetes API (web servers, batch processors, data pipelines), this token is pure attack surface.
|
|
35
|
+
|
|
36
|
+
Setting `automountServiceAccountToken: false` on the pod spec removes the token mount entirely. For workloads that do need API access, use projected token volumes with explicit audience and expiration instead of the legacy static token.
|
|
37
|
+
|
|
38
|
+
## Secrets Are Not Encrypted
|
|
39
|
+
|
|
40
|
+
The most dangerous misconception about Kubernetes Secrets is that they are secure. They are not:
|
|
41
|
+
|
|
42
|
+
- **Base64 is not encryption.** `kubectl get secret -o yaml` shows the value. `echo <value> | base64 -d` decodes it. Any user or ServiceAccount with `get secrets` RBAC in the namespace can read every secret.
|
|
43
|
+
- **etcd stores secrets in plaintext by default.** Without explicit `EncryptionConfiguration`, secrets are stored unencrypted in the cluster's backing store.
|
|
44
|
+
- **Environment variable injection exposes secrets.** Secrets injected via `env.valueFrom.secretKeyRef` are visible in `kubectl describe pod`, process listings (`/proc/<pid>/environ`), and crash dumps.
|
|
45
|
+
|
|
46
|
+
The hardened approach:
|
|
47
|
+
1. Mount secrets as files via `volumeMounts`, not environment variables.
|
|
48
|
+
2. Enable etcd encryption at rest as a baseline.
|
|
49
|
+
3. Use external secret management (External Secrets Operator with AWS Secrets Manager, GCP Secret Manager, or HashiCorp Vault) for production secrets.
|
|
50
|
+
4. Use Sealed Secrets for secrets that must be stored in Git.
|
|
51
|
+
|
|
52
|
+
## Token Projection for API Access
|
|
53
|
+
|
|
54
|
+
When a workload genuinely needs to call the Kubernetes API, use bound service account token volumes instead of the default mount:
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
volumes:
|
|
58
|
+
- name: kube-api-token
|
|
59
|
+
projected:
|
|
60
|
+
sources:
|
|
61
|
+
- serviceAccountToken:
|
|
62
|
+
audience: "https://kubernetes.default.svc"
|
|
63
|
+
expirationSeconds: 3600
|
|
64
|
+
path: token
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Projected tokens are short-lived and audience-scoped, limiting the damage if the token is leaked.
|
|
68
|
+
|
|
69
|
+
## What LLMs Get Wrong
|
|
70
|
+
|
|
71
|
+
1. **Binding `cluster-admin` to workload ServiceAccounts.** The most dangerous mistake. Appears in quickstart-style outputs when the LLM does not know the specific permissions needed.
|
|
72
|
+
2. **Using wildcards for convenience.** `verbs: ["*"]` and `resources: ["*"]` appear frequently because they avoid enumeration.
|
|
73
|
+
3. **Omitting `serviceAccountName`.** The pod silently uses the `default` SA, sharing identity with every other pod in the namespace.
|
|
74
|
+
4. **Leaving `automountServiceAccountToken` at default.** The token is mounted even when the workload never calls the API.
|
|
75
|
+
5. **Injecting secrets as environment variables.** Using `env.valueFrom.secretKeyRef` instead of volume mounts.
|
|
76
|
+
6. **Hardcoding secret values in manifests.** Plaintext passwords in `env.value` fields, committed to version control.
|
|
77
|
+
7. **Treating base64 as encryption.** Generating a Secret resource and assuming the data is protected.
|
|
78
|
+
|
|
79
|
+
## Real-World Impact
|
|
80
|
+
|
|
81
|
+
- **Shopify Kubernetes bug bounty:** An attacker gained access to a pod with excessive RBAC permissions, then used `kubectl` from inside the pod to read secrets from other namespaces.
|
|
82
|
+
- **Kubernetes CVE-2018-1002105:** A privilege escalation vulnerability in the API server. Clusters where workloads already had broad RBAC permissions experienced full compromise; clusters with least-privilege RBAC contained the blast radius.
|
|
83
|
+
- **Uber breach (2022):** While not Kubernetes-specific, the pattern -- hardcoded credentials in source code -- is identical to the secrets-in-env antipattern that LLMs reproduce.
|
|
84
|
+
|
|
85
|
+
Privilege sprawl is cumulative and invisible until exploitation. Every unnecessary permission is an expansion of the attack surface that persists indefinitely unless explicitly revoked.
|
|
86
|
+
|
|
87
|
+
## Further Reading
|
|
88
|
+
|
|
89
|
+
- [RBAC Authorization](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)
|
|
90
|
+
- [KubeShark Security Hardening Guide](../guides/security-hardening.md)
|
|
91
|
+
- [KubeShark Do/Don't Checklist](../examples/do-dont-checklist.md)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# FM2: Resource Starvation
|
|
2
|
+
|
|
3
|
+
Every container in a Kubernetes cluster shares finite CPU, memory, and disk. Without explicit resource requests and limits, workloads compete unpredictably -- a single runaway process can starve an entire node. Resource starvation is the most common cause of production instability in Kubernetes and the hardest to diagnose after the fact.
|
|
4
|
+
|
|
5
|
+
## QoS Classes and Eviction Order
|
|
6
|
+
|
|
7
|
+
Kubernetes assigns a Quality of Service class to every pod based on how its resource fields are configured. This class determines eviction priority when a node runs out of resources:
|
|
8
|
+
|
|
9
|
+
| QoS Class | Condition | Eviction order |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| **Guaranteed** | Every container has `requests == limits` for both CPU and memory | Last evicted |
|
|
12
|
+
| **Burstable** | At least one container has `requests != limits` | Middle |
|
|
13
|
+
| **BestEffort** | No requests or limits on any container | First evicted |
|
|
14
|
+
|
|
15
|
+
A pod with no `resources` block at all is BestEffort. Under node memory pressure, the kubelet kills BestEffort pods first, then Burstable pods exceeding their requests, and Guaranteed pods only as a last resort. Running BestEffort in production is never acceptable.
|
|
16
|
+
|
|
17
|
+
## CPU Throttling: The Invisible Latency Killer
|
|
18
|
+
|
|
19
|
+
CPU is a compressible resource -- when a container hits its CPU limit, the kernel's Completely Fair Scheduler (CFS) throttles it rather than killing it. This causes latency spikes that are invisible in standard metrics. A container with a 250m CPU limit that needs 300m for a request will pause mid-execution, adding unpredictable delays.
|
|
20
|
+
|
|
21
|
+
Current best practice for most application workloads: set CPU requests but omit CPU limits. This allows bursting to available capacity without CFS throttling. Set CPU limits only when running in multi-tenant clusters that require hard fairness guarantees, or when Guaranteed QoS is specifically needed.
|
|
22
|
+
|
|
23
|
+
## Memory: Always Set a Limit
|
|
24
|
+
|
|
25
|
+
Memory is incompressible. When a container exceeds its memory limit, the kernel OOM-kills the process immediately. There is no throttling, no warning -- the process is terminated and the container restarts. Set memory limits 25-50% above observed p99 usage to absorb garbage collection spikes and temporary allocations.
|
|
26
|
+
|
|
27
|
+
## LimitRange and ResourceQuota
|
|
28
|
+
|
|
29
|
+
Namespace-level guardrails catch workloads that slip through without resource specifications:
|
|
30
|
+
|
|
31
|
+
- **LimitRange** sets default requests/limits for containers that omit them, and enforces min/max bounds per container. Without a LimitRange, a single container can request all available resources on a node.
|
|
32
|
+
- **ResourceQuota** caps aggregate resource consumption per namespace: total CPU, memory, pod count, PVC count. When a ResourceQuota exists, every pod must specify resources or admission is rejected.
|
|
33
|
+
|
|
34
|
+
Both should be present in every production namespace. LimitRange provides sensible defaults; ResourceQuota prevents a single namespace from starving the rest of the cluster.
|
|
35
|
+
|
|
36
|
+
## OOMKill Cascades
|
|
37
|
+
|
|
38
|
+
A particularly dangerous pattern occurs when OOMKills cascade. Pod A exceeds its memory limit and is killed. Its traffic shifts to pods B and C, which now handle more load, consume more memory, and also get OOMKilled. Within seconds, the entire service is in `CrashLoopBackOff`. This is especially common with JVM workloads where heap sizing does not account for off-heap memory, native threads, and container overhead.
|
|
39
|
+
|
|
40
|
+
## PodDisruptionBudgets
|
|
41
|
+
|
|
42
|
+
Without a PDB, voluntary disruptions (node upgrades, autoscaler scale-downs, `kubectl drain`) can terminate all replicas simultaneously. A PDB with `maxUnavailable: 1` ensures at least N-1 replicas remain running during planned disruptions. Critical rules:
|
|
43
|
+
|
|
44
|
+
- Never set `minAvailable` equal to `replicas` -- it blocks all voluntary disruptions including cluster upgrades.
|
|
45
|
+
- The PDB selector must exactly match the pod labels. A mismatched selector silently protects nothing.
|
|
46
|
+
- PDBs only protect against voluntary disruptions. Node crashes and OOMKills bypass PDB constraints.
|
|
47
|
+
|
|
48
|
+
## HPA Pitfalls
|
|
49
|
+
|
|
50
|
+
The Horizontal Pod Autoscaler scales replicas based on metrics, but misconfiguration causes more problems than it solves:
|
|
51
|
+
|
|
52
|
+
- **Target utilization too high (90%):** No headroom for traffic spikes. By the time new pods start, the existing pods are overwhelmed.
|
|
53
|
+
- **Target utilization too low (30%):** Wasteful. The cluster runs 3x the needed capacity.
|
|
54
|
+
- **No scale-down stabilization:** HPA scales down aggressively by default. A brief traffic dip removes pods, then the next spike overwhelms the reduced fleet. Set `scaleDown.stabilizationWindowSeconds: 300`.
|
|
55
|
+
- **HPA `minReplicas` below PDB `minAvailable`:** HPA scales down to a count that violates the disruption budget, causing node drains to block indefinitely.
|
|
56
|
+
|
|
57
|
+
## Topology Spread and Anti-Affinity
|
|
58
|
+
|
|
59
|
+
Three replicas on the same node provide zero high availability. A single node failure takes all of them down. Use `topologySpreadConstraints` to distribute pods across zones and nodes:
|
|
60
|
+
|
|
61
|
+
- Zone-level spread with `whenUnsatisfiable: DoNotSchedule` prevents all replicas from landing in one availability zone.
|
|
62
|
+
- Node-level spread with `whenUnsatisfiable: ScheduleAnyway` provides a soft preference that does not block scheduling in small clusters.
|
|
63
|
+
|
|
64
|
+
## What LLMs Get Wrong
|
|
65
|
+
|
|
66
|
+
1. **Omitting resources entirely.** The most common error. The pod becomes BestEffort and is evicted first under any pressure.
|
|
67
|
+
2. **Round-number guessing.** `cpu: 1` and `memory: 1Gi` without profiling. Requests should reflect measured steady-state usage, not arbitrary values.
|
|
68
|
+
3. **Setting CPU limits by default.** CFS throttling causes latency spikes. Omit CPU limits unless multi-tenancy or Guaranteed QoS requires them.
|
|
69
|
+
4. **Memory limit equal to request.** Zero headroom means any spike triggers OOMKill. Allow 25-50% margin.
|
|
70
|
+
5. **Forgetting PDB.** Multiple replicas without a PDB is false redundancy -- a node drain kills them all.
|
|
71
|
+
6. **Topology spread missing.** Three replicas with no spread constraints may all schedule to the same node.
|
|
72
|
+
|
|
73
|
+
## Real Incidents
|
|
74
|
+
|
|
75
|
+
- **Datadog outage (2023):** A cascading OOMKill across monitoring agents caused loss of observability during a separate infrastructure incident, delaying diagnosis by hours.
|
|
76
|
+
- **GitHub rate limiting regression:** CPU throttling on API servers caused p99 latency to spike from 50ms to 2s. Removing CPU limits restored performance immediately.
|
|
77
|
+
- **Zalando postmortem:** A missing PDB allowed a cluster upgrade to drain all pods of a critical payment service simultaneously, causing a 15-minute outage.
|
|
78
|
+
|
|
79
|
+
Resource management is not optimization -- it is correctness. A manifest without resource configuration is incomplete.
|
|
80
|
+
|
|
81
|
+
## Further Reading
|
|
82
|
+
|
|
83
|
+
- [Managing Resources for Containers](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
|
|
84
|
+
- [Pod Quality of Service Classes](https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/)
|
|
85
|
+
- [KubeShark Good Patterns](../examples/good-patterns.md)
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
KubeShark can be installed in three ways depending on your environment: direct clone (recommended), marketplace install, or per-project setup for Codex.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Option 1: Direct Clone (Recommended)
|
|
8
|
+
|
|
9
|
+
Clone the repository into your Claude Code skills directory. Claude Code auto-discovers skills in `~/.claude/skills/` -- no restart or configuration needed.
|
|
10
|
+
|
|
11
|
+
### macOS / Linux
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone https://github.com/LukasNiessen/kubernetes-skill.git ~/.claude/skills/kubernetes-skill
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Windows (PowerShell)
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
git clone https://github.com/LukasNiessen/kubernetes-skill.git "$env:USERPROFILE\.claude\skills\kubernetes-skill"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Windows (Command Prompt)
|
|
24
|
+
|
|
25
|
+
```cmd
|
|
26
|
+
git clone https://github.com/LukasNiessen/kubernetes-skill.git "%USERPROFILE%\.claude\skills\kubernetes-skill"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
After cloning, the skill is active immediately. Claude Code reads `SKILL.md` on the next Kubernetes-related prompt.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Option 2: Marketplace Install
|
|
34
|
+
|
|
35
|
+
Claude Code includes a built-in plugin system with marketplace support. This avoids manual cloning.
|
|
36
|
+
|
|
37
|
+
**Add the marketplace source and install:**
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
/plugin marketplace add LukasNiessen/kubernetes-skill
|
|
41
|
+
/plugin install kubernetes-skill
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Or use the interactive manager:**
|
|
45
|
+
|
|
46
|
+
1. Run `/plugin` in Claude Code.
|
|
47
|
+
2. Switch to the **Discover** tab.
|
|
48
|
+
3. Find KubeShark and install.
|
|
49
|
+
|
|
50
|
+
The marketplace reads `.claude-plugin/marketplace.json` in the repository to register KubeShark as an installable plugin.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Option 3: Codex Per-Project Setup
|
|
55
|
+
|
|
56
|
+
Codex has no global skill system. Setup is per-project: clone the skill into your repository and reference it from `AGENTS.md`.
|
|
57
|
+
|
|
58
|
+
**Step 1 -- Clone into your project:**
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
git clone https://github.com/LukasNiessen/kubernetes-skill.git .kubernetes-skill
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Step 2 -- Reference in AGENTS.md:**
|
|
65
|
+
|
|
66
|
+
Create or edit `AGENTS.md` in your repository root and add:
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
## Kubernetes
|
|
70
|
+
|
|
71
|
+
When working with Kubernetes manifests, Helm charts, or Kustomize overlays,
|
|
72
|
+
follow the workflow in `.kubernetes-skill/SKILL.md`.
|
|
73
|
+
Load references from `.kubernetes-skill/references/` as needed.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Codex will follow the workflow whenever it encounters Kubernetes tasks in the project.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Updating
|
|
81
|
+
|
|
82
|
+
KubeShark is a plain Git repository. Pull the latest changes to update:
|
|
83
|
+
|
|
84
|
+
**macOS / Linux:**
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
cd ~/.claude/skills/kubernetes-skill && git pull
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Windows (PowerShell):**
|
|
91
|
+
|
|
92
|
+
```powershell
|
|
93
|
+
cd "$env:USERPROFILE\.claude\skills\kubernetes-skill"; git pull
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Codex projects:**
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
cd .kubernetes-skill && git pull
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Uninstalling
|
|
105
|
+
|
|
106
|
+
Remove the cloned directory to uninstall.
|
|
107
|
+
|
|
108
|
+
**macOS / Linux:**
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
rm -rf ~/.claude/skills/kubernetes-skill
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Windows (PowerShell):**
|
|
115
|
+
|
|
116
|
+
```powershell
|
|
117
|
+
Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\skills\kubernetes-skill"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Codex projects:**
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
rm -rf .kubernetes-skill
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Also remove the corresponding section from `AGENTS.md` if you added one.
|
|
127
|
+
|
|
128
|
+
**Marketplace installs:**
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
/plugin uninstall kubernetes-skill
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Verifying Installation
|
|
137
|
+
|
|
138
|
+
Confirm the skill is installed correctly by checking that `SKILL.md` exists:
|
|
139
|
+
|
|
140
|
+
**macOS / Linux:**
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
ls ~/.claude/skills/kubernetes-skill/SKILL.md
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Windows (PowerShell):**
|
|
147
|
+
|
|
148
|
+
```powershell
|
|
149
|
+
Test-Path "$env:USERPROFILE\.claude\skills\kubernetes-skill\SKILL.md"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
If the file exists, KubeShark is ready. You can also verify by asking Claude Code a Kubernetes question -- the response should follow the 7-step workflow and include an output contract with assumptions, failure modes, and rollback notes.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Quick Start
|
|
2
|
+
|
|
3
|
+
Get KubeShark running in under two minutes.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git clone https://github.com/LukasNiessen/kubernetes-skill.git ~/.claude/skills/kubernetes-skill
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
See the [Installation guide](installation.md) for Windows commands and alternative install methods.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 2. Use It
|
|
18
|
+
|
|
19
|
+
### Explicit invocation
|
|
20
|
+
|
|
21
|
+
Prefix your prompt with `/kubernetes-skill` to invoke the skill directly:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
/kubernetes-skill Create a production-ready Deployment for a Node.js API with autoscaling
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
/kubernetes-skill Review my StatefulSet for security and reliability issues
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Automatic activation
|
|
32
|
+
|
|
33
|
+
KubeShark activates automatically when Claude Code detects a Kubernetes-related task. No prefix needed:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Create a Helm chart for a PostgreSQL StatefulSet with backup CronJobs
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Review my deployment.yaml for security issues
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Both invocation methods produce the same structured output.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 3. What to Expect
|
|
48
|
+
|
|
49
|
+
Every KubeShark response follows a **7-step workflow**:
|
|
50
|
+
|
|
51
|
+
| Step | What happens |
|
|
52
|
+
|------|-------------|
|
|
53
|
+
| 1. Capture context | Records cluster version, distribution, namespace, environment, workload type |
|
|
54
|
+
| 2. Diagnose failure modes | Identifies which of the 6 failure modes apply to your task |
|
|
55
|
+
| 3. Load references | Pulls 1-2 targeted reference files (not the entire knowledge base) |
|
|
56
|
+
| 4. Propose fix path | Recommends a solution with risk controls and runtime behavior notes |
|
|
57
|
+
| 5. Generate artifacts | Produces YAML manifests, Helm charts, Kustomize overlays, or policies |
|
|
58
|
+
| 6. Validate | Provides dry-run commands, schema validation, and consistency checks |
|
|
59
|
+
| 7. Output contract | States assumptions, tradeoffs, validation plan, and rollback notes |
|
|
60
|
+
|
|
61
|
+
The output contract at the end is the key differentiator. It makes every response auditable -- you can verify assumptions and check the rollback path before applying anything to your cluster.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 4. Example Tasks
|
|
66
|
+
|
|
67
|
+
KubeShark handles a wide range of Kubernetes work. Here are common task types to try:
|
|
68
|
+
|
|
69
|
+
### Deployment creation
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
/kubernetes-skill Create a production Deployment for a Python Flask API with 3 replicas, resource limits, and an Ingress
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Security review
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
/kubernetes-skill Review this Deployment for security issues and harden it with proper security contexts, NetworkPolicies, and RBAC
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Helm chart generation
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
/kubernetes-skill Create a Helm chart for a Redis cluster with configurable replicas and persistent storage
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Kustomize overlay
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
/kubernetes-skill Build a Kustomize overlay structure with base, staging, and production variants for my microservice
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### RBAC setup
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
/kubernetes-skill Create least-privilege RBAC for a monitoring service that needs read access to pods and metrics across all namespaces
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Troubleshooting
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
/kubernetes-skill My pods are stuck in CrashLoopBackOff with OOMKilled status. Here is my manifest -- diagnose and fix it.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Probe configuration
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
/kubernetes-skill Add proper liveness, readiness, and startup probes for a Java Spring Boot app that takes 90 seconds to start
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### CI pipeline validation
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
/kubernetes-skill Create a CI pipeline step that validates all manifests with kubeconform and checks for policy violations with Kyverno
|
|
115
|
+
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Helm Chart Best Practices
|
|
2
|
+
|
|
3
|
+
Helm is the standard package manager for Kubernetes. KubeShark follows these conventions when generating or reviewing Helm charts. For full YAML examples and the LLM mistake checklist, see [references/helm-patterns.md](https://github.com/LukasNiessen/kubernetes-skill/blob/main/references/helm-patterns.md).
|
|
4
|
+
|
|
5
|
+
## Chart.yaml
|
|
6
|
+
|
|
7
|
+
Every chart must declare `apiVersion: v2` (mandatory for Helm 3), a SemVer `version` that bumps on every chart change, and an independent `appVersion` tracking the application release. The `type` field should be `application` or `library`. Include a concise `description` field.
|
|
8
|
+
|
|
9
|
+
Key rules:
|
|
10
|
+
|
|
11
|
+
- `version` follows SemVer and must change on every chart modification -- Helm repositories serve stale versions from cache if the version is not bumped
|
|
12
|
+
- `appVersion` tracks the application release independently of the chart version
|
|
13
|
+
- Declare sub-chart dependencies in `Chart.yaml` under `dependencies`, not in a separate `requirements.yaml`
|
|
14
|
+
|
|
15
|
+
## values.yaml Structure
|
|
16
|
+
|
|
17
|
+
Group values by resource type. Provide secure defaults that match the PSS restricted profile out of the box:
|
|
18
|
+
|
|
19
|
+
- **image** -- repository, tag (defaults to `appVersion`), pullPolicy
|
|
20
|
+
- **securityContext** -- `runAsNonRoot`, `allowPrivilegeEscalation: false`, `readOnlyRootFilesystem: true`, `capabilities.drop: ["ALL"]`
|
|
21
|
+
- **resources** -- explicit requests and memory limits
|
|
22
|
+
- **probes** -- liveness and readiness paths, ports, and initial delays
|
|
23
|
+
- **ingress** -- disabled by default with `enabled: false`
|
|
24
|
+
- **serviceAccount** -- `create: true`, blank name, empty annotations
|
|
25
|
+
|
|
26
|
+
Document every section with `# --` comments so `helm-docs` can auto-generate documentation.
|
|
27
|
+
|
|
28
|
+
## Template Helpers (_helpers.tpl)
|
|
29
|
+
|
|
30
|
+
Define reusable named templates for `fullname`, `labels`, `selectorLabels`, and `serviceAccountName`. All templates should:
|
|
31
|
+
|
|
32
|
+
- Truncate names to 63 characters (Kubernetes DNS label limit)
|
|
33
|
+
- Support `nameOverride` and `fullnameOverride` values
|
|
34
|
+
- Use `include` (not `template`) so output can be piped to `nindent`
|
|
35
|
+
|
|
36
|
+
## Template Conventions
|
|
37
|
+
|
|
38
|
+
- Use {% raw %}`{{- ... -}}`{% endraw %} whitespace trimming to prevent blank lines in rendered output.
|
|
39
|
+
- Always pipe string values through {% raw %}`{{ .Values.foo | quote }}`{% endraw %}.
|
|
40
|
+
- Use {% raw %}`{{ toYaml .Values.resources | nindent N }}`{% endraw %} for nested objects -- never render at column 0.
|
|
41
|
+
- Wrap optional resources in {% raw %}`{{- if .Values.ingress.enabled }}`{% endraw %} conditionals.
|
|
42
|
+
- Use {% raw %}`{{ required "message" .Values.key }}`{% endraw %} for values that must be supplied by the user.
|
|
43
|
+
|
|
44
|
+
## Dependency Management
|
|
45
|
+
|
|
46
|
+
Declare sub-charts in `Chart.yaml` under `dependencies`. Run `helm dependency update` to generate `Chart.lock`. Use `condition` or `tags` to make sub-charts optional. Commit both `Chart.yaml` and `Chart.lock` to version control.
|
|
47
|
+
|
|
48
|
+
## Security Defaults
|
|
49
|
+
|
|
50
|
+
Charts should ship with secure defaults out of the box. Users who need to relax security (e.g., for a CNI plugin that requires host networking) can override values explicitly, but the default path should produce a PSS-restricted-compliant workload.
|
|
51
|
+
|
|
52
|
+
Key defaults to include in every chart's `values.yaml`:
|
|
53
|
+
|
|
54
|
+
- Pod-level `securityContext` with `runAsNonRoot: true` and `seccompProfile: RuntimeDefault`
|
|
55
|
+
- Container-level `securityContext` with `allowPrivilegeEscalation: false`, `readOnlyRootFilesystem: true`, and `capabilities.drop: ["ALL"]`
|
|
56
|
+
- `automountServiceAccountToken: false` unless the workload calls the Kubernetes API
|
|
57
|
+
|
|
58
|
+
## Testing Pipeline
|
|
59
|
+
|
|
60
|
+
Run these checks in order during development and CI:
|
|
61
|
+
|
|
62
|
+
1. **`helm lint ./chart`** -- catch syntax and structural errors
|
|
63
|
+
2. **`helm template release-name ./chart -f values-prod.yaml`** -- render manifests locally
|
|
64
|
+
3. **`kubeconform -kubernetes-version X.Y.0 -strict`** -- validate rendered output against target cluster schemas
|
|
65
|
+
4. **`helm test release-name`** -- run in-cluster test pods post-install
|
|
66
|
+
|
|
67
|
+
Integrate these steps into your CI pipeline so every chart change is validated before merge. The schema validation step (kubeconform) is especially important because `helm lint` does not validate against the Kubernetes API schema.
|
|
68
|
+
|
|
69
|
+
## Common LLM Mistakes
|
|
70
|
+
|
|
71
|
+
The most frequent Helm-specific errors LLMs produce include: missing {% raw %}`{{-`{% endraw %} whitespace control, omitting `| nindent N` on `toYaml` calls, forgetting to `quote` string values, hardcoding labels instead of using `include` helpers, not providing defaults for image tags, and not bumping the chart version. See the full checklist in the [reference file](https://github.com/LukasNiessen/kubernetes-skill/blob/main/references/helm-patterns.md#llm-mistake-checklist).
|