@ketecode/loom 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +616 -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/behavior.json +60 -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/inbox-triager/AGENT.md +98 -0
- package/agents/inbox-triager/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/spec-reviewer/AGENT.md +95 -0
- package/agents/spec-reviewer/evals/behavior.json +57 -0
- package/agents/spec-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/task-implementer/AGENT.md +89 -0
- package/agents/task-implementer/evals/behavior.json +47 -0
- package/agents/task-implementer/evals/triggers.json +16 -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 +723 -0
- package/commands/aside.md +19 -0
- package/commands/brainstorm.md +25 -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/debug.md +27 -0
- package/commands/deps-audit.md +32 -0
- package/commands/dual-review.md +34 -0
- package/commands/epic-decompose.md +21 -0
- package/commands/explain.md +37 -0
- package/commands/feature-dev.md +23 -0
- package/commands/finish-branch.md +26 -0
- package/commands/fix-bug.md +38 -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/production-readiness.md +45 -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/usage-report.md +43 -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-foreground-servers/HOOK.md +34 -0
- package/hooks/block-foreground-servers/cases.json +31 -0
- package/hooks/block-foreground-servers/hook.js +41 -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/capture-lessons/HOOK.md +24 -0
- package/hooks/capture-lessons/hook.js +48 -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/notify-on-stop/HOOK.md +25 -0
- package/hooks/notify-on-stop/hook.js +27 -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/protect-lint-config/HOOK.md +29 -0
- package/hooks/protect-lint-config/cases.json +18 -0
- package/hooks/protect-lint-config/fixtures/.eslintrc.json +1 -0
- package/hooks/protect-lint-config/fixtures/.golangci.yml +1 -0
- package/hooks/protect-lint-config/fixtures/.prettierrc +1 -0
- package/hooks/protect-lint-config/fixtures/.rubocop.yml +1 -0
- package/hooks/protect-lint-config/fixtures/biome.json +1 -0
- package/hooks/protect-lint-config/fixtures/eslint.config.mjs +1 -0
- package/hooks/protect-lint-config/fixtures/ruff.toml +1 -0
- package/hooks/protect-lint-config/hook.js +25 -0
- package/hooks/read-before-edit/HOOK.md +26 -0
- package/hooks/read-before-edit/cases.json +15 -0
- package/hooks/read-before-edit/hook.js +50 -0
- package/hooks/run.js +148 -0
- package/hooks/verify-before-stop/HOOK.md +32 -0
- package/hooks/verify-before-stop/hook.js +70 -0
- package/mcp/atlassian.json +11 -0
- package/mcp/chrome-devtools.json +18 -0
- package/mcp/clickhouse.json +11 -0
- package/mcp/cloudflare.json +11 -0
- package/mcp/context7.json +11 -0
- package/mcp/exa.json +11 -0
- package/mcp/fetch.json +17 -0
- package/mcp/figma.json +11 -0
- package/mcp/firecrawl.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/mcp/vercel.json +11 -0
- package/package.json +61 -4
- package/profiles.json +214 -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/rules/use-skills.md +23 -0
- package/schemas/skill-frontmatter.schema.json +52 -0
- package/scripts/lib/audit.js +96 -0
- package/scripts/lib/behavior.js +52 -0
- package/scripts/lib/frontmatter.js +65 -0
- package/scripts/lib/hooks-install.js +294 -0
- package/scripts/lib/i18n.js +51 -0
- package/scripts/lib/inventory.js +85 -0
- package/scripts/lib/lint.js +180 -0
- package/scripts/lib/mcp-install.js +288 -0
- package/scripts/lib/profiles.js +128 -0
- package/scripts/lib/render.js +92 -0
- package/scripts/lib/rules-install.js +118 -0
- package/scripts/lib/skills.js +87 -0
- package/scripts/lib/targets.js +123 -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-failure-debugging/SKILL.md +92 -0
- package/skills/agent-failure-debugging/evals/triggers.json +16 -0
- package/skills/agent-harness-design/SKILL.md +125 -0
- package/skills/agent-harness-design/evals/triggers.json +21 -0
- package/skills/agent-outbound-messaging/SKILL.md +92 -0
- package/skills/agent-outbound-messaging/evals/triggers.json +16 -0
- package/skills/agent-security/SKILL.md +117 -0
- package/skills/agent-security/evals/triggers.json +16 -0
- package/skills/agent-security/references/host-configs.md +37 -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-client-integration/SKILL.md +86 -0
- package/skills/api-client-integration/evals/triggers.json +16 -0
- package/skills/api-client-integration/references/resilience.md +57 -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/blender-automation/SKILL.md +100 -0
- package/skills/blender-automation/evals/triggers.json +16 -0
- package/skills/blender-automation/references/batch-and-render.md +77 -0
- package/skills/blender-automation/references/bpy-inspection.md +91 -0
- package/skills/blender-automation/references/rig-and-retarget-checks.md +23 -0
- package/skills/brand-strategy/SKILL.md +83 -0
- package/skills/brand-strategy/evals/triggers.json +16 -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/change-impact-analysis/SKILL.md +89 -0
- package/skills/change-impact-analysis/evals/triggers.json +16 -0
- package/skills/change-impact-analysis/references/graph-commands.md +28 -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/contract-drafting/SKILL.md +96 -0
- package/skills/contract-drafting/evals/triggers.json +16 -0
- package/skills/contract-drafting/references/term-sheets.md +68 -0
- package/skills/contract-first-development/SKILL.md +86 -0
- package/skills/contract-first-development/evals/triggers.json +16 -0
- package/skills/contract-first-development/references/tooling.md +46 -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/decision-council/SKILL.md +98 -0
- package/skills/decision-council/evals/triggers.json +16 -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/design-brainstorming/SKILL.md +132 -0
- package/skills/design-brainstorming/evals/behavior.json +55 -0
- package/skills/design-brainstorming/evals/triggers.json +16 -0
- package/skills/design-brainstorming/references/visual-mockups.md +34 -0
- package/skills/desktop-app-testing/SKILL.md +104 -0
- package/skills/desktop-app-testing/evals/triggers.json +16 -0
- package/skills/desktop-app-testing/references/drivers.md +81 -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/document-processing/SKILL.md +100 -0
- package/skills/document-processing/evals/triggers.json +17 -0
- package/skills/document-processing/references/extraction-and-ocr.md +71 -0
- package/skills/document-processing/references/forms-and-conversion.md +69 -0
- package/skills/document-processing/references/redaction.md +61 -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/energy-procurement/SKILL.md +106 -0
- package/skills/energy-procurement/evals/triggers.json +16 -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/finishing-a-branch/SKILL.md +127 -0
- package/skills/finishing-a-branch/evals/behavior.json +49 -0
- package/skills/finishing-a-branch/evals/triggers.json +16 -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/freight-carrier-management/SKILL.md +107 -0
- package/skills/freight-carrier-management/evals/triggers.json +16 -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/git-worktrees/SKILL.md +130 -0
- package/skills/git-worktrees/evals/behavior.json +56 -0
- package/skills/git-worktrees/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/google-workspace-integration/SKILL.md +65 -0
- package/skills/google-workspace-integration/evals/triggers.json +17 -0
- package/skills/google-workspace-integration/references/api.md +121 -0
- package/skills/harmonyos-arkts/SKILL.md +117 -0
- package/skills/harmonyos-arkts/evals/triggers.json +16 -0
- package/skills/harmonyos-arkts/references/build-errors.md +42 -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/implementation-plans/SKILL.md +117 -0
- package/skills/implementation-plans/evals/behavior.json +54 -0
- package/skills/implementation-plans/evals/triggers.json +16 -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/ios-platform-features/SKILL.md +99 -0
- package/skills/ios-platform-features/evals/triggers.json +16 -0
- package/skills/ios-platform-features/references/foundation-models.md +90 -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/jvm-sql-mappers/SKILL.md +98 -0
- package/skills/jvm-sql-mappers/evals/triggers.json +16 -0
- package/skills/jvm-sql-mappers/references/examples.md +129 -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/mobile-accessibility/SKILL.md +94 -0
- package/skills/mobile-accessibility/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-design/SKILL.md +98 -0
- package/skills/network-design/evals/triggers.json +16 -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/observability/SKILL.md +125 -0
- package/skills/observability/evals/triggers.json +17 -0
- package/skills/observability/references/otel-setup.md +87 -0
- package/skills/observability/references/slo-alerts.md +70 -0
- package/skills/open-source-release/SKILL.md +107 -0
- package/skills/open-source-release/evals/triggers.json +15 -0
- package/skills/open-source-release/references/history-scrub.md +65 -0
- package/skills/parallel-agent-orchestration/SKILL.md +106 -0
- package/skills/parallel-agent-orchestration/evals/triggers.json +14 -0
- package/skills/patent-research/SKILL.md +94 -0
- package/skills/patent-research/evals/triggers.json +16 -0
- package/skills/patent-research/references/databases-and-queries.md +52 -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/prospect-research/SKILL.md +87 -0
- package/skills/prospect-research/evals/triggers.json +16 -0
- package/skills/python-app-distribution/SKILL.md +107 -0
- package/skills/python-app-distribution/evals/triggers.json +16 -0
- package/skills/python-app-distribution/references/pypi-trusted-publishing.md +55 -0
- package/skills/python-app-distribution/references/windows-macos-signing.md +70 -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/quality-nonconformance/SKILL.md +107 -0
- package/skills/quality-nonconformance/evals/triggers.json +16 -0
- package/skills/quality-nonconformance/references/8d-and-capa.md +46 -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/react-testing/SKILL.md +121 -0
- package/skills/react-testing/evals/triggers.json +18 -0
- package/skills/react-testing/references/msw.md +64 -0
- package/skills/react-testing/references/queries.md +41 -0
- package/skills/react-testing/references/setup.md +74 -0
- package/skills/recommender-systems/SKILL.md +119 -0
- package/skills/recommender-systems/evals/triggers.json +16 -0
- package/skills/recommender-systems/references/evaluation.md +39 -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/behavior.json +57 -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/reproducible-dev-environments/SKILL.md +132 -0
- package/skills/reproducible-dev-environments/evals/triggers.json +16 -0
- package/skills/responding-to-code-review/SKILL.md +124 -0
- package/skills/responding-to-code-review/evals/behavior.json +54 -0
- package/skills/responding-to-code-review/evals/triggers.json +16 -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/behavior.json +56 -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/behavior.json +55 -0
- package/skills/session-handoff/evals/triggers.json +14 -0
- package/skills/skill-authoring/SKILL.md +98 -0
- package/skills/skill-authoring/evals/triggers.json +15 -0
- package/skills/skill-authoring/references/frontmatter.md +40 -0
- package/skills/skill-authoring/references/pressure-testing.md +87 -0
- package/skills/slack-app-integration/SKILL.md +108 -0
- package/skills/slack-app-integration/evals/triggers.json +17 -0
- package/skills/slide-decks/SKILL.md +107 -0
- package/skills/slide-decks/evals/triggers.json +18 -0
- package/skills/slide-decks/references/html-decks.md +86 -0
- package/skills/slide-decks/references/layouts.md +45 -0
- package/skills/slide-decks/references/pptx.md +87 -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/subagent-driven-development/SKILL.md +109 -0
- package/skills/subagent-driven-development/evals/behavior.json +53 -0
- package/skills/subagent-driven-development/evals/triggers.json +15 -0
- package/skills/subagent-driven-development/references/implementer-brief.md +60 -0
- package/skills/subagent-driven-development/references/reviewer-briefs.md +52 -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/systematic-debugging/SKILL.md +92 -0
- package/skills/systematic-debugging/evals/behavior.json +59 -0
- package/skills/systematic-debugging/evals/triggers.json +16 -0
- package/skills/systematic-debugging/references/condition-waiting.md +52 -0
- package/skills/systematic-debugging/references/root-cause-tracing.md +49 -0
- package/skills/systematic-debugging/references/test-pollution.md +46 -0
- package/skills/tdd-workflow/SKILL.md +69 -0
- package/skills/tdd-workflow/evals/behavior.json +55 -0
- package/skills/tdd-workflow/evals/triggers.json +15 -0
- package/skills/tdd-workflow/references/testing-anti-patterns.md +87 -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/transactional-email/SKILL.md +68 -0
- package/skills/transactional-email/evals/triggers.json +17 -0
- package/skills/transactional-email/references/providers.md +63 -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/ui-demo-recording/SKILL.md +93 -0
- package/skills/ui-demo-recording/evals/triggers.json +16 -0
- package/skills/ui-demo-recording/references/cursor-and-captions.md +48 -0
- package/skills/ui-demo-recording/references/playwright-recording.md +63 -0
- package/skills/ui-demo-recording/references/post-processing.md +57 -0
- package/skills/ui-design-polish/SKILL.md +113 -0
- package/skills/ui-design-polish/evals/triggers.json +18 -0
- package/skills/ui-design-polish/references/detail-checklist.md +45 -0
- package/skills/ui-design-polish/references/tokens.md +68 -0
- package/skills/ui-flow-audit/SKILL.md +112 -0
- package/skills/ui-flow-audit/evals/triggers.json +17 -0
- package/skills/ui-motion/SKILL.md +103 -0
- package/skills/ui-motion/evals/triggers.json +18 -0
- package/skills/ui-motion/references/patterns.md +138 -0
- package/skills/ui-motion/references/tokens.md +52 -0
- package/skills/unicode-text-processing/SKILL.md +103 -0
- package/skills/unicode-text-processing/evals/triggers.json +17 -0
- package/skills/unicode-text-processing/references/apis.md +89 -0
- package/skills/unicode-text-processing/references/script-notes.md +50 -0
- package/skills/verification-loop/SKILL.md +70 -0
- package/skills/verification-loop/evals/behavior.json +52 -0
- package/skills/verification-loop/evals/triggers.json +14 -0
- package/skills/verification-loop/scripts/detect-checks.js +102 -0
- package/skills/video-editing/SKILL.md +111 -0
- package/skills/video-editing/evals/triggers.json +16 -0
- package/skills/video-editing/references/edl-and-logging.md +44 -0
- package/skills/video-editing/references/ffmpeg-edit-recipes.md +92 -0
- package/skills/video-editing/references/resolve-scripting.md +53 -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,105 @@
|
|
|
1
|
+
# Dockerfile templates
|
|
2
|
+
|
|
3
|
+
Starting points. Adjust versions, paths and commands to the project; don't paste blindly.
|
|
4
|
+
|
|
5
|
+
## Node.js (npm)
|
|
6
|
+
|
|
7
|
+
```dockerfile
|
|
8
|
+
# syntax=docker/dockerfile:1
|
|
9
|
+
FROM node:22-bookworm-slim AS deps
|
|
10
|
+
WORKDIR /app
|
|
11
|
+
COPY package.json package-lock.json ./
|
|
12
|
+
RUN --mount=type=cache,target=/root/.npm npm ci
|
|
13
|
+
|
|
14
|
+
FROM deps AS build
|
|
15
|
+
COPY . .
|
|
16
|
+
RUN npm run build && npm prune --omit=dev
|
|
17
|
+
|
|
18
|
+
FROM node:22-bookworm-slim
|
|
19
|
+
ENV NODE_ENV=production
|
|
20
|
+
WORKDIR /app
|
|
21
|
+
COPY --from=build --chown=node:node /app/node_modules ./node_modules
|
|
22
|
+
COPY --from=build --chown=node:node /app/dist ./dist
|
|
23
|
+
COPY --chown=node:node package.json ./
|
|
24
|
+
USER node
|
|
25
|
+
EXPOSE 3000
|
|
26
|
+
CMD ["node", "dist/server.js"]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Python (pip)
|
|
30
|
+
|
|
31
|
+
```dockerfile
|
|
32
|
+
# syntax=docker/dockerfile:1
|
|
33
|
+
FROM python:3.12-slim AS build
|
|
34
|
+
WORKDIR /app
|
|
35
|
+
RUN python -m venv /opt/venv
|
|
36
|
+
ENV PATH=/opt/venv/bin:$PATH
|
|
37
|
+
COPY requirements.txt .
|
|
38
|
+
RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements.txt
|
|
39
|
+
|
|
40
|
+
FROM python:3.12-slim
|
|
41
|
+
ENV PATH=/opt/venv/bin:$PATH PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
|
|
42
|
+
RUN useradd --create-home --uid 10001 app
|
|
43
|
+
WORKDIR /app
|
|
44
|
+
COPY --from=build /opt/venv /opt/venv
|
|
45
|
+
COPY --chown=app:app . .
|
|
46
|
+
USER app
|
|
47
|
+
EXPOSE 8000
|
|
48
|
+
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "app.wsgi:application"]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Go (static binary)
|
|
52
|
+
|
|
53
|
+
```dockerfile
|
|
54
|
+
# syntax=docker/dockerfile:1
|
|
55
|
+
FROM golang:1.23 AS build
|
|
56
|
+
WORKDIR /src
|
|
57
|
+
COPY go.mod go.sum ./
|
|
58
|
+
RUN --mount=type=cache,target=/go/pkg/mod go mod download
|
|
59
|
+
COPY . .
|
|
60
|
+
RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build \
|
|
61
|
+
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/app ./cmd/app
|
|
62
|
+
|
|
63
|
+
FROM gcr.io/distroless/static-debian12:nonroot
|
|
64
|
+
COPY --from=build /out/app /app
|
|
65
|
+
USER nonroot:nonroot
|
|
66
|
+
EXPOSE 8080
|
|
67
|
+
ENTRYPOINT ["/app"]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Java (Maven, Spring Boot style fat jar)
|
|
71
|
+
|
|
72
|
+
```dockerfile
|
|
73
|
+
# syntax=docker/dockerfile:1
|
|
74
|
+
FROM eclipse-temurin:21-jdk AS build
|
|
75
|
+
WORKDIR /src
|
|
76
|
+
COPY pom.xml mvnw ./
|
|
77
|
+
COPY .mvn .mvn
|
|
78
|
+
RUN --mount=type=cache,target=/root/.m2 ./mvnw -q dependency:go-offline
|
|
79
|
+
COPY src src
|
|
80
|
+
RUN --mount=type=cache,target=/root/.m2 ./mvnw -q package -DskipTests
|
|
81
|
+
|
|
82
|
+
FROM eclipse-temurin:21-jre
|
|
83
|
+
RUN useradd --uid 10001 app
|
|
84
|
+
WORKDIR /app
|
|
85
|
+
COPY --from=build /src/target/*.jar app.jar
|
|
86
|
+
USER app
|
|
87
|
+
EXPOSE 8080
|
|
88
|
+
ENTRYPOINT ["java", "-jar", "/app/app.jar"]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Build-time secret example
|
|
92
|
+
|
|
93
|
+
```dockerfile
|
|
94
|
+
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc npm ci
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
docker build --secret id=npmrc,src=$HOME/.npmrc -t app:dev .
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Notes
|
|
102
|
+
|
|
103
|
+
- `# syntax=docker/dockerfile:1` opts into the current stable Dockerfile frontend, which `--mount` needs on older engines.
|
|
104
|
+
- Version tags above are examples. Use the versions the project already targets.
|
|
105
|
+
- A distroless or `scratch` image has no shell: `docker exec ... sh` won't work, and a `HEALTHCHECK` needs a binary you add yourself.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: document-processing
|
|
3
|
+
description: Pipelines for PDFs and scanned paperwork built on open tools - triage each file as born-digital, scanned or mixed, pull text and tables with pdfplumber or pdftotext, add a searchable text layer with OCRmyPDF and Tesseract language packs, split, merge, rotate, decrypt and repair with qpdf, read and fill AcroForm fields with pypdf or pdftk, redact so the underlying text and metadata are truly gone and prove it, and translate a document while keeping its layout. Use when someone has a folder of PDFs or scans to extract data from, needs a scanned contract made searchable, wants a PDF form filled from a spreadsheet, or must hand over a redacted document that has to survive copy-paste and text extraction.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Any Agent Skills host. Uses Python 3 with pdfplumber and pypdf, plus the qpdf, ocrmypdf, tesseract (with the needed language data), pdftotext/pdfinfo (poppler-utils) and optionally pdftk CLIs. Redaction examples use PyMuPDF, which is AGPL-licensed.
|
|
6
|
+
metadata:
|
|
7
|
+
kete-loom/version: "0.1.0"
|
|
8
|
+
kete-loom/category: data
|
|
9
|
+
kete-loom/risk: runs-commands
|
|
10
|
+
kete-loom/requires: "python3, qpdf, ocrmypdf, tesseract, pdftotext"
|
|
11
|
+
kete-loom/owner: "Kete-org"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Document processing
|
|
15
|
+
|
|
16
|
+
Treat every document as evidence: never change the original, keep each step's output, and check results against the page images, not just the extracted text. Command and code detail is in `references/extraction-and-ocr.md`, `references/forms-and-conversion.md` and `references/redaction.md`.
|
|
17
|
+
|
|
18
|
+
## 0. Before you start
|
|
19
|
+
|
|
20
|
+
1. Copy inputs to `work/in/` and treat them as read-only. Outputs go to `work/out/`.
|
|
21
|
+
2. Ask the user what the result is for (search, a spreadsheet, a filled form, a redacted copy for disclosure, a translation) and the languages in the documents.
|
|
22
|
+
3. **Sensitive content** (IDs, health, financial, legal): confirm the user may process it and that no cloud OCR, translation or AI service will be used without their approval. Default to local tools.
|
|
23
|
+
4. Do not open files from untrusted sources with tools that execute embedded content; work with command-line tools and libraries, not by opening JavaScript-enabled viewers.
|
|
24
|
+
|
|
25
|
+
## 1. Triage each file
|
|
26
|
+
|
|
27
|
+
Run `pdfinfo file.pdf` (pages, encryption, PDF version, tagged or not) and `pdffonts file.pdf`, then sample text with `pdftotext -f 1 -l 3 -layout file.pdf -`.
|
|
28
|
+
|
|
29
|
+
| Finding | Class | Next step |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| Text comes out readable, fonts listed | Born-digital | Extract directly (step 2) |
|
|
32
|
+
| No text, no fonts, pages are images | Scanned | OCR first (step 3) |
|
|
33
|
+
| Some pages have text, others not | Mixed | OCR with skip mode for pages that already have text |
|
|
34
|
+
| Text is garbled (wrong glyphs, `(cid:123)`) | Broken font encoding | OCR with force mode, or redo |
|
|
35
|
+
| `qpdf --check` reports damage | Damaged | Repair with `qpdf in.pdf repaired.pdf`, then re-triage |
|
|
36
|
+
| Encrypted | Protected | Decrypt with `qpdf --decrypt` only with the password and permission from the user |
|
|
37
|
+
|
|
38
|
+
## 2. Extract text and tables (born-digital)
|
|
39
|
+
|
|
40
|
+
1. Plain text in reading order: `pdftotext -layout` for column-preserving text, or pdfplumber `page.extract_text()` for per-page control.
|
|
41
|
+
2. Tables: pdfplumber `page.extract_tables()` with explicit `table_settings` (lines strategy for ruled tables, text strategy for whitespace tables). Crop to the table region with `page.crop(bbox)` when a page has more than one table.
|
|
42
|
+
3. Keep provenance on every row: file, page number and, for tables, the bounding box.
|
|
43
|
+
4. Validate: row counts per page, column totals against the printed totals, and a manual spot check of at least three rows against the page image. Report any mismatch rather than "fixing" numbers.
|
|
44
|
+
|
|
45
|
+
## 3. OCR scans
|
|
46
|
+
|
|
47
|
+
1. Run OCRmyPDF with the right languages (`-l eng+fra`; install the Tesseract language data first, check with `tesseract --list-langs`).
|
|
48
|
+
2. For phone photos or skewed scans add `--rotate-pages --deskew --clean`. These cannot be combined with redo mode.
|
|
49
|
+
3. For mixed files use skip mode (`--skip-text`, or `--mode skip` in OCRmyPDF 17+); for an existing bad text layer use `--redo-ocr` (`--mode redo`); `--force-ocr` (`--mode force`) rasterises everything and loses vector quality.
|
|
50
|
+
4. Write PDF/A for archiving (`--output-type pdfa`) and a `--sidecar out.txt` for the plain text.
|
|
51
|
+
5. Check quality: sample pages, compare OCR text with the image, and note low-confidence areas (handwriting, stamps, tables). OCR is never 100% accurate; say so in the report and keep the images as the source of truth.
|
|
52
|
+
|
|
53
|
+
## 4. Convert, split, merge, rotate
|
|
54
|
+
|
|
55
|
+
Use qpdf for structural work (no re-rendering, so quality is kept): `--pages` to select, split or merge, `--rotate`, `--linearize` for web viewing, `--split-pages` for one file per page. Office formats to PDF via `libreoffice --headless --convert-to pdf` if installed. Recipes in `references/forms-and-conversion.md`.
|
|
56
|
+
|
|
57
|
+
## 5. Fill forms
|
|
58
|
+
|
|
59
|
+
1. List the fields first (`pypdf` `reader.get_fields()` or `pdftk in.pdf dump_data_fields_utf8`) and map them to the user's data. **Show the user the mapping** before filling.
|
|
60
|
+
2. Fill with pypdf (`writer.update_page_form_field_values`) or pdftk (`fill_form data.fdf output out.pdf`), one output per record.
|
|
61
|
+
3. Checkboxes and radio buttons need their export value (often `/Yes` or `/On`), not `True`.
|
|
62
|
+
4. Flatten (`pdftk ... flatten`, or render) only when the user wants a non-editable copy; keep the unflattened version.
|
|
63
|
+
5. XFA forms (dynamic forms from Adobe LiveCycle) are not AcroForms; most open tools cannot fill them. Stop and tell the user.
|
|
64
|
+
6. Open each output and check a few fields by eye.
|
|
65
|
+
|
|
66
|
+
## 6. Redact (must be real)
|
|
67
|
+
|
|
68
|
+
Drawing a black box over text does **not** redact it: the text stays in the content stream and is copied, searched and extracted. Follow `references/redaction.md` exactly:
|
|
69
|
+
|
|
70
|
+
1. Find every occurrence (search the text layer and the OCR layer; patterns for IDs, emails, phone numbers; ask the user for names and terms).
|
|
71
|
+
2. Apply true redaction that removes the text, vector graphics and image pixels under each area (PyMuPDF `add_redact_annot` then `apply_redactions`), or rasterise the pages and re-OCR the result.
|
|
72
|
+
3. Remove metadata, XMP, attachments, annotations, form field values, bookmarks and earlier revisions (incremental updates) by rewriting the file.
|
|
73
|
+
4. **Verify**: extract all text from the output and search for every redacted term; inspect metadata; check that the file has no incremental updates left. Any hit means the redaction failed.
|
|
74
|
+
5. A person must review redactions before disclosure. Legal, court or regulatory redaction rules (what must be withheld, how it is marked) are outside this skill; the user's legal team decides.
|
|
75
|
+
|
|
76
|
+
## 7. Translate with layout
|
|
77
|
+
|
|
78
|
+
1. Extract text per block with its position, font size and page (pdfplumber words or PyMuPDF blocks).
|
|
79
|
+
2. Translate block by block, with the tool or service the user approves; keep numbers, names, codes and dates unchanged and give the translator a glossary.
|
|
80
|
+
3. Rebuild: either an overlay PDF that writes translated text into each block's box (shrink font to fit, flag blocks that overflow) or a bilingual table (source, translation, page) when layout matters less than accuracy.
|
|
81
|
+
4. Fonts must cover the target script (for example Noto fonts for Bengali, Arabic, CJK); check that no characters render as boxes. Complex scripts need a shaping-capable text engine.
|
|
82
|
+
5. Machine translation of legal, medical or official documents needs review by a qualified translator before use; certified translations are out of scope.
|
|
83
|
+
|
|
84
|
+
## Never
|
|
85
|
+
|
|
86
|
+
- Never modify or delete the original files.
|
|
87
|
+
- Never present OCR or extracted numbers as exact without a spot check.
|
|
88
|
+
- Never send documents to an online service without the user's explicit approval.
|
|
89
|
+
- Never call a document redacted until the verification step passes.
|
|
90
|
+
|
|
91
|
+
## Report back
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
Files: n (born-digital / scanned / mixed / damaged)
|
|
95
|
+
Outputs: <paths> Tools and versions: ...
|
|
96
|
+
Extraction: rows or pages extracted, spot checks done, mismatches
|
|
97
|
+
OCR: languages, pages OCRed, known weak areas
|
|
98
|
+
Redaction: terms and patterns, hits after verification (must be 0), metadata cleared
|
|
99
|
+
Needs a human: legal review of redactions, translation review, unreadable pages
|
|
100
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"should_trigger": [
|
|
3
|
+
"Pull the transaction tables out of these 200 bank statement PDFs into one CSV",
|
|
4
|
+
"Make this folder of scanned contracts searchable with OCR, some are in French",
|
|
5
|
+
"Fill this PDF application form for each of the 50 rows in our spreadsheet",
|
|
6
|
+
"Redact every name and account number from this PDF and prove the text can't be copied back out",
|
|
7
|
+
"Translate this German PDF brochure into English but keep the layout of each page",
|
|
8
|
+
"The text I extract from this PDF comes out as (cid:34) gibberish, how do I get real text"
|
|
9
|
+
],
|
|
10
|
+
"should_not_trigger": [
|
|
11
|
+
"Create a Word document report with a table of contents and page numbers",
|
|
12
|
+
"Translate the app's UI strings into French and German with message catalogs",
|
|
13
|
+
"Write the user guide for our CLI tool",
|
|
14
|
+
"Build a RAG pipeline that chunks and embeds our product manuals",
|
|
15
|
+
"Normalise the Bengali text in our search index so the same word always matches"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Extraction and OCR
|
|
2
|
+
|
|
3
|
+
## Triage commands
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pdfinfo in.pdf # pages, encryption, producer, PDF version
|
|
7
|
+
pdffonts in.pdf # no fonts => likely scanned
|
|
8
|
+
pdftotext -f 1 -l 3 -layout in.pdf - | head -50
|
|
9
|
+
qpdf --check in.pdf # structural problems
|
|
10
|
+
pdfimages -list in.pdf | head # image resolution per page (OCR needs ~300 dpi)
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Text with pdfplumber
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
import pdfplumber, json
|
|
17
|
+
rows = []
|
|
18
|
+
with pdfplumber.open("work/in/report.pdf") as pdf:
|
|
19
|
+
for i, page in enumerate(pdf.pages, start=1):
|
|
20
|
+
text = page.extract_text(layout=False) or ""
|
|
21
|
+
rows.append({"page": i, "text": text})
|
|
22
|
+
json.dump(rows, open("work/out/report.text.json", "w"), ensure_ascii=False, indent=1)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Words with positions (for layout-aware work): `page.extract_words(keep_blank_chars=False, use_text_flow=True)` returns `x0, top, x1, bottom, text`.
|
|
26
|
+
|
|
27
|
+
## Tables with pdfplumber
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
ruled = {"vertical_strategy": "lines", "horizontal_strategy": "lines"}
|
|
31
|
+
whitespace = {"vertical_strategy": "text", "horizontal_strategy": "text", "snap_tolerance": 3}
|
|
32
|
+
|
|
33
|
+
with pdfplumber.open("work/in/statement.pdf") as pdf:
|
|
34
|
+
page = pdf.pages[0]
|
|
35
|
+
region = page.crop((0, 120, page.width, 700)) # x0, top, x1, bottom in PDF points
|
|
36
|
+
for table in region.extract_tables(ruled):
|
|
37
|
+
for row in table:
|
|
38
|
+
print(row)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Debug a table: `page.to_image(resolution=150).debug_tablefinder(ruled).save("debug.png")` and look at the detected lines.
|
|
42
|
+
|
|
43
|
+
Tips:
|
|
44
|
+
- Header rows that repeat on every page: drop them after the first page by matching the header.
|
|
45
|
+
- Cells that wrap onto two lines become `"line1\nline2"`; join them, do not split into rows.
|
|
46
|
+
- Numbers: strip thousands separators according to the document's locale (1.234,56 vs 1,234.56); keep the original string next to the parsed value.
|
|
47
|
+
|
|
48
|
+
## OCRmyPDF
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
tesseract --list-langs # confirm language data is installed
|
|
52
|
+
ocrmypdf -l eng --rotate-pages --deskew --clean --output-type pdfa --sidecar out.txt in.pdf out.pdf
|
|
53
|
+
ocrmypdf -l eng+deu --skip-text in.pdf out.pdf # mixed: only OCR pages without text
|
|
54
|
+
ocrmypdf -l eng --redo-ocr in.pdf out.pdf # replace a bad hidden text layer
|
|
55
|
+
ocrmypdf -l ben --force-ocr in.pdf out.pdf # rasterise and OCR everything
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- OCRmyPDF 17 added `--mode skip|redo|force`; the legacy flags still work.
|
|
59
|
+
- `--clean` needs the `unpaper` program installed; it only cleans the image Tesseract sees, not the output page (that is `--clean-final`).
|
|
60
|
+
- `--redo-ocr` cannot be combined with `--deskew`, `--rotate-pages` or `--clean`.
|
|
61
|
+
- Tesseract language codes are ISO 639-2 style (`eng`, `fra`, `deu`, `ben`, `hin`, `ara`, `chi_sim`, `jpn`). Choose `script/` models (for example `script/Devanagari`) when the language is unknown but the script is.
|
|
62
|
+
- Very low-resolution scans: upscale is no substitute for a rescan at 300 dpi; tell the user.
|
|
63
|
+
|
|
64
|
+
## Plain Tesseract on images
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
tesseract page.png out -l eng --psm 6 # writes out.txt; --psm 6 = single uniform block
|
|
68
|
+
tesseract page.png out -l eng tsv # word-level confidence in out.tsv
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Use the `conf` column of the TSV to flag words under about 60 for human checking.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Forms and structural conversion
|
|
2
|
+
|
|
3
|
+
## qpdf
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
qpdf in.pdf repaired.pdf # rewrite, fixes many damaged files
|
|
7
|
+
qpdf --decrypt --password-file=pw.txt locked.pdf open.pdf # only with the owner's permission; a file keeps the password out of shell history
|
|
8
|
+
qpdf --empty --pages a.pdf b.pdf 1-3 -- merged.pdf # all of a, pages 1-3 of b
|
|
9
|
+
qpdf in.pdf --pages . 5-10 -- part.pdf # extract pages
|
|
10
|
+
qpdf --split-pages in.pdf page-%d.pdf # one file per page
|
|
11
|
+
qpdf in.pdf rotated.pdf --rotate=+90:2,4 # rotate pages 2 and 4 by 90 degrees clockwise
|
|
12
|
+
qpdf --linearize in.pdf web.pdf # fast web view
|
|
13
|
+
qpdf --qdf --object-streams=disable in.pdf inspect.pdf # human-readable objects for debugging
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Office documents to PDF (if LibreOffice is installed):
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
libreoffice --headless --convert-to pdf --outdir work/out work/in/*.docx
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## List form fields
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pdftk form.pdf dump_data_fields_utf8
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from pypdf import PdfReader
|
|
30
|
+
reader = PdfReader("form.pdf")
|
|
31
|
+
for name, f in (reader.get_fields() or {}).items():
|
|
32
|
+
print(name, f.get("/FT"), f.get("/V"), f.get("/_States_", "")) # /_States_ lists checkbox values
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If `get_fields()` is empty but the PDF looks like a form, it is either flat (no fields) or XFA. Check with `acro = reader.trailer["/Root"].get("/AcroForm")` then `acro is not None and "/XFA" in acro.get_object()`. Report which.
|
|
36
|
+
|
|
37
|
+
## Fill with pypdf
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from pypdf import PdfReader, PdfWriter
|
|
41
|
+
reader = PdfReader("form.pdf")
|
|
42
|
+
writer = PdfWriter(clone_from=reader)
|
|
43
|
+
values = {"FullName": "Ama Mensah", "Date": "2026-03-02", "Agree": "/Yes"}
|
|
44
|
+
for page in writer.pages:
|
|
45
|
+
writer.update_page_form_field_values(page, values, auto_regenerate=False)
|
|
46
|
+
writer.set_need_appearances_writer(True) # ask viewers to regenerate appearances
|
|
47
|
+
with open("filled.pdf", "wb") as fh:
|
|
48
|
+
writer.write(fh)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Check the pypdf version's docs: the signature of `update_page_form_field_values` has gained options (such as `flatten`) over releases.
|
|
52
|
+
|
|
53
|
+
## Fill with pdftk
|
|
54
|
+
|
|
55
|
+
Write an FDF or XFDF with the values, then:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pdftk form.pdf fill_form data.xfdf output filled.pdf # keeps fields editable
|
|
59
|
+
pdftk form.pdf fill_form data.xfdf output filled_flat.pdf flatten
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Use `need_appearances` if the viewer shows empty fields after filling.
|
|
63
|
+
|
|
64
|
+
## Batch filling from a CSV
|
|
65
|
+
|
|
66
|
+
1. Read the CSV with the csv module (UTF-8, keep leading zeros as strings).
|
|
67
|
+
2. Map CSV columns to field names with an explicit dict the user approved.
|
|
68
|
+
3. One output per row named from a key column, sanitised to a safe filename.
|
|
69
|
+
4. Log each row: output path, fields filled, fields missing.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Redaction that holds up
|
|
2
|
+
|
|
3
|
+
A redaction has failed if any redacted value can be recovered by selecting, copying, searching, extracting text, reading metadata, opening an earlier revision or lifting an overlay. Check every one.
|
|
4
|
+
|
|
5
|
+
## 1. Find targets
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
import fitz, re # PyMuPDF (AGPL; confirm the licence suits the user)
|
|
9
|
+
patterns = [r"\b\d{3}-\d{2}-\d{4}\b", r"[\w.+-]+@[\w-]+\.[\w.]+"]
|
|
10
|
+
terms = ["Ama Mensah", "Account 0012345678"] # from the user
|
|
11
|
+
doc = fitz.open("work/in/case.pdf")
|
|
12
|
+
hits = []
|
|
13
|
+
for page in doc:
|
|
14
|
+
text = page.get_text()
|
|
15
|
+
found = set(terms) | {m.group(0) for p in patterns for m in re.finditer(p, text)}
|
|
16
|
+
for t in found:
|
|
17
|
+
for rect in page.search_for(t):
|
|
18
|
+
hits.append((page.number + 1, t, rect))
|
|
19
|
+
print(len(hits), "hits")
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Scanned pages have no text to search: OCR them first, then search the OCR layer, and redact the image region as well as the hidden text.
|
|
23
|
+
|
|
24
|
+
Show the user the hit list (page, term, count) before applying.
|
|
25
|
+
|
|
26
|
+
## 2. Apply
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
for page_no, _term, rect in hits: # the approved hit list from step 1
|
|
30
|
+
doc[page_no - 1].add_redact_annot(rect, fill=(0, 0, 0))
|
|
31
|
+
for page in doc:
|
|
32
|
+
page.apply_redactions(images=fitz.PDF_REDACT_IMAGE_PIXELS) # removes text and the image pixels under each box; be explicit, defaults changed across versions
|
|
33
|
+
doc.set_metadata({})
|
|
34
|
+
doc.del_xml_metadata()
|
|
35
|
+
for name in doc.embfile_names():
|
|
36
|
+
doc.embfile_del(name)
|
|
37
|
+
doc.save("work/out/case.redacted.pdf", garbage=4, deflate=True, clean=True) # full rewrite, no incremental update
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Also remove, where present: form field values, annotations and comments, bookmarks that quote redacted text, and document-level JavaScript.
|
|
41
|
+
|
|
42
|
+
Stronger alternative when the layout does not need to stay searchable: rasterise each page to an image at 200 to 300 dpi after drawing the boxes, build a new PDF from the images, then OCR it if search is needed. This leaves no original text objects at all.
|
|
43
|
+
|
|
44
|
+
## 3. Verify (all must pass)
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pdftotext work/out/case.redacted.pdf - | grep -i -E "Ama Mensah|0012345678|[0-9]{3}-[0-9]{2}-[0-9]{4}" && echo "FAIL: text still present"
|
|
48
|
+
pdfinfo work/out/case.redacted.pdf # author, title, subject, keywords cleared
|
|
49
|
+
exiftool work/out/case.redacted.pdf # if installed: XMP and other metadata
|
|
50
|
+
grep -c "%%EOF" work/out/case.redacted.pdf # more than 1 suggests incremental updates remain (a linearized file also has 2)
|
|
51
|
+
qpdf --check work/out/case.redacted.pdf
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
pdftotext does not read annotation or form-field text: also list fields with pypdf `get_fields()` and annotations with PyMuPDF `page.annots()` and confirm none hold a redacted value.
|
|
55
|
+
|
|
56
|
+
Then open the output, select all text on a redacted page, and paste it into a text file; search again. Check a few redacted areas zoomed in for half-covered characters.
|
|
57
|
+
|
|
58
|
+
## 4. Hand-off
|
|
59
|
+
|
|
60
|
+
- Report: terms and patterns used, hits found, hits after verification (must be zero), what metadata was removed.
|
|
61
|
+
- A person must review every redacted page before release. What must legally be withheld, and how redactions must be labelled (for example exemption codes), is decided by the user's legal or records team, not by this process.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: e2e-testing-playwright
|
|
3
|
+
description: Writes and maintains Playwright Test end-to-end suites for web apps, using role-based locators, web-first assertions that auto-wait, saved storageState for login, page.route network mocks, isolated per-test data, traces for flaky runs and a sharded CI job. Use when adding or fixing browser end-to-end tests with Playwright, setting up playwright.config, or making an existing Playwright suite reliable in CI.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Any Agent Skills host. Needs Node 18+ and the project's package manager; browsers install with npx playwright install.
|
|
6
|
+
metadata:
|
|
7
|
+
kete-loom/version: "0.1.0"
|
|
8
|
+
kete-loom/category: testing
|
|
9
|
+
kete-loom/risk: runs-commands
|
|
10
|
+
kete-loom/requires: "node, npx"
|
|
11
|
+
kete-loom/owner: "Kete-org"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# End-to-end testing with Playwright
|
|
15
|
+
|
|
16
|
+
An end-to-end test drives the real app through a real browser, the way a user would. It is slow and costly to maintain, so write few of them, for the journeys that make money or lose data, and make each one deterministic.
|
|
17
|
+
|
|
18
|
+
## 0. Before you start
|
|
19
|
+
|
|
20
|
+
1. Look for an existing setup: `playwright.config.ts`, an `e2e/` or `tests/` folder, `@playwright/test` in `package.json`. Follow its conventions (folder, fixtures, naming, base URL) instead of creating a parallel setup.
|
|
21
|
+
2. If there is none, run `npm init playwright@latest` (or the project's package manager equivalent) and accept TypeScript. Then read `references/config-and-ci.md` for a config to start from.
|
|
22
|
+
3. Find out how the app starts locally and what test data it needs. If the app needs a database or third-party sandbox you cannot reach, **stop and ask the user** how they want it provided.
|
|
23
|
+
4. Run the existing suite once (`npx playwright test`) and record the result before changing anything.
|
|
24
|
+
|
|
25
|
+
## 1. Choose what to cover
|
|
26
|
+
|
|
27
|
+
- List the critical journeys: sign up, log in, the core create/edit flow, checkout or payment, anything with irreversible effects.
|
|
28
|
+
- One test per journey outcome. Cover the happy path plus the one or two failure paths a user really hits (invalid card, expired session).
|
|
29
|
+
- Push everything else down: validation rules, formatting and edge cases belong in unit or component tests.
|
|
30
|
+
|
|
31
|
+
## 2. Locators: how a user finds things
|
|
32
|
+
|
|
33
|
+
Use, in order of preference:
|
|
34
|
+
|
|
35
|
+
1. `page.getByRole('button', { name: 'Save' })`: role plus accessible name.
|
|
36
|
+
2. `page.getByLabel('Email')`, `getByPlaceholder`, `getByText`, `getByAltText`, `getByTitle`.
|
|
37
|
+
3. `page.getByTestId('cart-total')`: only when there is no user-facing handle. The attribute defaults to `data-testid` (change it with `use.testIdAttribute`).
|
|
38
|
+
|
|
39
|
+
Never use CSS chains tied to layout (`div > div:nth-child(3)`), generated class names, or XPath. Narrow with `locator.filter({ hasText })` or by chaining from a parent region (`page.getByRole('dialog').getByRole('button', { name: 'Confirm' })`). If a role locator can't find an element, the element is probably inaccessible: report that, don't paper over it with a test id.
|
|
40
|
+
|
|
41
|
+
## 3. Waiting: never sleep
|
|
42
|
+
|
|
43
|
+
- Actions (`click`, `fill`, `check`) wait for the element to be visible, stable, enabled and able to receive events.
|
|
44
|
+
- Assert with web-first assertions that retry until timeout: `await expect(locator).toBeVisible()`, `toHaveText`, `toHaveValue`, `toHaveURL`, `toHaveCount`.
|
|
45
|
+
- Never write `page.waitForTimeout(...)` or a fixed sleep. Never `expect(await locator.textContent()).toBe(...)`: that reads once and does not retry.
|
|
46
|
+
- For a non-DOM condition, use `await expect.poll(() => fetchStatus()).toBe('done')`.
|
|
47
|
+
- To wait for a specific request, start `page.waitForResponse(...)` before the action that triggers it.
|
|
48
|
+
|
|
49
|
+
## 4. Isolation and data
|
|
50
|
+
|
|
51
|
+
- Each test gets a fresh browser context: no shared cookies or storage. Keep it that way; never make test B depend on test A.
|
|
52
|
+
- Create the data a test needs in the test (through the app's API with the `request` fixture, or a seed helper), with unique values (`order-${test.info().testId}` or a random suffix), so tests can run in parallel and on retry.
|
|
53
|
+
- Clean up in fixture teardown, or use a disposable database per run. Never point tests at production.
|
|
54
|
+
- Put shared setup in custom fixtures with `test.extend`, not in `beforeAll` blocks that leak state.
|
|
55
|
+
|
|
56
|
+
## 5. Authentication
|
|
57
|
+
|
|
58
|
+
Log in once and reuse the state. Use a setup project that logs in through the UI, waits for proof of login, and saves `page.context().storageState({ path: 'playwright/.auth/user.json' })`; testing projects set `dependencies: ['setup']` and `use: { storageState: 'playwright/.auth/user.json' }`. Add `playwright/.auth` to `.gitignore`: it holds live cookies. For several roles, save one file per role. Tests of the login form itself start with an empty state: `test.use({ storageState: { cookies: [], origins: [] } })`.
|
|
59
|
+
|
|
60
|
+
## 6. Network mocking
|
|
61
|
+
|
|
62
|
+
Mock only what you don't own or can't control (payment provider, maps, flaky third parties, rare error responses):
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
await page.route('**/api/rates', route =>
|
|
66
|
+
route.fulfill({ status: 503, json: { error: 'unavailable' } }));
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- Use `route.fulfill` for canned responses, `route.abort()` to simulate network failure, `route.continue()` to modify a request in flight.
|
|
70
|
+
- Keep at least one unmocked journey against your own backend, or the suite proves nothing about integration.
|
|
71
|
+
- For larger fixtures, record a HAR with `page.routeFromHAR(path, { update: true })` once and replay it.
|
|
72
|
+
|
|
73
|
+
## 7. Flaky tests
|
|
74
|
+
|
|
75
|
+
1. Reproduce: `npx playwright test path/to/spec.ts --repeat-each=20 --workers=4`.
|
|
76
|
+
2. Read the trace: config `trace: 'on-first-retry'` (or `--trace on`), then `npx playwright show-trace <trace.zip>`. Check the action log, DOM snapshots, network and console at the failing step.
|
|
77
|
+
3. Fix the cause: a missing web-first assertion, shared data, an animation, a race with a request, an un-awaited promise. Retries hide flakiness; they don't fix it.
|
|
78
|
+
4. In CI, `--fail-on-flaky-tests` turns "passed on retry" into a failure when the team wants zero tolerance.
|
|
79
|
+
|
|
80
|
+
## 8. CI
|
|
81
|
+
|
|
82
|
+
Run with retries 2 and 1 worker per shard on CI, upload the HTML report and traces as artifacts, and shard with `--shard=1/4` for large suites. A ready workflow and config are in `references/config-and-ci.md`.
|
|
83
|
+
|
|
84
|
+
## Rules
|
|
85
|
+
|
|
86
|
+
- Never commit `test.only` (set `forbidOnly: !!process.env.CI`).
|
|
87
|
+
- Never add a sleep, a raw `setTimeout`, or a huge timeout to make a test pass.
|
|
88
|
+
- Never weaken or delete an assertion to get green; find out why it failed.
|
|
89
|
+
- Never put real credentials in test files; read them from environment variables.
|
|
90
|
+
- Visual snapshots (`toHaveScreenshot`) only for stable, important screens, generated on the same OS and browser as CI.
|
|
91
|
+
|
|
92
|
+
## Report back
|
|
93
|
+
|
|
94
|
+
End with: tests added or changed (file and title), the exact command run, pass/fail/flaky counts, and anything not covered (for example "payment provider mocked, real sandbox not exercised").
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"should_trigger": [
|
|
3
|
+
"Write a Playwright test for the signup and onboarding flow",
|
|
4
|
+
"Our Playwright tests keep logging in through the UI before every test, make them reuse the session",
|
|
5
|
+
"Set up Playwright in this Next.js repo and add an e2e test for checkout, with a GitHub Actions job",
|
|
6
|
+
"Mock the exchange-rate API in my Playwright spec so I can test the error banner",
|
|
7
|
+
"Replace the waitForTimeout calls in our playwright specs with proper assertions"
|
|
8
|
+
],
|
|
9
|
+
"should_not_trigger": [
|
|
10
|
+
"Click through the staging site and tell me what's broken before the demo",
|
|
11
|
+
"The nightly end-to-end run failed again, figure out whether it's the app or the tests and stabilise it",
|
|
12
|
+
"Look at the tests in this pull request and tell me which cases are missing",
|
|
13
|
+
"Write unit tests for the price formatting helper with Vitest",
|
|
14
|
+
"Our coverage is 41%, help me add tests where it actually matters"
|
|
15
|
+
]
|
|
16
|
+
}
|