@ketecode/loom 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +516 -2
- package/agents/accessibility-reviewer/AGENT.md +70 -0
- package/agents/accessibility-reviewer/evals/triggers.json +15 -0
- package/agents/agent-evaluator/AGENT.md +74 -0
- package/agents/agent-evaluator/evals/triggers.json +15 -0
- package/agents/architect/AGENT.md +82 -0
- package/agents/architect/evals/triggers.json +17 -0
- package/agents/billing-reviewer/AGENT.md +68 -0
- package/agents/billing-reviewer/evals/triggers.json +16 -0
- package/agents/code-reviewer/AGENT.md +51 -0
- package/agents/code-reviewer/evals/triggers.json +14 -0
- package/agents/code-simplifier/AGENT.md +74 -0
- package/agents/code-simplifier/evals/triggers.json +15 -0
- package/agents/cpp-build-resolver/AGENT.md +73 -0
- package/agents/cpp-build-resolver/evals/triggers.json +16 -0
- package/agents/cpp-reviewer/AGENT.md +59 -0
- package/agents/cpp-reviewer/evals/triggers.json +16 -0
- package/agents/csharp-build-resolver/AGENT.md +84 -0
- package/agents/csharp-build-resolver/evals/triggers.json +17 -0
- package/agents/csharp-reviewer/AGENT.md +88 -0
- package/agents/csharp-reviewer/evals/triggers.json +17 -0
- package/agents/dart-build-resolver/AGENT.md +80 -0
- package/agents/dart-build-resolver/evals/triggers.json +17 -0
- package/agents/dart-reviewer/AGENT.md +66 -0
- package/agents/dart-reviewer/evals/triggers.json +17 -0
- package/agents/database-reviewer/AGENT.md +72 -0
- package/agents/database-reviewer/evals/triggers.json +16 -0
- package/agents/django-reviewer/AGENT.md +61 -0
- package/agents/django-reviewer/evals/triggers.json +15 -0
- package/agents/doc-updater/AGENT.md +92 -0
- package/agents/doc-updater/evals/triggers.json +14 -0
- package/agents/e2e-runner/AGENT.md +88 -0
- package/agents/e2e-runner/evals/triggers.json +16 -0
- package/agents/fastapi-reviewer/AGENT.md +63 -0
- package/agents/fastapi-reviewer/evals/triggers.json +15 -0
- package/agents/flutter-reviewer/AGENT.md +70 -0
- package/agents/flutter-reviewer/evals/triggers.json +15 -0
- package/agents/fsharp-build-resolver/AGENT.md +81 -0
- package/agents/fsharp-build-resolver/evals/triggers.json +15 -0
- package/agents/fsharp-reviewer/AGENT.md +77 -0
- package/agents/fsharp-reviewer/evals/triggers.json +15 -0
- package/agents/go-build-resolver/AGENT.md +85 -0
- package/agents/go-build-resolver/evals/triggers.json +16 -0
- package/agents/go-reviewer/AGENT.md +66 -0
- package/agents/go-reviewer/evals/triggers.json +16 -0
- package/agents/healthcare-reviewer/AGENT.md +65 -0
- package/agents/healthcare-reviewer/evals/triggers.json +16 -0
- package/agents/i18n-reviewer/AGENT.md +64 -0
- package/agents/i18n-reviewer/evals/triggers.json +16 -0
- package/agents/infra-reviewer/AGENT.md +93 -0
- package/agents/infra-reviewer/evals/triggers.json +15 -0
- package/agents/java-build-resolver/AGENT.md +82 -0
- package/agents/java-build-resolver/evals/triggers.json +16 -0
- package/agents/java-reviewer/AGENT.md +64 -0
- package/agents/java-reviewer/evals/triggers.json +16 -0
- package/agents/kotlin-build-resolver/AGENT.md +89 -0
- package/agents/kotlin-build-resolver/evals/triggers.json +16 -0
- package/agents/kotlin-reviewer/AGENT.md +75 -0
- package/agents/kotlin-reviewer/evals/triggers.json +16 -0
- package/agents/mle-reviewer/AGENT.md +68 -0
- package/agents/mle-reviewer/evals/triggers.json +16 -0
- package/agents/network-config-reviewer/AGENT.md +68 -0
- package/agents/network-config-reviewer/evals/triggers.json +17 -0
- package/agents/payments-reviewer/AGENT.md +64 -0
- package/agents/payments-reviewer/evals/triggers.json +16 -0
- package/agents/performance-optimizer/AGENT.md +86 -0
- package/agents/performance-optimizer/evals/triggers.json +16 -0
- package/agents/perl-build-resolver/AGENT.md +84 -0
- package/agents/perl-build-resolver/evals/triggers.json +15 -0
- package/agents/perl-reviewer/AGENT.md +77 -0
- package/agents/perl-reviewer/evals/triggers.json +15 -0
- package/agents/php-build-resolver/AGENT.md +88 -0
- package/agents/php-build-resolver/evals/triggers.json +16 -0
- package/agents/php-reviewer/AGENT.md +61 -0
- package/agents/php-reviewer/evals/triggers.json +15 -0
- package/agents/planner/AGENT.md +75 -0
- package/agents/planner/evals/triggers.json +17 -0
- package/agents/pr-test-analyzer/AGENT.md +82 -0
- package/agents/pr-test-analyzer/evals/triggers.json +16 -0
- package/agents/python-build-resolver/AGENT.md +87 -0
- package/agents/python-build-resolver/evals/triggers.json +16 -0
- package/agents/python-reviewer/AGENT.md +63 -0
- package/agents/python-reviewer/evals/triggers.json +15 -0
- package/agents/rag-reviewer/AGENT.md +71 -0
- package/agents/rag-reviewer/evals/triggers.json +16 -0
- package/agents/react-reviewer/AGENT.md +70 -0
- package/agents/react-reviewer/evals/triggers.json +16 -0
- package/agents/refactor-cleaner/AGENT.md +82 -0
- package/agents/refactor-cleaner/evals/triggers.json +16 -0
- package/agents/ruby-build-resolver/AGENT.md +93 -0
- package/agents/ruby-build-resolver/evals/triggers.json +16 -0
- package/agents/ruby-reviewer/AGENT.md +62 -0
- package/agents/ruby-reviewer/evals/triggers.json +16 -0
- package/agents/rust-build-resolver/AGENT.md +98 -0
- package/agents/rust-build-resolver/evals/triggers.json +16 -0
- package/agents/rust-reviewer/AGENT.md +78 -0
- package/agents/rust-reviewer/evals/triggers.json +15 -0
- package/agents/security-reviewer/AGENT.md +84 -0
- package/agents/security-reviewer/evals/triggers.json +16 -0
- package/agents/silent-failure-hunter/AGENT.md +66 -0
- package/agents/silent-failure-hunter/evals/triggers.json +16 -0
- package/agents/solidity-reviewer/AGENT.md +70 -0
- package/agents/solidity-reviewer/evals/triggers.json +16 -0
- package/agents/swift-build-resolver/AGENT.md +85 -0
- package/agents/swift-build-resolver/evals/triggers.json +15 -0
- package/agents/swift-reviewer/AGENT.md +75 -0
- package/agents/swift-reviewer/evals/triggers.json +15 -0
- package/agents/typescript-build-resolver/AGENT.md +76 -0
- package/agents/typescript-build-resolver/evals/triggers.json +15 -0
- package/agents/typescript-reviewer/AGENT.md +76 -0
- package/agents/typescript-reviewer/evals/triggers.json +15 -0
- package/agents/vue-reviewer/AGENT.md +75 -0
- package/agents/vue-reviewer/evals/triggers.json +15 -0
- package/bin/kete-loom.js +683 -0
- package/commands/aside.md +19 -0
- package/commands/build-fix.md +26 -0
- package/commands/campaign.md +19 -0
- package/commands/changelog.md +36 -0
- package/commands/checkpoint.md +26 -0
- package/commands/codemap.md +25 -0
- package/commands/commit.md +26 -0
- package/commands/deps-audit.md +32 -0
- package/commands/epic-decompose.md +21 -0
- package/commands/explain.md +37 -0
- package/commands/feature-dev.md +22 -0
- package/commands/hookify.md +23 -0
- package/commands/i18n-check.md +39 -0
- package/commands/issue-sync.md +22 -0
- package/commands/jira.md +19 -0
- package/commands/learn.md +23 -0
- package/commands/loom.md +21 -0
- package/commands/loop.md +20 -0
- package/commands/model-route.md +27 -0
- package/commands/onboard.md +35 -0
- package/commands/orchestrate.md +21 -0
- package/commands/plan-feature.md +36 -0
- package/commands/postmortem.md +42 -0
- package/commands/pr-describe.md +39 -0
- package/commands/pr.md +22 -0
- package/commands/prd.md +41 -0
- package/commands/project-init.md +21 -0
- package/commands/refactor-clean.md +24 -0
- package/commands/resume-session.md +22 -0
- package/commands/review.md +35 -0
- package/commands/save-session.md +37 -0
- package/commands/security-scan.md +32 -0
- package/commands/sessions.md +21 -0
- package/commands/skill-create.md +21 -0
- package/commands/tdd.md +36 -0
- package/commands/test-coverage.md +24 -0
- package/commands/threat-model.md +36 -0
- package/commands/update-docs.md +25 -0
- package/commands/verify.md +21 -0
- package/hooks/block-dangerous-commands/HOOK.md +30 -0
- package/hooks/block-dangerous-commands/cases.json +50 -0
- package/hooks/block-dangerous-commands/hook.js +75 -0
- package/hooks/block-no-verify/HOOK.md +25 -0
- package/hooks/block-no-verify/cases.json +30 -0
- package/hooks/block-no-verify/hook.js +43 -0
- package/hooks/format-on-edit/HOOK.md +24 -0
- package/hooks/format-on-edit/hook.js +89 -0
- package/hooks/guard-secrets/HOOK.md +19 -0
- package/hooks/guard-secrets/cases.json +110 -0
- package/hooks/guard-secrets/hook.js +44 -0
- package/hooks/load-session-context/HOOK.md +20 -0
- package/hooks/load-session-context/hook.js +56 -0
- package/hooks/protect-files/HOOK.md +24 -0
- package/hooks/protect-files/cases.json +27 -0
- package/hooks/protect-files/hook.js +39 -0
- package/hooks/run.js +132 -0
- package/mcp/atlassian.json +11 -0
- package/mcp/chrome-devtools.json +18 -0
- package/mcp/cloudflare.json +11 -0
- package/mcp/context7.json +11 -0
- package/mcp/fetch.json +17 -0
- package/mcp/figma.json +11 -0
- package/mcp/git.json +17 -0
- package/mcp/github.json +11 -0
- package/mcp/linear.json +11 -0
- package/mcp/memory.json +18 -0
- package/mcp/notion.json +11 -0
- package/mcp/playwright.json +18 -0
- package/mcp/sentry.json +11 -0
- package/mcp/stripe.json +11 -0
- package/mcp/supabase.json +11 -0
- package/mcp/time.json +17 -0
- package/package.json +59 -4
- package/profiles.json +165 -0
- package/rules/common.md +21 -0
- package/rules/cpp.md +29 -0
- package/rules/csharp.md +25 -0
- package/rules/dart.md +29 -0
- package/rules/fsharp.md +28 -0
- package/rules/git.md +26 -0
- package/rules/go.md +29 -0
- package/rules/java.md +29 -0
- package/rules/kotlin.md +27 -0
- package/rules/perl.md +26 -0
- package/rules/php.md +28 -0
- package/rules/python.md +30 -0
- package/rules/ruby.md +27 -0
- package/rules/rust.md +26 -0
- package/rules/security.md +29 -0
- package/rules/swift.md +28 -0
- package/rules/testing.md +25 -0
- package/rules/typescript.md +29 -0
- package/schemas/skill-frontmatter.schema.json +52 -0
- package/scripts/lib/audit.js +96 -0
- package/scripts/lib/frontmatter.js +65 -0
- package/scripts/lib/hooks-install.js +292 -0
- package/scripts/lib/i18n.js +51 -0
- package/scripts/lib/inventory.js +85 -0
- package/scripts/lib/lint.js +158 -0
- package/scripts/lib/mcp-install.js +284 -0
- package/scripts/lib/profiles.js +128 -0
- package/scripts/lib/render.js +86 -0
- package/scripts/lib/rules-install.js +118 -0
- package/scripts/lib/skills.js +86 -0
- package/scripts/lib/targets.js +113 -0
- package/skills/accounting-api-integration/SKILL.md +81 -0
- package/skills/accounting-api-integration/evals/triggers.json +17 -0
- package/skills/accounting-api-integration/references/quickbooks.md +48 -0
- package/skills/accounting-api-integration/references/xero.md +45 -0
- package/skills/agent-harness-design/SKILL.md +125 -0
- package/skills/agent-harness-design/evals/triggers.json +21 -0
- package/skills/ai-media-generation/SKILL.md +89 -0
- package/skills/ai-media-generation/evals/triggers.json +16 -0
- package/skills/ai-media-generation/references/job-pipeline.md +76 -0
- package/skills/angular-patterns/SKILL.md +122 -0
- package/skills/angular-patterns/evals/triggers.json +16 -0
- package/skills/api-design/SKILL.md +96 -0
- package/skills/api-design/evals/triggers.json +18 -0
- package/skills/api-design/references/conventions.md +133 -0
- package/skills/architecture-decision-records/SKILL.md +98 -0
- package/skills/architecture-decision-records/evals/triggers.json +17 -0
- package/skills/article-writing/SKILL.md +108 -0
- package/skills/article-writing/evals/triggers.json +16 -0
- package/skills/aspnet-core-patterns/SKILL.md +149 -0
- package/skills/aspnet-core-patterns/evals/triggers.json +16 -0
- package/skills/auth-patterns/SKILL.md +104 -0
- package/skills/auth-patterns/evals/triggers.json +17 -0
- package/skills/auth-patterns/references/oauth-oidc.md +64 -0
- package/skills/autonomous-loops/SKILL.md +99 -0
- package/skills/autonomous-loops/evals/triggers.json +14 -0
- package/skills/aws-patterns/SKILL.md +91 -0
- package/skills/aws-patterns/evals/triggers.json +16 -0
- package/skills/azure-patterns/SKILL.md +86 -0
- package/skills/azure-patterns/evals/triggers.json +16 -0
- package/skills/benchmark-methodology/SKILL.md +88 -0
- package/skills/benchmark-methodology/evals/triggers.json +16 -0
- package/skills/benchmark-methodology/references/language-harnesses.md +130 -0
- package/skills/bgp-diagnostics/SKILL.md +84 -0
- package/skills/bgp-diagnostics/evals/triggers.json +18 -0
- package/skills/bgp-diagnostics/references/bgp-reference.md +81 -0
- package/skills/bioinformatics-workflows/SKILL.md +108 -0
- package/skills/bioinformatics-workflows/evals/triggers.json +16 -0
- package/skills/bioinformatics-workflows/references/commands.md +71 -0
- package/skills/bioinformatics-workflows/references/formats.md +24 -0
- package/skills/bioinformatics-workflows/references/workflow-managers.md +107 -0
- package/skills/brand-voice/SKILL.md +112 -0
- package/skills/brand-voice/evals/triggers.json +16 -0
- package/skills/browser-qa/SKILL.md +99 -0
- package/skills/browser-qa/evals/triggers.json +16 -0
- package/skills/bun-runtime/SKILL.md +93 -0
- package/skills/bun-runtime/evals/triggers.json +16 -0
- package/skills/cisco-ios-config/SKILL.md +101 -0
- package/skills/cisco-ios-config/evals/triggers.json +18 -0
- package/skills/cisco-ios-config/references/verification.md +63 -0
- package/skills/clickhouse-patterns/SKILL.md +101 -0
- package/skills/clickhouse-patterns/evals/triggers.json +18 -0
- package/skills/clickhouse-patterns/references/engines-and-views.md +138 -0
- package/skills/clinical-decision-support/SKILL.md +90 -0
- package/skills/clinical-decision-support/evals/triggers.json +16 -0
- package/skills/clinical-decision-support/references/cds-hooks.md +76 -0
- package/skills/clinical-decision-support/references/regulatory-boundaries.md +37 -0
- package/skills/code-tour/SKILL.md +97 -0
- package/skills/code-tour/evals/triggers.json +14 -0
- package/skills/codebase-onboarding/SKILL.md +112 -0
- package/skills/codebase-onboarding/evals/triggers.json +14 -0
- package/skills/cold-outreach-sequences/SKILL.md +90 -0
- package/skills/cold-outreach-sequences/evals/triggers.json +16 -0
- package/skills/content-repurposing/SKILL.md +82 -0
- package/skills/content-repurposing/evals/triggers.json +16 -0
- package/skills/context-budget/SKILL.md +84 -0
- package/skills/context-budget/evals/triggers.json +14 -0
- package/skills/conventional-commits/SKILL.md +144 -0
- package/skills/conventional-commits/evals/triggers.json +16 -0
- package/skills/cpp-patterns/SKILL.md +129 -0
- package/skills/cpp-patterns/evals/triggers.json +16 -0
- package/skills/cpp-patterns/references/cmake-and-tooling.md +88 -0
- package/skills/cpp-patterns/references/undefined-behaviour.md +75 -0
- package/skills/cpp-testing/SKILL.md +131 -0
- package/skills/cpp-testing/evals/triggers.json +16 -0
- package/skills/csharp-patterns/SKILL.md +110 -0
- package/skills/csharp-patterns/evals/triggers.json +17 -0
- package/skills/csharp-patterns/references/analyzers.md +59 -0
- package/skills/csharp-testing/SKILL.md +85 -0
- package/skills/csharp-testing/evals/triggers.json +17 -0
- package/skills/csharp-testing/references/integration-tests.md +77 -0
- package/skills/css-architecture/SKILL.md +143 -0
- package/skills/css-architecture/evals/triggers.json +16 -0
- package/skills/customs-trade-compliance/SKILL.md +95 -0
- package/skills/customs-trade-compliance/evals/triggers.json +16 -0
- package/skills/customs-trade-compliance/references/incoterms-2020.md +42 -0
- package/skills/dart-patterns/SKILL.md +157 -0
- package/skills/dart-patterns/evals/triggers.json +18 -0
- package/skills/dart-testing/SKILL.md +164 -0
- package/skills/dart-testing/evals/triggers.json +18 -0
- package/skills/data-analysis-notebooks/SKILL.md +113 -0
- package/skills/data-analysis-notebooks/evals/triggers.json +16 -0
- package/skills/data-analysis-notebooks/references/dataframe-pitfalls.md +49 -0
- package/skills/data-analysis-notebooks/references/statistics-pitfalls.md +24 -0
- package/skills/data-pipelines/SKILL.md +90 -0
- package/skills/data-pipelines/evals/triggers.json +16 -0
- package/skills/data-pipelines/references/orchestrators.md +64 -0
- package/skills/database-migrations/SKILL.md +102 -0
- package/skills/database-migrations/evals/triggers.json +16 -0
- package/skills/database-migrations/references/recipes.md +98 -0
- package/skills/database-migrations/references/tools.md +21 -0
- package/skills/dbt-patterns/SKILL.md +96 -0
- package/skills/dbt-patterns/evals/triggers.json +16 -0
- package/skills/dbt-patterns/references/yaml-examples.md +114 -0
- package/skills/deep-research/SKILL.md +107 -0
- package/skills/deep-research/evals/triggers.json +14 -0
- package/skills/dependency-audit/SKILL.md +103 -0
- package/skills/dependency-audit/evals/triggers.json +16 -0
- package/skills/dependency-audit/references/tools.md +124 -0
- package/skills/deployment-strategies/SKILL.md +108 -0
- package/skills/deployment-strategies/evals/triggers.json +16 -0
- package/skills/django-patterns/SKILL.md +123 -0
- package/skills/django-patterns/evals/triggers.json +16 -0
- package/skills/docker-patterns/SKILL.md +132 -0
- package/skills/docker-patterns/evals/triggers.json +16 -0
- package/skills/docker-patterns/references/dockerfiles.md +105 -0
- package/skills/e2e-testing-playwright/SKILL.md +94 -0
- package/skills/e2e-testing-playwright/evals/triggers.json +16 -0
- package/skills/e2e-testing-playwright/references/config-and-ci.md +129 -0
- package/skills/ef-core-patterns/SKILL.md +117 -0
- package/skills/ef-core-patterns/evals/triggers.json +16 -0
- package/skills/email-deliverability/SKILL.md +99 -0
- package/skills/email-deliverability/evals/triggers.json +17 -0
- package/skills/email-deliverability/references/dns-records.md +85 -0
- package/skills/error-handling-patterns/SKILL.md +112 -0
- package/skills/error-handling-patterns/evals/triggers.json +18 -0
- package/skills/error-handling-patterns/references/language-idioms.md +49 -0
- package/skills/estimation-and-scoping/SKILL.md +97 -0
- package/skills/estimation-and-scoping/evals/triggers.json +14 -0
- package/skills/evm-dapp-integration/SKILL.md +73 -0
- package/skills/evm-dapp-integration/evals/triggers.json +16 -0
- package/skills/fastapi-patterns/SKILL.md +127 -0
- package/skills/fastapi-patterns/evals/triggers.json +16 -0
- package/skills/ffmpeg-media-processing/SKILL.md +94 -0
- package/skills/ffmpeg-media-processing/evals/triggers.json +16 -0
- package/skills/ffmpeg-media-processing/references/recipes.md +112 -0
- package/skills/fhir-integration/SKILL.md +81 -0
- package/skills/fhir-integration/evals/triggers.json +16 -0
- package/skills/fhir-integration/references/search-and-bundles.md +73 -0
- package/skills/fhir-integration/references/smart-on-fhir.md +50 -0
- package/skills/flask-patterns/SKILL.md +132 -0
- package/skills/flask-patterns/evals/triggers.json +16 -0
- package/skills/flutter-patterns/SKILL.md +99 -0
- package/skills/flutter-patterns/evals/triggers.json +16 -0
- package/skills/flutterwave-integration/SKILL.md +75 -0
- package/skills/flutterwave-integration/evals/triggers.json +16 -0
- package/skills/flutterwave-integration/references/api.md +73 -0
- package/skills/flutterwave-integration/references/webhooks.md +49 -0
- package/skills/fsharp-patterns/SKILL.md +133 -0
- package/skills/fsharp-patterns/evals/triggers.json +16 -0
- package/skills/fsharp-testing/SKILL.md +136 -0
- package/skills/fsharp-testing/evals/triggers.json +16 -0
- package/skills/gcp-patterns/SKILL.md +86 -0
- package/skills/gcp-patterns/evals/triggers.json +16 -0
- package/skills/git-workflow/SKILL.md +114 -0
- package/skills/git-workflow/evals/triggers.json +16 -0
- package/skills/github-actions-ci/SKILL.md +117 -0
- package/skills/github-actions-ci/evals/triggers.json +16 -0
- package/skills/github-api-automation/SKILL.md +101 -0
- package/skills/github-api-automation/evals/triggers.json +17 -0
- package/skills/go-patterns/SKILL.md +118 -0
- package/skills/go-patterns/evals/triggers.json +17 -0
- package/skills/go-patterns/references/concurrency.md +162 -0
- package/skills/go-testing/SKILL.md +154 -0
- package/skills/go-testing/evals/triggers.json +17 -0
- package/skills/hexagonal-architecture/SKILL.md +89 -0
- package/skills/hexagonal-architecture/evals/triggers.json +17 -0
- package/skills/hipaa-compliance/SKILL.md +91 -0
- package/skills/hipaa-compliance/evals/triggers.json +18 -0
- package/skills/hipaa-compliance/references/safeguards.md +68 -0
- package/skills/hl7v2-integration/SKILL.md +69 -0
- package/skills/hl7v2-integration/evals/triggers.json +16 -0
- package/skills/hl7v2-integration/references/messages-and-ack.md +78 -0
- package/skills/homelab-network-setup/SKILL.md +125 -0
- package/skills/homelab-network-setup/evals/triggers.json +18 -0
- package/skills/homelab-network-setup/references/firewall-and-dns.md +45 -0
- package/skills/homelab-network-setup/references/wireguard.md +72 -0
- package/skills/hubtel-integration/SKILL.md +77 -0
- package/skills/hubtel-integration/evals/triggers.json +16 -0
- package/skills/hubtel-integration/references/api.md +92 -0
- package/skills/i18n-localization/SKILL.md +114 -0
- package/skills/i18n-localization/evals/triggers.json +16 -0
- package/skills/i18n-localization/references/libraries.md +52 -0
- package/skills/incident-postmortem/SKILL.md +118 -0
- package/skills/incident-postmortem/evals/triggers.json +14 -0
- package/skills/inventory-demand-planning/SKILL.md +89 -0
- package/skills/inventory-demand-planning/evals/triggers.json +16 -0
- package/skills/inventory-demand-planning/references/formulas.md +62 -0
- package/skills/investor-materials/SKILL.md +127 -0
- package/skills/investor-materials/evals/triggers.json +16 -0
- package/skills/investor-materials/references/templates.md +74 -0
- package/skills/invoicing-and-tax/SKILL.md +84 -0
- package/skills/invoicing-and-tax/evals/triggers.json +17 -0
- package/skills/invoicing-and-tax/references/e-invoicing.md +24 -0
- package/skills/invoicing-and-tax/references/invoice-fields.md +38 -0
- package/skills/invoicing-and-tax/references/rounding.md +26 -0
- package/skills/java-patterns/SKILL.md +141 -0
- package/skills/java-patterns/evals/triggers.json +17 -0
- package/skills/java-testing/SKILL.md +142 -0
- package/skills/java-testing/evals/triggers.json +16 -0
- package/skills/jetpack-compose-patterns/SKILL.md +88 -0
- package/skills/jetpack-compose-patterns/evals/triggers.json +16 -0
- package/skills/jira-integration/SKILL.md +92 -0
- package/skills/jira-integration/evals/triggers.json +17 -0
- package/skills/jpa-hibernate/SKILL.md +92 -0
- package/skills/jpa-hibernate/evals/triggers.json +18 -0
- package/skills/jpa-hibernate/references/mapping.md +99 -0
- package/skills/kotlin-multiplatform/SKILL.md +97 -0
- package/skills/kotlin-multiplatform/evals/triggers.json +16 -0
- package/skills/kotlin-patterns/SKILL.md +128 -0
- package/skills/kotlin-patterns/evals/triggers.json +16 -0
- package/skills/kotlin-testing/SKILL.md +117 -0
- package/skills/kotlin-testing/evals/triggers.json +16 -0
- package/skills/ktor-patterns/SKILL.md +135 -0
- package/skills/ktor-patterns/evals/triggers.json +18 -0
- package/skills/kubernetes-patterns/SKILL.md +106 -0
- package/skills/kubernetes-patterns/evals/triggers.json +16 -0
- package/skills/kubernetes-patterns/references/manifests.md +115 -0
- package/skills/laravel-patterns/SKILL.md +136 -0
- package/skills/laravel-patterns/evals/triggers.json +16 -0
- package/skills/linear-integration/SKILL.md +98 -0
- package/skills/linear-integration/evals/triggers.json +17 -0
- package/skills/literature-review/SKILL.md +109 -0
- package/skills/literature-review/evals/triggers.json +16 -0
- package/skills/literature-review/references/appraisal.md +41 -0
- package/skills/literature-review/references/search-sources.md +39 -0
- package/skills/llm-app-patterns/SKILL.md +97 -0
- package/skills/llm-app-patterns/evals/triggers.json +17 -0
- package/skills/llm-evals/SKILL.md +98 -0
- package/skills/llm-evals/evals/triggers.json +16 -0
- package/skills/llm-evals/references/graders.md +66 -0
- package/skills/logistics-exception-management/SKILL.md +90 -0
- package/skills/logistics-exception-management/evals/triggers.json +16 -0
- package/skills/manim-animations/SKILL.md +106 -0
- package/skills/manim-animations/evals/triggers.json +16 -0
- package/skills/market-research/SKILL.md +117 -0
- package/skills/market-research/evals/triggers.json +16 -0
- package/skills/marketing-campaign/SKILL.md +111 -0
- package/skills/marketing-campaign/evals/triggers.json +16 -0
- package/skills/mcp-server-patterns/SKILL.md +127 -0
- package/skills/mcp-server-patterns/evals/triggers.json +18 -0
- package/skills/mcp-server-patterns/references/protocol-notes.md +68 -0
- package/skills/metrics-dashboards/SKILL.md +113 -0
- package/skills/metrics-dashboards/evals/triggers.json +16 -0
- package/skills/ml-experiment-workflow/SKILL.md +125 -0
- package/skills/ml-experiment-workflow/evals/triggers.json +16 -0
- package/skills/mongodb-patterns/SKILL.md +115 -0
- package/skills/mongodb-patterns/evals/triggers.json +18 -0
- package/skills/mongodb-patterns/references/indexes-and-aggregation.md +94 -0
- package/skills/mpesa-daraja-integration/SKILL.md +70 -0
- package/skills/mpesa-daraja-integration/evals/triggers.json +16 -0
- package/skills/mpesa-daraja-integration/references/api.md +103 -0
- package/skills/mpesa-daraja-integration/references/callbacks.md +74 -0
- package/skills/mtn-momo-integration/SKILL.md +66 -0
- package/skills/mtn-momo-integration/evals/triggers.json +16 -0
- package/skills/mtn-momo-integration/references/api.md +153 -0
- package/skills/mtn-momo-integration/references/callbacks.md +92 -0
- package/skills/mtn-momo-integration/references/sandbox-and-go-live.md +51 -0
- package/skills/mtn-momo-integration/scripts/sandbox-setup.js +79 -0
- package/skills/mysql-patterns/SKILL.md +96 -0
- package/skills/mysql-patterns/evals/triggers.json +16 -0
- package/skills/mysql-patterns/references/explain.md +34 -0
- package/skills/mysql-patterns/references/online-ddl.md +41 -0
- package/skills/nestjs-patterns/SKILL.md +114 -0
- package/skills/nestjs-patterns/evals/triggers.json +16 -0
- package/skills/nestjs-patterns/references/testing.md +68 -0
- package/skills/network-automation/SKILL.md +107 -0
- package/skills/network-automation/evals/triggers.json +18 -0
- package/skills/network-automation/references/tool-snippets.md +153 -0
- package/skills/network-troubleshooting/SKILL.md +152 -0
- package/skills/network-troubleshooting/evals/triggers.json +18 -0
- package/skills/network-troubleshooting/references/commands.md +33 -0
- package/skills/nextjs-patterns/SKILL.md +150 -0
- package/skills/nextjs-patterns/evals/triggers.json +18 -0
- package/skills/nextjs-patterns/references/caching.md +87 -0
- package/skills/node-backend-patterns/SKILL.md +103 -0
- package/skills/node-backend-patterns/evals/triggers.json +16 -0
- package/skills/node-backend-patterns/references/templates.md +122 -0
- package/skills/nuxt-patterns/SKILL.md +103 -0
- package/skills/nuxt-patterns/evals/triggers.json +16 -0
- package/skills/parallel-agent-orchestration/SKILL.md +106 -0
- package/skills/parallel-agent-orchestration/evals/triggers.json +14 -0
- package/skills/paystack-integration/SKILL.md +59 -0
- package/skills/paystack-integration/evals/triggers.json +14 -0
- package/skills/paystack-integration/references/api.md +73 -0
- package/skills/paystack-integration/references/mobile-money.md +50 -0
- package/skills/paystack-integration/references/webhooks.md +80 -0
- package/skills/pci-dss-scope/SKILL.md +103 -0
- package/skills/pci-dss-scope/evals/triggers.json +18 -0
- package/skills/pci-dss-scope/references/saq-and-data.md +36 -0
- package/skills/perl-patterns/SKILL.md +135 -0
- package/skills/perl-patterns/evals/triggers.json +18 -0
- package/skills/perl-testing/SKILL.md +126 -0
- package/skills/perl-testing/evals/triggers.json +17 -0
- package/skills/php-patterns/SKILL.md +116 -0
- package/skills/php-patterns/evals/triggers.json +16 -0
- package/skills/php-testing/SKILL.md +123 -0
- package/skills/php-testing/evals/triggers.json +16 -0
- package/skills/postgres-patterns/SKILL.md +103 -0
- package/skills/postgres-patterns/evals/triggers.json +17 -0
- package/skills/postgres-patterns/references/explain.md +59 -0
- package/skills/postgres-patterns/references/locks.md +53 -0
- package/skills/prd-writing/SKILL.md +124 -0
- package/skills/prd-writing/evals/triggers.json +15 -0
- package/skills/prisma-patterns/SKILL.md +83 -0
- package/skills/prisma-patterns/evals/triggers.json +18 -0
- package/skills/prisma-patterns/references/prisma-8.md +46 -0
- package/skills/prisma-patterns/references/workflow.md +50 -0
- package/skills/privacy-compliance/SKILL.md +121 -0
- package/skills/privacy-compliance/evals/triggers.json +18 -0
- package/skills/privacy-compliance/references/jurisdictions.md +51 -0
- package/skills/production-scheduling/SKILL.md +98 -0
- package/skills/production-scheduling/evals/triggers.json +16 -0
- package/skills/prompt-engineering/SKILL.md +92 -0
- package/skills/prompt-engineering/evals/triggers.json +16 -0
- package/skills/python-patterns/SKILL.md +107 -0
- package/skills/python-patterns/evals/triggers.json +16 -0
- package/skills/python-patterns/references/tooling.md +101 -0
- package/skills/python-testing/SKILL.md +126 -0
- package/skills/python-testing/evals/triggers.json +16 -0
- package/skills/python-testing/references/mocking.md +71 -0
- package/skills/pytorch-patterns/SKILL.md +139 -0
- package/skills/pytorch-patterns/evals/triggers.json +16 -0
- package/skills/pytorch-patterns/references/debugging.md +39 -0
- package/skills/quarkus-patterns/SKILL.md +93 -0
- package/skills/quarkus-patterns/evals/triggers.json +18 -0
- package/skills/rag-pipeline-patterns/SKILL.md +117 -0
- package/skills/rag-pipeline-patterns/evals/triggers.json +18 -0
- package/skills/rag-pipeline-patterns/references/evaluation.md +37 -0
- package/skills/rag-pipeline-patterns/references/retrieval-recipes.md +78 -0
- package/skills/rails-patterns/SKILL.md +132 -0
- package/skills/rails-patterns/evals/triggers.json +16 -0
- package/skills/react-native-patterns/SKILL.md +101 -0
- package/skills/react-native-patterns/evals/triggers.json +16 -0
- package/skills/react-patterns/SKILL.md +140 -0
- package/skills/react-patterns/evals/triggers.json +18 -0
- package/skills/react-performance/SKILL.md +107 -0
- package/skills/react-performance/evals/triggers.json +18 -0
- package/skills/redis-patterns/SKILL.md +109 -0
- package/skills/redis-patterns/evals/triggers.json +18 -0
- package/skills/redis-patterns/references/operations.md +61 -0
- package/skills/refactoring-safely/SKILL.md +107 -0
- package/skills/refactoring-safely/evals/triggers.json +17 -0
- package/skills/release-management/SKILL.md +141 -0
- package/skills/release-management/evals/triggers.json +16 -0
- package/skills/remotion-video/SKILL.md +91 -0
- package/skills/remotion-video/evals/triggers.json +16 -0
- package/skills/remotion-video/references/lambda.md +66 -0
- package/skills/returns-reverse-logistics/SKILL.md +97 -0
- package/skills/returns-reverse-logistics/evals/triggers.json +16 -0
- package/skills/ruby-patterns/SKILL.md +127 -0
- package/skills/ruby-patterns/evals/triggers.json +18 -0
- package/skills/ruby-testing/SKILL.md +113 -0
- package/skills/ruby-testing/evals/triggers.json +18 -0
- package/skills/runbook-writing/SKILL.md +101 -0
- package/skills/runbook-writing/evals/triggers.json +14 -0
- package/skills/rust-patterns/SKILL.md +118 -0
- package/skills/rust-patterns/evals/triggers.json +16 -0
- package/skills/rust-patterns/references/cargo-and-clippy.md +105 -0
- package/skills/rust-patterns/references/errors-and-traits.md +97 -0
- package/skills/rust-testing/SKILL.md +148 -0
- package/skills/rust-testing/evals/triggers.json +16 -0
- package/skills/rust-testing/references/fakes-proptest-async.md +113 -0
- package/skills/search-first/SKILL.md +73 -0
- package/skills/search-first/evals/triggers.json +14 -0
- package/skills/security-review/SKILL.md +58 -0
- package/skills/security-review/evals/triggers.json +14 -0
- package/skills/security-review/references/checklist.md +54 -0
- package/skills/security-review/scripts/scan-secrets.js +79 -0
- package/skills/seo-audit/SKILL.md +111 -0
- package/skills/seo-audit/evals/triggers.json +16 -0
- package/skills/seo-audit/references/checks.md +65 -0
- package/skills/session-handoff/SKILL.md +101 -0
- package/skills/session-handoff/evals/triggers.json +14 -0
- package/skills/skill-authoring/SKILL.md +87 -0
- package/skills/skill-authoring/evals/triggers.json +14 -0
- package/skills/skill-authoring/references/frontmatter.md +40 -0
- package/skills/slack-app-integration/SKILL.md +108 -0
- package/skills/slack-app-integration/evals/triggers.json +17 -0
- package/skills/smart-contract-security/SKILL.md +110 -0
- package/skills/smart-contract-security/evals/triggers.json +16 -0
- package/skills/smart-contract-security/references/vulnerability-checklist.md +79 -0
- package/skills/social-media-publishing/SKILL.md +84 -0
- package/skills/social-media-publishing/evals/triggers.json +17 -0
- package/skills/social-media-publishing/references/platform-apis.md +116 -0
- package/skills/solidity-patterns/SKILL.md +95 -0
- package/skills/solidity-patterns/evals/triggers.json +16 -0
- package/skills/spring-boot-patterns/SKILL.md +128 -0
- package/skills/spring-boot-patterns/evals/triggers.json +18 -0
- package/skills/spring-boot-patterns/references/testing.md +72 -0
- package/skills/stripe-integration/SKILL.md +69 -0
- package/skills/stripe-integration/evals/triggers.json +16 -0
- package/skills/stripe-integration/references/api.md +71 -0
- package/skills/stripe-integration/references/billing.md +58 -0
- package/skills/stripe-integration/references/webhooks.md +76 -0
- package/skills/subscription-billing-ops/SKILL.md +118 -0
- package/skills/subscription-billing-ops/evals/triggers.json +17 -0
- package/skills/subscription-billing-ops/references/proration.md +47 -0
- package/skills/subscription-billing-ops/references/revenue-metrics.md +38 -0
- package/skills/svelte-patterns/SKILL.md +122 -0
- package/skills/svelte-patterns/evals/triggers.json +16 -0
- package/skills/swift-patterns/SKILL.md +113 -0
- package/skills/swift-patterns/evals/triggers.json +16 -0
- package/skills/swift-patterns/references/concurrency-migration.md +40 -0
- package/skills/swift-testing/SKILL.md +121 -0
- package/skills/swift-testing/evals/triggers.json +16 -0
- package/skills/swift-testing/references/swift-testing-cheatsheet.md +81 -0
- package/skills/swiftui-patterns/SKILL.md +102 -0
- package/skills/swiftui-patterns/evals/triggers.json +16 -0
- package/skills/tdd-workflow/SKILL.md +67 -0
- package/skills/tdd-workflow/evals/triggers.json +14 -0
- package/skills/technical-writing/SKILL.md +95 -0
- package/skills/technical-writing/evals/triggers.json +14 -0
- package/skills/terraform-patterns/SKILL.md +122 -0
- package/skills/terraform-patterns/evals/triggers.json +16 -0
- package/skills/terraform-patterns/references/backends.md +67 -0
- package/skills/test-coverage-improvement/SKILL.md +107 -0
- package/skills/test-coverage-improvement/evals/triggers.json +16 -0
- package/skills/threat-modeling/SKILL.md +113 -0
- package/skills/threat-modeling/evals/triggers.json +16 -0
- package/skills/typescript-patterns/SKILL.md +122 -0
- package/skills/typescript-patterns/evals/triggers.json +16 -0
- package/skills/typescript-testing/SKILL.md +101 -0
- package/skills/typescript-testing/evals/triggers.json +16 -0
- package/skills/verification-loop/SKILL.md +70 -0
- package/skills/verification-loop/evals/triggers.json +14 -0
- package/skills/verification-loop/scripts/detect-checks.js +102 -0
- package/skills/vite-patterns/SKILL.md +117 -0
- package/skills/vite-patterns/evals/triggers.json +16 -0
- package/skills/vue-patterns/SKILL.md +104 -0
- package/skills/vue-patterns/evals/triggers.json +16 -0
- package/skills/web-accessibility/SKILL.md +119 -0
- package/skills/web-accessibility/evals/triggers.json +16 -0
- package/skills/web-performance/SKILL.md +107 -0
- package/skills/web-performance/evals/triggers.json +16 -0
- package/skills/web-scraping/SKILL.md +80 -0
- package/skills/web-scraping/evals/triggers.json +16 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: browser-qa
|
|
3
|
+
description: Exploratory, manual-style QA session on a running web app through a real browser, walking the critical user journeys, abusing forms and validation, spot-checking small screens, keyboard use and contrast, and watching the console and network panel, then filing reproducible bug reports. Use when someone wants a site or staging build clicked through and checked before a release, demo or handover, rather than automated tests written.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Any Agent Skills host with a browser-control capability (a browser automation tool or MCP server). Without one, produce the test plan and ask the user to run it.
|
|
6
|
+
metadata:
|
|
7
|
+
kete-loom/version: "0.1.0"
|
|
8
|
+
kete-loom/category: testing
|
|
9
|
+
kete-loom/risk: runs-commands
|
|
10
|
+
kete-loom/owner: "Kete-org"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Browser QA pass
|
|
14
|
+
|
|
15
|
+
Act as a careful human tester. You are looking for what a real user would hit, and you prove each problem with exact steps. You do not write automated tests here; if the user wants those, use the `e2e-testing-playwright` skill instead.
|
|
16
|
+
|
|
17
|
+
## 0. Agree the scope
|
|
18
|
+
|
|
19
|
+
Before opening the browser, confirm:
|
|
20
|
+
|
|
21
|
+
1. **The URL** and the environment (local, staging, preview). **Never test against production** with real data or payments unless the user says so explicitly in this conversation.
|
|
22
|
+
2. **Test accounts** and roles. Don't sign up with a real person's email or phone number. If you need an account and have none, **stop and ask**.
|
|
23
|
+
3. **What changed** or what matters most, if anything. Weight the pass toward it.
|
|
24
|
+
4. **What is off limits**: sending emails or SMS, real payments, deleting shared data. When an action would have an external effect you weren't cleared for, stop and ask.
|
|
25
|
+
|
|
26
|
+
If you have no way to control a browser, write the checklist from steps 1 to 5 and hand it to the user.
|
|
27
|
+
|
|
28
|
+
## 1. Map the critical journeys
|
|
29
|
+
|
|
30
|
+
List 3 to 7 journeys from the navigation, the README or the user: for example sign up, log in, log out, password reset, search, create/edit/delete the core object, checkout. Do them first, end to end, on a desktop-size window. Note every journey you could not complete and why.
|
|
31
|
+
|
|
32
|
+
## 2. Forms and validation
|
|
33
|
+
|
|
34
|
+
For each important form:
|
|
35
|
+
|
|
36
|
+
- Submit empty. Each required field should show a clear message tied to that field.
|
|
37
|
+
- Wrong formats: bad email, letters in a number, a date in the past where only future dates make sense, an amount of 0 and a negative one.
|
|
38
|
+
- Boundaries: very long text (500+ characters), emoji and non-Latin text (`Kwame Nkrumah`, `Ɔkɔmfo`, `Zoë`, `日本`), leading and trailing spaces, pasted text.
|
|
39
|
+
- Double submit: click the submit button twice quickly. Exactly one record or charge should result.
|
|
40
|
+
- Server errors: does a failed request show a helpful message and keep what the user typed?
|
|
41
|
+
- Navigation: back button after submit, refresh mid-flow, opening the same flow in two tabs.
|
|
42
|
+
|
|
43
|
+
## 3. Responsive spot check
|
|
44
|
+
|
|
45
|
+
Resize to about 375 px wide (phone), 768 px (tablet) and 1280 px (desktop), or use device emulation. On each: no horizontal scrolling, nothing cut off, menus open and close, tap targets are not crammed together, modals fit and can be closed.
|
|
46
|
+
|
|
47
|
+
## 4. Accessibility spot check
|
|
48
|
+
|
|
49
|
+
This is a quick screen, not an audit:
|
|
50
|
+
|
|
51
|
+
- Tab through each journey with the keyboard only. Focus is visible, the order makes sense, nothing traps focus, and Escape closes dialogs.
|
|
52
|
+
- Every input has a visible label; icon-only buttons have an accessible name.
|
|
53
|
+
- Images that carry meaning have alt text.
|
|
54
|
+
- Text contrast looks sufficient, and information is not conveyed by colour alone.
|
|
55
|
+
- Zoom to 200 %: content still usable.
|
|
56
|
+
|
|
57
|
+
For a full WCAG review, recommend the `accessibility-reviewer` agent or the `web-accessibility` skill.
|
|
58
|
+
|
|
59
|
+
## 5. Console and network
|
|
60
|
+
|
|
61
|
+
Keep the console and network log open during every journey.
|
|
62
|
+
|
|
63
|
+
- Console: uncaught errors, failed hydration, React or Vue warnings, CSP violations, mixed-content warnings.
|
|
64
|
+
- Network: any 4xx or 5xx, requests that take more than a couple of seconds, duplicate requests for the same thing, secrets or personal data in URLs or responses that shouldn't be there.
|
|
65
|
+
- Note which user action produced each one.
|
|
66
|
+
|
|
67
|
+
## 6. Verify before you report
|
|
68
|
+
|
|
69
|
+
For each issue: reproduce it a second time from a fresh page load. If it doesn't reproduce, report it as intermittent with what you observed, not as a confirmed bug. Check it isn't caused by your own test data or an expired session.
|
|
70
|
+
|
|
71
|
+
## Bug report format
|
|
72
|
+
|
|
73
|
+
One block per bug:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
### BUG-<n>: <short title stating the wrong behaviour>
|
|
77
|
+
Severity: blocker | major | minor | cosmetic
|
|
78
|
+
Where: <URL or screen>, <browser and window size>, <account/role>
|
|
79
|
+
Steps:
|
|
80
|
+
1. ...
|
|
81
|
+
2. ...
|
|
82
|
+
Expected: ...
|
|
83
|
+
Actual: ...
|
|
84
|
+
Evidence: <console error text, failing request + status, screenshot name>
|
|
85
|
+
Reproduced: 2/2 | intermittent (1/3)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Severity guide: **blocker** stops a critical journey or loses data or money; **major** breaks a feature but has a workaround; **minor** is wrong but low impact; **cosmetic** is visual only.
|
|
89
|
+
|
|
90
|
+
## Final summary
|
|
91
|
+
|
|
92
|
+
End with:
|
|
93
|
+
|
|
94
|
+
1. Environment, browser and build tested, and the time.
|
|
95
|
+
2. A table of journeys with pass / fail / not tested.
|
|
96
|
+
3. Bugs ordered by severity (the blocks above).
|
|
97
|
+
4. What you did not cover (browsers, roles, screens, payments), stated plainly.
|
|
98
|
+
|
|
99
|
+
Never call a build "ready to ship"; report what you saw and let the user decide.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"should_trigger": [
|
|
3
|
+
"Can you click through our staging site and find bugs before tomorrow's launch?",
|
|
4
|
+
"Do a QA pass on the signup and checkout pages at localhost:5173 and write up anything broken",
|
|
5
|
+
"Smoke test the new dashboard in the browser on mobile and desktop sizes",
|
|
6
|
+
"Go through the app like a real user and tell me if the forms handle bad input properly",
|
|
7
|
+
"Check the preview deploy for console errors and failed requests while you use it"
|
|
8
|
+
],
|
|
9
|
+
"should_not_trigger": [
|
|
10
|
+
"Write Playwright specs for the login and checkout flows",
|
|
11
|
+
"Do a full WCAG 2.2 accessibility review of our component library",
|
|
12
|
+
"Our e2e suite is flaky on CI, find out why and fix it",
|
|
13
|
+
"Measure our Largest Contentful Paint and suggest how to bring it down",
|
|
14
|
+
"Review the tests added in PR 482 for weak assertions"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bun-runtime
|
|
3
|
+
description: Working with Bun as a JavaScript runtime, package manager, test runner and bundler, and knowing where it differs from Node and npm, including bun.lock and trustedDependencies, bunfig.toml, bun test with bun:test mocks, bun build and --compile, Bun.serve, automatic .env loading, Node API compatibility gaps, and when to stay on Node. Use when adopting or migrating to Bun, debugging something that works on Node but fails under Bun, setting up bun test or bun install in CI, or deciding whether Bun is a safe choice for a project.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Any Agent Skills host. Needs the bun CLI. Bun changes quickly; confirm version-specific behaviour against bun.com/docs for the installed version (bun --version).
|
|
6
|
+
metadata:
|
|
7
|
+
kete-loom/version: "0.1.0"
|
|
8
|
+
kete-loom/category: coding
|
|
9
|
+
kete-loom/risk: runs-commands
|
|
10
|
+
kete-loom/requires: "bun"
|
|
11
|
+
kete-loom/owner: "Kete-org"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Bun runtime
|
|
15
|
+
|
|
16
|
+
Bun is four tools in one binary: a runtime (JavaScriptCore, not V8), a package manager, a test runner and a bundler. A project can adopt any of them separately. Decide which ones you are using before changing anything.
|
|
17
|
+
|
|
18
|
+
## First, look at the project
|
|
19
|
+
|
|
20
|
+
1. Run `bun --version` and read `package.json`, `bunfig.toml` (if any) and the lockfile name: `bun.lock` (text, Bun 1.2+), `bun.lockb` (older binary format), or another manager's lockfile.
|
|
21
|
+
2. Note what runs in production: Bun, Node, or a serverless platform. The deploy target decides which Bun APIs are safe to use.
|
|
22
|
+
3. Search the code for `Bun.`, `bun:` imports and native addons (`.node` files, `node-gyp`, `prebuild` in dependencies).
|
|
23
|
+
|
|
24
|
+
Stop and ask the user before switching the production runtime from Node to Bun, or replacing the project's package manager, test runner or bundler. Each is a separate decision.
|
|
25
|
+
|
|
26
|
+
## Package manager
|
|
27
|
+
|
|
28
|
+
- `bun install` reads `package.json` and writes `bun.lock`. Commit it; delete other managers' lockfiles only when the team has agreed to switch.
|
|
29
|
+
- Convert an old `bun.lockb` with `bun install --save-text-lockfile --frozen-lockfile --lockfile-only`, then remove `bun.lockb`.
|
|
30
|
+
- CI: `bun install --frozen-lockfile` (or `bun ci`). Bun does not enable frozen mode automatically in CI.
|
|
31
|
+
- **Lifecycle scripts of dependencies do not run** unless the package is listed in `trustedDependencies` in `package.json`. A package that needs a `postinstall` (native builds, binary downloads such as some image, database or browser packages) often fails later at runtime instead of during install. Add it to `trustedDependencies` deliberately and reinstall; never trust everything blindly.
|
|
32
|
+
- Linker: workspaces created on recent Bun default to the `isolated` layout (pnpm-like, no phantom dependencies); single packages and older projects default to `hoisted`. Code that imports an undeclared transitive dependency breaks under `isolated`: declare the dependency rather than switching linker.
|
|
33
|
+
- `bunx <pkg>` is the `npx` equivalent. `bun run <script>` runs `package.json` scripts; CLIs with a `#!/usr/bin/env node` shebang (vite, next) still run under Node unless you use `bun run --bun <script>`.
|
|
34
|
+
|
|
35
|
+
## Runtime differences from Node
|
|
36
|
+
|
|
37
|
+
- **TypeScript and JSX run directly** with no build step, but **Bun does not type-check**. Keep `tsc --noEmit` in the check pipeline.
|
|
38
|
+
- **`.env` is loaded automatically** (`.env`, then `.env.<NODE_ENV>`, `.env.local` (skipped when `NODE_ENV=test`), `.env.<NODE_ENV>.local`). This can surprise tools that load env themselves (Vite warns about it) and can leak local values into tests. Use `--env-file <path>` to choose files, or `--no-env-file` / `env = false` in `bunfig.toml` to turn it off.
|
|
39
|
+
- ESM and CommonJS can be mixed in one file, and `require` of ESM works. Code that relies on this will not run on Node; keep shared libraries Node-compatible.
|
|
40
|
+
- Bun-only APIs: `Bun.serve`, `Bun.file`, `Bun.write`, `Bun.spawn`, `Bun.password`, `bun:sqlite`, `bun:ffi`. Use them only in code that will never run on Node; otherwise use `node:` modules.
|
|
41
|
+
- Native addons: N-API addons generally work; addons that use V8's C++ API directly do not, because there is no V8.
|
|
42
|
+
- `Bun.serve({ fetch(req) { ... } })` uses web `Request`/`Response`. Express and Fastify also run on Bun through its `node:http` implementation; benchmark before assuming a speed-up for your workload.
|
|
43
|
+
|
|
44
|
+
## Known Node compatibility gaps
|
|
45
|
+
|
|
46
|
+
Bun publishes a per-module compatibility page (bun.com/docs/runtime/nodejs-compat). Check it for the installed version before relying on any of these. Gaps that commonly matter:
|
|
47
|
+
|
|
48
|
+
| Area | What breaks |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `async_hooks.createHook` | Stubbed; APM/tracing agents that depend on it lose context. `AsyncLocalStorage` itself works. |
|
|
51
|
+
| `node:v8`, `node:inspector` | Partial: `v8.serialize` uses JavaScriptCore's format, and the inspector covers only some domains. Profilers and heap tools written for V8 may not work. |
|
|
52
|
+
| `node:crypto` | Partial: Bun uses BoringSSL, so some algorithms and APIs are missing. Test the exact algorithm you need on Bun. |
|
|
53
|
+
| `node:cluster` | Partial: HTTP servers in workers each bind their own socket, so do not assume Node's load balancing. |
|
|
54
|
+
| `node:test` | Partial: works only when files run under `bun test`; prefer `bun:test`. |
|
|
55
|
+
| `node:sea` | Not supported; use `bun build --compile`. |
|
|
56
|
+
|
|
57
|
+
When something works on Node but fails on Bun: reproduce with a minimal script on both, check the compatibility page and Bun's issue tracker, then either work around it or keep that piece on Node. Never patch `node_modules`.
|
|
58
|
+
|
|
59
|
+
## bun test
|
|
60
|
+
|
|
61
|
+
- Discovers `*.test.*`, `*_test.*`, `*.spec.*`, `*_spec.*`. Import from `bun:test`: `test`, `describe`, `expect`, `beforeEach`, `mock`, `spyOn`.
|
|
62
|
+
- Jest-compatible but not complete: `jest.fn()` works, `mock.module('pkg', () => ({ ... }))` replaces a module, but some Jest matchers and config options are missing. When migrating, run the whole suite and fix gaps one by one; do not mix Jest and `bun test` on the same files.
|
|
63
|
+
- Setup files: `bun test --preload ./test/setup.ts`, or `[test] preload = ["./test/setup.ts"]` in `bunfig.toml`. DOM tests need a preload that registers happy-dom (`@happy-dom/global-registrator`).
|
|
64
|
+
- Useful flags: `--watch`, `--coverage` (`--coverage-reporter=lcov` for CI), `--timeout <ms>` (default 5000), `-u` to update snapshots, `--bail`.
|
|
65
|
+
- Bun runs test files in a single process by default: tests that mutate globals, env or `mock.module` state leak into other files. Restore mocks in `afterEach`, or pass `--parallel` to spread files across CPU cores (check that your Bun version has this flag).
|
|
66
|
+
|
|
67
|
+
## bun build
|
|
68
|
+
|
|
69
|
+
- `bun build ./src/index.ts --outdir dist --target node|bun|browser`. Add `--minify`, `--sourcemap=linked`, `--splitting`, `--external <pkg>` as needed. JS API: `await Bun.build({ entrypoints, outdir, target })`.
|
|
70
|
+
- It does not emit `.d.ts` files; libraries still need `tsc --emitDeclarationOnly`.
|
|
71
|
+
- `bun build --compile ./src/cli.ts --outfile mycli` makes a standalone executable with the runtime embedded (large binary, but no install step for users).
|
|
72
|
+
- For browser apps with HMR, dev server and framework plugins, a dedicated tool (Vite, see the `vite-patterns` skill) is usually the better fit.
|
|
73
|
+
|
|
74
|
+
## When not to use Bun
|
|
75
|
+
|
|
76
|
+
Recommend staying on Node (or keeping Node in production while using Bun for install/test) when:
|
|
77
|
+
|
|
78
|
+
- The service depends on an APM, profiler or tracing agent that needs V8 or `async_hooks` hooks.
|
|
79
|
+
- It uses native addons built against V8, or crypto primitives BoringSSL lacks.
|
|
80
|
+
- The hosting platform has no first-class Bun runtime and a custom runtime is not acceptable to the team.
|
|
81
|
+
- The team needs long-term-support guarantees comparable to Node LTS.
|
|
82
|
+
- A library the project depends on documents Bun as unsupported.
|
|
83
|
+
|
|
84
|
+
## Never
|
|
85
|
+
|
|
86
|
+
- Commit both `bun.lock` and another manager's lockfile as sources of truth.
|
|
87
|
+
- Add every dependency to `trustedDependencies` to make an install error go away.
|
|
88
|
+
- Use `Bun.*` APIs in a package published for Node users.
|
|
89
|
+
- Drop `tsc` because "Bun runs TypeScript".
|
|
90
|
+
|
|
91
|
+
## Report
|
|
92
|
+
|
|
93
|
+
When asked to evaluate or migrate, return: what was switched (runtime / package manager / tests / bundler), commands now used for install, test, build and start, any compatibility gap found and its workaround, and the test and type-check results on Bun.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"should_trigger": [
|
|
3
|
+
"Migrate our Jest suite to bun test and get mock.module working",
|
|
4
|
+
"This package's postinstall never ran after bun install, the native binary is missing",
|
|
5
|
+
"Is it safe to run our production API on Bun? We use Datadog tracing",
|
|
6
|
+
"Our app works on Node but crashes under Bun with a crypto curve error",
|
|
7
|
+
"Make a single-file executable of our CLI with bun build --compile"
|
|
8
|
+
],
|
|
9
|
+
"should_not_trigger": [
|
|
10
|
+
"Add graceful shutdown and rate limiting to our Express service running on Node",
|
|
11
|
+
"Configure Vite library mode to publish our component package",
|
|
12
|
+
"Set up Vitest for our TypeScript utilities package",
|
|
13
|
+
"Write a GitHub Actions workflow that runs npm ci and the tests",
|
|
14
|
+
"Fix the circular dependency between two NestJS modules"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cisco-ios-config
|
|
3
|
+
description: Reads and writes Cisco IOS and IOS-XE running configuration by hand without cutting off access, covering access and trunk switchports, VLANs and VTP, named extended ACLs edited by sequence number, static routes and basic OSPF, SSH and local user hardening, config archive with configure replace and revert timers, and the show commands that prove each change worked. Use when someone needs CLI commands for a Catalyst switch or ISR/ASR/Catalyst 8000 router, wants a pasted show running-config explained, is about to change a trunk, ACL or VTY line remotely, or needs to roll a Cisco device back to an earlier config.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Any Agent Skills host. Works from pasted configuration; live use needs an SSH or console session to the device. Syntax varies by platform and release; check the command reference for the exact IOS/IOS-XE version.
|
|
6
|
+
metadata:
|
|
7
|
+
kete-loom/version: "0.1.0"
|
|
8
|
+
kete-loom/category: devops
|
|
9
|
+
kete-loom/risk: read-only
|
|
10
|
+
kete-loom/owner: "Kete-org"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Cisco IOS and IOS-XE configuration
|
|
14
|
+
|
|
15
|
+
Produce Cisco CLI changes that are minimal, reversible and verified, and explain existing configuration accurately. The operator pastes the commands; this skill writes them, the safety net and the checks.
|
|
16
|
+
|
|
17
|
+
For a per-area list of verification commands and expected output, read `references/verification.md`.
|
|
18
|
+
|
|
19
|
+
## 0. Before writing any command
|
|
20
|
+
|
|
21
|
+
1. Get `show version` (platform, IOS or IOS-XE release) and the relevant section of the running config: `show running-config | section <keyword>` or `show running-config interface <if>`. Never write a change against a config you have not seen.
|
|
22
|
+
2. Ask how the operator is connected: console, or SSH through which interface and VLAN. Any change on that path is a **lockout risk**.
|
|
23
|
+
3. **Stop and ask** before changing: the management VLAN/SVI, the uplink trunk, VTY `access-class`, AAA/`login` settings, the default route, or routing toward the management network. Propose the change with the revert timer from step 1 below and wait for agreement.
|
|
24
|
+
|
|
25
|
+
## 1. Safety net for every remote change
|
|
26
|
+
|
|
27
|
+
Enable the archive once (if `show archive` says it is not configured):
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
archive
|
|
31
|
+
path flash:archive
|
|
32
|
+
maximum 10
|
|
33
|
+
write-memory
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Use `bootflash:` instead of `flash:` where that is the platform's local file system. `write-memory` saves an archive copy each time the config is saved.
|
|
37
|
+
|
|
38
|
+
Then, for each change:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
configure terminal revert timer 10
|
|
42
|
+
... changes ...
|
|
43
|
+
end
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Verify (step 4). If good, `configure confirm` within the timer, then save. If you lose access, the device rolls back to the archived config when the timer (minutes) runs out. Where the archive is not available, the older fallback is `reload in 10` before the change and `reload cancel` after verifying; it only works if the startup config is the known-good one, and it reboots the device.
|
|
47
|
+
|
|
48
|
+
To return to a saved state on purpose: `configure replace flash:<file>` (replaces the whole running config, unlike `copy <file> running-config`, which only merges). Preview with `show archive config differences flash:<file> system:running-config`.
|
|
49
|
+
|
|
50
|
+
## 2. Writing changes
|
|
51
|
+
|
|
52
|
+
**Interfaces and VLANs**
|
|
53
|
+
- Access port: `switchport mode access`, `switchport access vlan <id>`, `spanning-tree portfast` (edge ports only), `description <what is connected>`.
|
|
54
|
+
- Trunks: add VLANs with `switchport trunk allowed vlan add <ids>`. `switchport trunk allowed vlan <ids>` without `add` **replaces** the whole list and is a classic outage. Remove with `remove`.
|
|
55
|
+
- Native VLAN: `switchport trunk native vlan <id>` must match on both ends, or untagged traffic (and often the management path) breaks and CDP logs a native VLAN mismatch. Change it with the revert timer running, and plan both ends of the link.
|
|
56
|
+
- Some platforms need `switchport trunk encapsulation dot1q` before `switchport mode trunk`.
|
|
57
|
+
- Create VLANs with `vlan <id>` + `name <name>`. Check `show vtp status` first: a switch in VTP server/client mode can have its VLAN database overwritten by a higher revision. Recommend `vtp mode transparent` or `off` unless VTP is deliberately in use.
|
|
58
|
+
- Reset a port to defaults with `default interface <if>` rather than removing lines one by one.
|
|
59
|
+
|
|
60
|
+
**ACLs**
|
|
61
|
+
- Use named extended ACLs with explicit sequence numbers: `ip access-list extended <NAME>`, `10 permit tcp 10.1.0.0 0.0.255.255 host 10.2.0.5 eq 443`. Remember the implicit `deny any` at the end; add an explicit `deny ip any any log` only when the operator wants the logging.
|
|
62
|
+
- Edit in place: insert with a new sequence number, delete with `no <seq>`, renumber with `ip access-list resequence <NAME> 10 10`. Never delete and re-create an ACL that is applied to a live interface or VTY line.
|
|
63
|
+
- Apply: `ip access-group <NAME> in|out` on the interface; `access-class <NAME> in` under `line vty 0 15` (check how many VTY lines exist with `show line`).
|
|
64
|
+
- Wildcard masks are inverse: `/24` is `0.0.0.255`.
|
|
65
|
+
|
|
66
|
+
**Routing basics**
|
|
67
|
+
- Static: `ip route <prefix> <mask> <next-hop> [distance] name <label>`. A floating backup route uses a higher distance than the primary.
|
|
68
|
+
- OSPF: `router ospf <pid>`, `router-id <x.x.x.x>`, `passive-interface default` then `no passive-interface <uplink>`, and `network <net> <wildcard> area <n>` or `ip ospf <pid> area <n>` on the interface. Changing a router ID or area on a live router resets adjacencies; plan a window.
|
|
69
|
+
- Never remove `router ospf` or `router bgp` to "start clean" on a live device.
|
|
70
|
+
|
|
71
|
+
**Management hardening**
|
|
72
|
+
- `ip ssh version 2` (or the release default), `transport input ssh` under VTY lines, `login local` or AAA, `exec-timeout 10 0`.
|
|
73
|
+
- Local users: `username <u> privilege 15 algorithm-type scrypt secret <pw>` and `enable algorithm-type scrypt secret <pw>` where the release supports it. Type 7 (`password` + `service password-encryption`) is reversible; do not treat it as protection.
|
|
74
|
+
- `no ip http server` unless the web UI is needed; prefer `ip http secure-server` if it is.
|
|
75
|
+
|
|
76
|
+
## 3. Explaining a pasted config
|
|
77
|
+
|
|
78
|
+
Go section by section (interfaces, VLANs, ACLs, routing, management, AAA, logging/NTP/SNMP). For each: what it does, anything risky (any/any rules, SNMP `public`, telnet enabled, type 7 or plaintext passwords, unused ports in VLAN 1 and up), and anything inconsistent (ACL referenced but not defined, VLAN on a trunk that does not exist). Replace every password, secret, key and community with `<redacted>` in your reply.
|
|
79
|
+
|
|
80
|
+
## 4. Verify every change
|
|
81
|
+
|
|
82
|
+
Run the matching checks from `references/verification.md` and compare with the output captured before the change. Minimum: `show ip interface brief`, the section you changed, `show logging | include <if or feature>`, and reachability from the management station. Only then `configure confirm` and `copy running-config startup-config` (or `write memory`).
|
|
83
|
+
|
|
84
|
+
## Never
|
|
85
|
+
|
|
86
|
+
- `write erase`, `erase startup-config`, `delete flash:*`, `reload` without a scheduled `reload cancel` plan, or `format`.
|
|
87
|
+
- `no vlan <id>` or trunk allowed-list changes on uplinks without checking which ports and neighbors use the VLAN.
|
|
88
|
+
- Paste a large config block into a live session without a revert timer.
|
|
89
|
+
- Save to startup before the change is verified.
|
|
90
|
+
- Echo secrets back to the user, even from their own paste.
|
|
91
|
+
|
|
92
|
+
## Report back
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
Device: <hostname>, platform <model>, release <version>
|
|
96
|
+
Change: <one line>
|
|
97
|
+
Commands: <block, with revert timer wrapping>
|
|
98
|
+
Verify: <show commands and the expected result>
|
|
99
|
+
Rollback: <configure revert now / configure replace <file> / reload cancel>
|
|
100
|
+
Lockout risk: <none | what could cut access and how the timer covers it>
|
|
101
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"should_trigger": [
|
|
3
|
+
"I need to add VLAN 40 to the trunk on Gi1/0/48 of our Catalyst 9300 without breaking the other VLANs",
|
|
4
|
+
"Give me the IOS-XE commands to restrict SSH on the VTY lines to the 10.10.0.0/16 admin subnet",
|
|
5
|
+
"Explain what each part of this show running-config from our ISR 4331 is doing",
|
|
6
|
+
"How do I roll this Cisco switch back to yesterday's config after a bad change?",
|
|
7
|
+
"Change the native VLAN on a Cisco trunk remotely without locking myself out",
|
|
8
|
+
"Write a named extended ACL on IOS that only lets the web servers reach the database on 5432"
|
|
9
|
+
],
|
|
10
|
+
"should_not_trigger": [
|
|
11
|
+
"Our BGP neighbor to the upstream ISP shows Idle (PfxCt), what happened?",
|
|
12
|
+
"Write an Ansible playbook using cisco.ios.ios_vlans to roll VLANs out to 80 switches",
|
|
13
|
+
"Audit this pfSense export and MikroTik config for ports open to the internet",
|
|
14
|
+
"Our Wi-Fi clients get an IP but can't load any websites, how do I narrow it down?",
|
|
15
|
+
"Design VLANs for my home lab with a guest network and an IoT network",
|
|
16
|
+
"Write a Kubernetes NetworkPolicy so only the API pods can reach Postgres"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Verification commands
|
|
2
|
+
|
|
3
|
+
Capture each relevant command before and after a change. Exact output columns vary by platform and release.
|
|
4
|
+
|
|
5
|
+
## Device and config state
|
|
6
|
+
|
|
7
|
+
| Command | Look for |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `show version` | Platform, release, uptime, config register |
|
|
10
|
+
| `show running-config \| section <kw>` | The block you changed, as the device stores it |
|
|
11
|
+
| `show archive` | Archive enabled, the most recent archive file names |
|
|
12
|
+
| `show archive config differences <a> <b>` | Line-level diff between two configs (for example an archive file and `system:running-config`) |
|
|
13
|
+
| `show archive log config all` | Who changed what, if `archive` + `log config` + `logging enable` are configured |
|
|
14
|
+
| `show logging` | `%LINK-3-UPDOWN`, `%LINEPROTO-5-UPDOWN`, `%SYS-5-CONFIG_I`, error messages after the change |
|
|
15
|
+
|
|
16
|
+
## Interfaces and switching
|
|
17
|
+
|
|
18
|
+
| Command | Look for |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `show ip interface brief` | Status/Protocol `up up`; `administratively down` means `shutdown` |
|
|
21
|
+
| `show interfaces status` | Per port: VLAN, duplex, speed, `err-disabled`, `notconnect` |
|
|
22
|
+
| `show interfaces <if>` | Input/CRC errors, output drops, duplex mismatch symptoms |
|
|
23
|
+
| `show interfaces trunk` | Mode, native VLAN, allowed VLANs and VLANs forwarding on each trunk |
|
|
24
|
+
| `show vlan brief` | VLAN exists, active, and which access ports are in it |
|
|
25
|
+
| `show vtp status` | VTP mode and configuration revision |
|
|
26
|
+
| `show spanning-tree vlan <id>` | Root bridge, port roles; blocked ports you did not expect |
|
|
27
|
+
| `show mac address-table interface <if>` | Hosts learned on the port |
|
|
28
|
+
| `show cdp neighbors detail` / `show lldp neighbors` | What is cabled to each port |
|
|
29
|
+
| `show errdisable recovery` | Why a port went err-disabled and whether it recovers |
|
|
30
|
+
|
|
31
|
+
## ACLs
|
|
32
|
+
|
|
33
|
+
| Command | Look for |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `show access-lists <NAME>` | Sequence numbers and per-entry match counters rising for the traffic you expect |
|
|
36
|
+
| `show ip interface <if> \| include access list` | Which ACL is applied inbound and outbound |
|
|
37
|
+
| `show line` / `show running-config \| section line vty` | VTY line count and the `access-class` applied |
|
|
38
|
+
|
|
39
|
+
## Routing
|
|
40
|
+
|
|
41
|
+
| Command | Look for |
|
|
42
|
+
|---|---|
|
|
43
|
+
| `show ip route <prefix>` | Which source and next hop won, and its distance/metric |
|
|
44
|
+
| `show ip route summary` | Route counts per source, before vs after |
|
|
45
|
+
| `show ip protocols` | Running routing processes, networks, passive interfaces |
|
|
46
|
+
| `show ip ospf neighbor` | Adjacencies in `FULL` (or `2WAY` to DROTHER on broadcast segments) |
|
|
47
|
+
| `show ip ospf interface brief` | Interfaces in OSPF, area, cost, state |
|
|
48
|
+
| `ping <ip> source <if>` / `traceroute <ip>` | Reachability along the path you changed |
|
|
49
|
+
|
|
50
|
+
## Management
|
|
51
|
+
|
|
52
|
+
| Command | Look for |
|
|
53
|
+
|---|---|
|
|
54
|
+
| `show ip ssh` | SSH enabled and version |
|
|
55
|
+
| `show users` | Your own session still listed, and from which line |
|
|
56
|
+
| `show ntp associations` | A synced peer (`*`) so logs have correct timestamps |
|
|
57
|
+
|
|
58
|
+
## Sources
|
|
59
|
+
|
|
60
|
+
- `configure terminal revert timer` and `configure revert` (1 to 120 minutes), `configure replace`: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/command/cf_command_ref/C_commands.html
|
|
61
|
+
- Archive `maximum` (1 to 14, default 10) and configuration rollback: https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9500/software/release/16-6/configuration_guide/sys_mgmt/b_166_sys_mgmt_9500_cg/b_166_sys_mgmt_9500_cg_chapter_01001.html
|
|
62
|
+
- Configuration change logger (`archive` / `log config` / `logging enable`, `show archive log config`): https://www.cisco.com/c/en/us/td/docs/routers/ios/config/17-x/syst-mgmt/b-system-management/m_cm-config-logger-0.html
|
|
63
|
+
- Type 8 and type 9 (`algorithm-type scrypt`) secrets and release support: https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-npe-hardening-Dkel83jP
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clickhouse-patterns
|
|
3
|
+
description: ClickHouse table and query design for analytics, choosing a MergeTree family engine, ordering the sorting key for the filters that matter, keeping partitions coarse, building incremental and refreshable materialised views, batching or async-inserting writes to avoid too many parts, and reading EXPLAIN and system tables to make slow queries fast. Use when creating or changing ClickHouse tables, ingesting events into ClickHouse, a ClickHouse query scans too many rows, or deduplication and rollups give unexpected results.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Any Agent Skills host. SQL runs in clickhouse-client or any ClickHouse driver. ClickHouse Cloud uses SharedMergeTree under the same MergeTree syntax; self-hosted replication uses Replicated* engines.
|
|
6
|
+
metadata:
|
|
7
|
+
kete-loom/version: "0.1.0"
|
|
8
|
+
kete-loom/category: data
|
|
9
|
+
kete-loom/risk: runs-commands
|
|
10
|
+
kete-loom/requires: "clickhouse-client"
|
|
11
|
+
kete-loom/owner: "Kete-org"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# ClickHouse patterns
|
|
15
|
+
|
|
16
|
+
ClickHouse is fast when it reads few granules of few columns, and when it receives few, large inserts. Almost every problem is a sorting key, a partition key or an insert pattern that breaks one of those. Engine details and view recipes are in `references/engines-and-views.md`.
|
|
17
|
+
|
|
18
|
+
## 0. Before you start
|
|
19
|
+
|
|
20
|
+
1. Get the version and deployment: `SELECT version()`, and whether it's ClickHouse Cloud, a single server, or a replicated cluster (`SELECT * FROM system.clusters`). Use the engine family the existing tables use.
|
|
21
|
+
2. Read the current table: `SHOW CREATE TABLE db.events`. Never guess the sorting key.
|
|
22
|
+
3. List the top queries the table must serve: which columns they filter on, group by and return, and the time range. If the table already exists, pull them from `system.query_log` (see section 5). If you can't get them, **stop and ask the user**; the sorting key depends on them.
|
|
23
|
+
4. The sorting key and partition key can't be changed in place. Changing them means a new table and a backfill (`INSERT INTO new SELECT * FROM old`, in chunks). Agree that plan with the user before starting.
|
|
24
|
+
5. Never run `DROP TABLE`, `TRUNCATE`, `ALTER TABLE ... DROP PARTITION`, `ALTER TABLE ... DELETE/UPDATE` or `OPTIMIZE ... FINAL` on a shared or production server without explicit approval. Mutations rewrite whole parts and can run for hours.
|
|
25
|
+
|
|
26
|
+
## 1. Sorting key (ORDER BY)
|
|
27
|
+
|
|
28
|
+
The sorting key decides how much data a query can skip. The primary index is sparse: one entry per granule (8192 rows by default).
|
|
29
|
+
|
|
30
|
+
1. Start with the columns most queries filter on with equality, usually a tenant, project or event type.
|
|
31
|
+
2. Order them from **low to high cardinality**: `ORDER BY (tenant_id, event_type, toDate(ts), user_id)`. Low-cardinality leading columns also compress better.
|
|
32
|
+
3. Put the time column after the equality filters, at the coarsest grain the queries need (`toDate(ts)` or `toStartOfHour(ts)` rather than the raw timestamp), unless queries are mainly time-range scans across all tenants.
|
|
33
|
+
4. Keep it to about four or five columns. Columns no query filters on don't belong in it.
|
|
34
|
+
5. `PRIMARY KEY` defaults to `ORDER BY`. Make it a shorter prefix only if the index is too big to keep in memory.
|
|
35
|
+
|
|
36
|
+
Check a query's pruning with `EXPLAIN indexes = 1 SELECT ...`: compare `Granules: selected/total` for the primary key. A query that selects most granules needs a different key, a projection, or a skip index.
|
|
37
|
+
|
|
38
|
+
## 2. Partitions
|
|
39
|
+
|
|
40
|
+
- Partitioning is for **data management** (dropping or moving old data, TTL), not for speed.
|
|
41
|
+
- Use a coarse key, usually `PARTITION BY toYYYYMM(ts)`, or none at all for small tables. Keep the number of partitions well under about 1000.
|
|
42
|
+
- Never partition by a high-cardinality column (user ID, raw timestamp, day across many years): every insert touching many partitions creates many parts and ends in `Too many parts` errors.
|
|
43
|
+
- Expire data with `TTL ts + INTERVAL 90 DAY`; whole expired partitions are dropped cheaply, especially with `ttl_only_drop_parts = 1`.
|
|
44
|
+
|
|
45
|
+
## 3. Inserts
|
|
46
|
+
|
|
47
|
+
- Insert in **batches of at least 1,000 rows, ideally 10,000 to 100,000**, at about one insert per second per table or less. Each insert creates at least one part per partition it touches.
|
|
48
|
+
- When many clients send small writes (events from apps, logs), enable server-side buffering instead of building a batcher: `SETTINGS async_insert = 1, wait_for_async_insert = 1`. Keep `wait_for_async_insert = 1` so errors reach the client.
|
|
49
|
+
- Inserts are retried safely when the same block is resent to a replicated or Cloud table: identical blocks are deduplicated. Keep retries byte-identical (same rows, same order).
|
|
50
|
+
- Use the native or RowBinary formats from drivers for throughput; JSONEachRow is fine for moderate volumes.
|
|
51
|
+
- Watch part counts: `SELECT table, partition, count() FROM system.parts WHERE active GROUP BY table, partition ORDER BY count() DESC`. Hundreds of active parts in one partition means inserts are too small or too spread out.
|
|
52
|
+
|
|
53
|
+
## 4. Column types
|
|
54
|
+
|
|
55
|
+
- Use the smallest type that fits (`UInt32` not `Int64` for counts, `Date` when you don't need time, `DateTime64(3)` for milliseconds).
|
|
56
|
+
- `LowCardinality(String)` for strings with fewer than about 10,000 distinct values (country, status, event name).
|
|
57
|
+
- Avoid `Nullable` unless "unknown" is different from a default; it adds a hidden column and slows queries. Use `DEFAULT` values.
|
|
58
|
+
- Use `Decimal` for money. Add codecs (`CODEC(Delta, ZSTD)` for monotonic timestamps and counters) only after checking `system.columns` compression ratios.
|
|
59
|
+
- Use `Map`, `Tuple`, `JSON` or a `String` column with JSON functions for semi-structured data, and pull hot fields into real columns (`MATERIALIZED JSONExtractString(raw, 'path')`).
|
|
60
|
+
|
|
61
|
+
## 5. Query optimisation
|
|
62
|
+
|
|
63
|
+
1. Find the slow queries:
|
|
64
|
+
```sql
|
|
65
|
+
SELECT query, query_duration_ms, read_rows, formatReadableSize(read_bytes) AS read, memory_usage
|
|
66
|
+
FROM system.query_log
|
|
67
|
+
WHERE type = 'QueryFinish' AND event_time > now() - INTERVAL 1 DAY
|
|
68
|
+
ORDER BY read_bytes DESC LIMIT 20
|
|
69
|
+
```
|
|
70
|
+
2. Read fewer columns: never `SELECT *` in production queries.
|
|
71
|
+
3. Filter on sorting-key columns, in key order. ClickHouse moves selective filters to `PREWHERE` on its own; check with `EXPLAIN`.
|
|
72
|
+
4. For a second access path, add a **projection** (`ALTER TABLE t ADD PROJECTION p (SELECT * ORDER BY user_id)`, then `ALTER TABLE t MATERIALIZE PROJECTION p` to build it for existing parts; that is a mutation, so ask first on production) or a materialised view into a table with a different key. For needle-in-haystack filters, a skip index (`INDEX idx col TYPE bloom_filter GRANULARITY 4`) can help; prove it with `EXPLAIN indexes = 1`.
|
|
73
|
+
5. Joins: put the smaller table on the right side, filter both sides before joining, and use dictionaries (`dictGet`) for dimension lookups.
|
|
74
|
+
6. Use `uniq` instead of `uniqExact` and `quantile` instead of `quantileExact` when approximate is acceptable; say so to the user.
|
|
75
|
+
7. Pre-aggregate dashboards with a materialised view (section 6) instead of scanning raw events on every page load.
|
|
76
|
+
|
|
77
|
+
## 6. Materialised views and rollups
|
|
78
|
+
|
|
79
|
+
- An **incremental** materialised view (`CREATE MATERIALIZED VIEW mv TO target AS SELECT ...`) is an insert trigger: it processes only blocks inserted into the source after it is created. It does **not** see existing rows; backfill them with an explicit `INSERT INTO target SELECT ...`.
|
|
80
|
+
- Always use `TO <target table>` so you control the target's engine, key and TTL.
|
|
81
|
+
- Rollups into `SummingMergeTree` or `AggregatingMergeTree` are merged in the background, so rows for one key may exist several times. Queries must still aggregate (`sum(...)`, `uniqMerge(...)` with `GROUP BY`).
|
|
82
|
+
- A **refreshable** materialised view (`REFRESH EVERY 1 HOUR`) re-runs a full query on a schedule; use it for joins and heavy reports where incremental logic is wrong.
|
|
83
|
+
- `ReplacingMergeTree` deduplicates rows with the same sorting key only during merges, at an unknown time. Read with `FINAL` or `argMax(..., version)` per key when you need the latest row.
|
|
84
|
+
|
|
85
|
+
## Never
|
|
86
|
+
|
|
87
|
+
- Insert one row per request without async inserts.
|
|
88
|
+
- Use `ALTER TABLE ... UPDATE` as a normal write path; model changes as new rows (ReplacingMergeTree, versioned rows) or use lightweight `DELETE FROM` sparingly.
|
|
89
|
+
- Run `OPTIMIZE TABLE ... FINAL` on a schedule to "fix" duplicates; fix the query instead.
|
|
90
|
+
- Claim a speedup without `read_rows` and `query_duration_ms` before and after.
|
|
91
|
+
|
|
92
|
+
## Report format (when reviewing)
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
ClickHouse review: <tables or queries>
|
|
96
|
+
Deployment/version: <Cloud | single | replicated>, <version>
|
|
97
|
+
Findings:
|
|
98
|
+
1. [severity] <table or file:line>: <problem> → <fix>
|
|
99
|
+
Evidence: <query> read_rows / granules selected / duration, before → after
|
|
100
|
+
Not verified: <anything you could not run>
|
|
101
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"should_trigger": [
|
|
3
|
+
"Design a ClickHouse table for page view events, what ORDER BY and PARTITION BY should it have?",
|
|
4
|
+
"We get DB::Exception Too many parts when our services insert into ClickHouse",
|
|
5
|
+
"My ClickHouse materialized view doesn't include the rows that were already in the table",
|
|
6
|
+
"ReplacingMergeTree still shows duplicate rows, how do I query only the latest version?",
|
|
7
|
+
"This ClickHouse dashboard query reads 2 billion rows, help me make it faster",
|
|
8
|
+
"Build a daily rollup of events per tenant with AggregatingMergeTree and uniqState"
|
|
9
|
+
],
|
|
10
|
+
"should_not_trigger": [
|
|
11
|
+
"Our Postgres reporting query is slow, should we add a BRIN index on created_at?",
|
|
12
|
+
"Write a MongoDB aggregation pipeline that groups orders by customer",
|
|
13
|
+
"Set up a Redis sorted set leaderboard for the game",
|
|
14
|
+
"Model order events in the Prisma schema and generate the client",
|
|
15
|
+
"Build a Grafana dashboard for our API latency metrics",
|
|
16
|
+
"Benchmark two implementations of our JSON parser fairly"
|
|
17
|
+
]
|
|
18
|
+
}
|