@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.
Files changed (656) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +516 -2
  3. package/agents/accessibility-reviewer/AGENT.md +70 -0
  4. package/agents/accessibility-reviewer/evals/triggers.json +15 -0
  5. package/agents/agent-evaluator/AGENT.md +74 -0
  6. package/agents/agent-evaluator/evals/triggers.json +15 -0
  7. package/agents/architect/AGENT.md +82 -0
  8. package/agents/architect/evals/triggers.json +17 -0
  9. package/agents/billing-reviewer/AGENT.md +68 -0
  10. package/agents/billing-reviewer/evals/triggers.json +16 -0
  11. package/agents/code-reviewer/AGENT.md +51 -0
  12. package/agents/code-reviewer/evals/triggers.json +14 -0
  13. package/agents/code-simplifier/AGENT.md +74 -0
  14. package/agents/code-simplifier/evals/triggers.json +15 -0
  15. package/agents/cpp-build-resolver/AGENT.md +73 -0
  16. package/agents/cpp-build-resolver/evals/triggers.json +16 -0
  17. package/agents/cpp-reviewer/AGENT.md +59 -0
  18. package/agents/cpp-reviewer/evals/triggers.json +16 -0
  19. package/agents/csharp-build-resolver/AGENT.md +84 -0
  20. package/agents/csharp-build-resolver/evals/triggers.json +17 -0
  21. package/agents/csharp-reviewer/AGENT.md +88 -0
  22. package/agents/csharp-reviewer/evals/triggers.json +17 -0
  23. package/agents/dart-build-resolver/AGENT.md +80 -0
  24. package/agents/dart-build-resolver/evals/triggers.json +17 -0
  25. package/agents/dart-reviewer/AGENT.md +66 -0
  26. package/agents/dart-reviewer/evals/triggers.json +17 -0
  27. package/agents/database-reviewer/AGENT.md +72 -0
  28. package/agents/database-reviewer/evals/triggers.json +16 -0
  29. package/agents/django-reviewer/AGENT.md +61 -0
  30. package/agents/django-reviewer/evals/triggers.json +15 -0
  31. package/agents/doc-updater/AGENT.md +92 -0
  32. package/agents/doc-updater/evals/triggers.json +14 -0
  33. package/agents/e2e-runner/AGENT.md +88 -0
  34. package/agents/e2e-runner/evals/triggers.json +16 -0
  35. package/agents/fastapi-reviewer/AGENT.md +63 -0
  36. package/agents/fastapi-reviewer/evals/triggers.json +15 -0
  37. package/agents/flutter-reviewer/AGENT.md +70 -0
  38. package/agents/flutter-reviewer/evals/triggers.json +15 -0
  39. package/agents/fsharp-build-resolver/AGENT.md +81 -0
  40. package/agents/fsharp-build-resolver/evals/triggers.json +15 -0
  41. package/agents/fsharp-reviewer/AGENT.md +77 -0
  42. package/agents/fsharp-reviewer/evals/triggers.json +15 -0
  43. package/agents/go-build-resolver/AGENT.md +85 -0
  44. package/agents/go-build-resolver/evals/triggers.json +16 -0
  45. package/agents/go-reviewer/AGENT.md +66 -0
  46. package/agents/go-reviewer/evals/triggers.json +16 -0
  47. package/agents/healthcare-reviewer/AGENT.md +65 -0
  48. package/agents/healthcare-reviewer/evals/triggers.json +16 -0
  49. package/agents/i18n-reviewer/AGENT.md +64 -0
  50. package/agents/i18n-reviewer/evals/triggers.json +16 -0
  51. package/agents/infra-reviewer/AGENT.md +93 -0
  52. package/agents/infra-reviewer/evals/triggers.json +15 -0
  53. package/agents/java-build-resolver/AGENT.md +82 -0
  54. package/agents/java-build-resolver/evals/triggers.json +16 -0
  55. package/agents/java-reviewer/AGENT.md +64 -0
  56. package/agents/java-reviewer/evals/triggers.json +16 -0
  57. package/agents/kotlin-build-resolver/AGENT.md +89 -0
  58. package/agents/kotlin-build-resolver/evals/triggers.json +16 -0
  59. package/agents/kotlin-reviewer/AGENT.md +75 -0
  60. package/agents/kotlin-reviewer/evals/triggers.json +16 -0
  61. package/agents/mle-reviewer/AGENT.md +68 -0
  62. package/agents/mle-reviewer/evals/triggers.json +16 -0
  63. package/agents/network-config-reviewer/AGENT.md +68 -0
  64. package/agents/network-config-reviewer/evals/triggers.json +17 -0
  65. package/agents/payments-reviewer/AGENT.md +64 -0
  66. package/agents/payments-reviewer/evals/triggers.json +16 -0
  67. package/agents/performance-optimizer/AGENT.md +86 -0
  68. package/agents/performance-optimizer/evals/triggers.json +16 -0
  69. package/agents/perl-build-resolver/AGENT.md +84 -0
  70. package/agents/perl-build-resolver/evals/triggers.json +15 -0
  71. package/agents/perl-reviewer/AGENT.md +77 -0
  72. package/agents/perl-reviewer/evals/triggers.json +15 -0
  73. package/agents/php-build-resolver/AGENT.md +88 -0
  74. package/agents/php-build-resolver/evals/triggers.json +16 -0
  75. package/agents/php-reviewer/AGENT.md +61 -0
  76. package/agents/php-reviewer/evals/triggers.json +15 -0
  77. package/agents/planner/AGENT.md +75 -0
  78. package/agents/planner/evals/triggers.json +17 -0
  79. package/agents/pr-test-analyzer/AGENT.md +82 -0
  80. package/agents/pr-test-analyzer/evals/triggers.json +16 -0
  81. package/agents/python-build-resolver/AGENT.md +87 -0
  82. package/agents/python-build-resolver/evals/triggers.json +16 -0
  83. package/agents/python-reviewer/AGENT.md +63 -0
  84. package/agents/python-reviewer/evals/triggers.json +15 -0
  85. package/agents/rag-reviewer/AGENT.md +71 -0
  86. package/agents/rag-reviewer/evals/triggers.json +16 -0
  87. package/agents/react-reviewer/AGENT.md +70 -0
  88. package/agents/react-reviewer/evals/triggers.json +16 -0
  89. package/agents/refactor-cleaner/AGENT.md +82 -0
  90. package/agents/refactor-cleaner/evals/triggers.json +16 -0
  91. package/agents/ruby-build-resolver/AGENT.md +93 -0
  92. package/agents/ruby-build-resolver/evals/triggers.json +16 -0
  93. package/agents/ruby-reviewer/AGENT.md +62 -0
  94. package/agents/ruby-reviewer/evals/triggers.json +16 -0
  95. package/agents/rust-build-resolver/AGENT.md +98 -0
  96. package/agents/rust-build-resolver/evals/triggers.json +16 -0
  97. package/agents/rust-reviewer/AGENT.md +78 -0
  98. package/agents/rust-reviewer/evals/triggers.json +15 -0
  99. package/agents/security-reviewer/AGENT.md +84 -0
  100. package/agents/security-reviewer/evals/triggers.json +16 -0
  101. package/agents/silent-failure-hunter/AGENT.md +66 -0
  102. package/agents/silent-failure-hunter/evals/triggers.json +16 -0
  103. package/agents/solidity-reviewer/AGENT.md +70 -0
  104. package/agents/solidity-reviewer/evals/triggers.json +16 -0
  105. package/agents/swift-build-resolver/AGENT.md +85 -0
  106. package/agents/swift-build-resolver/evals/triggers.json +15 -0
  107. package/agents/swift-reviewer/AGENT.md +75 -0
  108. package/agents/swift-reviewer/evals/triggers.json +15 -0
  109. package/agents/typescript-build-resolver/AGENT.md +76 -0
  110. package/agents/typescript-build-resolver/evals/triggers.json +15 -0
  111. package/agents/typescript-reviewer/AGENT.md +76 -0
  112. package/agents/typescript-reviewer/evals/triggers.json +15 -0
  113. package/agents/vue-reviewer/AGENT.md +75 -0
  114. package/agents/vue-reviewer/evals/triggers.json +15 -0
  115. package/bin/kete-loom.js +683 -0
  116. package/commands/aside.md +19 -0
  117. package/commands/build-fix.md +26 -0
  118. package/commands/campaign.md +19 -0
  119. package/commands/changelog.md +36 -0
  120. package/commands/checkpoint.md +26 -0
  121. package/commands/codemap.md +25 -0
  122. package/commands/commit.md +26 -0
  123. package/commands/deps-audit.md +32 -0
  124. package/commands/epic-decompose.md +21 -0
  125. package/commands/explain.md +37 -0
  126. package/commands/feature-dev.md +22 -0
  127. package/commands/hookify.md +23 -0
  128. package/commands/i18n-check.md +39 -0
  129. package/commands/issue-sync.md +22 -0
  130. package/commands/jira.md +19 -0
  131. package/commands/learn.md +23 -0
  132. package/commands/loom.md +21 -0
  133. package/commands/loop.md +20 -0
  134. package/commands/model-route.md +27 -0
  135. package/commands/onboard.md +35 -0
  136. package/commands/orchestrate.md +21 -0
  137. package/commands/plan-feature.md +36 -0
  138. package/commands/postmortem.md +42 -0
  139. package/commands/pr-describe.md +39 -0
  140. package/commands/pr.md +22 -0
  141. package/commands/prd.md +41 -0
  142. package/commands/project-init.md +21 -0
  143. package/commands/refactor-clean.md +24 -0
  144. package/commands/resume-session.md +22 -0
  145. package/commands/review.md +35 -0
  146. package/commands/save-session.md +37 -0
  147. package/commands/security-scan.md +32 -0
  148. package/commands/sessions.md +21 -0
  149. package/commands/skill-create.md +21 -0
  150. package/commands/tdd.md +36 -0
  151. package/commands/test-coverage.md +24 -0
  152. package/commands/threat-model.md +36 -0
  153. package/commands/update-docs.md +25 -0
  154. package/commands/verify.md +21 -0
  155. package/hooks/block-dangerous-commands/HOOK.md +30 -0
  156. package/hooks/block-dangerous-commands/cases.json +50 -0
  157. package/hooks/block-dangerous-commands/hook.js +75 -0
  158. package/hooks/block-no-verify/HOOK.md +25 -0
  159. package/hooks/block-no-verify/cases.json +30 -0
  160. package/hooks/block-no-verify/hook.js +43 -0
  161. package/hooks/format-on-edit/HOOK.md +24 -0
  162. package/hooks/format-on-edit/hook.js +89 -0
  163. package/hooks/guard-secrets/HOOK.md +19 -0
  164. package/hooks/guard-secrets/cases.json +110 -0
  165. package/hooks/guard-secrets/hook.js +44 -0
  166. package/hooks/load-session-context/HOOK.md +20 -0
  167. package/hooks/load-session-context/hook.js +56 -0
  168. package/hooks/protect-files/HOOK.md +24 -0
  169. package/hooks/protect-files/cases.json +27 -0
  170. package/hooks/protect-files/hook.js +39 -0
  171. package/hooks/run.js +132 -0
  172. package/mcp/atlassian.json +11 -0
  173. package/mcp/chrome-devtools.json +18 -0
  174. package/mcp/cloudflare.json +11 -0
  175. package/mcp/context7.json +11 -0
  176. package/mcp/fetch.json +17 -0
  177. package/mcp/figma.json +11 -0
  178. package/mcp/git.json +17 -0
  179. package/mcp/github.json +11 -0
  180. package/mcp/linear.json +11 -0
  181. package/mcp/memory.json +18 -0
  182. package/mcp/notion.json +11 -0
  183. package/mcp/playwright.json +18 -0
  184. package/mcp/sentry.json +11 -0
  185. package/mcp/stripe.json +11 -0
  186. package/mcp/supabase.json +11 -0
  187. package/mcp/time.json +17 -0
  188. package/package.json +59 -4
  189. package/profiles.json +165 -0
  190. package/rules/common.md +21 -0
  191. package/rules/cpp.md +29 -0
  192. package/rules/csharp.md +25 -0
  193. package/rules/dart.md +29 -0
  194. package/rules/fsharp.md +28 -0
  195. package/rules/git.md +26 -0
  196. package/rules/go.md +29 -0
  197. package/rules/java.md +29 -0
  198. package/rules/kotlin.md +27 -0
  199. package/rules/perl.md +26 -0
  200. package/rules/php.md +28 -0
  201. package/rules/python.md +30 -0
  202. package/rules/ruby.md +27 -0
  203. package/rules/rust.md +26 -0
  204. package/rules/security.md +29 -0
  205. package/rules/swift.md +28 -0
  206. package/rules/testing.md +25 -0
  207. package/rules/typescript.md +29 -0
  208. package/schemas/skill-frontmatter.schema.json +52 -0
  209. package/scripts/lib/audit.js +96 -0
  210. package/scripts/lib/frontmatter.js +65 -0
  211. package/scripts/lib/hooks-install.js +292 -0
  212. package/scripts/lib/i18n.js +51 -0
  213. package/scripts/lib/inventory.js +85 -0
  214. package/scripts/lib/lint.js +158 -0
  215. package/scripts/lib/mcp-install.js +284 -0
  216. package/scripts/lib/profiles.js +128 -0
  217. package/scripts/lib/render.js +86 -0
  218. package/scripts/lib/rules-install.js +118 -0
  219. package/scripts/lib/skills.js +86 -0
  220. package/scripts/lib/targets.js +113 -0
  221. package/skills/accounting-api-integration/SKILL.md +81 -0
  222. package/skills/accounting-api-integration/evals/triggers.json +17 -0
  223. package/skills/accounting-api-integration/references/quickbooks.md +48 -0
  224. package/skills/accounting-api-integration/references/xero.md +45 -0
  225. package/skills/agent-harness-design/SKILL.md +125 -0
  226. package/skills/agent-harness-design/evals/triggers.json +21 -0
  227. package/skills/ai-media-generation/SKILL.md +89 -0
  228. package/skills/ai-media-generation/evals/triggers.json +16 -0
  229. package/skills/ai-media-generation/references/job-pipeline.md +76 -0
  230. package/skills/angular-patterns/SKILL.md +122 -0
  231. package/skills/angular-patterns/evals/triggers.json +16 -0
  232. package/skills/api-design/SKILL.md +96 -0
  233. package/skills/api-design/evals/triggers.json +18 -0
  234. package/skills/api-design/references/conventions.md +133 -0
  235. package/skills/architecture-decision-records/SKILL.md +98 -0
  236. package/skills/architecture-decision-records/evals/triggers.json +17 -0
  237. package/skills/article-writing/SKILL.md +108 -0
  238. package/skills/article-writing/evals/triggers.json +16 -0
  239. package/skills/aspnet-core-patterns/SKILL.md +149 -0
  240. package/skills/aspnet-core-patterns/evals/triggers.json +16 -0
  241. package/skills/auth-patterns/SKILL.md +104 -0
  242. package/skills/auth-patterns/evals/triggers.json +17 -0
  243. package/skills/auth-patterns/references/oauth-oidc.md +64 -0
  244. package/skills/autonomous-loops/SKILL.md +99 -0
  245. package/skills/autonomous-loops/evals/triggers.json +14 -0
  246. package/skills/aws-patterns/SKILL.md +91 -0
  247. package/skills/aws-patterns/evals/triggers.json +16 -0
  248. package/skills/azure-patterns/SKILL.md +86 -0
  249. package/skills/azure-patterns/evals/triggers.json +16 -0
  250. package/skills/benchmark-methodology/SKILL.md +88 -0
  251. package/skills/benchmark-methodology/evals/triggers.json +16 -0
  252. package/skills/benchmark-methodology/references/language-harnesses.md +130 -0
  253. package/skills/bgp-diagnostics/SKILL.md +84 -0
  254. package/skills/bgp-diagnostics/evals/triggers.json +18 -0
  255. package/skills/bgp-diagnostics/references/bgp-reference.md +81 -0
  256. package/skills/bioinformatics-workflows/SKILL.md +108 -0
  257. package/skills/bioinformatics-workflows/evals/triggers.json +16 -0
  258. package/skills/bioinformatics-workflows/references/commands.md +71 -0
  259. package/skills/bioinformatics-workflows/references/formats.md +24 -0
  260. package/skills/bioinformatics-workflows/references/workflow-managers.md +107 -0
  261. package/skills/brand-voice/SKILL.md +112 -0
  262. package/skills/brand-voice/evals/triggers.json +16 -0
  263. package/skills/browser-qa/SKILL.md +99 -0
  264. package/skills/browser-qa/evals/triggers.json +16 -0
  265. package/skills/bun-runtime/SKILL.md +93 -0
  266. package/skills/bun-runtime/evals/triggers.json +16 -0
  267. package/skills/cisco-ios-config/SKILL.md +101 -0
  268. package/skills/cisco-ios-config/evals/triggers.json +18 -0
  269. package/skills/cisco-ios-config/references/verification.md +63 -0
  270. package/skills/clickhouse-patterns/SKILL.md +101 -0
  271. package/skills/clickhouse-patterns/evals/triggers.json +18 -0
  272. package/skills/clickhouse-patterns/references/engines-and-views.md +138 -0
  273. package/skills/clinical-decision-support/SKILL.md +90 -0
  274. package/skills/clinical-decision-support/evals/triggers.json +16 -0
  275. package/skills/clinical-decision-support/references/cds-hooks.md +76 -0
  276. package/skills/clinical-decision-support/references/regulatory-boundaries.md +37 -0
  277. package/skills/code-tour/SKILL.md +97 -0
  278. package/skills/code-tour/evals/triggers.json +14 -0
  279. package/skills/codebase-onboarding/SKILL.md +112 -0
  280. package/skills/codebase-onboarding/evals/triggers.json +14 -0
  281. package/skills/cold-outreach-sequences/SKILL.md +90 -0
  282. package/skills/cold-outreach-sequences/evals/triggers.json +16 -0
  283. package/skills/content-repurposing/SKILL.md +82 -0
  284. package/skills/content-repurposing/evals/triggers.json +16 -0
  285. package/skills/context-budget/SKILL.md +84 -0
  286. package/skills/context-budget/evals/triggers.json +14 -0
  287. package/skills/conventional-commits/SKILL.md +144 -0
  288. package/skills/conventional-commits/evals/triggers.json +16 -0
  289. package/skills/cpp-patterns/SKILL.md +129 -0
  290. package/skills/cpp-patterns/evals/triggers.json +16 -0
  291. package/skills/cpp-patterns/references/cmake-and-tooling.md +88 -0
  292. package/skills/cpp-patterns/references/undefined-behaviour.md +75 -0
  293. package/skills/cpp-testing/SKILL.md +131 -0
  294. package/skills/cpp-testing/evals/triggers.json +16 -0
  295. package/skills/csharp-patterns/SKILL.md +110 -0
  296. package/skills/csharp-patterns/evals/triggers.json +17 -0
  297. package/skills/csharp-patterns/references/analyzers.md +59 -0
  298. package/skills/csharp-testing/SKILL.md +85 -0
  299. package/skills/csharp-testing/evals/triggers.json +17 -0
  300. package/skills/csharp-testing/references/integration-tests.md +77 -0
  301. package/skills/css-architecture/SKILL.md +143 -0
  302. package/skills/css-architecture/evals/triggers.json +16 -0
  303. package/skills/customs-trade-compliance/SKILL.md +95 -0
  304. package/skills/customs-trade-compliance/evals/triggers.json +16 -0
  305. package/skills/customs-trade-compliance/references/incoterms-2020.md +42 -0
  306. package/skills/dart-patterns/SKILL.md +157 -0
  307. package/skills/dart-patterns/evals/triggers.json +18 -0
  308. package/skills/dart-testing/SKILL.md +164 -0
  309. package/skills/dart-testing/evals/triggers.json +18 -0
  310. package/skills/data-analysis-notebooks/SKILL.md +113 -0
  311. package/skills/data-analysis-notebooks/evals/triggers.json +16 -0
  312. package/skills/data-analysis-notebooks/references/dataframe-pitfalls.md +49 -0
  313. package/skills/data-analysis-notebooks/references/statistics-pitfalls.md +24 -0
  314. package/skills/data-pipelines/SKILL.md +90 -0
  315. package/skills/data-pipelines/evals/triggers.json +16 -0
  316. package/skills/data-pipelines/references/orchestrators.md +64 -0
  317. package/skills/database-migrations/SKILL.md +102 -0
  318. package/skills/database-migrations/evals/triggers.json +16 -0
  319. package/skills/database-migrations/references/recipes.md +98 -0
  320. package/skills/database-migrations/references/tools.md +21 -0
  321. package/skills/dbt-patterns/SKILL.md +96 -0
  322. package/skills/dbt-patterns/evals/triggers.json +16 -0
  323. package/skills/dbt-patterns/references/yaml-examples.md +114 -0
  324. package/skills/deep-research/SKILL.md +107 -0
  325. package/skills/deep-research/evals/triggers.json +14 -0
  326. package/skills/dependency-audit/SKILL.md +103 -0
  327. package/skills/dependency-audit/evals/triggers.json +16 -0
  328. package/skills/dependency-audit/references/tools.md +124 -0
  329. package/skills/deployment-strategies/SKILL.md +108 -0
  330. package/skills/deployment-strategies/evals/triggers.json +16 -0
  331. package/skills/django-patterns/SKILL.md +123 -0
  332. package/skills/django-patterns/evals/triggers.json +16 -0
  333. package/skills/docker-patterns/SKILL.md +132 -0
  334. package/skills/docker-patterns/evals/triggers.json +16 -0
  335. package/skills/docker-patterns/references/dockerfiles.md +105 -0
  336. package/skills/e2e-testing-playwright/SKILL.md +94 -0
  337. package/skills/e2e-testing-playwright/evals/triggers.json +16 -0
  338. package/skills/e2e-testing-playwright/references/config-and-ci.md +129 -0
  339. package/skills/ef-core-patterns/SKILL.md +117 -0
  340. package/skills/ef-core-patterns/evals/triggers.json +16 -0
  341. package/skills/email-deliverability/SKILL.md +99 -0
  342. package/skills/email-deliverability/evals/triggers.json +17 -0
  343. package/skills/email-deliverability/references/dns-records.md +85 -0
  344. package/skills/error-handling-patterns/SKILL.md +112 -0
  345. package/skills/error-handling-patterns/evals/triggers.json +18 -0
  346. package/skills/error-handling-patterns/references/language-idioms.md +49 -0
  347. package/skills/estimation-and-scoping/SKILL.md +97 -0
  348. package/skills/estimation-and-scoping/evals/triggers.json +14 -0
  349. package/skills/evm-dapp-integration/SKILL.md +73 -0
  350. package/skills/evm-dapp-integration/evals/triggers.json +16 -0
  351. package/skills/fastapi-patterns/SKILL.md +127 -0
  352. package/skills/fastapi-patterns/evals/triggers.json +16 -0
  353. package/skills/ffmpeg-media-processing/SKILL.md +94 -0
  354. package/skills/ffmpeg-media-processing/evals/triggers.json +16 -0
  355. package/skills/ffmpeg-media-processing/references/recipes.md +112 -0
  356. package/skills/fhir-integration/SKILL.md +81 -0
  357. package/skills/fhir-integration/evals/triggers.json +16 -0
  358. package/skills/fhir-integration/references/search-and-bundles.md +73 -0
  359. package/skills/fhir-integration/references/smart-on-fhir.md +50 -0
  360. package/skills/flask-patterns/SKILL.md +132 -0
  361. package/skills/flask-patterns/evals/triggers.json +16 -0
  362. package/skills/flutter-patterns/SKILL.md +99 -0
  363. package/skills/flutter-patterns/evals/triggers.json +16 -0
  364. package/skills/flutterwave-integration/SKILL.md +75 -0
  365. package/skills/flutterwave-integration/evals/triggers.json +16 -0
  366. package/skills/flutterwave-integration/references/api.md +73 -0
  367. package/skills/flutterwave-integration/references/webhooks.md +49 -0
  368. package/skills/fsharp-patterns/SKILL.md +133 -0
  369. package/skills/fsharp-patterns/evals/triggers.json +16 -0
  370. package/skills/fsharp-testing/SKILL.md +136 -0
  371. package/skills/fsharp-testing/evals/triggers.json +16 -0
  372. package/skills/gcp-patterns/SKILL.md +86 -0
  373. package/skills/gcp-patterns/evals/triggers.json +16 -0
  374. package/skills/git-workflow/SKILL.md +114 -0
  375. package/skills/git-workflow/evals/triggers.json +16 -0
  376. package/skills/github-actions-ci/SKILL.md +117 -0
  377. package/skills/github-actions-ci/evals/triggers.json +16 -0
  378. package/skills/github-api-automation/SKILL.md +101 -0
  379. package/skills/github-api-automation/evals/triggers.json +17 -0
  380. package/skills/go-patterns/SKILL.md +118 -0
  381. package/skills/go-patterns/evals/triggers.json +17 -0
  382. package/skills/go-patterns/references/concurrency.md +162 -0
  383. package/skills/go-testing/SKILL.md +154 -0
  384. package/skills/go-testing/evals/triggers.json +17 -0
  385. package/skills/hexagonal-architecture/SKILL.md +89 -0
  386. package/skills/hexagonal-architecture/evals/triggers.json +17 -0
  387. package/skills/hipaa-compliance/SKILL.md +91 -0
  388. package/skills/hipaa-compliance/evals/triggers.json +18 -0
  389. package/skills/hipaa-compliance/references/safeguards.md +68 -0
  390. package/skills/hl7v2-integration/SKILL.md +69 -0
  391. package/skills/hl7v2-integration/evals/triggers.json +16 -0
  392. package/skills/hl7v2-integration/references/messages-and-ack.md +78 -0
  393. package/skills/homelab-network-setup/SKILL.md +125 -0
  394. package/skills/homelab-network-setup/evals/triggers.json +18 -0
  395. package/skills/homelab-network-setup/references/firewall-and-dns.md +45 -0
  396. package/skills/homelab-network-setup/references/wireguard.md +72 -0
  397. package/skills/hubtel-integration/SKILL.md +77 -0
  398. package/skills/hubtel-integration/evals/triggers.json +16 -0
  399. package/skills/hubtel-integration/references/api.md +92 -0
  400. package/skills/i18n-localization/SKILL.md +114 -0
  401. package/skills/i18n-localization/evals/triggers.json +16 -0
  402. package/skills/i18n-localization/references/libraries.md +52 -0
  403. package/skills/incident-postmortem/SKILL.md +118 -0
  404. package/skills/incident-postmortem/evals/triggers.json +14 -0
  405. package/skills/inventory-demand-planning/SKILL.md +89 -0
  406. package/skills/inventory-demand-planning/evals/triggers.json +16 -0
  407. package/skills/inventory-demand-planning/references/formulas.md +62 -0
  408. package/skills/investor-materials/SKILL.md +127 -0
  409. package/skills/investor-materials/evals/triggers.json +16 -0
  410. package/skills/investor-materials/references/templates.md +74 -0
  411. package/skills/invoicing-and-tax/SKILL.md +84 -0
  412. package/skills/invoicing-and-tax/evals/triggers.json +17 -0
  413. package/skills/invoicing-and-tax/references/e-invoicing.md +24 -0
  414. package/skills/invoicing-and-tax/references/invoice-fields.md +38 -0
  415. package/skills/invoicing-and-tax/references/rounding.md +26 -0
  416. package/skills/java-patterns/SKILL.md +141 -0
  417. package/skills/java-patterns/evals/triggers.json +17 -0
  418. package/skills/java-testing/SKILL.md +142 -0
  419. package/skills/java-testing/evals/triggers.json +16 -0
  420. package/skills/jetpack-compose-patterns/SKILL.md +88 -0
  421. package/skills/jetpack-compose-patterns/evals/triggers.json +16 -0
  422. package/skills/jira-integration/SKILL.md +92 -0
  423. package/skills/jira-integration/evals/triggers.json +17 -0
  424. package/skills/jpa-hibernate/SKILL.md +92 -0
  425. package/skills/jpa-hibernate/evals/triggers.json +18 -0
  426. package/skills/jpa-hibernate/references/mapping.md +99 -0
  427. package/skills/kotlin-multiplatform/SKILL.md +97 -0
  428. package/skills/kotlin-multiplatform/evals/triggers.json +16 -0
  429. package/skills/kotlin-patterns/SKILL.md +128 -0
  430. package/skills/kotlin-patterns/evals/triggers.json +16 -0
  431. package/skills/kotlin-testing/SKILL.md +117 -0
  432. package/skills/kotlin-testing/evals/triggers.json +16 -0
  433. package/skills/ktor-patterns/SKILL.md +135 -0
  434. package/skills/ktor-patterns/evals/triggers.json +18 -0
  435. package/skills/kubernetes-patterns/SKILL.md +106 -0
  436. package/skills/kubernetes-patterns/evals/triggers.json +16 -0
  437. package/skills/kubernetes-patterns/references/manifests.md +115 -0
  438. package/skills/laravel-patterns/SKILL.md +136 -0
  439. package/skills/laravel-patterns/evals/triggers.json +16 -0
  440. package/skills/linear-integration/SKILL.md +98 -0
  441. package/skills/linear-integration/evals/triggers.json +17 -0
  442. package/skills/literature-review/SKILL.md +109 -0
  443. package/skills/literature-review/evals/triggers.json +16 -0
  444. package/skills/literature-review/references/appraisal.md +41 -0
  445. package/skills/literature-review/references/search-sources.md +39 -0
  446. package/skills/llm-app-patterns/SKILL.md +97 -0
  447. package/skills/llm-app-patterns/evals/triggers.json +17 -0
  448. package/skills/llm-evals/SKILL.md +98 -0
  449. package/skills/llm-evals/evals/triggers.json +16 -0
  450. package/skills/llm-evals/references/graders.md +66 -0
  451. package/skills/logistics-exception-management/SKILL.md +90 -0
  452. package/skills/logistics-exception-management/evals/triggers.json +16 -0
  453. package/skills/manim-animations/SKILL.md +106 -0
  454. package/skills/manim-animations/evals/triggers.json +16 -0
  455. package/skills/market-research/SKILL.md +117 -0
  456. package/skills/market-research/evals/triggers.json +16 -0
  457. package/skills/marketing-campaign/SKILL.md +111 -0
  458. package/skills/marketing-campaign/evals/triggers.json +16 -0
  459. package/skills/mcp-server-patterns/SKILL.md +127 -0
  460. package/skills/mcp-server-patterns/evals/triggers.json +18 -0
  461. package/skills/mcp-server-patterns/references/protocol-notes.md +68 -0
  462. package/skills/metrics-dashboards/SKILL.md +113 -0
  463. package/skills/metrics-dashboards/evals/triggers.json +16 -0
  464. package/skills/ml-experiment-workflow/SKILL.md +125 -0
  465. package/skills/ml-experiment-workflow/evals/triggers.json +16 -0
  466. package/skills/mongodb-patterns/SKILL.md +115 -0
  467. package/skills/mongodb-patterns/evals/triggers.json +18 -0
  468. package/skills/mongodb-patterns/references/indexes-and-aggregation.md +94 -0
  469. package/skills/mpesa-daraja-integration/SKILL.md +70 -0
  470. package/skills/mpesa-daraja-integration/evals/triggers.json +16 -0
  471. package/skills/mpesa-daraja-integration/references/api.md +103 -0
  472. package/skills/mpesa-daraja-integration/references/callbacks.md +74 -0
  473. package/skills/mtn-momo-integration/SKILL.md +66 -0
  474. package/skills/mtn-momo-integration/evals/triggers.json +16 -0
  475. package/skills/mtn-momo-integration/references/api.md +153 -0
  476. package/skills/mtn-momo-integration/references/callbacks.md +92 -0
  477. package/skills/mtn-momo-integration/references/sandbox-and-go-live.md +51 -0
  478. package/skills/mtn-momo-integration/scripts/sandbox-setup.js +79 -0
  479. package/skills/mysql-patterns/SKILL.md +96 -0
  480. package/skills/mysql-patterns/evals/triggers.json +16 -0
  481. package/skills/mysql-patterns/references/explain.md +34 -0
  482. package/skills/mysql-patterns/references/online-ddl.md +41 -0
  483. package/skills/nestjs-patterns/SKILL.md +114 -0
  484. package/skills/nestjs-patterns/evals/triggers.json +16 -0
  485. package/skills/nestjs-patterns/references/testing.md +68 -0
  486. package/skills/network-automation/SKILL.md +107 -0
  487. package/skills/network-automation/evals/triggers.json +18 -0
  488. package/skills/network-automation/references/tool-snippets.md +153 -0
  489. package/skills/network-troubleshooting/SKILL.md +152 -0
  490. package/skills/network-troubleshooting/evals/triggers.json +18 -0
  491. package/skills/network-troubleshooting/references/commands.md +33 -0
  492. package/skills/nextjs-patterns/SKILL.md +150 -0
  493. package/skills/nextjs-patterns/evals/triggers.json +18 -0
  494. package/skills/nextjs-patterns/references/caching.md +87 -0
  495. package/skills/node-backend-patterns/SKILL.md +103 -0
  496. package/skills/node-backend-patterns/evals/triggers.json +16 -0
  497. package/skills/node-backend-patterns/references/templates.md +122 -0
  498. package/skills/nuxt-patterns/SKILL.md +103 -0
  499. package/skills/nuxt-patterns/evals/triggers.json +16 -0
  500. package/skills/parallel-agent-orchestration/SKILL.md +106 -0
  501. package/skills/parallel-agent-orchestration/evals/triggers.json +14 -0
  502. package/skills/paystack-integration/SKILL.md +59 -0
  503. package/skills/paystack-integration/evals/triggers.json +14 -0
  504. package/skills/paystack-integration/references/api.md +73 -0
  505. package/skills/paystack-integration/references/mobile-money.md +50 -0
  506. package/skills/paystack-integration/references/webhooks.md +80 -0
  507. package/skills/pci-dss-scope/SKILL.md +103 -0
  508. package/skills/pci-dss-scope/evals/triggers.json +18 -0
  509. package/skills/pci-dss-scope/references/saq-and-data.md +36 -0
  510. package/skills/perl-patterns/SKILL.md +135 -0
  511. package/skills/perl-patterns/evals/triggers.json +18 -0
  512. package/skills/perl-testing/SKILL.md +126 -0
  513. package/skills/perl-testing/evals/triggers.json +17 -0
  514. package/skills/php-patterns/SKILL.md +116 -0
  515. package/skills/php-patterns/evals/triggers.json +16 -0
  516. package/skills/php-testing/SKILL.md +123 -0
  517. package/skills/php-testing/evals/triggers.json +16 -0
  518. package/skills/postgres-patterns/SKILL.md +103 -0
  519. package/skills/postgres-patterns/evals/triggers.json +17 -0
  520. package/skills/postgres-patterns/references/explain.md +59 -0
  521. package/skills/postgres-patterns/references/locks.md +53 -0
  522. package/skills/prd-writing/SKILL.md +124 -0
  523. package/skills/prd-writing/evals/triggers.json +15 -0
  524. package/skills/prisma-patterns/SKILL.md +83 -0
  525. package/skills/prisma-patterns/evals/triggers.json +18 -0
  526. package/skills/prisma-patterns/references/prisma-8.md +46 -0
  527. package/skills/prisma-patterns/references/workflow.md +50 -0
  528. package/skills/privacy-compliance/SKILL.md +121 -0
  529. package/skills/privacy-compliance/evals/triggers.json +18 -0
  530. package/skills/privacy-compliance/references/jurisdictions.md +51 -0
  531. package/skills/production-scheduling/SKILL.md +98 -0
  532. package/skills/production-scheduling/evals/triggers.json +16 -0
  533. package/skills/prompt-engineering/SKILL.md +92 -0
  534. package/skills/prompt-engineering/evals/triggers.json +16 -0
  535. package/skills/python-patterns/SKILL.md +107 -0
  536. package/skills/python-patterns/evals/triggers.json +16 -0
  537. package/skills/python-patterns/references/tooling.md +101 -0
  538. package/skills/python-testing/SKILL.md +126 -0
  539. package/skills/python-testing/evals/triggers.json +16 -0
  540. package/skills/python-testing/references/mocking.md +71 -0
  541. package/skills/pytorch-patterns/SKILL.md +139 -0
  542. package/skills/pytorch-patterns/evals/triggers.json +16 -0
  543. package/skills/pytorch-patterns/references/debugging.md +39 -0
  544. package/skills/quarkus-patterns/SKILL.md +93 -0
  545. package/skills/quarkus-patterns/evals/triggers.json +18 -0
  546. package/skills/rag-pipeline-patterns/SKILL.md +117 -0
  547. package/skills/rag-pipeline-patterns/evals/triggers.json +18 -0
  548. package/skills/rag-pipeline-patterns/references/evaluation.md +37 -0
  549. package/skills/rag-pipeline-patterns/references/retrieval-recipes.md +78 -0
  550. package/skills/rails-patterns/SKILL.md +132 -0
  551. package/skills/rails-patterns/evals/triggers.json +16 -0
  552. package/skills/react-native-patterns/SKILL.md +101 -0
  553. package/skills/react-native-patterns/evals/triggers.json +16 -0
  554. package/skills/react-patterns/SKILL.md +140 -0
  555. package/skills/react-patterns/evals/triggers.json +18 -0
  556. package/skills/react-performance/SKILL.md +107 -0
  557. package/skills/react-performance/evals/triggers.json +18 -0
  558. package/skills/redis-patterns/SKILL.md +109 -0
  559. package/skills/redis-patterns/evals/triggers.json +18 -0
  560. package/skills/redis-patterns/references/operations.md +61 -0
  561. package/skills/refactoring-safely/SKILL.md +107 -0
  562. package/skills/refactoring-safely/evals/triggers.json +17 -0
  563. package/skills/release-management/SKILL.md +141 -0
  564. package/skills/release-management/evals/triggers.json +16 -0
  565. package/skills/remotion-video/SKILL.md +91 -0
  566. package/skills/remotion-video/evals/triggers.json +16 -0
  567. package/skills/remotion-video/references/lambda.md +66 -0
  568. package/skills/returns-reverse-logistics/SKILL.md +97 -0
  569. package/skills/returns-reverse-logistics/evals/triggers.json +16 -0
  570. package/skills/ruby-patterns/SKILL.md +127 -0
  571. package/skills/ruby-patterns/evals/triggers.json +18 -0
  572. package/skills/ruby-testing/SKILL.md +113 -0
  573. package/skills/ruby-testing/evals/triggers.json +18 -0
  574. package/skills/runbook-writing/SKILL.md +101 -0
  575. package/skills/runbook-writing/evals/triggers.json +14 -0
  576. package/skills/rust-patterns/SKILL.md +118 -0
  577. package/skills/rust-patterns/evals/triggers.json +16 -0
  578. package/skills/rust-patterns/references/cargo-and-clippy.md +105 -0
  579. package/skills/rust-patterns/references/errors-and-traits.md +97 -0
  580. package/skills/rust-testing/SKILL.md +148 -0
  581. package/skills/rust-testing/evals/triggers.json +16 -0
  582. package/skills/rust-testing/references/fakes-proptest-async.md +113 -0
  583. package/skills/search-first/SKILL.md +73 -0
  584. package/skills/search-first/evals/triggers.json +14 -0
  585. package/skills/security-review/SKILL.md +58 -0
  586. package/skills/security-review/evals/triggers.json +14 -0
  587. package/skills/security-review/references/checklist.md +54 -0
  588. package/skills/security-review/scripts/scan-secrets.js +79 -0
  589. package/skills/seo-audit/SKILL.md +111 -0
  590. package/skills/seo-audit/evals/triggers.json +16 -0
  591. package/skills/seo-audit/references/checks.md +65 -0
  592. package/skills/session-handoff/SKILL.md +101 -0
  593. package/skills/session-handoff/evals/triggers.json +14 -0
  594. package/skills/skill-authoring/SKILL.md +87 -0
  595. package/skills/skill-authoring/evals/triggers.json +14 -0
  596. package/skills/skill-authoring/references/frontmatter.md +40 -0
  597. package/skills/slack-app-integration/SKILL.md +108 -0
  598. package/skills/slack-app-integration/evals/triggers.json +17 -0
  599. package/skills/smart-contract-security/SKILL.md +110 -0
  600. package/skills/smart-contract-security/evals/triggers.json +16 -0
  601. package/skills/smart-contract-security/references/vulnerability-checklist.md +79 -0
  602. package/skills/social-media-publishing/SKILL.md +84 -0
  603. package/skills/social-media-publishing/evals/triggers.json +17 -0
  604. package/skills/social-media-publishing/references/platform-apis.md +116 -0
  605. package/skills/solidity-patterns/SKILL.md +95 -0
  606. package/skills/solidity-patterns/evals/triggers.json +16 -0
  607. package/skills/spring-boot-patterns/SKILL.md +128 -0
  608. package/skills/spring-boot-patterns/evals/triggers.json +18 -0
  609. package/skills/spring-boot-patterns/references/testing.md +72 -0
  610. package/skills/stripe-integration/SKILL.md +69 -0
  611. package/skills/stripe-integration/evals/triggers.json +16 -0
  612. package/skills/stripe-integration/references/api.md +71 -0
  613. package/skills/stripe-integration/references/billing.md +58 -0
  614. package/skills/stripe-integration/references/webhooks.md +76 -0
  615. package/skills/subscription-billing-ops/SKILL.md +118 -0
  616. package/skills/subscription-billing-ops/evals/triggers.json +17 -0
  617. package/skills/subscription-billing-ops/references/proration.md +47 -0
  618. package/skills/subscription-billing-ops/references/revenue-metrics.md +38 -0
  619. package/skills/svelte-patterns/SKILL.md +122 -0
  620. package/skills/svelte-patterns/evals/triggers.json +16 -0
  621. package/skills/swift-patterns/SKILL.md +113 -0
  622. package/skills/swift-patterns/evals/triggers.json +16 -0
  623. package/skills/swift-patterns/references/concurrency-migration.md +40 -0
  624. package/skills/swift-testing/SKILL.md +121 -0
  625. package/skills/swift-testing/evals/triggers.json +16 -0
  626. package/skills/swift-testing/references/swift-testing-cheatsheet.md +81 -0
  627. package/skills/swiftui-patterns/SKILL.md +102 -0
  628. package/skills/swiftui-patterns/evals/triggers.json +16 -0
  629. package/skills/tdd-workflow/SKILL.md +67 -0
  630. package/skills/tdd-workflow/evals/triggers.json +14 -0
  631. package/skills/technical-writing/SKILL.md +95 -0
  632. package/skills/technical-writing/evals/triggers.json +14 -0
  633. package/skills/terraform-patterns/SKILL.md +122 -0
  634. package/skills/terraform-patterns/evals/triggers.json +16 -0
  635. package/skills/terraform-patterns/references/backends.md +67 -0
  636. package/skills/test-coverage-improvement/SKILL.md +107 -0
  637. package/skills/test-coverage-improvement/evals/triggers.json +16 -0
  638. package/skills/threat-modeling/SKILL.md +113 -0
  639. package/skills/threat-modeling/evals/triggers.json +16 -0
  640. package/skills/typescript-patterns/SKILL.md +122 -0
  641. package/skills/typescript-patterns/evals/triggers.json +16 -0
  642. package/skills/typescript-testing/SKILL.md +101 -0
  643. package/skills/typescript-testing/evals/triggers.json +16 -0
  644. package/skills/verification-loop/SKILL.md +70 -0
  645. package/skills/verification-loop/evals/triggers.json +14 -0
  646. package/skills/verification-loop/scripts/detect-checks.js +102 -0
  647. package/skills/vite-patterns/SKILL.md +117 -0
  648. package/skills/vite-patterns/evals/triggers.json +16 -0
  649. package/skills/vue-patterns/SKILL.md +104 -0
  650. package/skills/vue-patterns/evals/triggers.json +16 -0
  651. package/skills/web-accessibility/SKILL.md +119 -0
  652. package/skills/web-accessibility/evals/triggers.json +16 -0
  653. package/skills/web-performance/SKILL.md +107 -0
  654. package/skills/web-performance/evals/triggers.json +16 -0
  655. package/skills/web-scraping/SKILL.md +80 -0
  656. package/skills/web-scraping/evals/triggers.json +16 -0
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: bgp-diagnostics
3
+ description: Diagnoses Border Gateway Protocol problems on Cisco, Juniper, Arista and FRR routers by reading neighbor state (Idle, Active, OpenSent, Established) and NOTIFICATION codes, checking which prefixes are received, accepted and advertised through prefix-lists, route-maps and max-prefix limits, walking best-path selection, decoding standard and large communities, spotting RPKI-invalid or leaked routes, and confirming what the internet sees from RIPEstat, RouteViews and other looking glasses. Use when a BGP session will not come up or keeps flapping, a prefix is missing, not propagating or taking the wrong path, a provider says they are not receiving an announcement, or traffic shifted after a routing change or an upstream incident.
4
+ license: MIT
5
+ compatibility: Any Agent Skills host. Works from pasted router output; live checks need read-only CLI access to the router and web access to public looking glasses and route collectors.
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
+ # BGP diagnostics
14
+
15
+ Find out why a BGP session or route is not doing what the operator expects, using read-only commands and public data, and hand back a cause with evidence and a proposed fix the operator applies.
16
+
17
+ For NOTIFICATION codes, best-path order, well-known communities and per-vendor command equivalents, read `references/bgp-reference.md`.
18
+
19
+ ## Ground rules
20
+
21
+ 1. **Read-only.** Use `show`/`display` commands and public looking glasses. Never run `clear ip bgp`, `clear bgp`, `neighbor ... shutdown`, policy edits or `soft` resets yourself; propose them and let the operator run them in a window. A hard reset drops every route from that peer.
22
+ 2. Work from evidence: ask for the exact command output, router platform and OS version, local AS, peer AS and peer address.
23
+ 3. Separate the two questions: **is the session up?** and **is the route right?** Fix the first before the second.
24
+ 4. Treat every public looking-glass result as a sample from one vantage point. Check at least two sources before telling the user "the internet can't see it".
25
+
26
+ ## 1. Session not Established
27
+
28
+ Get `show bgp summary` (or `show ip bgp summary`, Junos `show bgp summary`, FRR `vtysh -c "show bgp summary"`) and `show bgp neighbors <peer>`.
29
+
30
+ | State seen | Usual cause | Check |
31
+ |---|---|---|
32
+ | `Idle` | Admin shutdown, no route to peer, max-prefix tripped, or waiting after errors | `show bgp neighbors` last reset reason; `Idle (Admin)` / `Idle (PfxCt)` on IOS |
33
+ | `Active` / `Connect` cycling | TCP 179 never completes: wrong peer IP, ACL or firewall, peer not configured, wrong source interface | Ping the peer from the configured source; `update-source` on loopback peers; ACLs and CoPP for TCP 179 |
34
+ | `OpenSent` / `OpenConfirm` then reset | OPEN rejected: wrong remote AS, bad router ID, capability or hold-time mismatch, MD5/TCP-AO password mismatch | Logs for NOTIFICATION code 2/x; on IOS `%TCP-6-BADAUTH` means password mismatch |
35
+ | Up then flaps every ~3 min | Hold timer expiry: loss, CPU, MTU problems on large updates | NOTIFICATION 4; interface errors; ping with DF at full MTU |
36
+ | Up then drops at a prefix count | Max-prefix limit | Cease subcode 1; compare received count to `maximum-prefix` |
37
+
38
+ Also check:
39
+ - eBGP to a non-directly-connected address needs `ebgp-multihop` (or `ttl-security` on both sides), because eBGP packets default to TTL 1.
40
+ - Some platforms refuse to send or accept eBGP routes with no policy configured (RFC 8212): IOS-XR ("no policy; defaults to 'drop'", overridable with `bgp unsafe-ebgp-policy`) and FRR in its default traditional profile (`bgp ebgp-requires-policy`, shown as `(Policy)` in `show bgp summary`). Session `Established` with 0 prefixes both ways often means this.
41
+ - Address family activated on both sides (`address-family ipv6` + `neighbor ... activate`).
42
+
43
+ ## 2. Prefix missing or wrong
44
+
45
+ Walk the path step by step and stop at the first step that fails.
46
+
47
+ 1. **Originated?** The prefix is in the local BGP table: `show bgp ipv4 unicast <prefix>`. A `network` statement needs an exact match in the RIB (same mask); otherwise use a static to Null0 or an aggregate.
48
+ 2. **Advertised?** `show bgp ipv4 unicast neighbors <peer> advertised-routes`. If absent, check outbound prefix-list, route-map, `no-export`/`no-advertise` communities, and iBGP split-horizon (iBGP-learned routes are not sent to other iBGP peers without a route reflector).
49
+ 3. **Received by the peer?** Ask the peer, or use their looking glass. On your side for inbound routes: `received-routes` needs `soft-reconfiguration inbound` on IOS; otherwise use `show bgp ... neighbors <peer> routes` for accepted routes only.
50
+ 4. **Accepted?** Inbound filters, max-prefix, AS-path loop (own AS in path; `allowas-in` only if the design needs it), RPKI-invalid dropped by ROV, or IRR-based filters at the provider missing your route object.
51
+ 5. **Best?** `show bgp ipv4 unicast <prefix>` lists all paths; walk the best-path order in the reference and name the step that decided. Common surprises: weight set on one neighbor, local-pref from a route-map, MED compared only within one neighbor AS, IGP metric to next hop.
52
+ 6. **Installed?** `show ip route <prefix>`: an IGP or static with lower administrative distance wins; next hop unreachable makes the path invalid (`inaccessible`).
53
+
54
+ ## 3. What the internet sees
55
+
56
+ For a public prefix or ASN:
57
+ - RIPEstat (`stat.ripe.net`): Routing Status, Looking Glass and BGPlay widgets show visibility across RIS collectors and the history of announcements and withdrawals.
58
+ - RouteViews collectors (`route-views.routeviews.org` and others) and bgp.tools or bgp.he.net for origin AS, upstreams and visibility.
59
+ - RPKI: check the prefix and origin pair is Valid in the RIPEstat RPKI widget or your RIR portal. An Invalid (wrong origin or max-length too short) is dropped by many networks.
60
+ - IRR: `whois -h whois.radb.net <prefix>` or the provider's IRR; missing or wrong `route`/`route6` objects cause providers to filter you.
61
+ - PeeringDB for the peer's NOC contact, prefix limits they expect, and IX details.
62
+
63
+ ## 4. Common outage causes to rule out
64
+
65
+ 1. ROA created with a max-length shorter than the announced more-specific, or for the wrong origin AS.
66
+ 2. A route leak: your prefix seen with an unexpected AS in the path, or you announcing learned routes to another provider (missing outbound filter). Check outbound policy matches only your own prefixes.
67
+ 3. Hijack or more-specific announced by someone else: a different origin AS for your prefix or a longer prefix inside it.
68
+ 4. Max-prefix tripped after a peer sent a full table.
69
+ 5. Password, AS or IP changed on one side during maintenance.
70
+ 6. Policy change applied without a soft refresh, so the new policy never took effect; or a soft reset expected to fix something it cannot.
71
+ 7. Upstream incident: check the provider status page and RIPEstat for many prefixes moving at once.
72
+
73
+ **Stop and tell the user to contact the provider or a qualified network engineer** when evidence points at the upstream, a suspected hijack, or a change that would affect transit for the whole network.
74
+
75
+ ## Report back
76
+
77
+ ```
78
+ Session: <peer IP / AS> state <state>, last reset <reason/code>
79
+ Prefix: <prefix> originated <y/n> advertised <y/n> seen by peer <y/n/unknown> best <y/n, decided at step N>
80
+ External view: <sources checked, visibility, RPKI status, IRR status>
81
+ Cause: <one sentence>, evidence: <command output lines>
82
+ Proposed fix: <exact commands for the operator>, impact: <soft refresh vs session reset>
83
+ Not verified: <what was not checked>
84
+ ```
@@ -0,0 +1,18 @@
1
+ {
2
+ "should_trigger": [
3
+ "show ip bgp summary says our neighbor 203.0.113.1 is stuck in Active, what does that mean?",
4
+ "Our transit provider says they don't see our /24 but it's in our BGP table, where is it getting dropped?",
5
+ "BGP session with the IX route server goes down every few minutes with hold timer expired",
6
+ "Why is the router choosing the path through ISP B when we set local-pref 200 on ISP A?",
7
+ "RIPEstat shows our prefix with a different origin AS since this morning, is this a hijack?",
8
+ "The peer sent a NOTIFICATION cease subcode 1 and the session dropped, how do I read that?"
9
+ ],
10
+ "should_not_trigger": [
11
+ "Write a Nornir task that renders BGP neighbor config from NetBox and pushes it to all edge routers",
12
+ "Configure an extended ACL on the Cisco switch to block telnet to the management VLAN",
13
+ "My laptop can reach google.com by IP but DNS lookups fail on the office Wi-Fi",
14
+ "Plan an address scheme and VLANs for a new branch office network",
15
+ "Review this firewall ruleset before I load it on the edge gateway",
16
+ "Write the OSPF config for three Cisco routers sharing area 0 over point-to-point links"
17
+ ]
18
+ }
@@ -0,0 +1,81 @@
1
+ # BGP reference
2
+
3
+ ## FSM states (RFC 4271)
4
+
5
+ `Idle` → `Connect` → `Active` → `OpenSent` → `OpenConfirm` → `Established`. `Connect` and `Active` mean TCP to port 179 has not completed. `OpenSent`/`OpenConfirm` mean TCP is up and OPEN messages are being exchanged.
6
+
7
+ ## NOTIFICATION error codes (RFC 4271)
8
+
9
+ | Code | Meaning | Typical subcodes |
10
+ |---|---|---|
11
+ | 1 | Message Header Error | bad length or type |
12
+ | 2 | OPEN Message Error | 2 Bad Peer AS, 3 Bad BGP Identifier, 4 Unsupported Optional Parameter, 6 Unacceptable Hold Time, 7 Unsupported Capability (RFC 5492) |
13
+ | 3 | UPDATE Message Error | malformed attribute list, invalid next hop, malformed AS_PATH |
14
+ | 4 | Hold Timer Expired | no keepalive or update within the hold time |
15
+ | 5 | Finite State Machine Error | |
16
+ | 6 | Cease | see below |
17
+
18
+ Cease subcodes (RFC 4486): 1 Maximum Number of Prefixes Reached, 2 Administrative Shutdown, 3 Peer De-configured, 4 Administrative Reset, 5 Connection Rejected, 6 Other Configuration Change, 7 Connection Collision Resolution, 8 Out of Resources.
19
+
20
+ Cisco IOS default timers: keepalive 60 s, hold 180 s. The negotiated hold time is the lower of the two sides.
21
+
22
+ ## Best-path selection, Cisco IOS/IOS-XE order
23
+
24
+ A path whose next hop is unreachable is not a candidate. Then:
25
+
26
+ 1. Highest weight (Cisco-local, not advertised)
27
+ 2. Highest local preference (default 100)
28
+ 3. Locally originated (`network`, redistribution, aggregate)
29
+ 4. Shortest AS_PATH (an AS_SET counts as 1; skipped with `bgp bestpath as-path ignore`)
30
+ 5. Lowest origin: IGP < EGP < Incomplete
31
+ 6. Lowest MED, compared only between paths from the same neighbor AS unless `bgp always-compare-med` (set it AS-wide or not at all)
32
+ 7. eBGP over iBGP
33
+ 8. Lowest IGP metric to the next hop
34
+ 9. Multipath decision, if `maximum-paths` is set
35
+ 10. Oldest eBGP path (skipped with `bgp bestpath compare-routerid`)
36
+ 11. Lowest router ID (originator ID with route reflection)
37
+ 12. Shortest cluster list
38
+ 13. Lowest neighbor address
39
+
40
+ Other vendors follow the same broad order without weight; Junos and FRR differ in details (for example MED handling and the oldest-path step). Check the vendor's doc for the exact release.
41
+
42
+ ## Well-known communities
43
+
44
+ | Community | Value | Effect |
45
+ |---|---|---|
46
+ | NO_EXPORT | 65535:65281 | Do not advertise outside the AS (or confederation) |
47
+ | NO_ADVERTISE | 65535:65282 | Do not advertise to any peer |
48
+ | NO_EXPORT_SUBCONFED | 65535:65283 | Do not advertise to external peers, including other confederation member ASes |
49
+ | GRACEFUL_SHUTDOWN | 65535:0 | RFC 8326: receiver lowers local preference before planned maintenance |
50
+ | BLACKHOLE | 65535:666 | RFC 7999: request the neighbor to discard traffic to the prefix (only if the neighbor supports it) |
51
+
52
+ Regular communities are `ASN:value` (RFC 1997). Large communities are `ASN:value1:value2` (RFC 8092) and are needed for 4-byte ASNs. Provider-specific action communities (prepend, local-pref, no-export to a region) are documented by each provider; look them up, never guess. On IOS, communities are only sent to a neighbor with `neighbor <ip> send-community` (`both` or `extended`/`large` as needed).
53
+
54
+ ## RPKI route origin validation (RFC 6811)
55
+
56
+ Result per route: Valid (a ROA covers the prefix with the same origin AS and the prefix length is within max-length), Invalid (covered but wrong origin or too long), NotFound (no covering ROA). Many networks drop Invalid.
57
+
58
+ ## Command equivalents
59
+
60
+ | Task | Cisco IOS/IOS-XE | Junos | Arista EOS | FRR (vtysh) |
61
+ |---|---|---|---|---|
62
+ | Summary | `show bgp ipv4 unicast summary` | `show bgp summary` | `show ip bgp summary` | `show bgp summary` |
63
+ | Neighbor detail | `show bgp ipv4 unicast neighbors <ip>` | `show bgp neighbor <ip>` | `show ip bgp neighbors <ip>` | `show bgp neighbors <ip>` |
64
+ | Prefix detail | `show bgp ipv4 unicast <prefix>` | `show route <prefix> detail` | `show ip bgp <prefix>` | `show bgp ipv4 unicast <prefix>` |
65
+ | Sent to peer | `show bgp ipv4 unicast neighbors <ip> advertised-routes` | `show route advertising-protocol bgp <ip>` | `show ip bgp neighbors <ip> advertised-routes` | `show bgp ipv4 unicast neighbors <ip> advertised-routes` |
66
+ | Received from peer (before policy) | `... neighbors <ip> received-routes` (needs `soft-reconfiguration inbound`) | `show route receive-protocol bgp <ip>` | `show ip bgp neighbors <ip> received-routes` | `... neighbors <ip> received-routes` (configure `soft-reconfiguration inbound` to keep the pre-policy table) |
67
+ | Soft refresh inbound (operator runs) | `clear bgp ipv4 unicast <ip> soft in` | `clear bgp neighbor <ip> soft-inbound` | `clear ip bgp <ip> soft in` | `clear bgp ipv4 unicast <ip> soft in` |
68
+
69
+ Check whether `received-routes` / `receive-protocol` output on your release is before or after inbound policy before drawing conclusions from it.
70
+
71
+ ## Sources
72
+
73
+ - RFC 4271 (FSM, NOTIFICATION codes, OPEN subcodes, hold time): https://www.rfc-editor.org/rfc/rfc4271
74
+ - RFC 4486 (Cease subcodes): https://www.rfc-editor.org/rfc/rfc4486
75
+ - RFC 5492 (subcode 7, Unsupported Capability): https://www.rfc-editor.org/rfc/rfc5492
76
+ - IANA well-known communities: https://www.iana.org/assignments/bgp-well-known-communities/
77
+ - RFC 8092 (large communities), RFC 6811 (origin validation), RFC 8212 (eBGP default reject)
78
+ - Cisco best-path algorithm: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html
79
+ - Cisco IOS BGP timers (`neighbor timers`): https://www.cisco.com/c/en/us/td/docs/ios/iproute_bgp/command/reference/irg_book/irg_bgp4.html
80
+ - FRR BGP (`ebgp-requires-policy`, show and clear commands): https://docs.frrouting.org/en/latest/bgp.html
81
+ - Junos `clear bgp neighbor`: https://www.juniper.net/documentation/us/en/software/junos/bgp/topics/ref/command/clear-bgp-neighbor.html
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: bioinformatics-workflows
3
+ description: Bioinformatics pipeline work on FASTA, FASTQ, SAM/BAM/CRAM and VCF files with Biopython, samtools, bcftools, seqkit, FastQC, aligners such as bwa-mem2 and minimap2, and Snakemake or Nextflow workflows run in pinned conda, Docker or Apptainer environments so results reproduce. Use when parsing or converting sequence and alignment files, writing or debugging a Snakemake or Nextflow pipeline, running read QC, alignment or variant calling steps, or making a genomics analysis reproducible on a laptop, HPC cluster or cloud.
4
+ license: MIT
5
+ compatibility: Any Agent Skills host. Needs the tools the pipeline uses (for example samtools, bcftools, snakemake or nextflow) and a conda/mamba, Docker or Apptainer install for pinned environments.
6
+ metadata:
7
+ kete-loom/version: "0.1.0"
8
+ kete-loom/category: data
9
+ kete-loom/risk: runs-commands
10
+ kete-loom/requires: "samtools, bcftools"
11
+ kete-loom/owner: "Kete-org"
12
+ ---
13
+
14
+ # Bioinformatics workflows
15
+
16
+ Get sequence data from raw reads to results with every step scripted, every tool version pinned, and every intermediate file checked before the next step trusts it.
17
+
18
+ ## Scope and limits
19
+
20
+ - This skill covers data handling and pipeline engineering. It does not choose the statistical model for a study or interpret variants clinically. Clinical or diagnostic use of variant calls needs a validated pipeline and review by a qualified clinical scientist; say so when the user's data is from patients.
21
+ - Human genomic data is personal data. Never upload it to a public service, paste it into an issue, or commit it to git. Ask where the data is allowed to live before moving it.
22
+
23
+ ## 0. Before you start
24
+
25
+ 1. Ask for, or find in the repo: organism and **reference genome build** (for example GRCh38 vs GRCh37, with the exact FASTA source), sequencing type (short-read Illumina, long-read ONT/PacBio), single or paired-end, and the expected output.
26
+ 2. Inspect the inputs before writing code: `seqkit stats reads.fastq.gz`, `samtools quickcheck -v *.bam`, `samtools view -H sample.bam | head`, `bcftools view -h calls.vcf.gz | tail -5`.
27
+ 3. Check that contig names agree across the reference, BAM header and VCF (`chr1` vs `1`). Mismatched builds or names are the most common silent failure. Stop and ask if they differ.
28
+
29
+ ## 1. Know the formats
30
+
31
+ Detail and gotchas in `references/formats.md`. The rules that bite most often:
32
+
33
+ - FASTQ quality scores are Phred+33 on modern Illumina and ONT; old data may be Phred+64. Paired files must stay in the same read order.
34
+ - SAM text and VCF are 1-based, BED is 0-based half-open, and pysam returns 0-based starts (`read.reference_start`, `record.start`) even for SAM and VCF. Convert explicitly.
35
+ - BAM and VCF need sorting and an index (`.bai`/`.csi`, `.tbi`/`.csi`) before region queries. Compress VCF with `bgzip`, not `gzip`.
36
+ - CRAM needs the exact reference FASTA it was written against to decode.
37
+
38
+ ## 2. Pick the tool
39
+
40
+ | Job | Use |
41
+ |---|---|
42
+ | Inspect, filter, sort, index BAM/CRAM | `samtools view`, `sort`, `index`, `flagstat`, `idxstats` |
43
+ | Filter, normalise, merge, query VCF/BCF | `bcftools view`, `norm`, `merge`, `query`, `index` |
44
+ | Fast FASTA/FASTQ stats, subset, convert | `seqkit` |
45
+ | Read QC and reports | FastQC, then MultiQC to aggregate |
46
+ | Short-read alignment to a genome | `bwa-mem2` (or `bwa mem`), `bowtie2` |
47
+ | Long reads, assemblies, spliced long reads | `minimap2` with the right preset (`-ax map-ont`, `-ax map-hifi`, `-ax splice`) |
48
+ | Interval arithmetic | `bedtools` |
49
+ | Parsing in Python | Biopython `SeqIO` for sequences, `pysam` for BAM/VCF |
50
+
51
+ Command patterns are in `references/commands.md`. Prefer a maintained community tool over hand-written parsing. Never parse BAM or VCF with regex.
52
+
53
+ ## 3. Biopython essentials
54
+
55
+ - `SeqIO.parse(path, "fasta")` and `SeqIO.parse(handle, "fastq")` stream records; use them in a loop, not `list(...)`, for large files. Open `.gz` with `gzip.open(path, "rt")`.
56
+ - `SeqIO.index(path, "fasta")` for random access by ID without loading the file.
57
+ - `Bio.Entrez` needs `Entrez.email` set; keep within NCBI limits (3 requests/second, 10 with an API key).
58
+ - Write with `SeqIO.write(records, out, "fasta")`. Check record IDs are unique.
59
+
60
+ ## 4. Build the pipeline in a workflow manager
61
+
62
+ Use Snakemake or Nextflow for anything with more than two steps or more than a handful of samples. Templates are in `references/workflow-managers.md`.
63
+
64
+ 1. One rule or process per tool invocation. Inputs and outputs declared, never implied.
65
+ 2. Sample list comes from a config or sample sheet (`config.yaml`, `samplesheet.csv`), never hard-coded.
66
+ 3. Each rule or process names its own environment: a conda YAML with pinned versions, or a container image with a tag (better, a digest).
67
+ 4. Threads and memory declared per step, so the executor can schedule on a cluster.
68
+ 5. Write logs per step and per sample.
69
+ 6. Dry-run before the real run: `snakemake -n` or `nextflow run main.nf -preview` (or `-stub-run` with stub blocks).
70
+ 7. Rerun only what changed: Snakemake does this by default; Nextflow needs `-resume`.
71
+ 8. Before writing a pipeline from scratch, check whether an nf-core pipeline or a Snakemake workflow catalog entry already does the job; reuse it if it fits.
72
+
73
+ ## 5. Make it reproducible
74
+
75
+ - Pin every tool version (`samtools=1.24`, not `samtools`). Export the solved environment (`conda env export --no-builds` or a lock file) and commit it.
76
+ - Record the reference genome source URL, build and checksum. Keep reference files out of git; document how to fetch them.
77
+ - Fix random seeds where tools take one (subsampling: `seqkit sample -s 11`, `samtools view -s 42.1`).
78
+ - Generate a run report: Snakemake `--report report.html`, Nextflow `-with-report -with-trace -with-timeline`.
79
+ - Store raw data read-only. Never overwrite inputs in place.
80
+
81
+ ## 6. Verify each step
82
+
83
+ After each stage, check before moving on:
84
+
85
+ - QC: FastQC/MultiQC flags reviewed; adapter content and per-base quality noted.
86
+ - Alignment: `samtools flagstat` mapping rate and properly-paired rate in a sensible range for the data type; `samtools quickcheck` passes.
87
+ - Variants: `bcftools stats` counts, transition/transversion ratio plausible for the organism and region; `bcftools norm -f ref.fa -c w -Ou -o /dev/null calls.vcf.gz` warns about no REF mismatches against the reference.
88
+ - Row and record counts agree between input and output where they should.
89
+
90
+ If a number is far outside what the data type normally gives, stop and report it to the user before continuing.
91
+
92
+ ## Never
93
+
94
+ - Mix reference builds in one analysis.
95
+ - Use `latest` container tags or unpinned conda packages in a pipeline others will run.
96
+ - Delete intermediate files the user has not agreed can go (use Snakemake `temp()` or Nextflow cleanup only when agreed).
97
+ - Commit raw sequencing data, reference genomes or credentials to git.
98
+
99
+ ## Report back
100
+
101
+ ```
102
+ Inputs: <files, organism, build, read type>
103
+ Pipeline: <Snakemake|Nextflow>, entry <file>, environments <how pinned>
104
+ Ran: <exact command>, <dry-run result>, <real run result>
105
+ Checks: <QC, flagstat, bcftools stats numbers>
106
+ Outputs: <paths>
107
+ Open issues: <anything outside expected ranges, unresolved mismatches>
108
+ ```
@@ -0,0 +1,16 @@
1
+ {
2
+ "should_trigger": [
3
+ "My bcftools merge fails because the contig names in one VCF are chr1 and the other is 1, how do I fix it safely?",
4
+ "Write a Snakemake pipeline that runs FastQC, aligns paired-end reads with bwa-mem2 and outputs sorted indexed BAMs",
5
+ "Parse this FASTQ file with Biopython and drop reads shorter than 50 bases",
6
+ "Our Nextflow run on the cluster died halfway, how do I restart it without redoing the alignment tasks?",
7
+ "Pin the conda environments for our variant calling workflow so the lab next door gets the same samtools version"
8
+ ],
9
+ "should_not_trigger": [
10
+ "Find and summarise recent papers on CRISPR off-target prediction methods",
11
+ "Set up an Airflow DAG that loads our sales CSVs into the warehouse every night",
12
+ "Tidy my exploratory pandas notebook and move the cleaning code into a module",
13
+ "Write a dbt model that joins orders to customers",
14
+ "Write a GitHub Actions workflow that runs pytest on every pull request"
15
+ ]
16
+ }
@@ -0,0 +1,71 @@
1
+ # Command patterns
2
+
3
+ Check each tool's `--help` for the installed version before relying on a flag.
4
+
5
+ ## Inspect
6
+
7
+ ```bash
8
+ seqkit stats -a reads_R1.fastq.gz reads_R2.fastq.gz
9
+ samtools quickcheck -v sample.bam && echo ok
10
+ samtools view -H sample.bam # header: @SQ contigs, @RG read groups, @PG programs
11
+ samtools flagstat -@ 4 sample.bam
12
+ samtools idxstats sample.bam # reads per contig (needs index)
13
+ bcftools view -h calls.vcf.gz | tail
14
+ bcftools stats calls.vcf.gz > calls.stats.txt
15
+ ```
16
+
17
+ ## QC
18
+
19
+ ```bash
20
+ mkdir -p qc
21
+ fastqc -t 4 -o qc/ reads_R1.fastq.gz reads_R2.fastq.gz
22
+ multiqc qc/ -o qc/
23
+ ```
24
+
25
+ ## Align short reads and make an indexed BAM
26
+
27
+ ```bash
28
+ bwa-mem2 index ref.fa # once per reference
29
+ bwa-mem2 mem -t 8 -R '@RG\tID:s1\tSM:s1\tPL:ILLUMINA' ref.fa R1.fq.gz R2.fq.gz \
30
+ | samtools sort -@ 4 -o s1.sorted.bam -
31
+ samtools index s1.sorted.bam
32
+ ```
33
+
34
+ Long reads: `minimap2 -ax map-ont ref.fa reads.fq.gz | samtools sort -o out.bam -` (use `map-hifi` for PacBio HiFi, `splice` for spliced cDNA).
35
+
36
+ ## Mark duplicates with samtools
37
+
38
+ ```bash
39
+ samtools sort -n -o s1.name.bam s1.sorted.bam
40
+ samtools fixmate -m s1.name.bam s1.fixmate.bam
41
+ samtools sort -o s1.pos.bam s1.fixmate.bam
42
+ samtools markdup s1.pos.bam s1.markdup.bam
43
+ samtools index s1.markdup.bam
44
+ ```
45
+
46
+ ## Variants
47
+
48
+ ```bash
49
+ bcftools mpileup -f ref.fa -Ou s1.markdup.bam | bcftools call -mv -Oz -o s1.vcf.gz
50
+ bcftools index -t s1.vcf.gz
51
+ bcftools norm -f ref.fa -m -any -Oz -o s1.norm.vcf.gz s1.vcf.gz
52
+ bcftools view -i 'QUAL>=30 && INFO/DP>=10' -Oz -o s1.filt.vcf.gz s1.norm.vcf.gz
53
+ bcftools query -f '%CHROM\t%POS\t%REF\t%ALT\t[%GT]\n' s1.filt.vcf.gz
54
+ ```
55
+
56
+ Filter thresholds are examples; choose them for the data and caller, and say which you used.
57
+
58
+ ## Regions and intervals
59
+
60
+ ```bash
61
+ samtools view -b -o region.bam s1.markdup.bam chr1:1000000-2000000
62
+ bcftools view -r chr1:1000000-2000000 s1.filt.vcf.gz
63
+ bedtools intersect -a calls.bed -b targets.bed -u
64
+ ```
65
+
66
+ ## Subsampling with a fixed seed
67
+
68
+ ```bash
69
+ seqkit sample -s 11 -p 0.1 reads.fq.gz -o sub.fq.gz
70
+ samtools view -b -s 42.1 -o sub.bam s1.markdup.bam # seed 42, keep 10%
71
+ ```
@@ -0,0 +1,24 @@
1
+ # Sequence and alignment formats
2
+
3
+ | Format | What it holds | Coordinates | Compression and index |
4
+ |---|---|---|---|
5
+ | FASTA | sequences with `>id description` headers | n/a | `bgzip` + `samtools faidx` (`.fai`, plus `.gzi` when bgzipped) |
6
+ | FASTQ | reads: 4 lines per record (`@id`, sequence, `+`, qualities) | n/a | gzip or bgzip; no index needed for streaming |
7
+ | SAM | text alignments, header lines start with `@` | 1-based `POS` | n/a |
8
+ | BAM | binary SAM | as SAM | BGZF; coordinate-sort then `samtools index` (`.bai`, or `.csi` for very long contigs) |
9
+ | CRAM | reference-compressed alignments | as SAM | needs the same reference FASTA to decode; `.crai` index |
10
+ | VCF / BCF | variant calls per site, genotypes per sample | 1-based `POS` | `bgzip` + `bcftools index -t` (`.tbi`) or `-c` (`.csi`) |
11
+ | BED | intervals | 0-based start, end exclusive | `bgzip` + `tabix -p bed` |
12
+ | GFF3 / GTF | gene annotations | 1-based, inclusive | `bgzip` + `tabix -p gff` after sorting |
13
+
14
+ ## Gotchas
15
+
16
+ - **Quality encoding.** Phred+33 is standard (Illumina 1.8+ and later, ONT, PacBio). If any quality character is below `;` (ASCII 59), the file must be Phred+33, because Phred+64 and Solexa never use those characters; FastQC's Basic Statistics module reports the encoding it used.
17
+ - **Paired-end order.** R1 and R2 must list the same reads in the same order. Tools that filter one file must filter both together (for example `fastp -i R1 -I R2 -o ... -O ...`).
18
+ - **Read names.** Some tools strip `/1` `/2` suffixes or comments after whitespace; keep names consistent across files.
19
+ - **SAM flags.** Decode with `samtools flags <n>`. Common: 4 unmapped, 256 secondary, 1024 duplicate, 2048 supplementary. Filtering primary mapped reads: `samtools view -F 0x904`.
20
+ - **pysam coordinates.** pysam is 0-based half-open (`reference_start`, `VariantRecord.start`); `VariantRecord.pos` is the 1-based VCF POS. Mixing them gives off-by-one errors.
21
+ - **Sorting.** Coordinate sort for indexing and variant calling; name sort (`samtools sort -n`) for tools that need mates adjacent, such as `samtools fixmate`.
22
+ - **VCF normalisation.** Left-align and split multi-allelic sites before comparing call sets: `bcftools norm -f ref.fa -m -any`.
23
+ - **Contig names.** `chr1` (UCSC style) vs `1` (Ensembl/NCBI style). Check with `samtools view -H` and `bcftools view -h`; rename with `bcftools annotate --rename-chrs` only after confirming the builds match.
24
+ - **bgzip vs gzip.** Indexed formats need BGZF blocks; plain `gzip` output cannot be indexed.
@@ -0,0 +1,107 @@
1
+ # Workflow managers
2
+
3
+ ## Snakemake
4
+
5
+ `Snakefile`:
6
+
7
+ ```python
8
+ configfile: "config.yaml"
9
+ SAMPLES = config["samples"]
10
+
11
+ rule all:
12
+ input: expand("results/{s}.flagstat.txt", s=SAMPLES)
13
+
14
+ rule align:
15
+ input:
16
+ r1="data/{s}_R1.fastq.gz",
17
+ r2="data/{s}_R2.fastq.gz",
18
+ ref=config["reference"],
19
+ output: "results/{s}.sorted.bam"
20
+ log: "logs/align/{s}.log"
21
+ threads: 8
22
+ resources: mem_mb=16000
23
+ conda: "envs/align.yaml"
24
+ shell:
25
+ "(bwa-mem2 mem -t {threads} {input.ref} {input.r1} {input.r2} "
26
+ "| samtools sort -@ {threads} -o {output} -) 2> {log}"
27
+
28
+ rule flagstat:
29
+ input: "results/{s}.sorted.bam"
30
+ output: "results/{s}.flagstat.txt"
31
+ conda: "envs/align.yaml"
32
+ shell: "samtools flagstat {input} > {output}"
33
+ ```
34
+
35
+ `envs/align.yaml` pins versions:
36
+
37
+ ```yaml
38
+ channels: [conda-forge, bioconda] # bioconda's recommended order; set channel_priority strict in .condarc
39
+ dependencies:
40
+ - bwa-mem2=2.3 # example pins: current bioconda releases in Oct 2026; pin what you tested
41
+ - samtools=1.24
42
+ ```
43
+
44
+ Run:
45
+
46
+ ```bash
47
+ snakemake -n # dry run: shows the job plan
48
+ snakemake --cores 8 --software-deployment-method conda # short form: --sdm conda; older: --use-conda
49
+ snakemake --cores 8 --sdm apptainer # rules with a container: directive
50
+ snakemake --report report.html # after a run
51
+ snakemake --lint # style and best-practice checks
52
+ ```
53
+
54
+ Use `temp()` for intermediates that may be deleted and `protected()` for outputs that must not be overwritten. Cluster and cloud execution uses executor plugins (`--executor slurm` with the slurm plugin installed); configure them in a profile rather than on the command line.
55
+
56
+ ## Nextflow (DSL2)
57
+
58
+ `main.nf`:
59
+
60
+ ```groovy
61
+ params.samplesheet = 'samplesheet.csv'
62
+ params.reference = 'ref/genome.fa'
63
+
64
+ process ALIGN {
65
+ tag "$sample"
66
+ cpus 8
67
+ memory '16 GB'
68
+ container 'quay.io/biocontainers/<image>:<tag>' // pin a tag or digest
69
+ input:
70
+ tuple val(sample), path(r1), path(r2)
71
+ path ref
72
+ output:
73
+ tuple val(sample), path("${sample}.sorted.bam")
74
+ script:
75
+ """
76
+ bwa-mem2 mem -t ${task.cpus} ${ref} ${r1} ${r2} | samtools sort -@ ${task.cpus} -o ${sample}.sorted.bam -
77
+ """
78
+ }
79
+
80
+ workflow {
81
+ reads = Channel.fromPath(params.samplesheet)
82
+ .splitCsv(header: true)
83
+ .map { row -> tuple(row.sample, file(row.r1), file(row.r2)) }
84
+ ALIGN(reads, file(params.reference))
85
+ }
86
+ ```
87
+
88
+ Note: `bwa-mem2` also needs its index files beside the reference; stage them as an extra `path` input or point to the index directory.
89
+
90
+ Run:
91
+
92
+ ```bash
93
+ nextflow run main.nf -profile docker -preview # check the workflow compiles without running tasks
94
+ nextflow run main.nf -profile docker -params-file params.yaml
95
+ nextflow run main.nf -profile docker -resume # reuse cached tasks
96
+ nextflow run main.nf -with-report -with-trace -with-timeline
97
+ nextflow run nf-core/<pipeline> -r <version> -profile docker,test # pin community pipelines with -r
98
+ nextflow lint main.nf # Nextflow 25.04+
99
+ ```
100
+
101
+ Profiles (`docker`, `apptainer`, `conda`, a cluster executor) live in `nextflow.config`. Always pin nf-core pipelines with `-r <release>`.
102
+
103
+ ## Choosing
104
+
105
+ - Snakemake: Python-centric team, file-based rules, simple local or Slurm runs.
106
+ - Nextflow: channel-based dataflow, strong container and cloud support, nf-core ecosystem.
107
+ - Either way: one environment per step, config-driven samples, dry run first.
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: brand-voice
3
+ description: Defines a company's written brand voice as three to five attributes with "this, not that" boundaries, paired do and don't rewrites, a preferred and banned vocabulary list and tone shifts by context, then checks or rewrites copy against that guide. Use when a team needs a voice and tone guide, wants marketing, product, support or social copy made consistent, or asks whether a piece of text sounds on-brand.
4
+ license: MIT
5
+ compatibility: Any Agent Skills host. No tools required; reads existing copy, a website or docs the user points to.
6
+ metadata:
7
+ kete-loom/version: "0.1.0"
8
+ kete-loom/category: business
9
+ kete-loom/risk: read-only
10
+ kete-loom/owner: "Kete-org"
11
+ ---
12
+
13
+ # Brand voice
14
+
15
+ Voice is who the brand is, and stays constant. Tone is how that voice adjusts to the moment. This skill has two modes: **define** a voice guide, or **apply** one to copy.
16
+
17
+ Ask which mode, or infer it: "create our voice guide" is define; "make this sound like us" or "is this on-brand?" is apply. If applying and no guide exists, offer to define a short one first.
18
+
19
+ ## Define mode
20
+
21
+ ### 1. Gather inputs
22
+
23
+ 1. What the company does, for whom, and its positioning against alternatives.
24
+ 2. Audience: who reads the copy and what they need from it.
25
+ 3. Existing material: website, app copy, emails, support replies, social posts. Ask for 5-10 pieces the team likes and 2-3 they dislike.
26
+ 4. Values or personality words the team already uses.
27
+ 5. Markets and languages (formality and humour travel differently).
28
+
29
+ ### 2. Find the voice in the evidence
30
+
31
+ Read the material the team likes. Note recurring traits: sentence length, formality, humour, jargon, how the reader is addressed, use of "we".
32
+ Compare with the disliked pieces: what exactly is wrong with them?
33
+
34
+ ### 3. Write three to five voice attributes
35
+
36
+ Each attribute has a boundary so it cannot be misread:
37
+
38
+ | Attribute | This | Not that | Sounds like |
39
+ |---|---|---|---|
40
+ | Plain-spoken | Short words, direct claims | Blunt, curt | "Your payout lands tomorrow." |
41
+ | Warm | Helpful, human, uses "you" | Gushing, over-familiar | "Thanks for waiting, here's what happened." |
42
+ | Confident | States facts, recommends | Arrogant, salesy | "This plan fits teams of 5-50." |
43
+
44
+ Rules for attributes: specific enough that two writers would apply them the same way; no generic words without boundaries ("innovative", "professional"); at least one attribute should distinguish the brand from its main competitors.
45
+
46
+ ### 4. Do and don't examples
47
+
48
+ For each attribute, give at least two pairs of real or realistic lines from the brand's own contexts:
49
+
50
+ ```
51
+ Don't: "We are thrilled to announce our revolutionary new feature!!!"
52
+ Do: "You can now schedule payouts. Pick a date and we'll handle the rest."
53
+ Why: Plain-spoken and confident: says what changed and what to do.
54
+ ```
55
+
56
+ ### 5. Vocabulary
57
+
58
+ - **Use**: product names (exact spelling and capitalisation), preferred terms ("customer" vs "user"), phrases that carry the brand.
59
+ - **Avoid**: jargon, clichés ("seamless", "cutting-edge", "game-changer"), words that conflict with the voice, and terms with legal or regulatory weight that need approval (for example "guaranteed", "free", "secure" in regulated industries).
60
+ - **Mechanics**: spelling variant (US or UK), date and currency formats, contractions, emoji policy, capitalisation of headings, punctuation choices (Oxford comma, exclamation marks).
61
+
62
+ ### 6. Tone by context
63
+
64
+ Show how the voice flexes, with one example line each:
65
+
66
+ | Context | Tone shift | Example |
67
+ |---|---|---|
68
+ | Marketing / landing page | Most energetic, benefit-led | |
69
+ | Product UI and errors | Brief, calm, tells the user what to do | |
70
+ | Support replies | Patient, specific, owns problems | |
71
+ | Incident or bad news | Serious, direct, no jokes, no spin | |
72
+ | Social | Conversational, can be playful | |
73
+ | Legal / billing | Precise, neutral, plain words | |
74
+
75
+ Ask the user to confirm the attributes before writing the full guide if the evidence was thin.
76
+
77
+ ### Guide output
78
+
79
+ ```
80
+ # <Brand> voice and tone guide
81
+ ## Who we're talking to
82
+ ## Our voice in one sentence
83
+ ## Voice attributes (table with This / Not that / Sounds like)
84
+ ## Do and don't (pairs with why)
85
+ ## Vocabulary (use / avoid / mechanics)
86
+ ## Tone by context (table)
87
+ ## Quick checklist for writers (5-8 yes/no questions)
88
+ ```
89
+
90
+ ## Apply mode
91
+
92
+ 1. Load the guide (from the user, the repo, or the one just defined). Do not apply a voice you made up.
93
+ 2. Identify the context of the copy (UI, marketing, support...) and the tone that context needs.
94
+ 3. Review against each attribute, the vocabulary list and mechanics. Quote each problem line.
95
+ 4. Rewrite only what is off-voice. Keep the meaning, facts, claims, legal wording and length constraints (UI strings, character limits) intact.
96
+ 5. If a rewrite would change a factual or legal claim, flag it instead of changing it.
97
+
98
+ ### Review output
99
+
100
+ ```
101
+ ## Voice review: <piece>
102
+ Verdict: on-brand | mostly on-brand | off-brand
103
+ | # | Line | Issue (attribute or rule) | Suggested rewrite |
104
+ ## Revised copy (if requested)
105
+ ```
106
+
107
+ ## Rules
108
+
109
+ - Never copy another company's voice guide or tagline; derive the voice from this brand's own material.
110
+ - Never introduce claims, numbers or promises while rewriting.
111
+ - Keep inclusive, accessible language: no idioms that exclude, no ableist or gendered defaults, reading level suited to the audience.
112
+ - Writing a whole new article is the `article-writing` skill's job; this skill shapes how it sounds.
@@ -0,0 +1,16 @@
1
+ {
2
+ "should_trigger": [
3
+ "Create a voice and tone guide for our fintech app, with do and don't examples",
4
+ "Does this onboarding email sound like us? Here's our style guide and the draft.",
5
+ "Our website, support macros and app error messages all sound different. Help us define one consistent brand voice.",
6
+ "Rewrite these push notifications so they match our playful-but-clear brand personality",
7
+ "Make a list of words our copywriters should use and avoid, plus how tone changes for incident messages"
8
+ ],
9
+ "should_not_trigger": [
10
+ "Write a 2000-word article about the history of mobile money in Ghana",
11
+ "Design a logo and colour palette for our new brand",
12
+ "Plan our product launch campaign with channels and a budget",
13
+ "Check our landing page meta titles and structured data for SEO problems",
14
+ "Draft the one-pager we send to angel investors"
15
+ ]
16
+ }