@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,235 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy-railway
|
|
3
|
+
triggers: [synapta deploy railway, Railway deploy, railway up, railway variables]
|
|
4
|
+
network: allowlist
|
|
5
|
+
source:
|
|
6
|
+
origin: https://github.com/railwayapp/railway-skills
|
|
7
|
+
path: plugins/railway/skills/use-railway
|
|
8
|
+
commit: 380a2abbb0f9
|
|
9
|
+
license: MIT (Railway Corporation)
|
|
10
|
+
adapted: light-touch
|
|
11
|
+
description: >
|
|
12
|
+
Operate Railway infrastructure: create projects, provision services and
|
|
13
|
+
databases, manage object storage buckets, deploy code, configure environments
|
|
14
|
+
and variables, manage domains, troubleshoot failures, check status and metrics,
|
|
15
|
+
set up Railway agent tooling, and query Railway docs. Use this skill whenever
|
|
16
|
+
the user mentions Railway, deployments, services, environments, buckets,
|
|
17
|
+
object storage, build failures, agent setup, MCP, or infrastructure operations,
|
|
18
|
+
even if they don't say "Railway" explicitly.
|
|
19
|
+
allowed-tools: Bash(railway:*), Bash(which:*), Bash(command:*), Bash(npm:*), Bash(npx:*), Bash(curl:*), Bash(python3:*)
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Use Railway
|
|
23
|
+
|
|
24
|
+
## Railway resource model
|
|
25
|
+
|
|
26
|
+
Railway organizes infrastructure in a hierarchy:
|
|
27
|
+
|
|
28
|
+
- **Workspace** is the billing and team scope. A user belongs to one or more workspaces.
|
|
29
|
+
- **Project** is a collection of services under one workspace. It maps to one deployable unit of work.
|
|
30
|
+
- **Environment** is an isolated configuration plane inside a project (for example, `production`, `staging`). Each environment has its own variables, config, and deployment history.
|
|
31
|
+
- **Service** is a single deployable unit inside a project. It can be an app from a repo, a Docker image, or a managed database.
|
|
32
|
+
- **Bucket** is an S3-compatible object storage resource inside a project. Buckets are created at the project level and deployed to environments. Each bucket has credentials (endpoint, access key, secret key) for S3-compatible access.
|
|
33
|
+
- **Deployment** is a point-in-time release of a service in an environment. It has build logs, runtime logs, and a status lifecycle.
|
|
34
|
+
|
|
35
|
+
Most CLI commands operate on the linked project/environment/service context. Use `railway status --json` to see the context, and `--project`, `--environment`, `--service` flags to override.
|
|
36
|
+
|
|
37
|
+
## Parsing Railway URLs
|
|
38
|
+
|
|
39
|
+
Users often paste Railway dashboard URLs. Extract IDs before doing anything else:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
https://railway.com/project/<PROJECT_ID>/service/<SERVICE_ID>?environmentId=<ENV_ID>
|
|
43
|
+
https://railway.com/project/<PROJECT_ID>/service/<SERVICE_ID>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The URL always contains `projectId` and `serviceId`. It may contain `environmentId` as a query parameter. If the environment ID is missing and the user specifies an environment by name (e.g., "production"), resolve it:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
scripts/railway-api.sh \
|
|
50
|
+
'query getProject($id: String!) {
|
|
51
|
+
project(id: $id) {
|
|
52
|
+
environments { edges { node { id name } } }
|
|
53
|
+
}
|
|
54
|
+
}' \
|
|
55
|
+
'{"id": "<PROJECT_ID>"}'
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Match the environment name (case-insensitive) to get the `environmentId`.
|
|
59
|
+
|
|
60
|
+
**Prefer passing explicit IDs** to CLI commands (`--project`, `--environment`, `--service`) and scripts (`--project-id`, `--environment-id`, `--service-id`) instead of running `railway link`. This avoids modifying global state and is faster.
|
|
61
|
+
|
|
62
|
+
## Preflight
|
|
63
|
+
|
|
64
|
+
Before any mutation, verify context:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
command -v railway # CLI installed
|
|
68
|
+
RAILWAY_CALLER="skill:use-railway@1.2.1" RAILWAY_AGENT_SESSION="railway-skill-$(date +%s)-$$" railway whoami --json
|
|
69
|
+
railway --version # check CLI version
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
For Railway CLI calls made while this skill is active, prefix the command with `RAILWAY_CALLER=skill:use-railway@1.2.1` and a stable `RAILWAY_AGENT_SESSION` reused for the current user request. Generate the session id once per user request, then reuse that exact value for later Railway CLI calls in the same workflow. Do not run a separate `export` preflight solely for telemetry; inline env prefixes keep the shell output concise and avoid leaking setup steps into every response.
|
|
73
|
+
|
|
74
|
+
**Context resolution - URL IDs always win:**
|
|
75
|
+
- If the user provides a Railway URL, extract IDs from it. Do NOT run `railway status --json`; it returns the locally linked project, which is usually unrelated.
|
|
76
|
+
- If no URL is given, fall back to `railway status --json` for the linked project/environment/service.
|
|
77
|
+
|
|
78
|
+
If the CLI is missing, guide the user to install it.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
bash <(curl -fsSL https://railway.com/install.sh) --agents -y # Install CLI and configure detected agents
|
|
82
|
+
bash <(curl -fsSL https://railway.com/install.sh) # Shell script (macOS, Linux, Windows via WSL)
|
|
83
|
+
npm i -g @railway/cli # npm (macOS, Linux, Windows). Requires Node.js version 16 or higher.
|
|
84
|
+
brew install railway # Homebrew (macOS)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
If not authenticated, run `railway login`. If not linked and no URL was provided, run `railway link --project <id-or-name>`.
|
|
88
|
+
|
|
89
|
+
If a command is not recognized (for example, `railway environment edit`), the CLI may be outdated. Upgrade with:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
railway upgrade
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Agent tooling
|
|
96
|
+
|
|
97
|
+
Use direct Railway CLI commands for deterministic operations. Use `railway agent` only when the user explicitly asks for Railway Agent, wants a natural-language investigation, or the task is broader than a single resource operation.
|
|
98
|
+
|
|
99
|
+
Set up Railway skills, MCP, and authentication with:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
railway setup agent
|
|
103
|
+
railway setup agent -y
|
|
104
|
+
railway setup agent --remote
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
`railway setup agent -y` skips the interactive login flow. If the user isn't authenticated after setup, run `railway login`.
|
|
108
|
+
|
|
109
|
+
Install or update MCP and skills directly when the user names a target tool:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
railway mcp install
|
|
113
|
+
railway mcp install --agent codex
|
|
114
|
+
railway mcp install --agent cursor --remote
|
|
115
|
+
railway skills
|
|
116
|
+
railway skills update --agent codex
|
|
117
|
+
railway skills remove --agent cursor
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Supported targets include `claude-code`, `cursor`, `codex`, `opencode`, `copilot`, and `factory-droid`. The `--remote` flag configures `https://mcp.railway.com` instead of a local `railway mcp` stdio server.
|
|
121
|
+
|
|
122
|
+
Use Railway Agent chat with:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
railway agent
|
|
126
|
+
railway agent -p "why is my service crashing?"
|
|
127
|
+
railway agent -p "summarize the deployment status" --json
|
|
128
|
+
railway agent --list --json
|
|
129
|
+
railway agent --thread-id <thread-id>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`railway agent` requires user OAuth authentication from `railway login`. Project tokens (`RAILWAY_TOKEN`) are not supported for Railway Agent chat. If an agent command is unavailable, upgrade with `railway upgrade --yes`.
|
|
133
|
+
|
|
134
|
+
## Common quick operations
|
|
135
|
+
|
|
136
|
+
These are frequent enough to handle without loading a reference:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
railway status --json # current context
|
|
140
|
+
railway whoami --json # auth and workspace info
|
|
141
|
+
railway project list --json # list projects
|
|
142
|
+
railway service list --json # services in current environment
|
|
143
|
+
railway variable list --service <svc> --json # list variables
|
|
144
|
+
railway variable set KEY=value --service <svc> # set a variable
|
|
145
|
+
railway logs --service <svc> --lines 200 --json # recent logs
|
|
146
|
+
railway metrics --service <svc> --since 1h --json # resource and HTTP metrics summary
|
|
147
|
+
railway up --detach -m "<summary>" # deploy current directory
|
|
148
|
+
railway bucket list --json # list buckets in current environment
|
|
149
|
+
railway bucket info --bucket <name> --json # bucket storage and object count
|
|
150
|
+
railway bucket credentials --bucket <name> --json # S3-compatible credentials
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
When using these commands from the skill, keep the command shape but prefix the Railway invocation with the telemetry env, for example:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
RAILWAY_CALLER="skill:use-railway@1.2.1" RAILWAY_AGENT_SESSION="railway-skill-20260508-1234" railway status --json
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Routing
|
|
160
|
+
|
|
161
|
+
For anything beyond quick operations, load the reference that matches the user's intent. Load only what you need, one reference is usually enough, two at most.
|
|
162
|
+
|
|
163
|
+
| Intent | Reference | Use for |
|
|
164
|
+
|---|---|---|
|
|
165
|
+
| **Analyze a database** ("analyze \<url\>", "analyze db", "analyze database", "analyze service", "introspect", "check my postgres/redis/mysql/mongo") | [analyze-db.md](references/analyze-db.md) | Database introspection and performance analysis. analyze-db.md directs you to the DB-specific reference. **This takes priority over the status/operate routes when a Railway URL to a database service is provided alongside "analyze".** |
|
|
166
|
+
| Create or connect resources | [setup.md](references/setup.md) | Projects, services, databases, buckets, templates, workspaces |
|
|
167
|
+
| Ship code or manage releases | [deploy.md](references/deploy.md) | Deploy, redeploy, restart, build config, monorepo, Dockerfile |
|
|
168
|
+
| Change configuration | [configure.md](references/configure.md) | Environments, variables, config patches, domains, networking |
|
|
169
|
+
| Check health or debug failures | [operate.md](references/operate.md) | Status, logs, metrics, build/runtime triage, recovery |
|
|
170
|
+
| Request from API, docs, or community | [request.md](references/request.md) | Railway GraphQL API queries/mutations, metrics queries, Central Station, official docs |
|
|
171
|
+
|
|
172
|
+
If the request spans two areas (for example, "deploy and then check if it's healthy"), load both references and compose one response.
|
|
173
|
+
|
|
174
|
+
## Execution rules
|
|
175
|
+
|
|
176
|
+
1. Prefer Railway CLI. Fall back to `scripts/railway-api.sh` for operations the CLI doesn't expose.
|
|
177
|
+
2. Use `--json` output where available for reliable parsing.
|
|
178
|
+
3. Resolve context before mutation. Know which project, environment, and service you're acting on.
|
|
179
|
+
4. For destructive actions (delete service, remove deployment, drop database), confirm intent and state impact before executing.
|
|
180
|
+
5. After mutations, verify the result with a read-back command.
|
|
181
|
+
|
|
182
|
+
## User-only commands (NEVER execute directly)
|
|
183
|
+
|
|
184
|
+
These commands modify database state and require the user to run them directly in their terminal. **Do NOT execute these with Bash. Instead, show the command and ask the user to run it.**
|
|
185
|
+
|
|
186
|
+
| Command | Why user-only |
|
|
187
|
+
|---------|---------------|
|
|
188
|
+
| `python3 scripts/enable-pg-stats.py --service <name>` | Modifies shared_preload_libraries, may restart database |
|
|
189
|
+
| `python3 scripts/pg-extensions.py --service <name> install <ext>` | Installs database extension |
|
|
190
|
+
| `python3 scripts/pg-extensions.py --service <name> uninstall <ext>` | Removes database extension |
|
|
191
|
+
| `ALTER SYSTEM SET ...` | Changes PostgreSQL configuration |
|
|
192
|
+
| `DROP EXTENSION ...` | Removes database extension |
|
|
193
|
+
| `CREATE EXTENSION ...` | Installs database extension |
|
|
194
|
+
|
|
195
|
+
When these operations are needed:
|
|
196
|
+
1. Explain what the command does and any side effects (e.g., restart required)
|
|
197
|
+
2. Show the exact command the user must run
|
|
198
|
+
3. Wait for user confirmation that they ran it
|
|
199
|
+
4. Verify the result with a read-only query
|
|
200
|
+
|
|
201
|
+
## Composition patterns
|
|
202
|
+
|
|
203
|
+
Multi-step workflows follow natural chains:
|
|
204
|
+
|
|
205
|
+
- **Add object storage**: setup (create bucket), setup (get credentials), configure (set S3 variables on app service)
|
|
206
|
+
- **First deploy**: setup (create project + service), configure (set variables and source), deploy, operate (verify healthy)
|
|
207
|
+
- **Fix a failure**: operate (triage logs), configure (fix config/variables), deploy (redeploy), operate (verify recovery)
|
|
208
|
+
- **Add a domain**: configure (add domain + set port), operate (verify DNS and service health)
|
|
209
|
+
- **Docs to action**: request (fetch docs answer), route to the relevant operational reference
|
|
210
|
+
|
|
211
|
+
When composing, return one unified response covering all steps. Don't ask the user to invoke each step separately.
|
|
212
|
+
|
|
213
|
+
## Setup decision flow
|
|
214
|
+
|
|
215
|
+
When the user wants to create or deploy something, determine the right action from current context:
|
|
216
|
+
|
|
217
|
+
1. Run `railway status --json` in the current directory.
|
|
218
|
+
2. **If linked**: add a service to the existing project (`railway add --service <name>`). Do not create a new project unless the user explicitly says "new project" or "separate project".
|
|
219
|
+
3. **If not linked**: check the parent directory (`cd .. && railway status --json`).
|
|
220
|
+
- **Parent linked**: this is likely a monorepo sub-app. Add a service and set `rootDirectory` to the sub-app path.
|
|
221
|
+
- **Parent not linked**: run `railway list --json` and look for a project matching the directory name.
|
|
222
|
+
- **Match found**: link to it (`railway link --project <name>`).
|
|
223
|
+
- **No match**: create a new project (`railway init --name <name>`).
|
|
224
|
+
4. When multiple workspaces exist, match by name from `railway whoami --json`.
|
|
225
|
+
|
|
226
|
+
**Naming heuristic**: app names like "flappy-bird" or "my-api" are service names, not project names. Use the directory or repo name for the project.
|
|
227
|
+
|
|
228
|
+
## Response format
|
|
229
|
+
|
|
230
|
+
For all operational responses, return:
|
|
231
|
+
1. What was done (action and scope).
|
|
232
|
+
2. The result (IDs, status, key output).
|
|
233
|
+
3. What to do next (or confirmation that the task is complete).
|
|
234
|
+
|
|
235
|
+
Keep output concise. Include command evidence only when it helps the user understand what happened.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# MongoDB Analysis
|
|
2
|
+
|
|
3
|
+
This reference covers MongoDB-specific metrics, tuning, and analysis guidance.
|
|
4
|
+
For common analysis patterns (output structure, collection status handling, performance thinking), see [analyze-db.md](analyze-db.md).
|
|
5
|
+
|
|
6
|
+
### What the Script Collects
|
|
7
|
+
|
|
8
|
+
**Via SSH (mongosh):**
|
|
9
|
+
- **Server Status:** version, storage engine, uptime, connections, opcounters, latency, memory, network, WiredTiger cache/checkpoint/tickets, global lock queues, document operations, query efficiency, cursors, TTL, asserts
|
|
10
|
+
- **DB Stats:** dataSize, storageSize, indexSize, object count, collection count
|
|
11
|
+
- **Collection Stats:** per-collection document count, size, storage size, index size, index count
|
|
12
|
+
- **Current Operations:** active ops with type, namespace, duration
|
|
13
|
+
- **Slow Queries:** from system.profile (if profiling enabled) — op, namespace, duration, plan summary
|
|
14
|
+
- **Replication Info:** oplog size, usage, time window
|
|
15
|
+
- **Top Collections:** per-collection read/write counts and time from `top` admin command
|
|
16
|
+
|
|
17
|
+
**Via Railway API:** Same infrastructure metrics.
|
|
18
|
+
|
|
19
|
+
### MongoDB Performance Patterns
|
|
20
|
+
|
|
21
|
+
**WiredTiger Cache Pressure Pattern:**
|
|
22
|
+
- Cache usage > 80% + app thread evictions > 0 = cache too small for working set
|
|
23
|
+
- Dirty cache > 20% of total = checkpoint falling behind, writes accumulating
|
|
24
|
+
- Read/write tickets depleted = operations queueing at storage engine level
|
|
25
|
+
- Fix: increase service RAM (WiredTiger uses ~50% of available RAM for cache)
|
|
26
|
+
|
|
27
|
+
**Query Efficiency Pattern:**
|
|
28
|
+
- `scannedObjects >> docsReturned` = collection scans, missing indexes
|
|
29
|
+
- Plan cache misses >> hits = frequent query re-planning, add indexes
|
|
30
|
+
- Sort spill to disk > 0 = sorts exceeding 100MB memory limit, needs index
|
|
31
|
+
|
|
32
|
+
**Connection Saturation Pattern:**
|
|
33
|
+
- `connectionsCurrent` approaching `connectionsAvailable` = connection pool exhaustion
|
|
34
|
+
- Many active ops with high microsecs_running = slow queries holding connections
|
|
35
|
+
- Queued readers/writers > 0 = global lock contention
|
|
36
|
+
|
|
37
|
+
**Oplog Pressure Pattern:**
|
|
38
|
+
- Oplog usage > 80% = replication window shrinking
|
|
39
|
+
- High write rate + small oplog = replicas may fall out of sync
|
|
40
|
+
- timeDiffHours < 1 on busy systems = risk of replica resync
|
|
41
|
+
|
|
42
|
+
### MongoDB Thresholds
|
|
43
|
+
|
|
44
|
+
| Metric | Healthy | Warning | Critical |
|
|
45
|
+
|--------|---------|---------|----------|
|
|
46
|
+
| WT cache usage | <70% | 70-85% | >85% |
|
|
47
|
+
| WT dirty % | <5% | 5-20% | >20% |
|
|
48
|
+
| App thread evictions | 0 | 1-100 | >100 |
|
|
49
|
+
| Connection usage | <70% | 70-85% | >85% |
|
|
50
|
+
| Queued operations | 0 | 1-10 | >10 |
|
|
51
|
+
| Scan-to-return ratio | <2x | 2-10x | >10x |
|
|
52
|
+
|
|
53
|
+
## Infrastructure (7d + 24h)
|
|
54
|
+
|
|
55
|
+
Show both windows side by side to compare trends:
|
|
56
|
+
|
|
57
|
+
**7-Day Trends**
|
|
58
|
+
| Metric | Current | Avg | Min | Max | Trend |
|
|
59
|
+
|--------|---------|-----|-----|-----|-------|
|
|
60
|
+
| CPU | 0.02 vCPU | 0.02 | 0.00 | 0.12 | stable |
|
|
61
|
+
| Memory | 210 MB | 200 MB | 180 MB | 240 MB | stable |
|
|
62
|
+
| Disk | 1.5 GB | 1.48 GB | 1.42 GB | 1.55 GB | increasing (+6%) |
|
|
63
|
+
|
|
64
|
+
**Last 24 Hours**
|
|
65
|
+
| Metric | Current | Avg | Min | Max | Trend |
|
|
66
|
+
|--------|---------|-----|-----|-----|-------|
|
|
67
|
+
| CPU | 0.03 vCPU | 0.02 | 0.00 | 0.12 | stable |
|
|
68
|
+
| Memory | 210 MB | 205 MB | 195 MB | 240 MB | stable |
|
|
69
|
+
| Disk | 1.5 GB | 1.49 GB | 1.48 GB | 1.51 GB | stable |
|
|
70
|
+
|
|
71
|
+
Compare windows to distinguish sustained vs transient trends.
|
|
72
|
+
|
|
73
|
+
Do NOT show cpu_limit/memory_limit columns or utilization %. Railway auto-scales — these limits are just the ceiling. See [analyze-db.md](analyze-db.md) autoscale rules.
|
|
74
|
+
|
|
75
|
+
## MongoDB Autoscale Note
|
|
76
|
+
|
|
77
|
+
See [analyze-db.md](analyze-db.md) for full autoscale rules. For MongoDB specifically:
|
|
78
|
+
- WiredTiger uses ~50% of available RAM for cache by default. As Railway auto-scales the container, the cache ceiling grows automatically.
|
|
79
|
+
- Do NOT recommend limiting WiredTiger cache to a fraction of the Railway memory limit — the limit is the autoscale ceiling, not fixed allocation.
|
|
80
|
+
- If cache usage is consistently >80%, this indicates working set pressure — note it but do not tell the user to increase RAM manually.
|
|
81
|
+
|
|
82
|
+
## Validated against
|
|
83
|
+
|
|
84
|
+
- MongoDB serverStatus, db.stats(), system.profile, top admin command
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
# MySQL Analysis
|
|
2
|
+
|
|
3
|
+
This reference covers MySQL-specific metrics, tuning, and analysis guidance.
|
|
4
|
+
For common analysis patterns (output structure, collection status handling, performance thinking), see [analyze-db.md](analyze-db.md).
|
|
5
|
+
|
|
6
|
+
## What the Script Collects
|
|
7
|
+
|
|
8
|
+
**Via SSH (mysql -B):**
|
|
9
|
+
- **SHOW GLOBAL STATUS:** threads connected/running, max used connections, query counts (select/insert/update/delete), InnoDB buffer pool stats, row lock waits/time, bytes sent/received, temp table stats, handler stats, table lock stats, aborted clients/connects
|
|
10
|
+
- **SHOW VARIABLES:** max_connections, innodb_buffer_pool_size, long_query_time, version
|
|
11
|
+
- **Table Sizes:** per-table rows, data length, index length, total size (top 15)
|
|
12
|
+
- **Processlist:** active queries with user, database, command, time, state
|
|
13
|
+
- **Top Queries (performance_schema):** digest text, call count, avg/total latency, rows examined/sent, temp disk tables, no-index flag
|
|
14
|
+
|
|
15
|
+
**Via Railway API:** Same infrastructure metrics (CPU, memory, disk, network).
|
|
16
|
+
|
|
17
|
+
## MySQL Metric Sections — Present ALL of These
|
|
18
|
+
|
|
19
|
+
When the script returns MySQL data, present **every section below** with its metrics. This matches the full MySQL metrics view. Don't skip sections — if data is present, show it.
|
|
20
|
+
|
|
21
|
+
### 1. Overview
|
|
22
|
+
|
|
23
|
+
| Metric | JSON Path | How to Display |
|
|
24
|
+
|--------|-----------|----------------|
|
|
25
|
+
| Version | `overview.version` | As-is |
|
|
26
|
+
| Uptime | `overview.uptime_seconds` | Format as Xd Xh Xm |
|
|
27
|
+
| Connections | `overview.connection_usage_percent` | `XX%` with `threads_connected / max_connections` as sub-value |
|
|
28
|
+
| Threads Running | `overview.threads_running` | As-is |
|
|
29
|
+
| Aborted Clients | `overview.aborted_clients` | Warn if > 0 — apps not closing connections |
|
|
30
|
+
| Aborted Connects | `overview.aborted_connects` | Warn if > 0 — auth failures or limit hits |
|
|
31
|
+
|
|
32
|
+
**Presentation:**
|
|
33
|
+
```
|
|
34
|
+
| Metric | Value | Status |
|
|
35
|
+
|--------|-------|--------|
|
|
36
|
+
| Version | 9.4.0 | |
|
|
37
|
+
| Uptime | 3d 12h | |
|
|
38
|
+
| Connections | 45% (9 / 20) | OK |
|
|
39
|
+
| Threads Running | 2 | |
|
|
40
|
+
| Aborted Clients | 0 | OK |
|
|
41
|
+
| Aborted Connects | 0 | OK |
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Query Throughput
|
|
45
|
+
|
|
46
|
+
| Metric | JSON Path | How to Display |
|
|
47
|
+
|--------|-----------|----------------|
|
|
48
|
+
| Total Queries | `query_throughput.questions` | Format with K/M suffix |
|
|
49
|
+
| Slow Queries | `query_throughput.slow_queries` | Warn if > 0, show threshold from `long_query_time` |
|
|
50
|
+
| SELECT | `query_throughput.com_select` | Format with K/M suffix |
|
|
51
|
+
| INSERT | `query_throughput.com_insert` | Format with K/M suffix |
|
|
52
|
+
| UPDATE | `query_throughput.com_update` | Format with K/M suffix |
|
|
53
|
+
| DELETE | `query_throughput.com_delete` | Format with K/M suffix |
|
|
54
|
+
|
|
55
|
+
Show the query mix distribution. A healthy OLTP workload is SELECT-heavy. INSERT/UPDATE-heavy suggests write pressure.
|
|
56
|
+
|
|
57
|
+
### 3. InnoDB Row Operations
|
|
58
|
+
|
|
59
|
+
| Metric | JSON Path |
|
|
60
|
+
|--------|-----------|
|
|
61
|
+
| Rows Read | `innodb_row_ops.rows_read` |
|
|
62
|
+
| Rows Inserted | `innodb_row_ops.rows_inserted` |
|
|
63
|
+
| Rows Updated | `innodb_row_ops.rows_updated` |
|
|
64
|
+
| Rows Deleted | `innodb_row_ops.rows_deleted` |
|
|
65
|
+
|
|
66
|
+
These are cumulative since server start. Compare read vs write ratios. A read-heavy workload with low row reads may indicate queries returning few results (good) or not using indexes (bad — cross-reference with table scan ratio).
|
|
67
|
+
|
|
68
|
+
### 4. Query Efficiency
|
|
69
|
+
|
|
70
|
+
| Metric | JSON Path | How to Interpret |
|
|
71
|
+
|--------|-----------|------------------|
|
|
72
|
+
| Temp Tables to Disk | `query_efficiency.tmp_disk_table_percent` | `XX%` (disk/total). > 10% = queries creating large temp results |
|
|
73
|
+
| Table Scan Ratio | `query_efficiency.table_scan_percent` | `XX%`. > 50% = most reads are full scans — missing indexes |
|
|
74
|
+
| Full Joins | `query_efficiency.select_full_join` | Warn if > 0. Joins without indexes — extremely expensive |
|
|
75
|
+
| Range Selects | `query_efficiency.select_range` | Index range scans (good). Higher is better relative to full scans |
|
|
76
|
+
| Sort Merge Passes | `query_efficiency.sort_merge_passes` | Warn if > 0. Sorts exceeding `sort_buffer_size` |
|
|
77
|
+
|
|
78
|
+
**This section is critical for identifying missing indexes.** If table scan ratio is high AND specific top queries show `no_index_used > 0`, you can give precise index recommendations.
|
|
79
|
+
|
|
80
|
+
### 5. InnoDB Buffer Pool
|
|
81
|
+
|
|
82
|
+
| Metric | JSON Path | How to Display |
|
|
83
|
+
|--------|-----------|----------------|
|
|
84
|
+
| Cache Hit Ratio | `innodb_buffer_pool.hit_ratio` | `XX.X%`. The most important single metric |
|
|
85
|
+
| Pool Usage | `innodb_buffer_pool.usage_percent` | `XX.X%` with `bytes_data / buffer_pool_size` as sub-value |
|
|
86
|
+
| Data | `innodb_buffer_pool.bytes_data` | Format as MB/GB |
|
|
87
|
+
| Dirty | `innodb_buffer_pool.bytes_dirty` | Format as MB/GB. Warn if significant |
|
|
88
|
+
| Free Pages | `innodb_buffer_pool.pages_free` | Format with K/M suffix |
|
|
89
|
+
|
|
90
|
+
**Analysis guidance:**
|
|
91
|
+
- Hit ratio < 99% + usage > 95% = buffer pool too small for the working set
|
|
92
|
+
- Hit ratio < 95% = severe cache pressure — increase `innodb_buffer_pool_size`
|
|
93
|
+
- Dirty pages are modified pages not yet flushed to disk — high dirty count means heavy writes or slow I/O
|
|
94
|
+
|
|
95
|
+
### 6. InnoDB I/O
|
|
96
|
+
|
|
97
|
+
| Metric | JSON Path |
|
|
98
|
+
|--------|-----------|
|
|
99
|
+
| Data Reads | `innodb_io.data_reads` |
|
|
100
|
+
| Data Writes | `innodb_io.data_writes` |
|
|
101
|
+
|
|
102
|
+
Only show this section if reads or writes > 0. High data reads with low buffer pool hit ratio = cache misses causing disk I/O.
|
|
103
|
+
|
|
104
|
+
### 7. Network
|
|
105
|
+
|
|
106
|
+
| Metric | JSON Path |
|
|
107
|
+
|--------|-----------|
|
|
108
|
+
| Bytes Received | `network.bytes_received` |
|
|
109
|
+
| Bytes Sent | `network.bytes_sent` |
|
|
110
|
+
|
|
111
|
+
Format as KB/MB/GB. High bytes sent relative to received suggests large result sets being returned.
|
|
112
|
+
|
|
113
|
+
### 8. Locks
|
|
114
|
+
|
|
115
|
+
| Metric | JSON Path | How to Interpret |
|
|
116
|
+
|--------|-----------|------------------|
|
|
117
|
+
| Row Lock Waits | `locks.row_lock_waits` | Warn if > 0. InnoDB row-level lock contention |
|
|
118
|
+
| Row Lock Time (ms) | `locks.row_lock_time` | Total time spent waiting for row locks |
|
|
119
|
+
| Table Lock Waits | `locks.table_locks_waited` | Warn if > 0. Table-level lock contention |
|
|
120
|
+
| Table Lock Contention | `locks.table_lock_contention` | `XX.X%` (waited / total). > 1% = investigate |
|
|
121
|
+
|
|
122
|
+
Lock contention + long-running queries in processlist = transactions holding locks too long. Check for MyISAM tables if table lock contention is high.
|
|
123
|
+
|
|
124
|
+
### 9. Table Cache
|
|
125
|
+
|
|
126
|
+
| Metric | JSON Path |
|
|
127
|
+
|--------|-----------|
|
|
128
|
+
| Open Tables | `table_cache.open_tables` |
|
|
129
|
+
| Opened Tables | `table_cache.opened_tables` |
|
|
130
|
+
| Cache Hit % | `table_cache.cache_hit_percent` |
|
|
131
|
+
|
|
132
|
+
Low cache hit = table_open_cache may be too small. Many opened_tables relative to open_tables means tables are being repeatedly opened and closed.
|
|
133
|
+
|
|
134
|
+
### 10. Top Queries (from performance_schema)
|
|
135
|
+
|
|
136
|
+
**This is the most actionable section.** Present as a table:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
| Query | Calls | Avg Latency | Total Latency | Rows Examined | Rows Sent | Flags |
|
|
140
|
+
|-------|-------|-------------|---------------|---------------|-----------|-------|
|
|
141
|
+
| SELECT ... FROM orders WHERE... | 15.2K | 2.3ms | 35.1s | 1.2M | 15.2K | |
|
|
142
|
+
| SELECT ... FROM users JOIN... | 8.1K | 12.5ms | 101.3s | 890K | 8.1K | ! No Index |
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Per-query analysis:**
|
|
146
|
+
- `no_index_used > 0` → Flag with "! No Index" — these are the biggest optimization targets
|
|
147
|
+
- `tmp_disk_tables > 0` → Query creates on-disk temp tables — needs optimization
|
|
148
|
+
- High `rows_examined / rows_sent` ratio → Scanning many rows to return few — missing or suboptimal index
|
|
149
|
+
- Truncate query text to essential parts (tables, WHERE clauses, JOINs). Don't dump full ORM SQL.
|
|
150
|
+
|
|
151
|
+
**If `top_queries` is empty or null:** performance_schema is likely disabled — this is the default on Railway. Do not suggest enabling it without caveats: it requires ~400MB+ additional memory and is only advisable on larger instances. Just note that query-level data is unavailable.
|
|
152
|
+
|
|
153
|
+
### 11. Tables
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
| Table | Rows | Data | Indexes | Total |
|
|
157
|
+
|-------|------|------|---------|-------|
|
|
158
|
+
| orders | 1.2M | 450 MB | 120 MB | 570 MB |
|
|
159
|
+
| users | 50K | 12 MB | 8 MB | 20 MB |
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Flag tables where index size is disproportionately large relative to data (possible unused indexes) or tables with many rows but no indexes (check with top queries).
|
|
163
|
+
|
|
164
|
+
### 12. Active Queries
|
|
165
|
+
|
|
166
|
+
Show if any non-Sleep, non-Daemon processes are running:
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
| User | Database | Command | Time (s) | Query |
|
|
170
|
+
|------|----------|---------|----------|-------|
|
|
171
|
+
| app | mydb | Query | 45 | SELECT ... |
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Long-running queries (> 30s) warrant investigation. Cross-reference with lock waits — a long query may be holding locks that block others.
|
|
175
|
+
|
|
176
|
+
## MySQL Performance Patterns
|
|
177
|
+
|
|
178
|
+
**Buffer Pool Starvation Pattern:**
|
|
179
|
+
- Hit ratio < 99% + pool usage > 95% = buffer pool too small for working set
|
|
180
|
+
- High `Innodb_data_reads` confirms disk I/O from cache misses
|
|
181
|
+
- Fix: increase `innodb_buffer_pool_size` (target 70-80% of available RAM)
|
|
182
|
+
|
|
183
|
+
**Query Inefficiency Pattern:**
|
|
184
|
+
- Table scan ratio > 50% = most reads are full scans, missing indexes
|
|
185
|
+
- `Select_full_join` > 0 = joins without indexes, extremely expensive
|
|
186
|
+
- Temp tables to disk > 10% = sorts/groups exceeding `tmp_table_size`
|
|
187
|
+
- Top queries with `no_index_used > 0` = specific queries needing indexes
|
|
188
|
+
|
|
189
|
+
**Lock Contention Pattern:**
|
|
190
|
+
- `row_lock_waits` high + `row_lock_time` high = write contention
|
|
191
|
+
- Table lock contention > 1% = may have MyISAM tables or DDL locks
|
|
192
|
+
- Long-running queries in processlist holding locks
|
|
193
|
+
|
|
194
|
+
**Connection Pattern:**
|
|
195
|
+
- `connection_usage_percent > 70%` = approaching limit
|
|
196
|
+
- `aborted_clients > 0` = connections not being closed properly (app bug or timeout)
|
|
197
|
+
- `aborted_connects > 0` = authentication failures or connection limit hits
|
|
198
|
+
|
|
199
|
+
## MySQL Thresholds
|
|
200
|
+
|
|
201
|
+
| Metric | Healthy | Warning | Critical |
|
|
202
|
+
|--------|---------|---------|----------|
|
|
203
|
+
| Buffer pool hit ratio | > 99% | 95-99% | < 95% |
|
|
204
|
+
| Buffer pool usage | < 85% | 85-95% | > 95% |
|
|
205
|
+
| Connection usage | < 70% | 70-90% | > 90% |
|
|
206
|
+
| Temp tables to disk | < 10% | 10-25% | > 25% |
|
|
207
|
+
| Table scan ratio | < 50% | 50-75% | > 75% |
|
|
208
|
+
| Table lock contention | < 1% | 1-5% | > 5% |
|
|
209
|
+
| Full joins | 0 | 1-100 | > 100 |
|
|
210
|
+
| Sort merge passes | 0 | > 0 | — |
|
|
211
|
+
|
|
212
|
+
## MySQL Tuning Knowledge
|
|
213
|
+
|
|
214
|
+
| Parameter | Default | Target | What It Does |
|
|
215
|
+
|-----------|---------|--------|--------------|
|
|
216
|
+
| `innodb_buffer_pool_size` | 128MB | 70-80% RAM | InnoDB's main cache. Equivalent to PostgreSQL's shared_buffers but should be much larger (70-80% vs 25%). |
|
|
217
|
+
| `max_connections` | 151 | Based on load | Each connection uses memory. Over-provisioning wastes RAM. |
|
|
218
|
+
| `tmp_table_size` / `max_heap_table_size` | 16MB | 64-256MB | Max size for in-memory temp tables. Larger = fewer disk temp tables. Both must be set together. |
|
|
219
|
+
| `sort_buffer_size` | 256KB | 1-4MB | Per-connection sort buffer. Too large wastes memory (multiplied by connections). |
|
|
220
|
+
| `long_query_time` | 10s | 1-2s | Threshold for slow query log. Lower = more visibility but more log volume. |
|
|
221
|
+
| `table_open_cache` | 4000 | Based on tables | Number of open tables cached. Increase if `Opened_tables` grows rapidly. |
|
|
222
|
+
|
|
223
|
+
## MySQL-Specific Notes
|
|
224
|
+
|
|
225
|
+
- **`performance_schema=0` in start command** disables query-level metrics. This is the default on Railway. Note it when detected but do not recommend enabling it without caveats — it adds ~400MB+ memory overhead and is only practical on larger instances (2GB+ RAM).
|
|
226
|
+
- **`disable-log-bin` in start command** means no binary logging — point-in-time recovery is not possible. Note if relevant.
|
|
227
|
+
- **`innodb-use-native-aio=0`** is common on Railway (container filesystem limitation). Not a concern.
|
|
228
|
+
- **Cumulative counters**: All SHOW GLOBAL STATUS values are cumulative since server start. Use uptime to compute rates (e.g., questions/uptime = queries per second).
|
|
229
|
+
|
|
230
|
+
## Infrastructure (7d + 24h)
|
|
231
|
+
|
|
232
|
+
Show both windows side by side to compare trends:
|
|
233
|
+
|
|
234
|
+
**7-Day Trends**
|
|
235
|
+
| Metric | Current | Avg | Min | Max | Trend |
|
|
236
|
+
|--------|---------|-----|-----|-----|-------|
|
|
237
|
+
| CPU | 0.03 vCPU | 0.02 | 0.00 | 0.15 | stable |
|
|
238
|
+
| Memory | 480 MB | 460 MB | 420 MB | 510 MB | stable |
|
|
239
|
+
| Disk | 2.8 GB | 2.7 GB | 2.6 GB | 2.9 GB | increasing (+8%) |
|
|
240
|
+
|
|
241
|
+
**Last 24 Hours**
|
|
242
|
+
| Metric | Current | Avg | Min | Max | Trend |
|
|
243
|
+
|--------|---------|-----|-----|-----|-------|
|
|
244
|
+
| CPU | 0.05 vCPU | 0.03 | 0.00 | 0.15 | stable |
|
|
245
|
+
| Memory | 480 MB | 465 MB | 450 MB | 510 MB | stable |
|
|
246
|
+
| Disk | 2.8 GB | 2.78 GB | 2.75 GB | 2.81 GB | stable |
|
|
247
|
+
|
|
248
|
+
Compare windows to distinguish sustained vs transient trends.
|
|
249
|
+
|
|
250
|
+
Do NOT show cpu_limit/memory_limit columns or utilization %. Railway auto-scales — these limits are just the ceiling. See [analyze-db.md](analyze-db.md) autoscale rules.
|
|
251
|
+
|
|
252
|
+
## Validated against
|
|
253
|
+
|
|
254
|
+
- MySQL SHOW GLOBAL STATUS, SHOW VARIABLES, information_schema, performance_schema
|