Skip to content

Commit c1bc2c8

Browse files
fix(auth0-checkmate): mirror CodeRabbit fixes + align report templates with the sanitized skill
CodeRabbit's re-review of PR #127 flagged the vendored CLI README in the checkmate skill; these were the same latent issues already fixed on the healthcheck side (06b235d) in checkmate's sibling files: - scripts/render_pdf.sh: render to a temp file, promote only on a non-empty result (don't treat a stale PDF as a successful render) - references/auth0-cli-readme.md: markdownlint fences (MD031 blank lines, MD040 language tags) - references/report-template.{md,html}: bin/ -> scripts/ render path; strip {{...}} from instructional comments so they can't survive substitution and trip the fusion lint Also aligns the report templates with the skill's already-sanitized recommendation logic — the templates still rendered the removed sales fields: - header "Auth0 Fit / {{auth0_plan_recommendation}}" -> "Recommended Plan / {{recommended_plan}}"; Section 4 banner likewise (md + html) - source-of-truth notes now point to the Phase 3 company context (sanitized: no fit scores, no firmographics), with recommended_plan / a4aa_yes_no derived from use case + findings + auth0-pricing.md; corrected the flat-array report-shape note Passes `uvx skillsaw --strict` (0 errors, 0 warnings). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 06b235d commit c1bc2c8

4 files changed

Lines changed: 48 additions & 39 deletions

File tree

plugins/auth0/skills/auth0-checkmate/references/auth0-cli-readme.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,17 @@ brew tap auth0/auth0-cli && brew install auth0
3535
Install via [cURL](https://curl.se/):
3636

3737
1. Download the binary. It will be placed in `./auth0`:
38+
3839
```bash
3940
curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh | sh -s -- -b .
4041
```
42+
4143
2. Optionally, if you want to be able to run the binary from any directory, make sure you move it to a place in your `$PATH`:
44+
4245
```bash
4346
sudo mv ./auth0 /usr/local/bin
4447
```
48+
4549
> **Tip:** On macOS, depending on the state of your current development environment you may have to first create the directory with `sudo mkdir -p /usr/local/bin`. Alternatively, you can move it to a directory of your choice and add that directory to your `$PATH`.
4650
4751
### Windows
@@ -56,17 +60,22 @@ scoop install auth0
5660
Install via [PowerShell](https://learn.microsoft.com/en-us/powershell/):
5761

5862
1. Fetch latest release information with the following commands:
63+
5964
```powershell
6065
$latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/auth0/auth0-cli/releases/latest"
6166
$latestVersion = $latestRelease.tag_name
6267
$version = $latestVersion -replace "^v"
6368
```
69+
6470
2. Download the binary to the current folder:
71+
6572
```powershell
6673
Invoke-WebRequest -Uri "https://github.com/auth0/auth0-cli/releases/download/${latestVersion}/auth0-cli_${version}_Windows_x86_64.zip" -OutFile ".\auth0.zip"
6774
Expand-Archive ".\auth0.zip" .\
6875
```
76+
6977
3. To be able to run the binary from any directory, add it to your `$PATH`:
78+
7079
```powershell
7180
[System.Environment]::SetEnvironmentVariable('PATH', $Env:PATH + ";${pwd}")
7281
```
@@ -116,7 +125,7 @@ auth0 login --domain <domain> --client-id <client-id> --client-assertion-private
116125

117126
When your access token expires, the CLI will prompt you to confirm whether to continue with your default tenant or select a different one:
118127

119-
```
128+
```text
120129
Continue login with default tenant 'your-tenant.auth0.com'? [y/N]
121130
```
122131

@@ -203,7 +212,7 @@ The `auth0-cli` skill is part of the [auth0/agent-skills](https://github.com/aut
203212

204213
**Claude Code plugin marketplace:**
205214

206-
```
215+
```text
207216
/plugin marketplace add auth0/agent-skills
208217
/plugin install auth0@auth0-agent-skills
209218
```

plugins/auth0/skills/auth0-checkmate/references/report-template.html

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!DOCTYPE html>
22
<!--
33
Locked HTML report template for the auth0-checkmate skill.
4-
Phase 5 substitutes every {{placeholder}} with the same data feeding report-template.md.
4+
Phase 5 substitutes every placeholder token with the same data feeding report-template.md.
55
Visual design models the "Auth0 Platform Development Review" reference layout (orange brand accent, severity-coded chips, four-section structure).
6-
Render to PDF with bin/render_pdf.sh (Chrome headless).
6+
Render to PDF with scripts/render_pdf.sh (Chrome headless).
77
-->
88
<html lang="en">
99
<head>
@@ -219,7 +219,7 @@
219219
<header class="header">
220220
<div>
221221
<h1>Auth0 Platform<br>Development Review</h1>
222-
{{subtitle_html}} <!-- '<div class="subtitle">Prepared by {{reviewer_org}}</div>' if reviewer_org is non-empty; emit empty string otherwise -->
222+
{{subtitle_html}} <!-- a subtitle div reading "Prepared by <org>" if reviewer_org is non-empty; emit empty string otherwise -->
223223
</div>
224224
<div class="header-right">
225225
<span class="plan-badge">{{plan_tag}}</span>
@@ -234,7 +234,7 @@ <h1>Auth0 Platform<br>Development Review</h1>
234234
<tr><th>Customer Account</th><td>{{customer_name}} ({{tenant_domain}})</td></tr>
235235
<tr><th>Current Auth0 Tier</th><td>{{tier}}</td></tr>
236236
<tr><th>Use Case Diagnosis</th><td>{{business_model}} — {{product_summary_short}}</td></tr>
237-
<tr><th>Auth0 Fit</th><td>{{auth0_plan_recommendation}} · Auth for AI Agents: {{a4aa_yes_no}}</td></tr>
237+
<tr><th>Recommended Plan</th><td>{{recommended_plan}} · Auth for AI Agents: {{a4aa_yes_no}}</td></tr>
238238
</table>
239239

240240
<h2 class="section">1. Account Health</h2>
@@ -258,9 +258,8 @@ <h2 class="section">1. Account Health</h2>
258258
</tbody>
259259
</table>
260260

261-
<!-- gaps_html: rendered from the included gap callouts. Each block:
262-
<div class="gap"><div class="gap-name">{{gap_name}}</div><p>{{gap_body}}</p></div>
263-
Only include gaps the data supports. -->
261+
<!-- gaps_html: rendered from the included gap callouts. Each block is a gap div with a
262+
gap-name heading and a one-line body paragraph. Only include gaps the data supports. -->
264263
{{gaps_html}}
265264

266265
<h2 class="section">2. Executive Summary</h2>
@@ -288,42 +287,36 @@ <h2 class="section">3. Strategic Opportunities &amp; Action Plan</h2>
288287
<tr><th>Feature Area</th><th>The Enterprise Challenge</th><th>The Solution</th><th>Strategic Impact</th></tr>
289288
</thead>
290289
<tbody>
291-
<!-- opportunities_rows: one <tr> per included row. Template:
292-
<tr>
293-
<td class="feature">{{feature_area}}</td>
294-
<td class="challenge">{{challenge_personalized}}</td>
295-
<td class="solution">{{solution_label}}</td>
296-
<td class="impact">{{strategic_impact}}</td>
297-
</tr>
298-
Every challenge cell MUST name a specific product, segment, or capability from enrichment.
299-
-->
290+
<!-- opportunities_rows: one table row per included row — feature area, a personalized
291+
challenge cell, the solution label, and the strategic impact. Every challenge cell
292+
MUST name a specific product, segment, or capability from the company context. -->
300293
{{opportunities_rows}}
301294
</tbody>
302295
</table>
303296

304297
<h2 class="section">4. Recommended Roadmap &amp; Next Steps</h2>
305298

306-
<p class="roadmap-banner">Recommended Plan: <em>{{auth0_plan_recommendation}}{{a4aa_addon_suffix}}</em></p>
299+
<p class="roadmap-banner">Recommended Plan: <em>{{recommended_plan}}{{a4aa_addon_suffix}}</em></p>
307300

308301
<div class="roadmap">
309302
{{plan_recommendation_paragraphs_html}}
310303
</div>
311304

312305
<p><strong>Immediate Actions — Available Today (Free)</strong></p>
313306
<ol class="actions">
314-
<!-- immediate_actions_html: <li>{{action_text}}</li> per item. Each must name affected apps/connections explicitly. -->
307+
<!-- immediate_actions_html: one list item per item. Each must name affected apps/connections explicitly. -->
315308
{{immediate_actions_html}}
316309
</ol>
317310

318311
<p><strong>After Upgrading</strong></p>
319312
<ol class="actions">
320-
<!-- after_upgrading_html: <li>{{action_text}}</li> per item. -->
313+
<!-- after_upgrading_html: one list item per item. -->
321314
{{after_upgrading_html}}
322315
</ol>
323316

324317
<p><strong>Key Documentation</strong></p>
325318
<div class="docs">
326-
<!-- docs_html: <a href="{{url}}">{{label}}</a> per included row. Match Section 3 rows. -->
319+
<!-- docs_html: one anchor link per included row. Match Section 3 rows. -->
327320
{{docs_html}}
328321
</div>
329322

plugins/auth0/skills/auth0-checkmate/references/report-template.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
# Locked report skeleton (Auth0 Platform Development Review)
22

3-
This is the structural contract Phase 5 of the `auth0-checkmate` skill follows for the markdown brief. The HTML/PDF render uses the parallel template at [report-template.html](report-template.html) — same data, same sections, different presentation. Replace every `{{placeholder}}` with values from CheckMate JSON / enrichment JSON / tenant facts. Visual design models the "Auth0 Platform Development Review" reference layout (orange brand accent, severity-coded chips, four-section structure).
4-
5-
Source-of-truth reminders (see SKILL.md Phase 5):
6-
- `{{tenant_domain}}``state/setup.json.tenant_domain` (from `auth0 tenants list --json`)
7-
- `{{customer_name}}`, `{{product_*}}`, `{{business_model}}`, `{{ai_use_case}}`, `{{auth0_plan_recommendation}}`, `{{a4aa_fit_score}}`, `{{integrations_*}}` → enrichment JSON
8-
- `{{reviewer_name}}`, `{{reviewer_org}}``state/operator.json.reviewer_name` / `.reviewer_org`
9-
- `{{plan_tag}}`, `{{tier}}``auth0 api get tenants/settings` (fallback "Free Plan")
10-
- `{{apps_count}}`, `{{apps_*}}``auth0 apps list --json`
11-
- `{{login_activity}}` → derived from `auth0 logs list --number 50`
12-
- `{{custom_domains_present}}`, `{{log_streams_present}}`, `{{mfa_configured}}`, etc. → tenant facts from Phase 4.4
13-
- `{{findings_*_count}}`, `{{findings_*_examples}}` → CheckMate `data.report.summary[]` grouped by severity
3+
This is the structural contract Phase 5 of the `auth0-checkmate` skill follows for the markdown brief. The HTML/PDF render uses the parallel template at [report-template.html](report-template.html) — same data, same sections, different presentation. Replace every placeholder token with values from the CheckMate report, the lightweight company context (Phase 3), and tenant facts. Visual design models the "Auth0 Platform Development Review" reference layout (orange brand accent, severity-coded chips, four-section structure).
4+
5+
Source-of-truth reminders (see SKILL.md Phase 5) — placeholder → source:
6+
- tenant_domain → `state/setup.json.tenant_domain` (from `auth0 tenants list --json`); never from the company context
7+
- customer_name, product_*, business_model, ai_use_case, integrations_* → the company context (Phase 3; sanitized — no fit scores, no firmographics)
8+
- recommended_plan, a4aa_yes_no → DERIVED in Phase 4 from the use case + the findings + `auth0-pricing.md` (never a company score)
9+
- reviewer_name, reviewer_org → `state/operator.json.reviewer_name` / `.reviewer_org`
10+
- plan_tag, tier → `auth0 api get tenants/settings` (fallback "Free Plan")
11+
- apps_count, apps_*`auth0 apps list --json`
12+
- login_activity → derived from `auth0 logs list --number 50`
13+
- custom_domains_present, log_streams_present, mfa_configured, etc. → tenant facts from Phase 4.4
14+
- findings_*_count, findings_*_examples → the CheckMate report (a flat array of finding objects), grouped by severity
1415

1516
---
1617

1718
# Auth0 Platform Development Review
1819

19-
{{prepared_by_line}} <!-- "**Prepared by {{reviewer_org}}**" if reviewer_org is non-empty; OMIT this line entirely otherwise -->
20+
{{prepared_by_line}} <!-- the "Prepared by <org>" line if reviewer_org is non-empty; OMIT this line entirely otherwise -->
2021

2122
> **{{plan_tag}}** · {{customer_name}} · {{tenant_domain}} · {{review_date_long}}
2223
@@ -27,7 +28,7 @@ Source-of-truth reminders (see SKILL.md Phase 5):
2728
| **Customer Account** | {{customer_name}} ({{tenant_domain}}) |
2829
| **Current Auth0 Tier** | {{tier}} |
2930
| **Use Case Diagnosis** | {{business_model}} — {{product_summary_short}} |
30-
| **Auth0 Fit** | {{auth0_plan_recommendation}} · Auth for AI Agents: {{a4aa_yes_no}} |
31+
| **Recommended Plan** | {{recommended_plan}} · Auth for AI Agents: {{a4aa_yes_no}} |
3132

3233
---
3334

@@ -99,7 +100,7 @@ Include only the rows whose triggers are met. Rewrite the cell text to reference
99100

100101
## 4. RECOMMENDED ROADMAP & NEXT STEPS
101102

102-
### Recommended Plan: **{{auth0_plan_recommendation}}**{{a4aa_addon_suffix}}
103+
### Recommended Plan: **{{recommended_plan}}**{{a4aa_addon_suffix}}
103104

104105
{{plan_recommendation_paragraph}}
105106

plugins/auth0/skills/auth0-checkmate/scripts/render_pdf.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,29 @@ done
8282

8383
if [[ -n "$CHROME" ]]; then
8484
echo "render_pdf: using $CHROME" >&2
85+
# Render to a temp file and only promote it on success — a stale PDF already
86+
# sitting at OUTPUT_ABS must never be mistaken for a fresh, successful render.
87+
TMP_PDF="$(mktemp -t render_pdf.XXXXXX 2>/dev/null || echo "${OUTPUT_ABS}.tmp.$$")"
8588
"$CHROME" \
8689
--headless=new \
8790
--disable-gpu \
8891
--no-pdf-header-footer \
89-
--print-to-pdf="$OUTPUT_ABS" \
92+
--print-to-pdf="$TMP_PDF" \
9093
"file://$INPUT_ABS" \
9194
>/dev/null 2>&1 \
9295
|| "$CHROME" \
9396
--headless \
9497
--disable-gpu \
95-
--print-to-pdf="$OUTPUT_ABS" \
98+
--print-to-pdf="$TMP_PDF" \
9699
"file://$INPUT_ABS" \
97100
>/dev/null 2>&1 || true
98-
if [[ -f "$OUTPUT_ABS" ]]; then
101+
if [[ -s "$TMP_PDF" ]]; then
102+
mv -f "$TMP_PDF" "$OUTPUT_ABS"
99103
echo "render_pdf: wrote $OUTPUT_ABS" >&2
100104
exit 0
101105
fi
106+
rm -f "$TMP_PDF"
107+
echo "render_pdf: Chrome produced no output; trying other renderers" >&2
102108
fi
103109

104110
if command -v wkhtmltopdf >/dev/null 2>&1; then

0 commit comments

Comments
 (0)