@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,352 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-strategy
|
|
3
|
+
synapta_original_name: test-driven-development
|
|
4
|
+
triggers: [synapta test, TDD, RED GREEN REFACTOR, test plan, test pyramid]
|
|
5
|
+
network: off
|
|
6
|
+
source:
|
|
7
|
+
origin: https://github.com/nousresearch/hermes-agent
|
|
8
|
+
path: skills/software-development/test-driven-development
|
|
9
|
+
commit: see hermes-agent main
|
|
10
|
+
license: MIT
|
|
11
|
+
adapted: light-touch
|
|
12
|
+
description: "TDD: enforce RED-GREEN-REFACTOR, tests before code."
|
|
13
|
+
version: 1.1.0
|
|
14
|
+
author: Hermes Agent (adapted from obra/superpowers)
|
|
15
|
+
license: MIT
|
|
16
|
+
platforms: [linux, macos, windows]
|
|
17
|
+
metadata:
|
|
18
|
+
hermes:
|
|
19
|
+
tags: [testing, tdd, development, quality, red-green-refactor]
|
|
20
|
+
related_skills: [systematic-debugging, writing-plans, subagent-driven-development]
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Test-Driven Development (TDD)
|
|
24
|
+
|
|
25
|
+
## Overview
|
|
26
|
+
|
|
27
|
+
Write the test first. Watch it fail. Write minimal code to pass.
|
|
28
|
+
|
|
29
|
+
**Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.
|
|
30
|
+
|
|
31
|
+
**Violating the letter of the rules is violating the spirit of the rules.**
|
|
32
|
+
|
|
33
|
+
## When to Use
|
|
34
|
+
|
|
35
|
+
**Always:**
|
|
36
|
+
- New features
|
|
37
|
+
- Bug fixes
|
|
38
|
+
- Refactoring
|
|
39
|
+
- Behavior changes
|
|
40
|
+
|
|
41
|
+
**Exceptions (ask the user first):**
|
|
42
|
+
- Throwaway prototypes
|
|
43
|
+
- Generated code
|
|
44
|
+
- Configuration files
|
|
45
|
+
|
|
46
|
+
Thinking "skip TDD just this once"? Stop. That's rationalization.
|
|
47
|
+
|
|
48
|
+
## The Iron Law
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Write code before the test? Delete it. Start over.
|
|
55
|
+
|
|
56
|
+
**No exceptions:**
|
|
57
|
+
- Don't keep it as "reference"
|
|
58
|
+
- Don't "adapt" it while writing tests
|
|
59
|
+
- Don't look at it
|
|
60
|
+
- Delete means delete
|
|
61
|
+
|
|
62
|
+
Implement fresh from tests. Period.
|
|
63
|
+
|
|
64
|
+
## Red-Green-Refactor Cycle
|
|
65
|
+
|
|
66
|
+
### RED — Write Failing Test
|
|
67
|
+
|
|
68
|
+
Write one minimal test showing what should happen.
|
|
69
|
+
|
|
70
|
+
**Good test:**
|
|
71
|
+
```python
|
|
72
|
+
def test_retries_failed_operations_3_times():
|
|
73
|
+
attempts = 0
|
|
74
|
+
def operation():
|
|
75
|
+
nonlocal attempts
|
|
76
|
+
attempts += 1
|
|
77
|
+
if attempts < 3:
|
|
78
|
+
raise Exception('fail')
|
|
79
|
+
return 'success'
|
|
80
|
+
|
|
81
|
+
result = retry_operation(operation)
|
|
82
|
+
|
|
83
|
+
assert result == 'success'
|
|
84
|
+
assert attempts == 3
|
|
85
|
+
```
|
|
86
|
+
Clear name, tests real behavior, one thing.
|
|
87
|
+
|
|
88
|
+
**Bad test:**
|
|
89
|
+
```python
|
|
90
|
+
def test_retry_works():
|
|
91
|
+
mock = MagicMock()
|
|
92
|
+
mock.side_effect = [Exception(), Exception(), 'success']
|
|
93
|
+
result = retry_operation(mock)
|
|
94
|
+
assert result == 'success' # What about retry count? Timing?
|
|
95
|
+
```
|
|
96
|
+
Vague name, tests mock not real code.
|
|
97
|
+
|
|
98
|
+
**Requirements:**
|
|
99
|
+
- One behavior per test
|
|
100
|
+
- Clear descriptive name ("and" in name? Split it)
|
|
101
|
+
- Real code, not mocks (unless truly unavoidable)
|
|
102
|
+
- Name describes behavior, not implementation
|
|
103
|
+
|
|
104
|
+
### Verify RED — Watch It Fail
|
|
105
|
+
|
|
106
|
+
**MANDATORY. Never skip.**
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Use terminal tool to run the specific test
|
|
110
|
+
pytest tests/test_feature.py::test_specific_behavior -v
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Confirm:
|
|
114
|
+
- Test fails (not errors from typos)
|
|
115
|
+
- Failure message is expected
|
|
116
|
+
- Fails because the feature is missing
|
|
117
|
+
|
|
118
|
+
**Test passes immediately?** You're testing existing behavior. Fix the test.
|
|
119
|
+
|
|
120
|
+
**Test errors?** Fix the error, re-run until it fails correctly.
|
|
121
|
+
|
|
122
|
+
### GREEN — Minimal Code
|
|
123
|
+
|
|
124
|
+
Write the simplest code to pass the test. Nothing more.
|
|
125
|
+
|
|
126
|
+
**Good:**
|
|
127
|
+
```python
|
|
128
|
+
def add(a, b):
|
|
129
|
+
return a + b # Nothing extra
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Bad:**
|
|
133
|
+
```python
|
|
134
|
+
def add(a, b):
|
|
135
|
+
result = a + b
|
|
136
|
+
logging.info(f"Adding {a} + {b} = {result}") # Extra!
|
|
137
|
+
return result
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Don't add features, refactor other code, or "improve" beyond the test.
|
|
141
|
+
|
|
142
|
+
**Cheating is OK in GREEN:**
|
|
143
|
+
- Hardcode return values
|
|
144
|
+
- Copy-paste
|
|
145
|
+
- Duplicate code
|
|
146
|
+
- Skip edge cases
|
|
147
|
+
|
|
148
|
+
We'll fix it in REFACTOR.
|
|
149
|
+
|
|
150
|
+
### Verify GREEN — Watch It Pass
|
|
151
|
+
|
|
152
|
+
**MANDATORY.**
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Run the specific test
|
|
156
|
+
pytest tests/test_feature.py::test_specific_behavior -v
|
|
157
|
+
|
|
158
|
+
# Then run ALL tests to check for regressions
|
|
159
|
+
pytest tests/ -q
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Confirm:
|
|
163
|
+
- Test passes
|
|
164
|
+
- Other tests still pass
|
|
165
|
+
- Output pristine (no errors, warnings)
|
|
166
|
+
|
|
167
|
+
**Test fails?** Fix the code, not the test.
|
|
168
|
+
|
|
169
|
+
**Other tests fail?** Fix regressions now.
|
|
170
|
+
|
|
171
|
+
### REFACTOR — Clean Up
|
|
172
|
+
|
|
173
|
+
After green only:
|
|
174
|
+
- Remove duplication
|
|
175
|
+
- Improve names
|
|
176
|
+
- Extract helpers
|
|
177
|
+
- Simplify expressions
|
|
178
|
+
|
|
179
|
+
Keep tests green throughout. Don't add behavior.
|
|
180
|
+
|
|
181
|
+
**If tests fail during refactor:** Undo immediately. Take smaller steps.
|
|
182
|
+
|
|
183
|
+
### Repeat
|
|
184
|
+
|
|
185
|
+
Next failing test for next behavior. One cycle at a time.
|
|
186
|
+
|
|
187
|
+
## Why Order Matters
|
|
188
|
+
|
|
189
|
+
**"I'll write tests after to verify it works"**
|
|
190
|
+
|
|
191
|
+
Tests written after code pass immediately. Passing immediately proves nothing:
|
|
192
|
+
- Might test the wrong thing
|
|
193
|
+
- Might test implementation, not behavior
|
|
194
|
+
- Might miss edge cases you forgot
|
|
195
|
+
- You never saw it catch the bug
|
|
196
|
+
|
|
197
|
+
Test-first forces you to see the test fail, proving it actually tests something.
|
|
198
|
+
|
|
199
|
+
**"I already manually tested all the edge cases"**
|
|
200
|
+
|
|
201
|
+
Manual testing is ad-hoc. You think you tested everything but:
|
|
202
|
+
- No record of what you tested
|
|
203
|
+
- Can't re-run when code changes
|
|
204
|
+
- Easy to forget cases under pressure
|
|
205
|
+
- "It worked when I tried it" ≠ comprehensive
|
|
206
|
+
|
|
207
|
+
Automated tests are systematic. They run the same way every time.
|
|
208
|
+
|
|
209
|
+
**"Deleting X hours of work is wasteful"**
|
|
210
|
+
|
|
211
|
+
Sunk cost fallacy. The time is already gone. Your choice now:
|
|
212
|
+
- Delete and rewrite with TDD (high confidence)
|
|
213
|
+
- Keep it and add tests after (low confidence, likely bugs)
|
|
214
|
+
|
|
215
|
+
The "waste" is keeping code you can't trust.
|
|
216
|
+
|
|
217
|
+
**"TDD is dogmatic, being pragmatic means adapting"**
|
|
218
|
+
|
|
219
|
+
TDD IS pragmatic:
|
|
220
|
+
- Finds bugs before commit (faster than debugging after)
|
|
221
|
+
- Prevents regressions (tests catch breaks immediately)
|
|
222
|
+
- Documents behavior (tests show how to use code)
|
|
223
|
+
- Enables refactoring (change freely, tests catch breaks)
|
|
224
|
+
|
|
225
|
+
"Pragmatic" shortcuts = debugging in production = slower.
|
|
226
|
+
|
|
227
|
+
**"Tests after achieve the same goals — it's spirit not ritual"**
|
|
228
|
+
|
|
229
|
+
No. Tests-after answer "What does this do?" Tests-first answer "What should this do?"
|
|
230
|
+
|
|
231
|
+
Tests-after are biased by your implementation. You test what you built, not what's required. Tests-first force edge case discovery before implementing.
|
|
232
|
+
|
|
233
|
+
## Common Rationalizations
|
|
234
|
+
|
|
235
|
+
| Excuse | Reality |
|
|
236
|
+
|--------|---------|
|
|
237
|
+
| "Too simple to test" | Simple code breaks. Test takes 30 seconds. |
|
|
238
|
+
| "I'll test after" | Tests passing immediately prove nothing. |
|
|
239
|
+
| "Tests after achieve same goals" | Tests-after = "what does this do?" Tests-first = "what should this do?" |
|
|
240
|
+
| "Already manually tested" | Ad-hoc ≠ systematic. No record, can't re-run. |
|
|
241
|
+
| "Deleting X hours is wasteful" | Sunk cost fallacy. Keeping unverified code is technical debt. |
|
|
242
|
+
| "Keep as reference, write tests first" | You'll adapt it. That's testing after. Delete means delete. |
|
|
243
|
+
| "Need to explore first" | Fine. Throw away exploration, start with TDD. |
|
|
244
|
+
| "Test hard = design unclear" | Listen to the test. Hard to test = hard to use. |
|
|
245
|
+
| "TDD will slow me down" | TDD faster than debugging. Pragmatic = test-first. |
|
|
246
|
+
| "Manual test faster" | Manual doesn't prove edge cases. You'll re-test every change. |
|
|
247
|
+
| "Existing code has no tests" | You're improving it. Add tests for the code you touch. |
|
|
248
|
+
|
|
249
|
+
## Red Flags — STOP and Start Over
|
|
250
|
+
|
|
251
|
+
If you catch yourself doing any of these, delete the code and restart with TDD:
|
|
252
|
+
|
|
253
|
+
- Code before test
|
|
254
|
+
- Test after implementation
|
|
255
|
+
- Test passes immediately on first run
|
|
256
|
+
- Can't explain why test failed
|
|
257
|
+
- Tests added "later"
|
|
258
|
+
- Rationalizing "just this once"
|
|
259
|
+
- "I already manually tested it"
|
|
260
|
+
- "Tests after achieve the same purpose"
|
|
261
|
+
- "Keep as reference" or "adapt existing code"
|
|
262
|
+
- "Already spent X hours, deleting is wasteful"
|
|
263
|
+
- "TDD is dogmatic, I'm being pragmatic"
|
|
264
|
+
- "This is different because..."
|
|
265
|
+
|
|
266
|
+
**All of these mean: Delete code. Start over with TDD.**
|
|
267
|
+
|
|
268
|
+
## Verification Checklist
|
|
269
|
+
|
|
270
|
+
Before marking work complete:
|
|
271
|
+
|
|
272
|
+
- [ ] Every new function/method has a test
|
|
273
|
+
- [ ] Watched each test fail before implementing
|
|
274
|
+
- [ ] Each test failed for expected reason (feature missing, not typo)
|
|
275
|
+
- [ ] Wrote minimal code to pass each test
|
|
276
|
+
- [ ] All tests pass
|
|
277
|
+
- [ ] Output pristine (no errors, warnings)
|
|
278
|
+
- [ ] Tests use real code (mocks only if unavoidable)
|
|
279
|
+
- [ ] Edge cases and errors covered
|
|
280
|
+
|
|
281
|
+
Can't check all boxes? You skipped TDD. Start over.
|
|
282
|
+
|
|
283
|
+
## When Stuck
|
|
284
|
+
|
|
285
|
+
| Problem | Solution |
|
|
286
|
+
|---------|----------|
|
|
287
|
+
| Don't know how to test | Write the wished-for API. Write the assertion first. Ask the user. |
|
|
288
|
+
| Test too complicated | Design too complicated. Simplify the interface. |
|
|
289
|
+
| Must mock everything | Code too coupled. Use dependency injection. |
|
|
290
|
+
| Test setup huge | Extract helpers. Still complex? Simplify the design. |
|
|
291
|
+
|
|
292
|
+
## Hermes Agent Integration
|
|
293
|
+
|
|
294
|
+
### Running Tests
|
|
295
|
+
|
|
296
|
+
Use the `terminal` tool to run tests at each step:
|
|
297
|
+
|
|
298
|
+
```python
|
|
299
|
+
# RED — verify failure
|
|
300
|
+
terminal("pytest tests/test_feature.py::test_name -v")
|
|
301
|
+
|
|
302
|
+
# GREEN — verify pass
|
|
303
|
+
terminal("pytest tests/test_feature.py::test_name -v")
|
|
304
|
+
|
|
305
|
+
# Full suite — verify no regressions
|
|
306
|
+
terminal("pytest tests/ -q")
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### With delegate_task
|
|
310
|
+
|
|
311
|
+
When dispatching subagents for implementation, enforce TDD in the goal:
|
|
312
|
+
|
|
313
|
+
```python
|
|
314
|
+
delegate_task(
|
|
315
|
+
goal="Implement [feature] using strict TDD",
|
|
316
|
+
context="""
|
|
317
|
+
Follow test-driven-development skill:
|
|
318
|
+
1. Write failing test FIRST
|
|
319
|
+
2. Run test to verify it fails
|
|
320
|
+
3. Write minimal code to pass
|
|
321
|
+
4. Run test to verify it passes
|
|
322
|
+
5. Refactor if needed
|
|
323
|
+
6. Commit
|
|
324
|
+
|
|
325
|
+
Project test command: pytest tests/ -q
|
|
326
|
+
Project structure: [describe relevant files]
|
|
327
|
+
""",
|
|
328
|
+
toolsets=['terminal', 'file']
|
|
329
|
+
)
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### With systematic-debugging
|
|
333
|
+
|
|
334
|
+
Bug found? Write failing test reproducing it. Follow TDD cycle. The test proves the fix and prevents regression.
|
|
335
|
+
|
|
336
|
+
Never fix bugs without a test.
|
|
337
|
+
|
|
338
|
+
## Testing Anti-Patterns
|
|
339
|
+
|
|
340
|
+
- **Testing mock behavior instead of real behavior** — mocks should verify interactions, not replace the system under test
|
|
341
|
+
- **Testing implementation details** — test behavior/results, not internal method calls
|
|
342
|
+
- **Happy path only** — always test edge cases, errors, and boundaries
|
|
343
|
+
- **Brittle tests** — tests should verify behavior, not structure; refactoring shouldn't break them
|
|
344
|
+
|
|
345
|
+
## Final Rule
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
Production code → test exists and failed first
|
|
349
|
+
Otherwise → not TDD
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
No exceptions without the user's explicit permission.
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: threat-model
|
|
3
|
+
synapta_original_name: stride-analysis
|
|
4
|
+
triggers: [synapta threat model, STRIDE, security review, AppSec, trust boundary]
|
|
5
|
+
network: off
|
|
6
|
+
source:
|
|
7
|
+
origin: https://github.com/sethdford/claude-skills
|
|
8
|
+
path: security/threat-modeling/skills/stride-analysis
|
|
9
|
+
commit: 00bd9265f5a3
|
|
10
|
+
license: MIT (Seth Ford)
|
|
11
|
+
adapted: light-touch
|
|
12
|
+
description: Systematically identify and document threats using the STRIDE framework (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege). Use when designing systems, reviewing architectures, conducting security design reviews, or updating threat models.
|
|
13
|
+
allowed-tools: Read, Grep, Glob, Write, Edit
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# STRIDE Threat Modeling
|
|
17
|
+
|
|
18
|
+
Conduct a systematic threat analysis of a system's architecture using Microsoft's STRIDE framework to identify vulnerabilities before they're exploited.
|
|
19
|
+
|
|
20
|
+
## Context
|
|
21
|
+
|
|
22
|
+
You are a security architect helping a team identify threats in their system design. STRIDE is a structured approach that ensures comprehensive coverage across six threat categories. Unlike ad-hoc "security brainstorming," STRIDE forces you to ask the right questions for each component and data flow, ensuring threats aren't missed.
|
|
23
|
+
|
|
24
|
+
Done well, threat modeling catches design flaws early (when they're cheap to fix). Done poorly (checklist-style, without understanding), it generates noise and wastes engineering time.
|
|
25
|
+
|
|
26
|
+
## Domain Context
|
|
27
|
+
|
|
28
|
+
- **STRIDE Framework (Microsoft)**: Six threat categories that map to security properties:
|
|
29
|
+
- **Spoofing (Identity)**: Can attackers impersonate a user, service, or component?
|
|
30
|
+
- **Tampering (Integrity)**: Can attackers modify data in transit or at rest?
|
|
31
|
+
- **Repudiation (Accountability)**: Can actors deny their actions? Are audit trails protected?
|
|
32
|
+
- **Information Disclosure (Confidentiality)**: Can unauthorized parties access sensitive data?
|
|
33
|
+
- **Denial of Service (Availability)**: Can attackers degrade or crash services?
|
|
34
|
+
- **Elevation of Privilege (Authorization)**: Can attackers gain higher-privilege access than intended?
|
|
35
|
+
- **Trust Boundaries**: Foundational concept—threats cross boundaries; within boundaries, assume trust
|
|
36
|
+
- **Data Flow Diagrams (DFD)**: Map components, actors, and data flows before analyzing threats
|
|
37
|
+
- **Threat Severity**: Likelihood × Impact (critical, high, medium, low)
|
|
38
|
+
- **Mitigations**: Controls that reduce threat severity (preventive, detective, compensating)
|
|
39
|
+
|
|
40
|
+
## When to Use This Skill
|
|
41
|
+
|
|
42
|
+
- You're designing a new system or major architectural change and want to identify threats early
|
|
43
|
+
- You're conducting a security design review before engineering starts
|
|
44
|
+
- You need to document threats for audit/compliance purposes
|
|
45
|
+
- You're updating your threat model based on new features or architecture changes
|
|
46
|
+
- A security researcher or customer asks "Have you done threat modeling?"
|
|
47
|
+
|
|
48
|
+
## Prerequisites
|
|
49
|
+
|
|
50
|
+
Before starting STRIDE analysis, gather:
|
|
51
|
+
|
|
52
|
+
1. **System architecture**: Diagrams showing components, data flows, external systems, trust boundaries
|
|
53
|
+
2. **Authentication/authorization model**: How are users/services identified and authorized?
|
|
54
|
+
3. **Data classification**: What data is sensitive (PII, financial, healthcare)? Where is it stored and transmitted?
|
|
55
|
+
4. **Existing controls**: What security measures already exist (encryption, logging, firewalls)?
|
|
56
|
+
5. **Compliance context**: Are there regulatory requirements (PCI-DSS, HIPAA, SOC2) that drive threat severity?
|
|
57
|
+
|
|
58
|
+
If documentation is missing, start by drawing the architecture with the team.
|
|
59
|
+
|
|
60
|
+
## Instructions
|
|
61
|
+
|
|
62
|
+
### 1. Map Components & Data Flows
|
|
63
|
+
|
|
64
|
+
Create or review a Data Flow Diagram (DFD) showing:
|
|
65
|
+
|
|
66
|
+
- **External entities** (users, APIs, partners)
|
|
67
|
+
- **Processes** (application, microservices, functions)
|
|
68
|
+
- **Data stores** (databases, caches, logs)
|
|
69
|
+
- **Data flows** (APIs, network calls, database queries)
|
|
70
|
+
- **Trust boundaries** (where privilege/trust levels change)
|
|
71
|
+
|
|
72
|
+
Example:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
[User] --HTTPS--> [Web App] --SQL--> [Database]
|
|
76
|
+
|
|
|
77
|
+
[API Log]
|
|
78
|
+
|
|
|
79
|
+
[SIEM/Alert]
|
|
80
|
+
|
|
81
|
+
Trust boundary: Outside | Web App Layer | Database Layer
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 2. For Each Component, Apply STRIDE
|
|
85
|
+
|
|
86
|
+
For each process, data store, or data flow, systematically ask:
|
|
87
|
+
|
|
88
|
+
**Spoofing (Identity)** questions:
|
|
89
|
+
|
|
90
|
+
- Can someone impersonate this component/user?
|
|
91
|
+
- How is identity verified (authentication)?
|
|
92
|
+
- Can credentials be stolen or replayed?
|
|
93
|
+
- Is multi-factor authentication enforced?
|
|
94
|
+
|
|
95
|
+
**Tampering (Integrity)** questions:
|
|
96
|
+
|
|
97
|
+
- Can data be modified in transit (man-in-the-middle)?
|
|
98
|
+
- Can data be modified at rest (database compromise)?
|
|
99
|
+
- Is data integrity checked (signatures, hashes)?
|
|
100
|
+
- Are there version controls or audit trails?
|
|
101
|
+
|
|
102
|
+
**Repudiation (Accountability)** questions:
|
|
103
|
+
|
|
104
|
+
- Can actors deny their actions?
|
|
105
|
+
- Are actions logged?
|
|
106
|
+
- Are logs protected from tampering?
|
|
107
|
+
- Can logs be correlated across systems?
|
|
108
|
+
|
|
109
|
+
**Information Disclosure (Confidentiality)** questions:
|
|
110
|
+
|
|
111
|
+
- Is data encrypted in transit (HTTPS, TLS)?
|
|
112
|
+
- Is data encrypted at rest?
|
|
113
|
+
- Who has access to this data?
|
|
114
|
+
- Can data be extracted (logging, debugging, sidechannels)?
|
|
115
|
+
|
|
116
|
+
**Denial of Service (Availability)** questions:
|
|
117
|
+
|
|
118
|
+
- Can attackers consume resources (CPU, disk, memory)?
|
|
119
|
+
- Can service be crashed or rate-limited?
|
|
120
|
+
- Are there recovery mechanisms?
|
|
121
|
+
- Is capacity planning done?
|
|
122
|
+
|
|
123
|
+
**Elevation of Privilege (Authorization)** questions:
|
|
124
|
+
|
|
125
|
+
- Can users exceed their intended permissions?
|
|
126
|
+
- Is authorization checked on every action (not just at entry)?
|
|
127
|
+
- Are roles/permissions clearly defined?
|
|
128
|
+
- Are there administrative backdoors or emergency access?
|
|
129
|
+
|
|
130
|
+
### 3. Document Threats
|
|
131
|
+
|
|
132
|
+
For each threat, document:
|
|
133
|
+
|
|
134
|
+
- **ID**: Unique identifier (T1, T2, etc.)
|
|
135
|
+
- **Category**: STRIDE category
|
|
136
|
+
- **Component**: What's being threatened (e.g., "API-Database connection")
|
|
137
|
+
- **Threat**: Specific attack scenario (e.g., "Attacker executes SQL injection to extract user records")
|
|
138
|
+
- **Severity**: Critical/High/Medium/Low based on likelihood and impact
|
|
139
|
+
- **Existing Controls**: What's already protecting against this
|
|
140
|
+
- **Mitigation**: Recommended control (preventive or detective)
|
|
141
|
+
- **Status**: Open/Mitigated/Accepted
|
|
142
|
+
|
|
143
|
+
### 4. Assign Severity
|
|
144
|
+
|
|
145
|
+
Severity = Likelihood × Impact
|
|
146
|
+
|
|
147
|
+
| Likelihood | Impact | Severity |
|
|
148
|
+
| --------------- | ------------------------------------ | ------------ |
|
|
149
|
+
| High (>50%) | Critical (customer data, downtime) | **CRITICAL** |
|
|
150
|
+
| High | High (service disruption, data loss) | **HIGH** |
|
|
151
|
+
| Medium (10-50%) | Critical | **HIGH** |
|
|
152
|
+
| Medium | High | **MEDIUM** |
|
|
153
|
+
| Low (<10%) | Critical | **MEDIUM** |
|
|
154
|
+
| Low | High | **LOW** |
|
|
155
|
+
| Low | Medium (minor disruption) | **LOW** |
|
|
156
|
+
|
|
157
|
+
### 5. Link to Mitigations
|
|
158
|
+
|
|
159
|
+
Match each threat to:
|
|
160
|
+
|
|
161
|
+
- **Preventive controls**: Stop the threat (e.g., encryption prevents eavesdropping)
|
|
162
|
+
- **Detective controls**: Detect the attack (e.g., logs detect unauthorized access)
|
|
163
|
+
- **Compensating controls**: Reduce impact if attack succeeds (e.g., backup restores data)
|
|
164
|
+
|
|
165
|
+
### 6. Review & Prioritize
|
|
166
|
+
|
|
167
|
+
Prioritize mitigations by:
|
|
168
|
+
|
|
169
|
+
1. Critical & unmitigated threats first
|
|
170
|
+
2. High threats with feasible mitigations
|
|
171
|
+
3. Medium threats with low effort
|
|
172
|
+
4. Accept low-severity risks (documented decision)
|
|
173
|
+
|
|
174
|
+
## Output Format
|
|
175
|
+
|
|
176
|
+
A STRIDE Threat Model document:
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
# STRIDE Threat Model: [System Name]
|
|
180
|
+
|
|
181
|
+
## System Overview
|
|
182
|
+
[Brief architecture description, DFD, trust boundaries]
|
|
183
|
+
|
|
184
|
+
## Threat Analysis
|
|
185
|
+
|
|
186
|
+
| ID | Category | Component | Threat | Severity | Existing Controls | Mitigation | Status |
|
|
187
|
+
|----|----------|-----------|--------|----------|-------------------|-----------|--------|
|
|
188
|
+
| T1 | Spoofing | API Auth | Attacker replays valid JWT | High | JWT signed, TTL 1hr | Rate limit auth failures | Open |
|
|
189
|
+
| T2 | Tampering | DB Connection | MITM modifies SQL queries | Critical | No TLS | Enforce TLS 1.2+ | Open |
|
|
190
|
+
| T3 | Information Disclosure | Logs | Sensitive data logged | High | No log encryption | Redact PII in logs | Open |
|
|
191
|
+
|
|
192
|
+
## Critical Findings Summary
|
|
193
|
+
- [List critical/high threats needing immediate attention]
|
|
194
|
+
|
|
195
|
+
## Mitigations Roadmap
|
|
196
|
+
- [Phase 1]: [Mitigations for critical threats]
|
|
197
|
+
- [Phase 2]: [Mitigations for high threats]
|
|
198
|
+
|
|
199
|
+
## Accepted Risks
|
|
200
|
+
- [Threats accepted with business justification and timeline to mitigate]
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Worked Example
|
|
204
|
+
|
|
205
|
+
**STRIDE Threat Model: Freelancer Project Sharing Feature**
|
|
206
|
+
|
|
207
|
+
## System Overview
|
|
208
|
+
|
|
209
|
+
Users share project links (one-click, read-only) with clients. Shared link grants read-only access to project files via a public URL (no authentication required).
|
|
210
|
+
|
|
211
|
+
```
|
|
212
|
+
[Client] --HTTP(S)--> [Web App] --[Token Lookup]--> [Database]
|
|
213
|
+
|
|
|
214
|
+
[File Storage]
|
|
215
|
+
|
|
216
|
+
Trust Boundary: Unauthenticated | Web App | Private Systems
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
| ID | Category | Component | Threat | Severity | Existing Controls | Mitigation | Status |
|
|
220
|
+
| --- | ---------------------- | ------------ | ------------------------------------------------ | -------- | --------------------------------- | ---------------------------------------------------- | ------ |
|
|
221
|
+
| T1 | Spoofing | Shared Link | Attacker guesses valid token | Medium | Tokens 32 bytes entropy, URL-safe | Use cryptographic PRNG (not Math.random) | Open |
|
|
222
|
+
| T2 | Information Disclosure | Shared Link | Token leaked in browser history, referrer header | High | HTTPS only, no query params | Put token in POST body or use signed URLs | Open |
|
|
223
|
+
| T3 | Tampering | Shared Link | Attacker modifies token to access other projects | High | Cryptographically signed tokens | Use authenticated encryption (HMAC-SHA256) | Open |
|
|
224
|
+
| T4 | Denial of Service | Shared Link | Attacker floods requests to exhaust capacity | Medium | CloudFront caching | Rate limit by IP; implement CAPTCHA | Open |
|
|
225
|
+
| T5 | Information Disclosure | File Storage | Project files stored unencrypted | Critical | Files at rest unencrypted | Encrypt files at rest (AES-256) | Open |
|
|
226
|
+
| T6 | Elevation of Privilege | Shared Link | Attacker modifies token to grant edit access | Critical | Read-only token checks API | Enforce read-only at every API call (not just auth) | Open |
|
|
227
|
+
| T7 | Repudiation | Audit Log | Attacker accesses project without audit trail | High | No audit logging | Log all shared link accesses (who, when, what files) | Open |
|
|
228
|
+
|
|
229
|
+
**Critical Findings**:
|
|
230
|
+
|
|
231
|
+
- T5: Files stored unencrypted at rest (CRITICAL)
|
|
232
|
+
- T6: Read-only enforcement only at auth layer, not per-request (CRITICAL)
|
|
233
|
+
|
|
234
|
+
**Mitigations Roadmap**:
|
|
235
|
+
|
|
236
|
+
- **Phase 1** (Week 1): Implement authenticated token signing (HMAC); enforce read-only at every file access
|
|
237
|
+
- **Phase 2** (Week 2): Encrypt files at rest (AES-256); add audit logging for shared link access
|
|
238
|
+
- **Phase 3** (Week 3): Add rate limiting per IP; implement CAPTCHA on brute-force attempts
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Decision Framework
|
|
243
|
+
|
|
244
|
+
When analyzing threats and facing ambiguity:
|
|
245
|
+
|
|
246
|
+
- **If a threat feels too generic** ("Someone could hack it"): Make it specific. What component? What's the attack path? What data is at risk?
|
|
247
|
+
- **If you're not sure about Likelihood**: Ask "Has this been exploited before?" or "How many attack steps does this take?" More steps = lower likelihood.
|
|
248
|
+
- **If Impact is unclear**: Ask "If this happens, what's lost?" Data? Service uptime? Compliance? Quantify in business terms.
|
|
249
|
+
- **If you can't articulate a mitigation**: The threat might be accepted (with documented risk). Don't list "security review" as a mitigation (too vague).
|
|
250
|
+
- **If a threat is cross-cutting (e.g., "encrypt all data")**: Break it into component-specific mitigations (DB encryption, TLS, log encryption).
|
|
251
|
+
|
|
252
|
+
## Anti-Patterns & Guards
|
|
253
|
+
|
|
254
|
+
### Anti-Pattern 1: Threat Listing Without Context
|
|
255
|
+
|
|
256
|
+
**Description**: "Spoofing threat" for every component; no specific attack scenario.
|
|
257
|
+
|
|
258
|
+
**Guard**: Every threat must answer: "Attacker does X to [component] to achieve Y." If you can't fill in X and Y, it's not a threat; it's a buzzword.
|
|
259
|
+
|
|
260
|
+
### Anti-Pattern 2: Ignoring Insider Threats
|
|
261
|
+
|
|
262
|
+
**Description**: Threat model assumes all insiders are trusted; focuses only on external attackers.
|
|
263
|
+
|
|
264
|
+
**Guard**: Ask "What could a disgruntled employee do?" Insider threats are real and often have high impact.
|
|
265
|
+
|
|
266
|
+
### Anti-Pattern 3: Vague Mitigations
|
|
267
|
+
|
|
268
|
+
**Description**: "Use encryption" without specifying where, how, or what algorithm.
|
|
269
|
+
|
|
270
|
+
**Guard**: Mitigations must be specific. "Encrypt PII at rest using AES-256 with key rotation every 90 days" is actionable.
|
|
271
|
+
|
|
272
|
+
### Anti-Pattern 4: Not Revisiting After Architecture Changes
|
|
273
|
+
|
|
274
|
+
**Description**: STRIDE done once; never updated when architecture changes.
|
|
275
|
+
|
|
276
|
+
**Guard**: Threat model is living document. Update when adding features, changing platforms, or after security incidents.
|
|
277
|
+
|
|
278
|
+
### Anti-Pattern 5: All Threats Marked "Critical"
|
|
279
|
+
|
|
280
|
+
**Description**: Over-inflating severity to make everything seem urgent.
|
|
281
|
+
|
|
282
|
+
**Guard**: If everything is critical, nothing is. Severity must differentiate; justify why each threat has its rating.
|
|
283
|
+
|
|
284
|
+
## Quality Checklist
|
|
285
|
+
|
|
286
|
+
Before sharing the threat model:
|
|
287
|
+
|
|
288
|
+
- [ ] **All components analyzed**: Every process, data store, and data flow has been examined for STRIDE threats
|
|
289
|
+
- [ ] **Threats are specific**: Each threat has a concrete attack scenario, not generic language
|
|
290
|
+
- [ ] **Severity is defensible**: Likelihood and impact are justified (backed by evidence or reasoning)
|
|
291
|
+
- [ ] **Mitigations are actionable**: Each mitigation is specific; engineers know what to build
|
|
292
|
+
- [ ] **Controls are mapped**: Existing controls are documented; gaps are clear
|
|
293
|
+
- [ ] **Insider threats included**: Model considers threats from employees, not just external attackers
|
|
294
|
+
- [ ] **Trust boundaries clear**: Where privilege/trust changes are explicit
|
|
295
|
+
- [ ] **Team reviewed**: Security and engineering reviewed together; disagreements noted
|
|
296
|
+
|
|
297
|
+
## Further Reading
|
|
298
|
+
|
|
299
|
+
- Microsoft STRIDE per Element: https://learn.microsoft.com/en-us/windows-hardware/drivers/drm/threat-modeling-documentation
|
|
300
|
+
- Shostack, Adam. _Threat Modeling: Design for Security_. Wiley, 2014. Comprehensive guide to STRIDE and DFD-based threat modeling.
|
|
301
|
+
- NIST SP 800-30: Risk Assessment guidance for threat severity and likelihood calibration.
|
|
302
|
+
- OWASP Threat Dragon: Free tool for creating DFDs and threat models.
|
|
303
|
+
- BSA Framework Threat Modeling Playbook: Step-by-step playbook with examples.
|