skilldrop-cli 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.
Files changed (226) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +413 -0
  3. package/bin/skilldrop.js +338 -0
  4. package/model-routing.json +147 -0
  5. package/package.json +36 -0
  6. package/packs.json +90 -0
  7. package/skills/accessibility-audit/SKILL.md +74 -0
  8. package/skills/accessibility-audit/examples/login-form.md +76 -0
  9. package/skills/accessibility-audit/manifest.json +11 -0
  10. package/skills/accessibility-audit/reference.md +69 -0
  11. package/skills/adr-generator/SKILL.md +49 -0
  12. package/skills/adr-generator/manifest.json +11 -0
  13. package/skills/adr-generator/templates/madr.md +56 -0
  14. package/skills/adr-generator/templates/nygard.md +19 -0
  15. package/skills/ai-usage-report/SKILL.md +111 -0
  16. package/skills/ai-usage-report/examples/weekly-engineering-team.md +133 -0
  17. package/skills/ai-usage-report/manifest.json +11 -0
  18. package/skills/ai-usage-report/scripts/build_report.py +436 -0
  19. package/skills/ai-usage-report/templates/report-per-user.md +42 -0
  20. package/skills/ai-usage-report/templates/report-team-rollup.md +49 -0
  21. package/skills/ai-usage-report/templates/usage-event-schema.md +76 -0
  22. package/skills/api-contract-draft/SKILL.md +69 -0
  23. package/skills/api-contract-draft/manifest.json +11 -0
  24. package/skills/api-contract-draft/reference.md +73 -0
  25. package/skills/api-contract-draft/templates/openapi-skeleton.yaml +148 -0
  26. package/skills/architecture-diagrams/SKILL.md +66 -0
  27. package/skills/architecture-diagrams/examples/aws-three-tier.md +44 -0
  28. package/skills/architecture-diagrams/examples/c4-container-saas.md +51 -0
  29. package/skills/architecture-diagrams/examples/microservices-sequence.md +49 -0
  30. package/skills/architecture-diagrams/manifest.json +28 -0
  31. package/skills/architecture-diagrams/templates/c4-container.puml +31 -0
  32. package/skills/architecture-diagrams/templates/mermaid-aws.md +52 -0
  33. package/skills/architecture-diagrams/templates/mermaid-flowchart.md +37 -0
  34. package/skills/architecture-diagrams/templates/mermaid-sequence.md +39 -0
  35. package/skills/audience-profile/SKILL.md +73 -0
  36. package/skills/audience-profile/manifest.json +11 -0
  37. package/skills/audience-profile/reference.md +175 -0
  38. package/skills/brief-intake/SKILL.md +78 -0
  39. package/skills/brief-intake/manifest.json +11 -0
  40. package/skills/brief-intake/templates/brief-adr.md +41 -0
  41. package/skills/brief-intake/templates/brief-decision-log.md +35 -0
  42. package/skills/brief-intake/templates/brief-deck.md +43 -0
  43. package/skills/brief-intake/templates/brief-design-doc.md +48 -0
  44. package/skills/brief-intake/templates/brief-exec-summary.md +47 -0
  45. package/skills/brief-intake/templates/brief-generic.md +45 -0
  46. package/skills/brief-intake/templates/brief-runbook.md +44 -0
  47. package/skills/brief-intake/templates/brief-tech-comparison.md +38 -0
  48. package/skills/bug-triage/SKILL.md +67 -0
  49. package/skills/bug-triage/manifest.json +11 -0
  50. package/skills/bug-triage/templates/bug-ticket.md +86 -0
  51. package/skills/business-case/SKILL.md +64 -0
  52. package/skills/business-case/manifest.json +11 -0
  53. package/skills/business-case/templates/business-case.md +60 -0
  54. package/skills/capacity-cost-model/SKILL.md +64 -0
  55. package/skills/capacity-cost-model/manifest.json +11 -0
  56. package/skills/capacity-cost-model/reference.md +54 -0
  57. package/skills/capacity-cost-model/templates/cost-model.md +68 -0
  58. package/skills/council-review/SKILL.md +106 -0
  59. package/skills/council-review/examples/redis-cache-decision.md +75 -0
  60. package/skills/council-review/manifest.json +11 -0
  61. package/skills/council-review/reference.md +76 -0
  62. package/skills/council-review/seats/architect.md +29 -0
  63. package/skills/council-review/seats/bench.md +39 -0
  64. package/skills/council-review/seats/operator.md +27 -0
  65. package/skills/council-review/seats/pragmatist.md +29 -0
  66. package/skills/council-review/seats/security-engineer.md +29 -0
  67. package/skills/council-review/seats/user-advocate.md +27 -0
  68. package/skills/council-review/templates/council-review.md +59 -0
  69. package/skills/data-contract/SKILL.md +67 -0
  70. package/skills/data-contract/manifest.json +11 -0
  71. package/skills/data-contract/reference.md +46 -0
  72. package/skills/data-contract/templates/data-contract.md +69 -0
  73. package/skills/db-schema-design/SKILL.md +68 -0
  74. package/skills/db-schema-design/manifest.json +11 -0
  75. package/skills/db-schema-design/reference.md +56 -0
  76. package/skills/db-schema-design/templates/schema-design.md +75 -0
  77. package/skills/decision-log/SKILL.md +67 -0
  78. package/skills/decision-log/manifest.json +11 -0
  79. package/skills/deck-builder/SKILL.md +114 -0
  80. package/skills/deck-builder/examples/exec-board-update.md +108 -0
  81. package/skills/deck-builder/manifest.json +17 -0
  82. package/skills/deck-builder/reference.md +92 -0
  83. package/skills/deck-builder/requirements.txt +1 -0
  84. package/skills/deck-builder/scripts/build_deck.py +309 -0
  85. package/skills/deck-builder/templates/deck-spec.json +97 -0
  86. package/skills/deck-builder/templates/palettes.json +59 -0
  87. package/skills/design-doc/SKILL.md +49 -0
  88. package/skills/design-doc/manifest.json +11 -0
  89. package/skills/design-doc/templates/design-doc.md +98 -0
  90. package/skills/devils-advocate/SKILL.md +142 -0
  91. package/skills/devils-advocate/lenses/adversarial-review.md +88 -0
  92. package/skills/devils-advocate/lenses/edge-cases.md +95 -0
  93. package/skills/devils-advocate/lenses/future-proofing.md +75 -0
  94. package/skills/devils-advocate/lenses/test-coverage.md +90 -0
  95. package/skills/devils-advocate/manifest.json +11 -0
  96. package/skills/devils-advocate/templates/challenge.md +118 -0
  97. package/skills/doc-critique/SKILL.md +119 -0
  98. package/skills/doc-critique/manifest.json +11 -0
  99. package/skills/doc-critique/rubrics/adr.md +36 -0
  100. package/skills/doc-critique/rubrics/decision-log.md +39 -0
  101. package/skills/doc-critique/rubrics/deck.md +45 -0
  102. package/skills/doc-critique/rubrics/design-doc.md +42 -0
  103. package/skills/doc-critique/rubrics/exec-summary.md +41 -0
  104. package/skills/doc-critique/rubrics/generic.md +40 -0
  105. package/skills/doc-critique/rubrics/runbook.md +42 -0
  106. package/skills/doc-critique/rubrics/tech-comparison.md +40 -0
  107. package/skills/doc-critique/templates/critique.md +49 -0
  108. package/skills/exec-summary/SKILL.md +45 -0
  109. package/skills/exec-summary/manifest.json +11 -0
  110. package/skills/exec-summary/templates/exec-summary.md +48 -0
  111. package/skills/feature-implement-loop/SKILL.md +83 -0
  112. package/skills/feature-implement-loop/manifest.json +11 -0
  113. package/skills/figma-diagrams/SKILL.md +85 -0
  114. package/skills/figma-diagrams/manifest.json +35 -0
  115. package/skills/figma-diagrams/reference.md +91 -0
  116. package/skills/figma-diagrams/requirements.txt +1 -0
  117. package/skills/figma-diagrams/scripts/_figma_client.py +71 -0
  118. package/skills/figma-diagrams/scripts/frame_to_mermaid.py +102 -0
  119. package/skills/figma-diagrams/scripts/inspect_file.py +46 -0
  120. package/skills/figma-diagrams/scripts/list_comments.py +35 -0
  121. package/skills/figma-diagrams/scripts/post_comment.py +52 -0
  122. package/skills/figma-diagrams/templates/figjam-import.json +20 -0
  123. package/skills/guide-builder/SKILL.md +76 -0
  124. package/skills/guide-builder/examples/local-setup-guide.md +127 -0
  125. package/skills/guide-builder/manifest.json +11 -0
  126. package/skills/guide-builder/templates/api-reference.md +120 -0
  127. package/skills/guide-builder/templates/design-walkthrough.md +72 -0
  128. package/skills/guide-builder/templates/setup-guide.md +109 -0
  129. package/skills/incident-comms/SKILL.md +68 -0
  130. package/skills/incident-comms/manifest.json +11 -0
  131. package/skills/incident-comms/reference.md +43 -0
  132. package/skills/incident-comms/templates/messages.md +82 -0
  133. package/skills/llm-eval-harness/SKILL.md +73 -0
  134. package/skills/llm-eval-harness/manifest.json +11 -0
  135. package/skills/llm-eval-harness/reference.md +58 -0
  136. package/skills/llm-eval-harness/templates/eval-plan.md +63 -0
  137. package/skills/llm-eval-harness/templates/golden-case.jsonl +5 -0
  138. package/skills/migration-plan/SKILL.md +68 -0
  139. package/skills/migration-plan/manifest.json +11 -0
  140. package/skills/migration-plan/templates/migration-plan.md +68 -0
  141. package/skills/nfr-spec/SKILL.md +63 -0
  142. package/skills/nfr-spec/manifest.json +11 -0
  143. package/skills/nfr-spec/reference.md +74 -0
  144. package/skills/nfr-spec/templates/nfr-spec.md +56 -0
  145. package/skills/observability-plan/SKILL.md +70 -0
  146. package/skills/observability-plan/manifest.json +11 -0
  147. package/skills/observability-plan/reference.md +67 -0
  148. package/skills/observability-plan/templates/observability-plan.md +62 -0
  149. package/skills/okr-cascade/SKILL.md +59 -0
  150. package/skills/okr-cascade/evals/eval_queries.json +12 -0
  151. package/skills/okr-cascade/evals/evals.json +28 -0
  152. package/skills/okr-cascade/manifest.json +11 -0
  153. package/skills/okr-cascade/templates/okr-cascade.md +46 -0
  154. package/skills/postmortem-generator/SKILL.md +65 -0
  155. package/skills/postmortem-generator/manifest.json +11 -0
  156. package/skills/postmortem-generator/templates/postmortem.md +67 -0
  157. package/skills/prd-draft/SKILL.md +62 -0
  158. package/skills/prd-draft/manifest.json +11 -0
  159. package/skills/prd-draft/templates/prd.md +66 -0
  160. package/skills/prfaq/SKILL.md +75 -0
  161. package/skills/prfaq/evals/eval_queries.json +13 -0
  162. package/skills/prfaq/evals/evals.json +32 -0
  163. package/skills/prfaq/manifest.json +11 -0
  164. package/skills/prfaq/templates/prfaq.md +60 -0
  165. package/skills/release-notes/SKILL.md +61 -0
  166. package/skills/release-notes/manifest.json +11 -0
  167. package/skills/release-notes/templates/release-notes.md +83 -0
  168. package/skills/requirements-interview/SKILL.md +61 -0
  169. package/skills/requirements-interview/manifest.json +11 -0
  170. package/skills/requirements-interview/templates/interview-kit.md +63 -0
  171. package/skills/reverse-architecture/SKILL.md +103 -0
  172. package/skills/reverse-architecture/manifest.json +11 -0
  173. package/skills/reverse-architecture/reference.md +150 -0
  174. package/skills/reverse-architecture/templates/description.md +52 -0
  175. package/skills/reverse-architecture/templates/extraction.md +55 -0
  176. package/skills/runbook-generator/SKILL.md +42 -0
  177. package/skills/runbook-generator/manifest.json +11 -0
  178. package/skills/runbook-generator/templates/runbook.md +109 -0
  179. package/skills/slide-outliner/SKILL.md +58 -0
  180. package/skills/slide-outliner/manifest.json +11 -0
  181. package/skills/slide-outliner/templates/deck-outline.md +131 -0
  182. package/skills/sonar-onboard/SKILL.md +170 -0
  183. package/skills/sonar-onboard/manifest.json +11 -0
  184. package/skills/sonar-onboard/reference.md +151 -0
  185. package/skills/sonar-onboard/templates/github-actions-sonar-server.yml.tmpl +50 -0
  186. package/skills/sonar-onboard/templates/github-actions-sonarcloud.yml.tmpl +53 -0
  187. package/skills/sonar-onboard/templates/readme-snippet.md +38 -0
  188. package/skills/sonar-onboard/templates/sonar-project.properties.tmpl +31 -0
  189. package/skills/sonar-review/SKILL.md +220 -0
  190. package/skills/sonar-review/lenses/bugs.md +48 -0
  191. package/skills/sonar-review/lenses/code-smells.md +64 -0
  192. package/skills/sonar-review/lenses/coverage-and-duplication.md +74 -0
  193. package/skills/sonar-review/lenses/security-hotspots.md +56 -0
  194. package/skills/sonar-review/lenses/vulnerabilities.md +52 -0
  195. package/skills/sonar-review/manifest.json +37 -0
  196. package/skills/sonar-review/reference.md +167 -0
  197. package/skills/sonar-review/templates/report.md +84 -0
  198. package/skills/strategy-analysis/SKILL.md +63 -0
  199. package/skills/strategy-analysis/evals/eval_queries.json +13 -0
  200. package/skills/strategy-analysis/evals/evals.json +36 -0
  201. package/skills/strategy-analysis/manifest.json +11 -0
  202. package/skills/success-metrics/SKILL.md +63 -0
  203. package/skills/success-metrics/evals/eval_queries.json +11 -0
  204. package/skills/success-metrics/evals/evals.json +27 -0
  205. package/skills/success-metrics/manifest.json +11 -0
  206. package/skills/success-metrics/templates/metrics-plan.md +55 -0
  207. package/skills/tech-comparison-matrix/SKILL.md +56 -0
  208. package/skills/tech-comparison-matrix/manifest.json +11 -0
  209. package/skills/tech-comparison-matrix/templates/matrix.md +45 -0
  210. package/skills/test-plan-generator/SKILL.md +59 -0
  211. package/skills/test-plan-generator/manifest.json +11 -0
  212. package/skills/test-plan-generator/templates/test-plan.md +83 -0
  213. package/skills/threat-model/SKILL.md +65 -0
  214. package/skills/threat-model/examples/document-upload.md +56 -0
  215. package/skills/threat-model/manifest.json +11 -0
  216. package/skills/threat-model/reference.md +69 -0
  217. package/skills/user-journey-map/SKILL.md +64 -0
  218. package/skills/user-journey-map/evals/eval_queries.json +12 -0
  219. package/skills/user-journey-map/evals/evals.json +30 -0
  220. package/skills/user-journey-map/examples/b2b-saas-onboarding.md +69 -0
  221. package/skills/user-journey-map/manifest.json +11 -0
  222. package/skills/user-journey-map/templates/journey-map.md +47 -0
  223. package/skills/user-story-splitter/SKILL.md +88 -0
  224. package/skills/user-story-splitter/examples/notifications-epic.md +123 -0
  225. package/skills/user-story-splitter/manifest.json +11 -0
  226. package/skills/user-story-splitter/templates/story.md +40 -0
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "runbook-generator",
3
+ "version": "0.1.0",
4
+ "description": "Generate an operational runbook for a service — covering deploy/rollback, common incidents, on-call escalation, SLOs, dashboards, and dependencies. Use when the user is launching a new service, onboarding to on-call, or being asked for \"the runbook\" by SRE or production-readiness review.",
5
+ "entrypoint": "SKILL.md",
6
+ "deps": { "npm": [], "pip": [] },
7
+ "env": { "required": [], "optional": [] },
8
+ "related": [],
9
+ "tags": ["runbook", "operations", "on-call", "sre"],
10
+ "model": { "tier": "standard", "rationale": "Operational doc from service facts. Bounded synthesis." }
11
+ }
@@ -0,0 +1,109 @@
1
+ # Runbook — {service-name}
2
+
3
+ **Purpose:** {One sentence — what this service does}
4
+ **Owner:** {team name} (primary), {team name} (secondary)
5
+ **On-call escalation:** {PagerDuty rotation / Slack channel for paging}
6
+ **Last reviewed:** {YYYY-MM-DD}
7
+
8
+ > 📟 **Paged right now?** Skip to [Incident playbooks](#incident-playbooks) below.
9
+
10
+ ## Critical links
11
+
12
+ | What | Where |
13
+ |---|---|
14
+ | Dashboard (golden signals) | {URL} |
15
+ | Logs | {URL — e.g. Datadog query, CloudWatch link} |
16
+ | Error tracking | {URL — Sentry / Bugsnag / Rollbar project} |
17
+ | Source repo | {URL} |
18
+ | Latest design doc | {URL} |
19
+ | Change calendar | {URL — to check if a recent deploy is the cause} |
20
+
21
+ ## SLOs
22
+
23
+ | SLI | SLO | Window |
24
+ |---|---|---|
25
+ | Availability | 99.9% | 30 days |
26
+ | Latency p99 | < 100ms | 30 days |
27
+ | Error rate | < 0.1% | 30 days |
28
+
29
+ **Error budget:** {how much budget is left this period, link to dashboard}
30
+
31
+ ## Deploy
32
+
33
+ ```bash
34
+ # Trigger CI/CD
35
+ {exact command — e.g. `gh workflow run deploy-prod.yml --ref main`}
36
+
37
+ # Confirm
38
+ {exact command — e.g. `kubectl rollout status deployment/{service} -n {ns}`}
39
+ ```
40
+
41
+ **Pre-deploy checklist:** {anything that must be true before deploying — error budget OK, no incidents open, …}
42
+
43
+ ## Rollback
44
+
45
+ ```bash
46
+ # Last-known-good
47
+ {exact command — e.g. `kubectl rollout undo deployment/{service} -n {ns}`}
48
+ ```
49
+
50
+ **Rollback criteria:** {when to revert without further investigation — e.g. "error rate > 1% sustained 5 min after deploy"}
51
+
52
+ ## Incident playbooks
53
+
54
+ The most common incidents, with how to recognize → mitigate → investigate.
55
+
56
+ ### 1. {Incident name — e.g. "High p99 latency"}
57
+
58
+ **Symptom:** {alert text + dashboard pattern}
59
+ **Immediate mitigation:**
60
+ 1. {Step — e.g. "Scale up: `kubectl scale deploy/{service} --replicas=20`"}
61
+ 2. {Step}
62
+
63
+ **Investigate:**
64
+ - {Where to look — log query, dashboard, …}
65
+
66
+ **Escalate when:** {clear condition for paging the next tier}
67
+
68
+ ### 2. {Incident name — e.g. "Database connection saturation"}
69
+
70
+ **Symptom:** {…}
71
+ **Immediate mitigation:** {…}
72
+ **Investigate:** {…}
73
+ **Escalate when:** {…}
74
+
75
+ ### 3. {Incident name}
76
+
77
+ {…}
78
+
79
+ ### 4. {Incident name}
80
+
81
+ {…}
82
+
83
+ ### 5. {Incident name}
84
+
85
+ {…}
86
+
87
+ ## Dependencies
88
+
89
+ | Depends on | Type | Failure mode if it's down | Owner |
90
+ |---|---|---|---|
91
+ | {Service / vendor} | {sync API / async queue / data store} | {what happens — does this service degrade, refuse traffic, or break entirely?} | {team} |
92
+ | {Service / vendor} | … | … | … |
93
+
94
+ ## Operations cookbook
95
+
96
+ Common manual tasks (not incidents):
97
+
98
+ - **Drain a node / pod:** `{command}`
99
+ - **Replay a failed job:** `{command or runbook link}`
100
+ - **Re-issue an API key:** `{procedure}`
101
+ - **Triage a customer report:** `{escalation path}`
102
+
103
+ ## Known gaps
104
+
105
+ - {Honest list of "we don't have a good answer for X yet" — better explicit than hidden}
106
+
107
+ ## Change log
108
+
109
+ - {YYYY-MM-DD} — {what changed in the runbook itself, e.g. "added incident #5 after rollout 2026-04-12 incident"}
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: slide-outliner
3
+ description: Outline an architecture review or technical pitch deck — slide titles, key points per slide, and speaker notes. Does NOT generate PowerPoint/Keynote files; produces a structured outline the user can paste into any deck tool. Use when the user is preparing for an architecture review, design review, sales pitch, partner meeting, or steering-committee presentation.
4
+ ---
5
+
6
+ # slide-outliner
7
+
8
+ You help the user plan a deck before they open PowerPoint, by producing a slide-by-slide outline with structure, key points, and speaker notes.
9
+
10
+ ## How to respond
11
+
12
+ 1. **Pin down audience + format + time.**
13
+ - **Audience:** engineering peers? execs? customers? regulators? Mix?
14
+ - **Format:** live presentation (with discussion) vs. read-ahead doc vs. async share?
15
+ - **Time:** 10 minutes? 30? 60? — this determines slide count more than anything else.
16
+
17
+ Rough guide: **1.5–2 minutes per slide** in a live setting with Q&A. So 30 minutes → 12–15 content slides max, including the cover and the close.
18
+
19
+ 2. **Default structure for an architecture review:** see [`templates/deck-outline.md`](templates/deck-outline.md). Sections in order:
20
+ 1. **Cover** — title, presenter, audience, date
21
+ 2. **Why we're here** — the question/decision/approval being sought (one slide)
22
+ 3. **Context** — what's the current state, what changed, what's the forcing function (1–2 slides)
23
+ 4. **Proposed approach** — the architecture / decision / change (3–5 slides — this is the bulk)
24
+ 5. **Alternatives considered** — the strongest 1–2, and why we didn't pick them (1 slide each, max)
25
+ 6. **Risks & mitigations** — pick the 3–4 the audience cares most about (1 slide)
26
+ 7. **Cost, timeline, rollout** (1 slide)
27
+ 8. **What we need from you** — the Ask (1 slide)
28
+ 9. **Appendix** — backup slides for deep-dive questions (not part of the planned flow)
29
+
30
+ 3. **Per slide, produce:**
31
+ - **Slide title** (a sentence that *states the takeaway*, not a category label — "Postgres meets our latency target" beats "Database evaluation")
32
+ - **Key points** (3–5 bullets — what's actually on the slide)
33
+ - **Speaker notes** (2–3 sentences — what the presenter says that *isn't* on the slide)
34
+
35
+ 4. **Plan for Q&A.** Add an Appendix section with 3–5 "if they ask…" backup slides covering the topics most likely to come up:
36
+ - Cost detail / TCO
37
+ - Security & compliance
38
+ - Migration path / backwards compatibility
39
+ - Vendor risk / open-source health
40
+ - Why-not the obvious-but-rejected alternative
41
+
42
+ 5. **End with a slide-count check.** Tally the slides against the time budget. If you're over, suggest specific cuts. Don't leave the user to do the math.
43
+
44
+ ## Quality bar
45
+
46
+ - **Slide titles assert, don't label.** ✅ "We can ship the migration in two quarters" — ❌ "Migration timeline".
47
+ - **No slide has both "high-level overview" *and* "deep technical detail".** Pick one. If you need both, that's two slides.
48
+ - **Speaker notes carry the narrative; slides carry the evidence.** Don't put your script on the slide.
49
+ - **One idea per slide.** If the slide has two takeaways, split it.
50
+ - **Appendix slides are labeled as such** so the presenter doesn't accidentally walk into them.
51
+
52
+ ## Anti-patterns to avoid
53
+
54
+ - ❌ The "agenda" slide. Most audiences don't care; the cover already tells them.
55
+ - ❌ "Thank you / questions?" as a slide. Land on a slide with content (usually the Ask) — questions will come anyway.
56
+ - ❌ More than ~6 bullets on one slide. If you have 7, split or cut.
57
+ - ❌ Backup slides indistinguishable from main slides — leads to accidental flow disruption.
58
+ - ❌ A "team" slide unless someone in the audience actually needs to know who's in the room.
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "slide-outliner",
3
+ "version": "0.1.0",
4
+ "description": "Outline an architecture review or technical pitch deck — slide titles, key points per slide, and speaker notes. Does NOT generate PowerPoint/Keynote files; produces a structured outline the user can paste into any deck tool. Use when the user is preparing for an architecture review, design review, sales pitch, partner meeting, or steering-committee presentation.",
5
+ "entrypoint": "SKILL.md",
6
+ "deps": { "npm": [], "pip": [] },
7
+ "env": { "required": [], "optional": [] },
8
+ "related": [],
9
+ "tags": ["presentation", "deck", "outline", "stakeholder-communication"],
10
+ "model": { "tier": "standard", "rationale": "Outlines a deck to a time budget. Structuring, not deep reasoning." }
11
+ }
@@ -0,0 +1,131 @@
1
+ # Deck outline — {Topic}
2
+
3
+ **Audience:** {who's in the room}
4
+ **Format:** {live presentation 30 min + Q&A / read-ahead doc / async share}
5
+ **Slot:** {meeting / forum + date}
6
+ **Target slide count:** {N main + ~5 appendix}
7
+
8
+ ---
9
+
10
+ ## Slide 1 — Cover
11
+
12
+ **Title:** {Topic — usually mirrors the project name, as a phrase not a question}
13
+ **Key points:**
14
+ - Presenter(s) + role
15
+ - Audience the deck is for
16
+ - Date
17
+
18
+ **Speaker notes:** *{Set the scene in one sentence: "We're here to get your decision on X."}*
19
+
20
+ ---
21
+
22
+ ## Slide 2 — Why we're here
23
+
24
+ **Title:** {The decision / approval / input being sought, as an assertion}
25
+ **Key points:**
26
+ - The Ask (one line)
27
+ - What's on the table today vs. out of scope
28
+ - How this fits with prior decisions (link to ADR / prior review)
29
+
30
+ **Speaker notes:** *{Anchor on the Ask. If you don't get past this slide, the audience still knows what you needed.}*
31
+
32
+ ---
33
+
34
+ ## Slide 3 — Current state
35
+
36
+ **Title:** {Assertion about the current state — "Our checkout pipeline tops out at 50 RPS"}
37
+ **Key points:**
38
+ - 2–3 facts about the current system
39
+ - The constraint or pain that's forcing the change
40
+
41
+ **Speaker notes:** *{Establish the *why now*. Not "this could be better" — what's actually broken or about to be.}*
42
+
43
+ ---
44
+
45
+ ## Slide 4 — Proposed approach (overview)
46
+
47
+ **Title:** {What we're proposing, as an assertion}
48
+ **Key points:**
49
+ - The one-sentence change
50
+ - Architecture diagram (use `architecture-diagrams` skill if needed)
51
+ - The 2–3 key design decisions
52
+
53
+ **Speaker notes:** *{Stay shallow here — depth is in the next slides. If the diagram is unfamiliar, walk through it.}*
54
+
55
+ ---
56
+
57
+ ## Slides 5–7 — Proposed approach (detail)
58
+
59
+ **Use one slide per major component or major decision.** Examples:
60
+ - Slide 5: Data model change
61
+ - Slide 6: Migration path from current state
62
+ - Slide 7: Observability / how we'll know it's working
63
+
64
+ *(Plan these from the actual proposal, not in advance.)*
65
+
66
+ ---
67
+
68
+ ## Slide 8 — Alternatives considered
69
+
70
+ **Title:** {Why our pick beat the strongest alternative}
71
+ **Key points:**
72
+ - Alternative #1: what it was, one-line why not
73
+ - Alternative #2: what it was, one-line why not
74
+ - (Skip weaker alternatives — they belong in the appendix)
75
+
76
+ **Speaker notes:** *{Show your work. An exec who's been pitched before will trust you more if you killed at least one obvious option for a non-obvious reason.}*
77
+
78
+ ---
79
+
80
+ ## Slide 9 — Risks & mitigations
81
+
82
+ **Title:** {Top risk, framed as something we have a plan for}
83
+ **Key points:**
84
+ - Risk → mitigation (×3)
85
+ - Honest "we don't know yet" callouts go here, not hidden
86
+
87
+ **Speaker notes:** *{Don't pretend there are no risks. Audiences trust presenters who say "here's what could go wrong and here's how we'd respond."}*
88
+
89
+ ---
90
+
91
+ ## Slide 10 — Cost, timeline, rollout
92
+
93
+ **Title:** {Headline number — "Q3 ship for $480k" or "12 weeks, 4 engineers"}
94
+ **Key points:**
95
+ - Effort estimate + confidence
96
+ - Calendar timeline (gantt / phase strip)
97
+ - Rollout phases with go/no-go criteria
98
+
99
+ **Speaker notes:** *{Be honest about confidence. "Rough" + a transparent number is more credible than precise-looking fake numbers.}*
100
+
101
+ ---
102
+
103
+ ## Slide 11 — What we need from you
104
+
105
+ **Title:** {The Ask, restated as an action}
106
+ **Key points:**
107
+ - Decision needed: {…}
108
+ - Budget needed: {…}
109
+ - People needed: {…}
110
+ - By when
111
+
112
+ **Speaker notes:** *{Close on this slide. Take questions here, not after a thank-you slide.}*
113
+
114
+ ---
115
+
116
+ # Appendix (backup slides — only shown if asked)
117
+
118
+ ## A1 — Cost detail
119
+ {TCO breakdown, vendor pricing, sensitivity}
120
+
121
+ ## A2 — Security & compliance
122
+ {Threat model summary, data classification, regulatory implications}
123
+
124
+ ## A3 — Migration plan detail
125
+ {Phased plan, rollback, customer-impact analysis}
126
+
127
+ ## A4 — Why not {the obvious alternative}
128
+ {The deeper kill reason for the option people will ask about}
129
+
130
+ ## A5 — Open questions
131
+ {What we're still working out — be explicit}
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: sonar-onboard
3
+ description: Scaffold a repo for Sonar compliance — supports both **SonarQube server** (self-hosted) and **SonarCloud** (SaaS), user picks at setup time. Generates `sonar-project.properties` with language-correct source/test/coverage paths, a CI workflow that runs the scanner on every push and PR and blocks merge on quality-gate failure, and a README snippet documenting the gate. One-shot setup; pair with `sonar-review` for per-change feedback. Use when the user says "set up Sonar", "add SonarQube to this repo", "wire up SonarCloud", "set up the quality gate", or asks to make a project Sonar-compliant for the first time.
4
+ ---
5
+
6
+ # sonar-onboard
7
+
8
+ Scaffolds the artifacts a repo needs to become Sonar-compliant: a `sonar-project.properties` keyed to the project's actual language and layout, a CI workflow that runs the scanner and enforces the quality gate, and a README block so the next contributor knows what the gate means and how to run a scan locally.
9
+
10
+ This is a **one-shot setup skill**. For per-change feedback after the repo is onboarded, use [`sonar-review`](../sonar-review/SKILL.md).
11
+
12
+ Supports both deployment models — the user picks one:
13
+
14
+ | Mode | When it's right | Host | Key extras |
15
+ |---|---|---|---|
16
+ | **SonarQube server** | Self-hosted, on-prem or in own VPC. Enterprise / regulated orgs. | `https://sonar.<company>.com` (set per-org) | Project token + host URL |
17
+ | **SonarCloud** | SaaS, hosted by SonarSource. Faster setup, no infra. | `https://sonarcloud.io` (fixed) | Project token + **organization key** |
18
+
19
+ The choice changes three things: the properties file (SonarCloud needs `sonar.organization`), the GitHub Actions step (different action), and the secrets the user must add. Everything else is identical.
20
+
21
+ ## How to respond
22
+
23
+ 1. **Ask which mode** if the user hasn't said — it's the first question. One question, not two:
24
+
25
+ > Which Sonar are you using — **SonarQube server** (self-hosted) or **SonarCloud** (SaaS at sonarcloud.io)?
26
+
27
+ If they describe the host URL, infer: anything matching `sonarcloud.io` ⇒ SonarCloud; anything else ⇒ SonarQube server. Don't ask twice.
28
+
29
+ 2. **Collect the inputs.** Ask for whichever are missing. Cap at two more clarifying questions per turn; pick defaults for the rest and call them out:
30
+
31
+ | Input | Required for | Default if not given |
32
+ |---|---|---|
33
+ | **Project key** (e.g. `myorg_payments-api`) | both | `<repo-name>` (derive from `git remote get-url origin`) |
34
+ | **Organization key** (SonarCloud only, e.g. `my-org`) | SonarCloud | Required — ask if missing |
35
+ | **SonarQube host URL** (e.g. `https://sonar.company.com`) | SonarQube server | Required — ask if missing |
36
+ | **Primary language(s)** | both | Detect from repo (see step 3) |
37
+ | **CI system** | both | GitHub Actions (emit `gitlab-ci`/`jenkins`/`azure-pipelines` only if user names it) |
38
+ | **Coverage tool** | both | Detect from language (see step 4) |
39
+
40
+ 3. **Detect language(s)** from the working tree — don't ask if a probe will tell you:
41
+
42
+ | Marker file | Language | Default source dir |
43
+ |---|---|---|
44
+ | `package.json` | JavaScript / TypeScript | `src` |
45
+ | `pom.xml` | Java (Maven) | `src/main/java` |
46
+ | `build.gradle` / `build.gradle.kts` | Java / Kotlin (Gradle) | `src/main/java` or `src/main/kotlin` |
47
+ | `requirements.txt` / `pyproject.toml` / `setup.py` | Python | top-level package dir or `src` |
48
+ | `go.mod` | Go | repo root |
49
+ | `*.csproj` / `*.sln` | C# / .NET | project dirs |
50
+ | `Cargo.toml` | Rust | `src` |
51
+ | `composer.json` | PHP | `src` |
52
+ | `Gemfile` | Ruby | `lib` and `app` |
53
+
54
+ Multi-language is normal (e.g. TypeScript frontend + Python backend) — set `sonar.sources` to a comma-separated list and emit one combined `sonar-project.properties`. Don't generate one file per language.
55
+
56
+ 4. **Pick the coverage report path** based on language. These are the formats Sonar's importers expect:
57
+
58
+ | Language | Coverage report | Sonar property |
59
+ |---|---|---|
60
+ | JS / TS | `coverage/lcov.info` (Jest, Vitest default) | `sonar.javascript.lcov.reportPaths` |
61
+ | Java (Maven) | `target/site/jacoco/jacoco.xml` | `sonar.coverage.jacoco.xmlReportPaths` |
62
+ | Java (Gradle) | `build/reports/jacoco/test/jacocoTestReport.xml` | `sonar.coverage.jacoco.xmlReportPaths` |
63
+ | Python | `coverage.xml` (`pytest-cov --cov-report=xml`) | `sonar.python.coverage.reportPaths` |
64
+ | Go | `coverage.out` | `sonar.go.coverage.reportPaths` |
65
+ | C# | `coverage.opencover.xml` (coverlet) | `sonar.cs.opencover.reportsPaths` |
66
+
67
+ If the user has no coverage tool today, **don't fabricate a report path**. Omit the coverage property and add a `# TODO` comment in the properties file pointing them at the right one.
68
+
69
+ 5. **Generate `sonar-project.properties`** using [`templates/sonar-project.properties.tmpl`](templates/sonar-project.properties.tmpl). Fill placeholders; remove blocks that don't apply.
70
+
71
+ **For SonarCloud**, add this line (immediately after `sonar.projectKey`):
72
+ ```
73
+ sonar.organization={{ORG_KEY}}
74
+ ```
75
+ The organization key is mandatory for SonarCloud and rejected by SonarQube server — emit it for one and not the other.
76
+
77
+ **Exclusions** — add these by default; they save the next contributor from a noisy first scan:
78
+ ```
79
+ sonar.exclusions=**/node_modules/**,**/dist/**,**/build/**,**/.next/**,**/__pycache__/**,**/*.generated.*,**/vendor/**,**/migrations/**
80
+ sonar.test.exclusions=**/*.test.*,**/*.spec.*,**/test/**,**/tests/**
81
+ sonar.coverage.exclusions=**/*.test.*,**/*.spec.*,**/test/**,**/tests/**,**/*.stories.*,**/index.{js,ts}
82
+ ```
83
+ Trim language-irrelevant entries (e.g. drop `__pycache__` for a pure-JS repo).
84
+
85
+ 6. **Generate the CI workflow.** Default is GitHub Actions. Pick the template by mode:
86
+
87
+ | Mode | Template | Scan action | Gate action |
88
+ |---|---|---|---|
89
+ | SonarQube server | [`templates/github-actions-sonar-server.yml.tmpl`](templates/github-actions-sonar-server.yml.tmpl) | `sonarsource/sonarqube-scan-action@v3` | `sonarsource/sonarqube-quality-gate-action@master` |
90
+ | SonarCloud | [`templates/github-actions-sonarcloud.yml.tmpl`](templates/github-actions-sonarcloud.yml.tmpl) | `SonarSource/sonarcloud-github-action@master` | (built into scan action — `pollingTimeoutSec` controls wait) |
91
+
92
+ Both must:
93
+ - Trigger on `push` to default branch **and** `pull_request` (Sonar needs the PR event to comment on the PR).
94
+ - Use `actions/checkout@v4` with `fetch-depth: 0` (Sonar needs full history to attribute blame).
95
+ - Run the project's build + test + coverage **before** the scanner, otherwise coverage is empty.
96
+ - Reference `SONAR_TOKEN` from GitHub Secrets — never inline.
97
+
98
+ Mode-specific:
99
+ - **Server** also references `SONAR_HOST_URL` from Secrets, and runs a separate `sonarqube-quality-gate-action` step so the job fails on gate failure.
100
+ - **SonarCloud** doesn't need `SONAR_HOST_URL` (the action defaults to `https://sonarcloud.io`), and references `GITHUB_TOKEN` for PR decoration.
101
+
102
+ For GitLab / Jenkins / Azure DevOps, see [`reference.md`](reference.md) — only emit those if the user names them.
103
+
104
+ 7. **Generate the README snippet** using [`templates/readme-snippet.md`](templates/readme-snippet.md). Drop it under a `## Code quality` heading. It documents: what the gate enforces, the two required secrets, the local-scan command, and where to read findings (Sonar UI link).
105
+
106
+ 8. **List the secrets the user must add manually.** End your response with this exact block — the skill cannot set secrets and shouldn't pretend it can. The steps differ by mode:
107
+
108
+ **SonarQube server:**
109
+ ```
110
+ Manual steps you must do before the workflow runs green:
111
+ 1. Create a SonarQube project at <SONAR_HOST_URL>/projects/create with key `<project-key>`.
112
+ 2. Generate a project token (My Account → Security → Generate Token).
113
+ 3. Add GitHub Secret `SONAR_TOKEN` with the token value.
114
+ 4. Add GitHub Secret `SONAR_HOST_URL` with `<SONAR_HOST_URL>`.
115
+ 5. (Optional) Tighten the Quality Gate in Sonar UI — defaults are listed in the README snippet.
116
+ ```
117
+
118
+ **SonarCloud:**
119
+ ```
120
+ Manual steps you must do before the workflow runs green:
121
+ 1. Sign in at https://sonarcloud.io with the GitHub account that owns this repo.
122
+ 2. Create / import the project: + → Analyze new project → pick the repo. Confirm organization is `<org-key>` and project key is `<project-key>`.
123
+ 3. Disable "Automatic Analysis" on the project (Administration → Analysis Method) — the CI-driven scan and Automatic Analysis cannot both run.
124
+ 4. Generate a token (My Account → Security → Generate Token).
125
+ 5. Add GitHub Secret `SONAR_TOKEN` with the token value.
126
+ 6. (Optional) Tighten the Quality Gate in SonarCloud UI — defaults are listed in the README snippet.
127
+ ```
128
+
129
+ ## Useful references in this skill
130
+
131
+ - [`templates/sonar-project.properties.tmpl`](templates/sonar-project.properties.tmpl) — properties file skeleton (works for both modes; `sonar.organization` line is SonarCloud-only)
132
+ - [`templates/github-actions-sonar-server.yml.tmpl`](templates/github-actions-sonar-server.yml.tmpl) — CI workflow for self-hosted SonarQube
133
+ - [`templates/github-actions-sonarcloud.yml.tmpl`](templates/github-actions-sonarcloud.yml.tmpl) — CI workflow for SonarCloud
134
+ - [`templates/readme-snippet.md`](templates/readme-snippet.md) — README section for the gate (mode-aware placeholders)
135
+ - [`reference.md`](reference.md) — GitLab / Jenkins / Azure DevOps variants, quality-gate tuning, monorepo guidance, server vs cloud differences
136
+
137
+ ## Quality bar
138
+
139
+ - **Properties file is keyed to the actual repo.** `sonar.projectKey`, `sonar.sources`, `sonar.tests`, and the coverage path must reflect what's on disk — not a generic example. A properties file that scans the wrong directories produces a green gate that means nothing.
140
+ - **The workflow blocks merge on gate failure.** A scan that runs but doesn't fail PRs is decoration. The `sonarqube-quality-gate-action` step is non-negotiable.
141
+ - **Coverage path exists or is marked TODO.** Pointing at a coverage file that the test step never produces gives Sonar 0% coverage and a false-failing gate. Either wire it up end-to-end or leave it explicit.
142
+ - **`fetch-depth: 0` in checkout.** Shallow clones break Sonar's new-code-period detection. The first scan will look fine; the next ten PRs will mis-attribute issues.
143
+ - **Secrets are referenced, never inlined.** No raw tokens or URLs in committed files. The token belongs in GitHub Secrets; the URL too, even though it's not technically secret — it keeps fork PRs from leaking the host.
144
+ - **README snippet tells the next contributor what the gate enforces.** "Sonar must pass" is not enough — list the conditions (no new bugs, no new vulnerabilities, coverage on new code ≥ X%, duplication ≤ Y%).
145
+
146
+ ## When to use this skill
147
+
148
+ - ✅ First-time Sonar setup on a repo (server or cloud)
149
+ - ✅ Migrating between modes — SonarCloud → self-hosted (or vice versa). Re-scaffold with the new mode; remember to switch templates *and* the properties file.
150
+ - ✅ Adding Sonar to a fork or a new service in a monorepo (one properties file per module — see `reference.md`)
151
+ - ✅ Replacing an ad-hoc, locally-run scanner setup with a gate-enforcing CI workflow
152
+
153
+ ## When NOT to use this skill
154
+
155
+ - ❌ Repo already has a working `sonar-project.properties` and a CI workflow that runs the scanner. Use `sonar-review` for per-change feedback instead.
156
+ - ❌ User wants to disable rules or relax the gate to make a failing scan pass. That's a code-quality conversation, not a setup task — push back.
157
+ - ❌ User wants language-specific deep config (custom rule profiles, Sonar plugins, branch analysis tuning). Out of scope; point at [`reference.md`](reference.md) and the Sonar docs.
158
+ - ❌ User wants both SonarQube server *and* SonarCloud scanning the same repo. Pick one — running both means two gates, two histories, and two answers to "did the build pass?".
159
+
160
+ ## Anti-patterns to avoid
161
+
162
+ - ❌ **Emitting `sonar.organization` for SonarQube server.** It's SonarCloud-only and the server rejects it. Conversely: omitting it for SonarCloud breaks the scan.
163
+ - ❌ **Emitting a `sonar.login=...` line.** Deprecated since Sonar 10. Use `SONAR_TOKEN` env var, which both scan actions read automatically.
164
+ - ❌ **Hard-coding the host URL in the properties file** (server mode). It belongs in CI env / the scan action input, so forks and local runs don't ship someone else's Sonar.
165
+ - ❌ **Forgetting to disable SonarCloud's Automatic Analysis.** The CI scan and Automatic Analysis can't coexist; SonarCloud will fail one of them. The Manual Steps block must include this — it's the #1 cause of "scan ran but didn't update".
166
+ - ❌ **Generating multiple `sonar-project.properties` files for a multi-language single project.** One project = one properties file with comma-separated `sonar.sources`.
167
+ - ❌ **Skipping `pull_request` trigger.** A scan that only runs on `main` finds problems after they're merged — defeats the purpose.
168
+ - ❌ **Inventing a coverage path because "Sonar wants one".** If the project doesn't generate coverage, omit the property and TODO it. A path that points at nothing produces a misleading gate.
169
+ - ❌ **Recommending the user disable rules to pass the gate.** The gate exists to surface real issues. Suggest fixes or scope the gate to "new code" rather than turning rules off.
170
+ - ❌ **Burying the manual steps.** The "Manual steps you must do" block is the most important output — the workflow can't run green without it. Don't summarize it; print it verbatim.
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "sonar-onboard",
3
+ "version": "0.1.0",
4
+ "description": "Scaffold a repo for Sonar compliance — supports both **SonarQube server** (self-hosted) and **SonarCloud** (SaaS), user picks at setup time. Generates `sonar-project.properties` with language-correct source/test/coverage paths, a CI workflow that runs the scanner on every push and PR and blocks merge on quality-gate failure, and a README snippet documenting the gate. One-shot setup; pair with `sonar-review` for per-change feedback. Use when the user says \"set up Sonar\", \"add SonarQube to this repo\", \"wire up SonarCloud\", \"set up the quality gate\", or asks to make a project Sonar-compliant for the first time.",
5
+ "entrypoint": "SKILL.md",
6
+ "deps": { "npm": [], "pip": [] },
7
+ "env": { "required": [], "optional": ["SONAR_HOST_URL"] },
8
+ "related": ["sonar-review"],
9
+ "tags": ["sonarqube", "sonarcloud", "sonar", "code-quality", "ci", "quality-gate", "scaffold", "dev-workflow"],
10
+ "model": { "tier": "light", "rationale": "Scaffolds config from detected language + a template. Deterministic fill-in; little judgment." }
11
+ }
@@ -0,0 +1,151 @@
1
+ # sonar-onboard — reference
2
+
3
+ Long-form material that doesn't belong in `SKILL.md`.
4
+
5
+ ## SonarQube server vs SonarCloud — what actually differs
6
+
7
+ The user picks one at setup. The differences are smaller than the marketing suggests, but the ones that matter are:
8
+
9
+ | Aspect | SonarQube server | SonarCloud |
10
+ |---|---|---|
11
+ | Host URL | Set per-org (e.g. `sonar.company.com`) | Fixed at `https://sonarcloud.io` |
12
+ | `sonar.organization` in properties | **Must not** be present | **Must** be present |
13
+ | GitHub Action | `sonarsource/sonarqube-scan-action@v3` + separate gate action | `SonarSource/sonarcloud-github-action@master` (single step) |
14
+ | Quality-gate action | `sonarsource/sonarqube-quality-gate-action@master` | Built into the scan action; separate action also works |
15
+ | GitHub Secrets | `SONAR_TOKEN`, `SONAR_HOST_URL` | `SONAR_TOKEN` only (host is implicit) |
16
+ | Branch analysis | Developer Edition+ only (Community Edition: no branches) | Included on all SonarCloud tiers |
17
+ | PR decoration | Needs ALM integration set up server-side | Auto-enabled when scan runs |
18
+ | Automatic Analysis | N/A | **Must be disabled** when using CI-driven scanning |
19
+ | Pricing | Per-instance license | Per-LoC subscription, free for open-source |
20
+ | Where the data lives | Your infra | SonarSource's (EU / US regions available) |
21
+
22
+ Two failure modes are mode-specific and worth surfacing:
23
+
24
+ - **SonarCloud + Automatic Analysis** — if both Automatic Analysis and the CI scan are enabled, SonarCloud rejects one (the second one to run). Symptom: random scan failures with "Project already analyzed". Fix: disable Automatic Analysis under Administration → Analysis Method.
25
+ - **SonarQube server + Community Edition + branch scanning** — Community Edition has no branch analysis; setting `sonar.branch.name` makes the scanner emit a license warning and fall back to scanning as the default branch (so feature-branch PRs overwrite `main`'s history). Fix: either upgrade to Developer Edition, or remove the `branch.name` line and scan only on merge.
26
+
27
+ ## Non-GitHub CI variants
28
+
29
+ Only emit these if the user explicitly names the CI system. Defaults to GitHub Actions.
30
+
31
+ ### GitLab CI
32
+
33
+ ```yaml
34
+ sonarqube-check:
35
+ image:
36
+ name: sonarsource/sonar-scanner-cli:latest
37
+ entrypoint: [""]
38
+ variables:
39
+ SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"
40
+ GIT_DEPTH: "0" # full history for blame
41
+ cache:
42
+ key: "${CI_JOB_NAME}"
43
+ paths: [.sonar/cache]
44
+ script:
45
+ - sonar-scanner
46
+ rules:
47
+ - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
48
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
49
+ ```
50
+
51
+ GitLab passes `SONAR_TOKEN` and `SONAR_HOST_URL` via project-level CI/CD variables (Settings → CI/CD → Variables). Quality-gate enforcement requires the [GitLab MR decoration](https://docs.sonarsource.com/sonarqube/latest/devops-platform-integration/gitlab-integration/) setup on the Sonar side — the gate fails the pipeline automatically once decoration is wired.
52
+
53
+ ### Jenkins
54
+
55
+ Requires the **SonarQube Scanner for Jenkins** plugin. In a `Jenkinsfile`:
56
+
57
+ ```groovy
58
+ pipeline {
59
+ agent any
60
+ stages {
61
+ stage('Build + Test') { steps { sh 'mvn -B verify' } }
62
+ stage('SonarQube') {
63
+ steps {
64
+ withSonarQubeEnv('SonarQube-Server') { // configured in Jenkins → System
65
+ sh 'sonar-scanner'
66
+ }
67
+ }
68
+ }
69
+ stage('Quality Gate') {
70
+ steps {
71
+ timeout(time: 5, unit: 'MINUTES') {
72
+ waitForQualityGate abortPipeline: true
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ ```
79
+
80
+ `abortPipeline: true` is the equivalent of the GitHub `quality-gate-action` — without it, the gate is decorative.
81
+
82
+ ### Azure DevOps
83
+
84
+ Install the **SonarQube extension** from the marketplace, then in `azure-pipelines.yml`:
85
+
86
+ ```yaml
87
+ steps:
88
+ - task: SonarQubePrepare@5
89
+ inputs:
90
+ SonarQube: 'SonarQube-ServiceConnection'
91
+ scannerMode: 'CLI'
92
+ configMode: 'file'
93
+ - script: '<build + test + coverage commands here>'
94
+ - task: SonarQubeAnalyze@5
95
+ - task: SonarQubePublish@5
96
+ inputs: { pollingTimeoutSec: '300' }
97
+ - task: sonarcloud-buildbreaker@2 # NOTE: also works for SonarQube server
98
+ inputs:
99
+ SonarQube: 'SonarQube-ServiceConnection'
100
+ ```
101
+
102
+ ## Quality gate tuning
103
+
104
+ The skill emits the **Sonar way** default gate. Common project-specific adjustments:
105
+
106
+ - **Loosen coverage on new code** (default 80%) — for projects with hard-to-test integration code, drop to 60% and note the exception in the README.
107
+ - **Tighten duplication** (default 3%) — for libraries, 1% is reasonable; the dup gate catches copy-paste.
108
+ - **Add a "security review" condition** — for compliance-driven projects, require all security hotspots (not just new ones) to be reviewed.
109
+
110
+ Edit gates in Sonar UI: Quality Gates → `<gate-name>` → Conditions. Do **not** copy a gate config into source control — it lives server-side and applies per project.
111
+
112
+ ## Monorepo guidance
113
+
114
+ For a monorepo with multiple deployable services, emit **one `sonar-project.properties` per service** at the service root, plus a root-level GitHub Actions workflow with a matrix:
115
+
116
+ ```yaml
117
+ strategy:
118
+ matrix:
119
+ project:
120
+ - path: services/payments
121
+ key: myorg_payments
122
+ - path: services/billing
123
+ key: myorg_billing
124
+ steps:
125
+ - uses: sonarsource/sonarqube-scan-action@v3
126
+ with:
127
+ projectBaseDir: ${{ matrix.project.path }}
128
+ env:
129
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
130
+ SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
131
+ ```
132
+
133
+ Each service is a separate Sonar project with its own gate and history. Don't try to put a multi-module config in one properties file — Sonar's "modules" feature is deprecated.
134
+
135
+ ## Language-specific gotchas
136
+
137
+ - **TypeScript** — set `sonar.typescript.tsconfigPath=tsconfig.json` if the project uses path aliases; otherwise Sonar can't resolve imports and over-reports "unused" findings.
138
+ - **Java (Gradle)** — use the [Sonar Gradle plugin](https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/scanners/sonarscanner-for-gradle/) instead of the standalone scanner. It auto-detects sources, tests, and JaCoCo paths. The properties file then only needs `sonar.projectKey`.
139
+ - **Python** — Sonar imports `coverage.xml`, not `.coverage`. Run `coverage xml` (or `pytest-cov --cov-report=xml`) explicitly; the default `.coverage` binary is ignored.
140
+ - **Go** — coverage importer expects the raw `coverage.out` (Go's native format), not `cobertura` XML. Don't convert.
141
+ - **C# / .NET** — use the [`dotnet-sonarscanner`](https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/scanners/sonarscanner-for-dotnet/) tool, not the generic scanner. Wraps `dotnet build` so analysis hooks into the compile step.
142
+
143
+ ## Why `fetch-depth: 0`
144
+
145
+ Shallow clones (the GitHub Actions default) ship only the last commit. Sonar uses git blame to attribute issues to authors and the new-code period to scope the gate. Without full history:
146
+
147
+ - All issues look like they were introduced in the latest commit → gate fails on existing debt.
148
+ - Blame UI in Sonar shows the wrong author for every line.
149
+ - "New code since previous version" becomes meaningless because the previous version isn't in the clone.
150
+
151
+ Always `fetch-depth: 0`. The extra clone time is a few seconds; the analytical correctness is worth it.