opencode-skills-collection 3.1.10 → 3.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +8 -1
- package/bundled-skills/browser-testing-with-devtools/SKILL.md +334 -0
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +3 -3
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/sources/sources.md +4 -0
- package/bundled-skills/docs/users/bundles.md +1 -1
- package/bundled-skills/docs/users/claude-code-skills.md +1 -1
- package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
- package/bundled-skills/docs/users/getting-started.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/usage.md +4 -4
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/drizzle-migration-conflict/SKILL.md +179 -0
- package/bundled-skills/drizzle-migration-conflict/references/ci-policy.md +87 -0
- package/bundled-skills/drizzle-migration-conflict/references/conflict-resolution.md +163 -0
- package/bundled-skills/drizzle-migration-conflict/references/report-template.md +69 -0
- package/bundled-skills/drizzle-migration-conflict/references/sources.md +51 -0
- package/bundled-skills/drizzle-migration-conflict/scripts/check_drizzle_migrations.py +721 -0
- package/bundled-skills/frontend-lighthouse/SKILL.md +348 -0
- package/bundled-skills/pre-release-review/SKILL.md +198 -0
- package/bundled-skills/pre-release-review/references/checklist.md +104 -0
- package/bundled-skills/pre-release-review/references/report-template.md +91 -0
- package/bundled-skills/re-create/SKILL.md +251 -0
- package/bundled-skills/weaviate/SKILL.md +132 -0
- package/bundled-skills/weaviate/references/ask.md +36 -0
- package/bundled-skills/weaviate/references/create_collection.md +152 -0
- package/bundled-skills/weaviate/references/environment_requirements.md +34 -0
- package/bundled-skills/weaviate/references/example_data.md +24 -0
- package/bundled-skills/weaviate/references/explore_collection.md +50 -0
- package/bundled-skills/weaviate/references/fetch_filter.md +88 -0
- package/bundled-skills/weaviate/references/get_collection.md +32 -0
- package/bundled-skills/weaviate/references/hybrid_search.md +47 -0
- package/bundled-skills/weaviate/references/import_data.md +160 -0
- package/bundled-skills/weaviate/references/keyword_search.md +38 -0
- package/bundled-skills/weaviate/references/list_collections.md +31 -0
- package/bundled-skills/weaviate/references/query_search.md +38 -0
- package/bundled-skills/weaviate/references/semantic_search.md +46 -0
- package/bundled-skills/weaviate/scripts/ask.py +106 -0
- package/bundled-skills/weaviate/scripts/create_collection.py +359 -0
- package/bundled-skills/weaviate/scripts/example_data.py +945 -0
- package/bundled-skills/weaviate/scripts/explore_collection.py +295 -0
- package/bundled-skills/weaviate/scripts/fetch_filter.py +261 -0
- package/bundled-skills/weaviate/scripts/get_collection.py +122 -0
- package/bundled-skills/weaviate/scripts/hybrid_search.py +157 -0
- package/bundled-skills/weaviate/scripts/import.py +701 -0
- package/bundled-skills/weaviate/scripts/keyword_search.py +142 -0
- package/bundled-skills/weaviate/scripts/list_collections.py +77 -0
- package/bundled-skills/weaviate/scripts/query_search.py +135 -0
- package/bundled-skills/weaviate/scripts/semantic_search.py +139 -0
- package/bundled-skills/weaviate/scripts/weaviate_conn.py +231 -0
- package/bundled-skills/weaviate-cookbooks/SKILL.md +67 -0
- package/bundled-skills/weaviate-cookbooks/references/advanced_rag.md +274 -0
- package/bundled-skills/weaviate-cookbooks/references/agentic_rag.md +360 -0
- package/bundled-skills/weaviate-cookbooks/references/async_client.md +428 -0
- package/bundled-skills/weaviate-cookbooks/references/basic_agent.md +270 -0
- package/bundled-skills/weaviate-cookbooks/references/basic_rag.md +219 -0
- package/bundled-skills/weaviate-cookbooks/references/data_explorer.md +336 -0
- package/bundled-skills/weaviate-cookbooks/references/environment_requirements.md +78 -0
- package/bundled-skills/weaviate-cookbooks/references/frontend_interface.md +104 -0
- package/bundled-skills/weaviate-cookbooks/references/pdf_multimodal_rag.md +635 -0
- package/bundled-skills/weaviate-cookbooks/references/project_setup.md +75 -0
- package/bundled-skills/weaviate-cookbooks/references/query_agent_chatbot.md +163 -0
- package/package.json +1 -1
- package/skills_index.json +156 -0
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-lighthouse
|
|
3
|
+
description: "Add a portable Lighthouse CI gate for production frontend builds with Core Web Vitals budgets, category floors, median runs, and CI artifacts."
|
|
4
|
+
category: frontend
|
|
5
|
+
risk: safe
|
|
6
|
+
source: community
|
|
7
|
+
source_repo: stareezy-1/frontend-architecture-skill
|
|
8
|
+
source_type: community
|
|
9
|
+
date_added: "2026-06-29"
|
|
10
|
+
author: stareezy-1
|
|
11
|
+
tags: [frontend, lighthouse, performance, core-web-vitals, ci]
|
|
12
|
+
tools: [lighthouse, node, github-actions]
|
|
13
|
+
license: "MIT"
|
|
14
|
+
license_source: "https://github.com/stareezy-1/frontend-architecture-skill/blob/main/LICENSE"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Frontend Lighthouse (portable performance gate)
|
|
18
|
+
|
|
19
|
+
> Portable skill — readable by Claude Code, OpenCode, Codex, Cursor, Windsurf, and others.
|
|
20
|
+
> This skill describes a **CI performance gate** — a Lighthouse CI config plus a workflow — not a
|
|
21
|
+
> component library or a visual style. It pairs with the **frontend-seo** and
|
|
22
|
+
> **frontend-architecture** skills: SEO writes the metadata, Lighthouse proves it ships fast.
|
|
23
|
+
|
|
24
|
+
The goal: every pull request is **blocked unless the production build meets explicit Core Web
|
|
25
|
+
Vitals budgets and category score floors**. Budgets live in **one** `lighthouserc.cjs`, runs are
|
|
26
|
+
**median-of-N** so the gate doesn't flake, and the same config runs locally and in CI.
|
|
27
|
+
|
|
28
|
+
## When to Use This Skill
|
|
29
|
+
|
|
30
|
+
- Use when adding a Lighthouse CI performance gate to a web app.
|
|
31
|
+
- Use when setting Core Web Vitals budgets for LCP, CLS, and TBT as the lab proxy for INP.
|
|
32
|
+
- Use when configuring category score floors for performance, SEO, accessibility, and best practices.
|
|
33
|
+
- Use when debugging flaky Lighthouse runs or making reports visible as CI artifacts.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 0. The five core ideas
|
|
38
|
+
|
|
39
|
+
1. **One config, one source of truth.** All budgets and assertions live in a single `lighthouserc.cjs`. Named constants for each budget — no magic numbers buried in assertion objects.
|
|
40
|
+
2. **Gate the production build, never dev.** Lighthouse runs against `build` + `start` (the real, optimized output). Dev-server numbers are meaningless for a budget.
|
|
41
|
+
3. **Median-of-N kills flakiness.** Run 3+ times and assert on the median run, so per-run jitter (cold caches, CI noise) never red-flags a healthy build.
|
|
42
|
+
4. **Budgets encode Google's "good" thresholds.** LCP ≤ 2500 ms, INP ≤ 200 ms (gated via the TBT lab proxy), CLS ≤ 0.1 — the values that earn green scores, not "needs improvement".
|
|
43
|
+
5. **Blocking in CI, visible as artifacts.** A GitHub Action runs the gate on every PR touching the app and uploads the HTML/JSON reports so failures are debuggable.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 1. Files this skill adds
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
apps/web/ (or your app root)
|
|
51
|
+
├── lighthouserc.cjs ← the gate: budgets + assertions + collect settings
|
|
52
|
+
├── package.json ← "lhci": "lhci autorun --config=./lighthouserc.cjs"
|
|
53
|
+
└── .github/workflows/lighthouse.yml ← PR-blocking CI job (build → start → lhci → upload)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Plus a dev dependency: `@lhci/cli`.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pnpm add -D @lhci/cli # or npm i -D / yarn add -D
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 2. The config (`lighthouserc.cjs`)
|
|
65
|
+
|
|
66
|
+
`.cjs` (CommonJS) so it loads without ESM/TS transpilation. Every budget is a **named constant**
|
|
67
|
+
with a comment explaining the threshold — never a bare number inside an assertion.
|
|
68
|
+
|
|
69
|
+
```js
|
|
70
|
+
/**
|
|
71
|
+
* Lighthouse CI configuration — Core Web Vitals budgets for the marketing surface.
|
|
72
|
+
*
|
|
73
|
+
* Enforces Google's mobile "good" CWV thresholds:
|
|
74
|
+
* - Largest Contentful Paint (LCP) ≤ 2500 ms
|
|
75
|
+
* - Cumulative Layout Shift (CLS) ≤ 0.1
|
|
76
|
+
* - Interaction to Next Paint (INP) ≤ 200 ms
|
|
77
|
+
*
|
|
78
|
+
* INP is a *field* metric with no direct lab audit, so in the lab we gate on
|
|
79
|
+
* Total Blocking Time (TBT) — Lighthouse's recommended lab proxy — at the same
|
|
80
|
+
* budget, and assert the experimental INP audit directly as a warning where the
|
|
81
|
+
* build exposes it.
|
|
82
|
+
*
|
|
83
|
+
* Collection runs against the *production* server (build + start) on Lighthouse's
|
|
84
|
+
* default mobile (Moto G4 / slow 4G) emulation.
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
/** The fixed port the production server is started on for the audit. */
|
|
88
|
+
const PORT = 3100;
|
|
89
|
+
const BASE_URL = `http://localhost:${PORT}`;
|
|
90
|
+
|
|
91
|
+
/** Pages whose budgets are enforced in CI. */
|
|
92
|
+
const MARKETING_URLS = [`${BASE_URL}/`];
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Core Web Vitals budgets on mobile — Google's "good" thresholds.
|
|
96
|
+
* These are the values that earn the best Lighthouse scores.
|
|
97
|
+
*/
|
|
98
|
+
const LCP_BUDGET_MS = 2500; // good
|
|
99
|
+
const INP_BUDGET_MS = 200; // good (TBT lab proxy)
|
|
100
|
+
const CLS_BUDGET = 0.1; // good
|
|
101
|
+
|
|
102
|
+
module.exports = {
|
|
103
|
+
ci: {
|
|
104
|
+
collect: {
|
|
105
|
+
// Build is run separately in CI; here we only serve the production output.
|
|
106
|
+
startServerCommand: `pnpm start --port ${PORT}`,
|
|
107
|
+
startServerReadyPattern: "Ready in", // framework's "server ready" log line
|
|
108
|
+
startServerReadyTimeout: 120000,
|
|
109
|
+
url: MARKETING_URLS,
|
|
110
|
+
// Median of multiple runs keeps the gate stable against per-run jitter.
|
|
111
|
+
numberOfRuns: 3,
|
|
112
|
+
settings: {
|
|
113
|
+
// Default mobile emulation; opt into desktop via env for a second run.
|
|
114
|
+
preset:
|
|
115
|
+
process.env.LHCI_FORM_FACTOR === "desktop" ? "desktop" : undefined,
|
|
116
|
+
// Only gate the categories we care about; skip PWA category noise.
|
|
117
|
+
onlyCategories: [
|
|
118
|
+
"performance",
|
|
119
|
+
"seo",
|
|
120
|
+
"accessibility",
|
|
121
|
+
"best-practices",
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
assert: {
|
|
126
|
+
// Median across runs is the value compared against each budget.
|
|
127
|
+
aggregationMethod: "median-run",
|
|
128
|
+
assertions: {
|
|
129
|
+
// --- Core Web Vitals budgets (the contract) ---------------------
|
|
130
|
+
"largest-contentful-paint": [
|
|
131
|
+
"error",
|
|
132
|
+
{ maxNumericValue: LCP_BUDGET_MS },
|
|
133
|
+
],
|
|
134
|
+
"cumulative-layout-shift": ["error", { maxNumericValue: CLS_BUDGET }],
|
|
135
|
+
"total-blocking-time": ["error", { maxNumericValue: INP_BUDGET_MS }],
|
|
136
|
+
// Direct INP audit where the Lighthouse build exposes it (else ignored).
|
|
137
|
+
"interaction-to-next-paint": [
|
|
138
|
+
"warn",
|
|
139
|
+
{ maxNumericValue: INP_BUDGET_MS },
|
|
140
|
+
],
|
|
141
|
+
|
|
142
|
+
// --- Category floors (target top Lighthouse scores) -------------
|
|
143
|
+
"categories:performance": ["error", { minScore: 0.9 }],
|
|
144
|
+
"categories:seo": ["error", { minScore: 0.95 }],
|
|
145
|
+
"categories:accessibility": ["error", { minScore: 0.95 }],
|
|
146
|
+
"categories:best-practices": ["error", { minScore: 0.9 }],
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
upload: {
|
|
150
|
+
// Keep reports in the CI run's filesystem; no external LHCI server.
|
|
151
|
+
target: "filesystem",
|
|
152
|
+
outputDir: "./.lighthouseci",
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Hard rules:**
|
|
159
|
+
|
|
160
|
+
- Every budget is a named constant with a unit in its name (`LCP_BUDGET_MS`) and a comment.
|
|
161
|
+
- `aggregationMethod: "median-run"` is non-negotiable — single-run gates flake constantly.
|
|
162
|
+
- `numberOfRuns` ≥ 3 (odd numbers give a clean median).
|
|
163
|
+
- Assert on TBT for INP in the lab; treat the experimental `interaction-to-next-paint` audit as a `warn`, not an `error` (it isn't present in every Lighthouse build).
|
|
164
|
+
- Keep `onlyCategories` to exactly what you gate — fewer audits, faster, less noise.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## 3. Choosing budget severity and thresholds
|
|
169
|
+
|
|
170
|
+
| Audit / category | Severity | Threshold | Why |
|
|
171
|
+
| --------------------------- | -------- | --------- | ----------------------------------------------------- |
|
|
172
|
+
| `largest-contentful-paint` | `error` | ≤ 2500 ms | Google "good" LCP |
|
|
173
|
+
| `cumulative-layout-shift` | `error` | ≤ 0.1 | Google "good" CLS |
|
|
174
|
+
| `total-blocking-time` | `error` | ≤ 200 ms | INP lab proxy |
|
|
175
|
+
| `interaction-to-next-paint` | `warn` | ≤ 200 ms | not in all builds; don't hard-fail on a missing audit |
|
|
176
|
+
| `categories:performance` | `error` | ≥ 0.9 | top (green) band |
|
|
177
|
+
| `categories:seo` | `error` | ≥ 0.95 | SEO is cheap to keep perfect |
|
|
178
|
+
| `categories:accessibility` | `error` | ≥ 0.95 | a11y regressions must block |
|
|
179
|
+
| `categories:best-practices` | `error` | ≥ 0.9 | green band |
|
|
180
|
+
|
|
181
|
+
Use `error` for contracts that must hold and `warn` for audits that are environment-dependent or
|
|
182
|
+
aspirational. **Start strict and only loosen with a recorded reason** — a budget you keep raising
|
|
183
|
+
to make CI pass is a budget that no longer protects anything.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## 4. The npm script
|
|
188
|
+
|
|
189
|
+
```jsonc
|
|
190
|
+
// package.json
|
|
191
|
+
{
|
|
192
|
+
"scripts": {
|
|
193
|
+
"lhci": "lhci autorun --config=./lighthouserc.cjs"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
`lhci autorun` runs `collect` → `assert` → `upload` in sequence. Run it locally before pushing to
|
|
199
|
+
reproduce exactly what CI does:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
pnpm build && pnpm lhci
|
|
203
|
+
# desktop form factor:
|
|
204
|
+
LHCI_FORM_FACTOR=desktop pnpm build && LHCI_FORM_FACTOR=desktop pnpm lhci
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 5. The GitHub Actions workflow
|
|
210
|
+
|
|
211
|
+
Runs on PRs that touch the app or the workflow itself. Builds the production output, runs the
|
|
212
|
+
gate, and **always** uploads the reports (even on failure) so a red check is debuggable.
|
|
213
|
+
|
|
214
|
+
```yaml
|
|
215
|
+
name: Lighthouse CWV
|
|
216
|
+
|
|
217
|
+
on:
|
|
218
|
+
pull_request:
|
|
219
|
+
branches: [main]
|
|
220
|
+
paths:
|
|
221
|
+
- "apps/web/**"
|
|
222
|
+
- ".github/workflows/lighthouse.yml"
|
|
223
|
+
|
|
224
|
+
permissions:
|
|
225
|
+
contents: read
|
|
226
|
+
|
|
227
|
+
jobs:
|
|
228
|
+
lighthouse:
|
|
229
|
+
name: Lighthouse CWV (marketing pages)
|
|
230
|
+
runs-on: ubuntu-latest
|
|
231
|
+
defaults:
|
|
232
|
+
run:
|
|
233
|
+
working-directory: apps/web
|
|
234
|
+
steps:
|
|
235
|
+
- uses: actions/checkout@v4
|
|
236
|
+
|
|
237
|
+
- name: Setup pnpm
|
|
238
|
+
uses: pnpm/action-setup@v4 # version comes from root package.json packageManager
|
|
239
|
+
|
|
240
|
+
- name: Setup Node
|
|
241
|
+
uses: actions/setup-node@v4
|
|
242
|
+
with:
|
|
243
|
+
node-version: 22
|
|
244
|
+
cache: pnpm
|
|
245
|
+
|
|
246
|
+
- name: Install dependencies
|
|
247
|
+
working-directory: .
|
|
248
|
+
run: pnpm install --frozen-lockfile
|
|
249
|
+
|
|
250
|
+
- name: Build web app
|
|
251
|
+
run: pnpm build
|
|
252
|
+
|
|
253
|
+
# build + start the production server, run Lighthouse on mobile emulation,
|
|
254
|
+
# fail the job if any budget in lighthouserc.cjs is exceeded.
|
|
255
|
+
- name: Run Lighthouse CI
|
|
256
|
+
run: pnpm lhci
|
|
257
|
+
|
|
258
|
+
- name: Upload Lighthouse reports
|
|
259
|
+
if: always()
|
|
260
|
+
uses: actions/upload-artifact@v4
|
|
261
|
+
with:
|
|
262
|
+
name: lighthouse-reports
|
|
263
|
+
path: apps/web/.lighthouseci
|
|
264
|
+
if-no-files-found: ignore
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Hard rules:**
|
|
268
|
+
|
|
269
|
+
- Trigger on the app path **and** the workflow file so config changes are self-testing.
|
|
270
|
+
- `if: always()` on the upload step — you need the report most when the gate fails.
|
|
271
|
+
- Gate on the **production** build (`pnpm build` then the `start` server in `collect`).
|
|
272
|
+
- Match the CI Node/pnpm versions to the repo's pinned versions to avoid lockfile drift.
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## 6. Framework adapters
|
|
277
|
+
|
|
278
|
+
The config is framework-neutral except `startServerCommand` and `startServerReadyPattern`.
|
|
279
|
+
|
|
280
|
+
| Framework | `startServerCommand` | `startServerReadyPattern` |
|
|
281
|
+
| ------------- | ----------------------------------------------------------------- | ------------------------------------------- |
|
|
282
|
+
| **Next.js** | `pnpm start --port 3100` (after `next build`) | `"Ready in"` |
|
|
283
|
+
| **Remix** | `pnpm start` (serve the built app) | server's listening log line |
|
|
284
|
+
| **Astro** | `node ./dist/server/entry.mjs` (SSR) or `npx serve dist` (static) | the adapter's ready line / serve's URL line |
|
|
285
|
+
| **SvelteKit** | `node build` (node adapter) | `"Listening on"` |
|
|
286
|
+
| **Vite SPA** | `npx vite preview --port 3100` | `"Local:"` |
|
|
287
|
+
|
|
288
|
+
For purely static output you can skip the server and point `collect.staticDistDir` at the build
|
|
289
|
+
folder instead of `startServerCommand` — Lighthouse serves it internally.
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## 7. Debugging failing or flaky runs
|
|
294
|
+
|
|
295
|
+
- **Flaky LCP/TBT** → raise `numberOfRuns` (5), confirm `median-run`, and make sure nothing else is competing for CPU on the runner.
|
|
296
|
+
- **`interaction-to-next-paint` errors** → it should be `warn`, not `error`; the audit is missing in some Lighthouse versions.
|
|
297
|
+
- **"server not ready" timeout** → fix `startServerReadyPattern` to match the framework's actual ready log, and raise `startServerReadyTimeout`.
|
|
298
|
+
- **Real regressions** → open the uploaded report artifact, read the failed audit's "Opportunities"/"Diagnostics", fix the cause (oversized image, render-blocking JS, layout shift from unsized media) — don't just bump the budget.
|
|
299
|
+
- **Desktop vs mobile divergence** → run both form factors; mobile is the stricter gate and should be the default.
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## 8. Conventions checklist (enforce in review)
|
|
304
|
+
|
|
305
|
+
- [ ] All budgets are named constants with units and comments — no magic numbers in assertions.
|
|
306
|
+
- [ ] Gate runs against the **production** build, never the dev server.
|
|
307
|
+
- [ ] `aggregationMethod: "median-run"` with `numberOfRuns` ≥ 3.
|
|
308
|
+
- [ ] CWV budgets at Google "good" thresholds (LCP ≤ 2500, TBT ≤ 200, CLS ≤ 0.1).
|
|
309
|
+
- [ ] INP gated via TBT (`error`); experimental INP audit is `warn`.
|
|
310
|
+
- [ ] Category floors set as `error` (perf ≥ 0.9, SEO/a11y ≥ 0.95, best-practices ≥ 0.9).
|
|
311
|
+
- [ ] `onlyCategories` lists exactly the gated categories.
|
|
312
|
+
- [ ] CI triggers on the app path **and** the workflow file; reports upload with `if: always()`.
|
|
313
|
+
- [ ] Local `pnpm lhci` reproduces the CI run.
|
|
314
|
+
- [ ] Budgets are tightened over time, loosened only with a recorded reason.
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## 9. How to apply this skill
|
|
319
|
+
|
|
320
|
+
**Adding the gate to a project:** install `@lhci/cli`, drop in `lighthouserc.cjs` with your URLs
|
|
321
|
+
and `startServerCommand`, add the `lhci` script, and add the workflow. Run `pnpm build && pnpm lhci`
|
|
322
|
+
locally to confirm it passes before opening a PR.
|
|
323
|
+
|
|
324
|
+
**Adding a page to the gate:** append its URL to `MARKETING_URLS` (or a second URL array). Each URL
|
|
325
|
+
is audited independently against the same budgets.
|
|
326
|
+
|
|
327
|
+
**Tuning budgets:** change the named constant, not the assertion. Record why in the comment. Prefer
|
|
328
|
+
fixing the regression over raising the budget.
|
|
329
|
+
|
|
330
|
+
**Reviewing performance:** run the checklist in §8. The highest-value catches are a gate that runs
|
|
331
|
+
against the dev server (meaningless numbers) and single-run assertions (chronic flakiness).
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## Publishing / installing this skill
|
|
336
|
+
|
|
337
|
+
This skill follows the Anthropic `SKILL.md` format and is portable across agents.
|
|
338
|
+
|
|
339
|
+
1. Keep it under `skills/frontend-lighthouse/SKILL.md` in a public GitHub repo.
|
|
340
|
+
2. Keep the frontmatter `name` and high-signal `description` — discovery indexes match against it.
|
|
341
|
+
3. Install with: `npx skills add <org>/<repo> --skill "frontend-lighthouse"`.
|
|
342
|
+
4. Non-`SKILL.md` agents can be pointed here from `AGENTS.md` / `CLAUDE.md`; Kiro can mirror it as a steering file.
|
|
343
|
+
|
|
344
|
+
## Limitations
|
|
345
|
+
|
|
346
|
+
- Lighthouse CI is a lab signal and does not replace field monitoring from real-user metrics.
|
|
347
|
+
- Budgets must be tuned to the actual app route, hosting platform, and device/network assumptions.
|
|
348
|
+
- A passing Lighthouse gate does not prove business-critical flows, visual correctness, or backend availability.
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pre-release-review
|
|
3
|
+
description: "Run a read-only pre-release review for deploy readiness, migrations, config, secrets, rollout order, rollback risk, and launch blockers."
|
|
4
|
+
category: operations
|
|
5
|
+
risk: safe
|
|
6
|
+
source: community
|
|
7
|
+
source_repo: chaunsin/agent-skills
|
|
8
|
+
source_type: community
|
|
9
|
+
date_added: "2026-06-29"
|
|
10
|
+
author: chaunsin
|
|
11
|
+
tags: [release, deploy-readiness, ci-cd, rollback, production]
|
|
12
|
+
tools: [git, gh, rg]
|
|
13
|
+
license: "Apache-2.0"
|
|
14
|
+
license_source: "https://github.com/chaunsin/agent-skills/blob/master/LICENSE"
|
|
15
|
+
---
|
|
16
|
+
# Pre-release Review
|
|
17
|
+
|
|
18
|
+
Use this skill to run a read-only production release readiness review. The goal is to reduce
|
|
19
|
+
release time and coordination failures by finding missing deploy materials, unsafe ordering,
|
|
20
|
+
configuration gaps, data migration gaps, and ambiguous production risks before CI/CD or manual
|
|
21
|
+
release steps begin.
|
|
22
|
+
|
|
23
|
+
## When to Use This Skill
|
|
24
|
+
|
|
25
|
+
- Use when the user asks for a release audit, pre-release review, go-live review, or deploy readiness check.
|
|
26
|
+
- Use before publishing a tag, deploying production services, or merging a release branch.
|
|
27
|
+
- Use when a PR or git range may include migrations, environment changes, queues, cache behavior, object storage assets, or service contract changes.
|
|
28
|
+
- Use when the user asks whether a change is safe to ship and needs a read-only risk report.
|
|
29
|
+
|
|
30
|
+
## Non-negotiable rules
|
|
31
|
+
|
|
32
|
+
- Do not modify source code, configs, migrations, secrets, deployment files, or generated files.
|
|
33
|
+
- Do not execute migrations, clear or warm caches, upload assets, trigger CI/CD, deploy services,
|
|
34
|
+
publish tags, rotate secrets, or change remote infrastructure.
|
|
35
|
+
- Produce a concise report that lists only confirmed problems and plausible risks needing
|
|
36
|
+
confirmation. Do not bury the reader in clean checklist items.
|
|
37
|
+
- Sort findings from highest to lowest priority.
|
|
38
|
+
- Include module, finding, evidence, inferred owner, risk, and recommended action for each item.
|
|
39
|
+
- Never reveal private keys, account passwords, tokens, certificates, cookies, or full secret
|
|
40
|
+
values. Report only file path, line number, variable name, secret type, and a redacted hint.
|
|
41
|
+
- If evidence is incomplete but the risk could block production, list it as a confirmation item.
|
|
42
|
+
|
|
43
|
+
## Required references
|
|
44
|
+
|
|
45
|
+
- Read `references/checklist.md` before analyzing findings so important release domains are not
|
|
46
|
+
skipped.
|
|
47
|
+
- Read `references/report-template.md` before writing the final report so priorities, owner
|
|
48
|
+
inference, secret redaction, and output shape stay consistent.
|
|
49
|
+
|
|
50
|
+
## Project guidance discovery
|
|
51
|
+
|
|
52
|
+
Before interpreting the release diff, look for project-local guidance files such as `AGENTS.md` and
|
|
53
|
+
`CLAUDE.md` in the repository root and relevant service directories. Read them when present so the
|
|
54
|
+
review respects the user's project-specific conventions, service boundaries, release rules,
|
|
55
|
+
validation expectations, ownership hints, and known operational constraints.
|
|
56
|
+
|
|
57
|
+
- Treat project guidance as context for how to interpret risks, not as permission to perform
|
|
58
|
+
mutating release actions.
|
|
59
|
+
- If project guidance conflicts with this skill's non-negotiable safety rules, the read-only,
|
|
60
|
+
no-secret-disclosure rules in this skill win.
|
|
61
|
+
- If a relevant guidance file cannot be read, note the limitation in "Unable To Verify" only when it
|
|
62
|
+
affects the release review.
|
|
63
|
+
|
|
64
|
+
## Scope selection
|
|
65
|
+
|
|
66
|
+
Determine the review range before judging risk. State the chosen range in the report.
|
|
67
|
+
|
|
68
|
+
1. If the user provides a pull request URL or PR number, review that PR diff first.
|
|
69
|
+
- If `gh` is available and authenticated, use read-only commands such as `gh pr view` and
|
|
70
|
+
`gh pr diff`.
|
|
71
|
+
- If the PR cannot be fetched due to missing tooling, auth, or network limits, say so and ask
|
|
72
|
+
for a local branch, patch, or explicit git range. Do not invent the PR contents.
|
|
73
|
+
2. If the user provides an explicit `base..head` range, use it directly.
|
|
74
|
+
3. If the user provides only a head commit, compare the previous usable release tag reachable from
|
|
75
|
+
that commit to the head commit.
|
|
76
|
+
4. If the user provides no scope, compare the previous usable release tag to `HEAD`.
|
|
77
|
+
5. Choose the previous usable release tag carefully:
|
|
78
|
+
- Prefer the repository's visible release-tag convention when one is obvious, such as semantic
|
|
79
|
+
versions, `v*`, or `release-*`. If tag naming is mixed, state the assumption.
|
|
80
|
+
- If `HEAD` is exactly at one or more tags, treat those as the current release point and compare
|
|
81
|
+
against the earlier reachable release tag, not `HEAD`'s own tag.
|
|
82
|
+
- If no usable previous release tag exists, review the latest 5 commits and explicitly warn that
|
|
83
|
+
this is a fallback: there is no usable previous release tag, so the audit only covers the
|
|
84
|
+
latest 5 commits; recommend a PR or tag-based range for future reviews.
|
|
85
|
+
|
|
86
|
+
## Read-only evidence collection
|
|
87
|
+
|
|
88
|
+
Run only safe inspection commands, adjusted to the repository and current permissions. Useful
|
|
89
|
+
commands include:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
git status --short
|
|
93
|
+
git rev-parse --show-toplevel
|
|
94
|
+
git rev-parse --abbrev-ref HEAD
|
|
95
|
+
git rev-parse HEAD
|
|
96
|
+
rg --files -g 'AGENTS.md' -g 'CLAUDE.md'
|
|
97
|
+
git tag --merged HEAD --sort=-creatordate
|
|
98
|
+
git tag --points-at HEAD
|
|
99
|
+
git for-each-ref --sort=-creatordate --format="%(refname:short) %(objectname:short)" refs/tags
|
|
100
|
+
git describe --tags --abbrev=0 HEAD
|
|
101
|
+
git diff --name-status <base>..<head>
|
|
102
|
+
git diff --stat <base>..<head>
|
|
103
|
+
git log --oneline --decorate --no-merges <base>..<head>
|
|
104
|
+
git diff -U3 <base>..<head> -- <path>
|
|
105
|
+
git blame -L <start>,<end> -- <path>
|
|
106
|
+
git log --format="%h %an %s" -- <path>
|
|
107
|
+
rg -n "<pattern>" .
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
For PRs, use `gh pr view` and `gh pr diff` only when they are available and allowed. Do not bypass
|
|
111
|
+
network, auth, sandbox, or approval restrictions. If a command cannot run, record the limitation in
|
|
112
|
+
the report's "Unable to verify" section.
|
|
113
|
+
|
|
114
|
+
## Review workflow
|
|
115
|
+
|
|
116
|
+
1. Confirm the git repository root, current branch, dirty state, and selected comparison range.
|
|
117
|
+
2. Collect changed file names, file status, diff stats, commit summaries, and touched services.
|
|
118
|
+
3. Inspect relevant diffs rather than relying on filenames alone.
|
|
119
|
+
4. Use the checklist to map changed code to production requirements:
|
|
120
|
+
- schema changes to migrations, indexes, seeds, and backfills
|
|
121
|
+
- config reads to env examples, deploy secrets, flags, and runtime config
|
|
122
|
+
- cache key or TTL changes to invalidation, prewarm, and compatibility work
|
|
123
|
+
- queue producers/consumers to topic setup, DLQ, idempotency, and deploy order
|
|
124
|
+
- asset references to object storage, CDN, templates, certificates, and permissions
|
|
125
|
+
- service contract changes to deploy sequence, backward compatibility, and rollback risk
|
|
126
|
+
5. Infer owners with `git blame` on changed lines when possible; otherwise use recent `git log`
|
|
127
|
+
authors for the file or commit. Label them as inferred owners, and do not include email
|
|
128
|
+
addresses.
|
|
129
|
+
6. Classify each finding as P0, P1, or P2 using `references/report-template.md`.
|
|
130
|
+
7. Write the final report in the user's language when practical. Keep conclusion values exactly as
|
|
131
|
+
`BLOCKED`, `NEEDS_CONFIRMATION`, or `NO_BLOCKER_FOUND`.
|
|
132
|
+
|
|
133
|
+
## Dirty worktree handling
|
|
134
|
+
|
|
135
|
+
By default, review only the selected committed range. Do not silently mix uncommitted or untracked
|
|
136
|
+
changes into the release diff unless the user explicitly asks to include worktree changes.
|
|
137
|
+
|
|
138
|
+
- Always report whether the worktree is dirty.
|
|
139
|
+
- If dirty or untracked files touch release-relevant areas such as migrations, deployment config,
|
|
140
|
+
env examples, CI/CD, secrets, cache, queues, assets, or service contracts, add a P2 confirmation
|
|
141
|
+
item saying those changes are excluded from the committed-range review and must be committed,
|
|
142
|
+
discarded, or reviewed separately before release.
|
|
143
|
+
- If the user explicitly asks to include dirty worktree changes, inspect them with read-only
|
|
144
|
+
commands such as `git diff` and `git diff --name-status`, and clearly label them as uncommitted
|
|
145
|
+
evidence.
|
|
146
|
+
|
|
147
|
+
## Evidence expectations
|
|
148
|
+
|
|
149
|
+
Every finding should cite concrete evidence:
|
|
150
|
+
|
|
151
|
+
- file path and line number when available
|
|
152
|
+
- commit hash or PR reference when line evidence is not enough
|
|
153
|
+
- command limitation when evidence could not be collected
|
|
154
|
+
- diff relationship, such as "schema changed but no migration file changed"
|
|
155
|
+
|
|
156
|
+
Do not state that something is safe just because no file matched a pattern. Use "not verified" for
|
|
157
|
+
areas that cannot be confirmed from local repository evidence.
|
|
158
|
+
|
|
159
|
+
## Findings versus verification limits
|
|
160
|
+
|
|
161
|
+
Separate release confirmation items from neutral tool limits:
|
|
162
|
+
|
|
163
|
+
- A release confirmation item is a diff-linked production risk, such as a new env var whose
|
|
164
|
+
production secret cannot be verified, a schema change with unclear migration status, or a new queue
|
|
165
|
+
whose infrastructure cannot be confirmed. Classify it as P1 or P2 and set the conclusion to
|
|
166
|
+
`NEEDS_CONFIRMATION` unless a P0 also exists.
|
|
167
|
+
- An "Unable To Verify" entry is a neutral limitation, such as missing remote access or deployment
|
|
168
|
+
platform credentials when the diff does not introduce a specific release requirement. Neutral
|
|
169
|
+
limitations do not change the conclusion by themselves.
|
|
170
|
+
- If a limitation blocks confirmation of a release-critical diff change, promote it to a P1/P2
|
|
171
|
+
finding rather than leaving it only in "Unable To Verify".
|
|
172
|
+
- Use `NO_BLOCKER_FOUND` only when no P0-P2 findings or release confirmation items were found from
|
|
173
|
+
available evidence. The report may still include neutral verification limits.
|
|
174
|
+
|
|
175
|
+
## Output rules
|
|
176
|
+
|
|
177
|
+
- Show P0 and P1 findings first, then P2 confirmation items.
|
|
178
|
+
- Do not list clean checklist categories.
|
|
179
|
+
- Include a service deployment order section only when the diff touches multiple services,
|
|
180
|
+
asynchronous workers, migrations, queues, cache, or public contracts.
|
|
181
|
+
- If no P0 blocker is found but P1/P2 confirmation items remain, use `NEEDS_CONFIRMATION`.
|
|
182
|
+
- If no P0-P2 findings exist, include the reviewed range and any neutral verification limits.
|
|
183
|
+
- Keep the report short enough for a release manager to act on immediately.
|
|
184
|
+
|
|
185
|
+
## Limitations
|
|
186
|
+
|
|
187
|
+
- This skill is read-only and does not deploy, tag, publish, run migrations, rotate secrets, or change infrastructure.
|
|
188
|
+
- It can identify release risks from available evidence, but it cannot prove production state without access to the relevant deployment, secrets, database, queue, cache, or observability systems.
|
|
189
|
+
- It should not replace service-owner signoff for high-risk production changes.
|
|
190
|
+
|
|
191
|
+
## Test prompts
|
|
192
|
+
|
|
193
|
+
Use these prompts to validate the skill behavior:
|
|
194
|
+
|
|
195
|
+
- "Run a pre-release review and tell me if this production deploy has risks."
|
|
196
|
+
- "Review PR #123 before release. Check migrations, configs, and cache work."
|
|
197
|
+
- "This repo has no tags. Use the default strategy and audit release readiness."
|
|
198
|
+
- "Check `v1.2.3..HEAD` for backend go-live blockers."
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Pre-release Review Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist to find production release risks from a PR or git diff. Report only categories
|
|
4
|
+
with confirmed problems or plausible risks that need confirmation.
|
|
5
|
+
|
|
6
|
+
## Database and data changes
|
|
7
|
+
|
|
8
|
+
- Schema or ORM model changes without corresponding migration files.
|
|
9
|
+
- New columns, enums, constraints, indexes, partitions, triggers, functions, or extensions that need
|
|
10
|
+
deploy-time DDL.
|
|
11
|
+
- Destructive migrations, column renames, type changes, constraint tightening, or data rewrites
|
|
12
|
+
without backward-compatible rollout or rollback notes.
|
|
13
|
+
- New required data without seed, backfill, admin setup, or one-time SQL.
|
|
14
|
+
- Index changes that may lock large tables or need concurrent/online creation.
|
|
15
|
+
- Query changes that depend on data shape not guaranteed in production.
|
|
16
|
+
- Migration files present but not referenced by the deploy system or migration runner.
|
|
17
|
+
|
|
18
|
+
## Environment and configuration
|
|
19
|
+
|
|
20
|
+
- New env var, config key, feature flag, secret name, or runtime option without example/default,
|
|
21
|
+
deployment platform update, or CI/CD secret update.
|
|
22
|
+
- Config key rename/removal that may break existing production variables.
|
|
23
|
+
- Code that reads production-only values without validation or safe failure behavior.
|
|
24
|
+
- Feature flags without documented default state, owner, rollout plan, or kill switch.
|
|
25
|
+
- Docker, Kubernetes, Helm, Terraform, Railway, Vercel, GitHub Actions, or similar deploy config
|
|
26
|
+
changes that require manual environment changes.
|
|
27
|
+
|
|
28
|
+
## Security and sensitive material
|
|
29
|
+
|
|
30
|
+
- Private keys, tokens, passwords, certificates, cookies, `.pem`, `.key`, `.p12`, `.env`, service
|
|
31
|
+
account JSON, or cloud credentials added to the diff.
|
|
32
|
+
- Logs, errors, analytics, webhooks, or traces that may expose PII, tokens, session IDs, or payment
|
|
33
|
+
data.
|
|
34
|
+
- Debug endpoints, admin bypasses, permissive CORS, disabled auth, relaxed TLS, or temporary
|
|
35
|
+
development flags.
|
|
36
|
+
- IAM, ACL, bucket policy, database role, queue permission, webhook signature, or API key scope
|
|
37
|
+
changes without release coordination.
|
|
38
|
+
- Dependency or container changes with known security-sensitive behavior, native binaries, or
|
|
39
|
+
postinstall scripts.
|
|
40
|
+
|
|
41
|
+
## Cache, CDN, and derived state
|
|
42
|
+
|
|
43
|
+
- Redis key format, namespace, TTL, serialization, or value shape changes without invalidation or
|
|
44
|
+
backward compatibility.
|
|
45
|
+
- Code that assumes warmed cache, precomputed data, materialized views, search indexes, or derived
|
|
46
|
+
tables exist.
|
|
47
|
+
- CDN/static asset paths, cache headers, ETags, versioning, or purge requirements changed.
|
|
48
|
+
- Rollout can serve mixed old/new cache values during a partial deploy.
|
|
49
|
+
- Feature removal leaves stale cache keys that can revive old behavior.
|
|
50
|
+
|
|
51
|
+
## Queues, events, and schedulers
|
|
52
|
+
|
|
53
|
+
- New topic, queue, routing key, exchange, subscription, event type, cron job, or scheduled worker.
|
|
54
|
+
- Producer and consumer contract changes without compatible deployment order.
|
|
55
|
+
- Missing DLQ, retry policy, idempotency, dedupe key, or poison-message handling.
|
|
56
|
+
- Worker concurrency, timeout, rate limit, or backpressure changes that may overload dependencies.
|
|
57
|
+
- Event payload shape changes without versioning or old-consumer compatibility.
|
|
58
|
+
|
|
59
|
+
## External services and assets
|
|
60
|
+
|
|
61
|
+
- New object storage, CDN, S3, OSS, GCS, or static asset references without upload or permissions
|
|
62
|
+
confirmation.
|
|
63
|
+
- Email, SMS, push, PDF, image, translation, or notification templates changed without production
|
|
64
|
+
material update.
|
|
65
|
+
- Webhook URL, callback domain, redirect URI, CORS origin, OAuth app, payment provider, or third
|
|
66
|
+
party whitelist changes.
|
|
67
|
+
- New cloud resource, bucket, DNS record, certificate, API product, SaaS setting, or quota need.
|
|
68
|
+
- Frontend build assets depend on backend routes or config that are not deployed yet.
|
|
69
|
+
|
|
70
|
+
## Service dependencies and deployment order
|
|
71
|
+
|
|
72
|
+
- API contract changes affecting web, mobile, workers, indexers, schedulers, or third parties.
|
|
73
|
+
- Database migration must run before or after specific service versions.
|
|
74
|
+
- Worker should be paused, drained, or deployed after producers.
|
|
75
|
+
- Read/write compatibility risks during rolling deploys.
|
|
76
|
+
- New background jobs, queues, or cache consumers need infrastructure before application deploy.
|
|
77
|
+
- Rollback would be unsafe because schema, data, cache, or queue payloads are not backward
|
|
78
|
+
compatible.
|
|
79
|
+
|
|
80
|
+
## CI/CD and release automation
|
|
81
|
+
|
|
82
|
+
- Workflow, Dockerfile, build script, deploy script, package manager, lockfile, or artifact path
|
|
83
|
+
changed.
|
|
84
|
+
- Required build-time env var, secret, binary, system package, or runtime version changed.
|
|
85
|
+
- Tag/release workflow depends on files or outputs not updated in the diff.
|
|
86
|
+
- Migration, seed, asset upload, or cache purge step is manual but not documented.
|
|
87
|
+
- Tests, linters, or type checks disabled or narrowed for release-critical code.
|
|
88
|
+
|
|
89
|
+
## Observability and operations
|
|
90
|
+
|
|
91
|
+
- New critical path without logs, metrics, traces, health checks, dashboards, or alerts.
|
|
92
|
+
- Error handling changed without actionable logs or rollback signal.
|
|
93
|
+
- Runbook, release checklist, incident response, or support notes missing for operational changes.
|
|
94
|
+
- Kill switch, feature flag, or emergency disable path absent for risky functionality.
|
|
95
|
+
- SLO, rate limit, quota, or capacity implication not addressed.
|
|
96
|
+
|
|
97
|
+
## Reportable "unable to verify" cases
|
|
98
|
+
|
|
99
|
+
- Remote PR diff cannot be fetched.
|
|
100
|
+
- Release tag cannot be found and the audit fell back to recent commits.
|
|
101
|
+
- Deployment platform config, production secrets, cloud buckets, queues, or external SaaS settings
|
|
102
|
+
are not accessible from the local repository.
|
|
103
|
+
- Owner cannot be inferred from blame/log evidence.
|
|
104
|
+
- Diff is too large to inspect fully within the available time or tool limits.
|