@ericrisco/rsc 0.1.44 → 0.1.45
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/README.md +1 -1
- package/manifest.json +110 -86
- package/package.json +1 -1
- package/scripts/lib/domains.js +1 -1
- package/scripts/skill-migration-brief.md +104 -0
- package/skills/ab-testing/SKILL.md +9 -41
- package/skills/accessibility/SKILL.md +5 -7
- package/skills/ads/SKILL.md +9 -24
- package/skills/agent-eval/SKILL.md +7 -33
- package/skills/agent-safety/SKILL.md +7 -14
- package/skills/ai-media/SKILL.md +4 -20
- package/skills/analytics/SKILL.md +8 -30
- package/skills/analyze/SKILL.md +24 -59
- package/skills/angular/SKILL.md +12 -25
- package/skills/api-connector-builder/SKILL.md +10 -27
- package/skills/api-design/SKILL.md +7 -14
- package/skills/article-writing/SKILL.md +1 -18
- package/skills/astro/SKILL.md +36 -54
- package/skills/author-skill/SKILL.md +41 -74
- package/skills/author-skill/evals/README.md +5 -5
- package/skills/author-skill/evals/cases.yaml +8 -8
- package/skills/author-skill/references/description-recipe.md +25 -26
- package/skills/author-skill/references/eval-authoring.md +1 -1
- package/skills/author-skill/references/rsc-conventions.md +1 -1
- package/skills/automation-flows/SKILL.md +6 -16
- package/skills/automation-strategy/SKILL.md +1 -9
- package/skills/aws-essentials/SKILL.md +6 -23
- package/skills/backups/SKILL.md +1 -7
- package/skills/bash-scripting/SKILL.md +5 -9
- package/skills/bookkeeping/SKILL.md +2 -10
- package/skills/brand-identity/SKILL.md +18 -44
- package/skills/brand-voice/SKILL.md +4 -31
- package/skills/building-agents/SKILL.md +20 -103
- package/skills/business-intelligence/SKILL.md +9 -23
- package/skills/calendar-scheduling/SKILL.md +11 -27
- package/skills/case-studies/SKILL.md +3 -8
- package/skills/chatbot/SKILL.md +6 -23
- package/skills/chrome-extension/SKILL.md +2 -2
- package/skills/clarify/SKILL.md +31 -72
- package/skills/clickhouse-analytics/SKILL.md +2 -8
- package/skills/client-onboarding/SKILL.md +17 -19
- package/skills/cloudflare/SKILL.md +3 -8
- package/skills/code-review/SKILL.md +10 -23
- package/skills/codebase-onboarding/SKILL.md +2 -7
- package/skills/cold-outreach/SKILL.md +9 -30
- package/skills/community/SKILL.md +4 -31
- package/skills/competitor-watch/SKILL.md +20 -35
- package/skills/compliance/SKILL.md +10 -37
- package/skills/compose-multiplatform/SKILL.md +1 -1
- package/skills/constitution/SKILL.md +8 -35
- package/skills/content-engine/SKILL.md +4 -16
- package/skills/context-budget/SKILL.md +3 -21
- package/skills/continuous-learning/SKILL.md +10 -40
- package/skills/contracts/SKILL.md +6 -17
- package/skills/coolify/SKILL.md +8 -14
- package/skills/cost-tracking/SKILL.md +3 -11
- package/skills/course-builder/SKILL.md +17 -45
- package/skills/course-storytelling/SKILL.md +26 -94
- package/skills/cpp/SKILL.md +26 -71
- package/skills/csharp-dotnet/SKILL.md +19 -38
- package/skills/customer-support/SKILL.md +14 -37
- package/skills/dashboard/SKILL.md +6 -26
- package/skills/data-cleaning/SKILL.md +37 -63
- package/skills/data-policy/SKILL.md +8 -21
- package/skills/data-scraper/SKILL.md +1 -7
- package/skills/debug/SKILL.md +10 -49
- package/skills/deployment/SKILL.md +38 -101
- package/skills/design/SKILL.md +34 -116
- package/skills/fable-operator/SKILL.md +1 -4
- package/skills/fastapi/SKILL.md +50 -82
- package/skills/flutter/SKILL.md +41 -89
- package/skills/go/SKILL.md +57 -105
- package/skills/harness/SKILL.md +52 -68
- package/skills/implement/SKILL.md +1 -1
- package/skills/init/SKILL.md +152 -168
- package/skills/marketing/SKILL.md +30 -80
- package/skills/nextjs/SKILL.md +42 -116
- package/skills/orient/SKILL.md +25 -20
- package/skills/parallel/SKILL.md +9 -75
- package/skills/plan/SKILL.md +92 -165
- package/skills/postgresdb/SKILL.md +52 -72
- package/skills/presentations/SKILL.md +49 -87
- package/skills/python/SKILL.md +23 -72
- package/skills/react/SKILL.md +19 -67
- package/skills/review/SKILL.md +22 -52
- package/skills/rust/SKILL.md +40 -115
- package/skills/sdd-init/SKILL.md +9 -14
- package/skills/secure-coding/SKILL.md +80 -109
- package/skills/ship/SKILL.md +25 -55
- package/skills/tasks/SKILL.md +37 -61
- package/skills/typescript/SKILL.md +22 -55
- package/skills/verify/SKILL.md +8 -32
- package/skills/viral-score/SKILL.md +122 -0
- package/skills/viral-score/evals/README.md +16 -0
- package/skills/viral-score/evals/cases.yaml +50 -0
- package/skills/vue-nuxt/SKILL.md +45 -106
- package/skills/worktrees/SKILL.md +24 -69
package/package.json
CHANGED
package/scripts/lib/domains.js
CHANGED
|
@@ -10,7 +10,7 @@ export const DOMAINS = [
|
|
|
10
10
|
{ title: 'Raise & model money', ids: ['pitch-deck', 'investor-materials', 'financial-model', 'fundraising', 'unit-economics', 'grants'] },
|
|
11
11
|
{ title: 'Legal, privacy & compliance', ids: ['gdpr-privacy', 'terms-conditions', 'compliance', 'data-policy', 'ip-trademark'] },
|
|
12
12
|
{ title: 'Market & brand', ids: ['marketing', 'seo-geo', 'content-engine', 'social-publisher', 'brand-voice', 'brand-identity', 'newsletter', 'landing-copy', 'ads', 'article-writing', 'case-studies', 'video-shorts', 'podcast', 'market-research', 'competitor-watch', 'press-kit', 'community', 'webinar', 'review-management'] },
|
|
13
|
-
{ title: 'Grow a channel (YouTube / TikTok / Reels / LinkedIn / Medium)', ids: ['youtube-api', 'youtube-strategy', 'youtube-ideation', 'youtube-thumbnails', 'youtube-packaging', 'remotion-video', 'tiktok-api', 'instagram-api', 'shortform-strategy', 'shortform-ideation', 'shortform-packaging', 'shortform-editing', 'linkedin-api', 'linkedin-strategy', 'linkedin-content', 'linkedin-carousels', 'linkedin-outreach', 'medium-writing', 'medium-publishing', 'medium-strategy'] },
|
|
13
|
+
{ title: 'Grow a channel (YouTube / TikTok / Reels / LinkedIn / Medium)', ids: ['youtube-api', 'youtube-strategy', 'youtube-ideation', 'youtube-thumbnails', 'youtube-packaging', 'remotion-video', 'tiktok-api', 'instagram-api', 'shortform-strategy', 'shortform-ideation', 'shortform-packaging', 'shortform-editing', 'viral-score', 'linkedin-api', 'linkedin-strategy', 'linkedin-content', 'linkedin-carousels', 'linkedin-outreach', 'medium-writing', 'medium-publishing', 'medium-strategy'] },
|
|
14
14
|
{ title: 'Connect & automate', ids: ['stripe', 'email-connector', 'google-workspace', 'notion-connector', 'whatsapp-telegram', 'automation-flows', 'api-connector-builder', 'webhooks', 'data-scraper', 'spreadsheet-ops', 'calendar-scheduling', 'document-processing', 'e-signature'] },
|
|
15
15
|
{ title: 'Automation platforms', ids: ['automation-strategy', 'n8n', 'make', 'zapier', 'power-automate'] },
|
|
16
16
|
{ title: 'Data & analytics', ids: ['analytics', 'dashboard', 'kpi-framework', 'reporting', 'ab-testing', 'forecasting', 'data-cleaning', 'business-intelligence'] },
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# skill-migration-brief — how to move one skill to the Claude-5-era rubric
|
|
2
|
+
|
|
3
|
+
This is the working brief for the catalog-wide migration. One agent, one skill, one worktree, one
|
|
4
|
+
branch, one PR. `scripts/skill-rubric.md` is the spec; this is how to apply it to an existing skill.
|
|
5
|
+
|
|
6
|
+
## Why this exists
|
|
7
|
+
|
|
8
|
+
Anthropic's *The new rules of context engineering for Claude 5 generation models* (Jul 2026) reports
|
|
9
|
+
that >80% of Claude Code's system prompt was removed with no measurable eval loss, and names the
|
|
10
|
+
patterns that stopped paying: **repeating yourself across layers**, **over-constraining with rules
|
|
11
|
+
where judgment suffices**, and **enumerating examples where an expressive interface would do**.
|
|
12
|
+
|
|
13
|
+
Applied here: a skill's `description` is in context on **every turn it is installed**, invoked or
|
|
14
|
+
not. Across 257 skills that was 207 KB. The body is loaded when the skill fires. Both are paid for
|
|
15
|
+
by every user, so length is a cost, never a credit.
|
|
16
|
+
|
|
17
|
+
## The pass
|
|
18
|
+
|
|
19
|
+
1. `git checkout -b skill/<id>`
|
|
20
|
+
2. Read `scripts/skill-rubric.md`, then `skills/<id>/SKILL.md`.
|
|
21
|
+
|
|
22
|
+
### The description
|
|
23
|
+
|
|
24
|
+
Shape: **what it does · when to use it · an explicit `NOT <x> (that is \`sibling\`)` boundary.**
|
|
25
|
+
|
|
26
|
+
- Delete any `Triggers: '…', '…'` phrase list. The model matches by meaning; keyword lists in three
|
|
27
|
+
languages are pure per-turn cost, and the body usually instructs semantic matching right next to
|
|
28
|
+
them — a self-contradiction.
|
|
29
|
+
- Name a **real** sibling in the boundary. Verify it exists under `skills/`.
|
|
30
|
+
- Target ≤350 chars. Hard limit 1024 (schema-enforced). Third person, opens with "Use when/to".
|
|
31
|
+
- The test is **discrimination, not coverage**: could a reader choose this skill over its nearest
|
|
32
|
+
sibling from the description alone?
|
|
33
|
+
|
|
34
|
+
### The body
|
|
35
|
+
|
|
36
|
+
The goal is the smallest body that still routes correctly. 400 lines is a ceiling; there is no floor.
|
|
37
|
+
|
|
38
|
+
**Remove:**
|
|
39
|
+
|
|
40
|
+
- Rule banks that restate the flow — "Iron rules (non-negotiable)", "Rationalizations — STOP".
|
|
41
|
+
A rule worth keeping moves next to the step it governs, and says *why* it is absolute instead of
|
|
42
|
+
shouting NON-NEGOTIABLE. A rule in an appendix is skimmed; a rule in context is followed.
|
|
43
|
+
- Re-teaching of what another skill owns. The accompaniment dial belongs to `init`; the SDD method
|
|
44
|
+
belongs to `sdd`. Read the profile and point; do not restate, or the two drift apart.
|
|
45
|
+
- "When to use" sections that restate the description, and trailing reference indexes whose links
|
|
46
|
+
already appear inline at point of use.
|
|
47
|
+
|
|
48
|
+
**Keep — these are not padding:**
|
|
49
|
+
|
|
50
|
+
- The **anti-patterns table**. The rubric requires one, and it is a different animal from a
|
|
51
|
+
rationalization table: it names concrete failure modes, not rules already stated above it.
|
|
52
|
+
- Decision tables where the flow genuinely branches.
|
|
53
|
+
- Tables specific to *this* skill's phase (e.g. what to show at each checkpoint) — that is not the
|
|
54
|
+
generic dial.
|
|
55
|
+
- Worked bad/good pairs that teach judgment by demonstration.
|
|
56
|
+
- Result-envelope blocks, chain position, and output contracts where they already exist. Do **not**
|
|
57
|
+
add one that was never there: that is a content change, not a format change.
|
|
58
|
+
|
|
59
|
+
**Invariant:** every file under `skills/<id>/references/` must be linked from the body. An unlinked
|
|
60
|
+
reference is never loaded, so it is dead weight in the package. Folding a tail index into inline
|
|
61
|
+
mentions is fine — the link just has to survive. `scripts/`, `evals/` and `assets/` need no link.
|
|
62
|
+
|
|
63
|
+
**Preserve substance exactly.** This is a context-engineering pass, not a content rewrite. Do not
|
|
64
|
+
change recommendations, versions, commands, figures, or add claims.
|
|
65
|
+
|
|
66
|
+
## Verify
|
|
67
|
+
|
|
68
|
+
Your worktree has **no `node_modules`**, so:
|
|
69
|
+
|
|
70
|
+
- Run: `bash scripts/eval-lint.sh 2>&1 | grep -i '^<id>'` → must report PASS.
|
|
71
|
+
- Check the description length and that every `references/` file is linked.
|
|
72
|
+
- Do **not** run `npm test` or `npm run validate` — they need dependencies you do not have. The
|
|
73
|
+
orchestrator runs them once, globally, after merge.
|
|
74
|
+
- Do **not** edit `manifest.json`. It is derived, and parallel edits from hundreds of agents would
|
|
75
|
+
all conflict on the same lines. The orchestrator regenerates it once at the end.
|
|
76
|
+
|
|
77
|
+
## Ship
|
|
78
|
+
|
|
79
|
+
Commit only `skills/<id>/`. Subject `refactor(<id>): <what you actually did>`. The body says what you
|
|
80
|
+
removed **and why**, and — just as important — what you deliberately **kept** and why. Close with:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Then `git push -u origin skill/<id>` and `gh pr create`. The PR body carries before/after description
|
|
87
|
+
chars, before/after body bytes, what went, what stayed, and the eval-lint result. Close it with:
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Judgment
|
|
94
|
+
|
|
95
|
+
If the skill already meets the rubric, **say so and change only the description.** A small honest
|
|
96
|
+
diff beats a large invented one. Several skills in the pilot needed 5-line diffs; that is a good
|
|
97
|
+
outcome, not a failed pass. Never pad, and never cut substance to hit a number.
|
|
98
|
+
|
|
99
|
+
## Return value
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{"skill":"<id>","pr":"<url|null>","descBefore":0,"descAfter":0,"bytesBefore":0,"bytesAfter":0,
|
|
103
|
+
"evalLint":"PASS|FAIL","removed":["…"],"kept":["…"],"notes":"anything the orchestrator must know"}
|
|
104
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ab-testing
|
|
3
|
-
description: "Use when designing or analyzing a controlled experiment —
|
|
3
|
+
description: "Use when designing or analyzing a controlled experiment — falsifiable hypothesis, sample size from an MDE, reading significance/CI/power, CUPED, or rescuing tests that won't go significant. NOT recurring metric tracking (that is `analytics`), NOT north-star/KPI trees (that is `kpi-framework`), NOT projecting metrics forward (that is `forecasting`)."
|
|
4
4
|
tags: [ab-testing, experimentation, statistics, cuped, sample-size, hypothesis-testing]
|
|
5
5
|
recommends: [analytics, kpi-framework, forecasting, data-cleaning, python, reporting]
|
|
6
6
|
origin: risco
|
|
@@ -13,23 +13,9 @@ It is a dashboard you stare at until it tells you what you wanted to hear. The d
|
|
|
13
13
|
entirely *before* traffic ships: a falsifiable hypothesis, one primary metric, a sample size derived
|
|
14
14
|
from the smallest effect worth detecting, and a stop rule you cannot renegotiate at 2pm on day four.
|
|
15
15
|
|
|
16
|
-
Do the math first. This skill is opinionated about refusing to declare a winner from a peeked dashboard.
|
|
17
|
-
|
|
18
|
-
## When to use
|
|
19
|
-
|
|
20
|
-
- Designing an A/B or multivariate test: hypothesis, primary + guardrail metrics, randomization unit.
|
|
21
|
-
- Computing required sample size / duration from a baseline rate, a minimum detectable effect (MDE), and power.
|
|
22
|
-
- Analyzing a finished test: two-proportion z-test or Welch t-test, lift, confidence interval, p-value.
|
|
23
|
-
- Reducing required traffic with CUPED (pre-experiment covariate adjustment).
|
|
24
|
-
- Diagnosing an "inconclusive" test: underpowered, peeked, sample-ratio mismatch, multiple comparisons.
|
|
25
|
-
|
|
26
|
-
For the failure-mode math (peeking, sequential methods, FDR corrections, SRM, Simpson's paradox) see
|
|
27
|
-
`references/pitfalls.md`. For full runnable sizing/CUPED/SRM snippets and a worked numeric example see
|
|
28
|
-
`references/sample-size-and-cuped.md`.
|
|
29
|
-
|
|
30
16
|
## Pre-test checklist — every line true before any traffic
|
|
31
17
|
|
|
32
|
-
|
|
18
|
+
Each one is a place experiments die silently.
|
|
33
19
|
|
|
34
20
|
- [ ] A **falsifiable hypothesis** — names the change, the direction, and the metric it moves.
|
|
35
21
|
- [ ] Exactly **ONE primary metric**. More than one primary = multiple comparisons = inflated false positives.
|
|
@@ -90,7 +76,8 @@ n = TTestIndPower().solve_power(effect_size=effect, alpha=0.05, power=0.80, rati
|
|
|
90
76
|
|
|
91
77
|
Then convert n to a calendar plan: `days = ceil((n_per_arm * num_arms) / daily_eligible_users)`. If that
|
|
92
78
|
is 9 days, run a clean **two full weeks** anyway — weekday/weekend mix is part of the population, and a
|
|
93
|
-
6-day test oversamples whoever shows up Tuesday. Full worked example
|
|
79
|
+
6-day test oversamples whoever shows up Tuesday. Full worked example (12% baseline, +1.5pp MDE, 80%
|
|
80
|
+
power) plus runnable sizing, n→duration, CUPED θ and SRM snippets: `references/sample-size-and-cuped.md`.
|
|
94
81
|
|
|
95
82
|
## Step 3 — Run discipline
|
|
96
83
|
|
|
@@ -101,12 +88,14 @@ inflates the Type-I error far above 5% — with enough looks, a null test crosse
|
|
|
101
88
|
If you genuinely need to stop early, use a *sequential / always-valid* method (confidence sequences,
|
|
102
89
|
e.g. Netflix's anytime-valid CIs) that holds Type-I error under continuous monitoring. Sequential is
|
|
103
90
|
strong for **killing losers early** and weak for **calling winners early** — for a confident win, the
|
|
104
|
-
fixed-horizon read is tighter.
|
|
91
|
+
fixed-horizon read is tighter.
|
|
105
92
|
|
|
106
93
|
**Gate on SRM before you trust anything.** Compute a chi-square test on the observed split versus the
|
|
107
94
|
intended ratio. If p < 0.001 the assignment or logging is broken — a bot filter dropping one arm, a
|
|
108
|
-
redirect, a caching bug. Fix the instrumentation and rerun; do not "adjust for it."
|
|
109
|
-
|
|
95
|
+
redirect, a caching bug. Fix the instrumentation and rerun; do not "adjust for it."
|
|
96
|
+
|
|
97
|
+
The peeking Type-I math, sequential/always-valid options, SRM diagnosis, novelty/primacy effects,
|
|
98
|
+
Simpson's paradox in segments and HARKing all live in `references/pitfalls.md`.
|
|
110
99
|
|
|
111
100
|
## Step 4 — Analyze
|
|
112
101
|
|
|
@@ -148,20 +137,6 @@ with the outcome, or — the cardinal sin — a covariate measured *after* assig
|
|
|
148
137
|
estimate. The covariate MUST be pre-treatment and independent of which arm a user lands in. Runnable
|
|
149
138
|
θ-via-OLS snippet in `references/sample-size-and-cuped.md`.
|
|
150
139
|
|
|
151
|
-
## Decision table
|
|
152
|
-
|
|
153
|
-
| Question | Use |
|
|
154
|
-
|---|---|
|
|
155
|
-
| Metric is a binary conversion | Two-proportion z-test |
|
|
156
|
-
| Metric is continuous, large n | Welch's t-test |
|
|
157
|
-
| Metric is revenue / heavy-tailed | Mann-Whitney U or t-test on log/winsorized |
|
|
158
|
-
| 1–3 decision-critical metrics | Bonferroni correction |
|
|
159
|
-
| Many exploratory metrics/segments | Benjamini-Hochberg (FDR) |
|
|
160
|
-
| Need to stop early to kill a loser | Sequential / always-valid CIs |
|
|
161
|
-
| Want a confident winner | Fixed horizon, read once at planned n |
|
|
162
|
-
| Recurring users + pre-period signal | Add CUPED |
|
|
163
|
-
| Brand-new users / no pre-period data | Skip CUPED |
|
|
164
|
-
|
|
165
140
|
## Anti-patterns
|
|
166
141
|
|
|
167
142
|
| Bad | Why it is wrong | Do instead |
|
|
@@ -176,13 +151,6 @@ estimate. The covariate MUST be pre-treatment and independent of which arm a use
|
|
|
176
151
|
| Decide the hypothesis after seeing results (HARKing) | Turns the whole analysis into a fishing expedition | Pre-register hypothesis + primary metric before launch |
|
|
177
152
|
| Run 6 days because it "looks significant" | Oversamples one weekday slice of the population | Run full weeks; honor the fixed horizon |
|
|
178
153
|
|
|
179
|
-
## References
|
|
180
|
-
|
|
181
|
-
- `references/sample-size-and-cuped.md` — full runnable snippets (proportion sizing, continuous sizing,
|
|
182
|
-
n→duration, CUPED θ via OLS, SRM chi-square) and a worked example: 12% baseline, +1.5pp MDE, 80% power.
|
|
183
|
-
- `references/pitfalls.md` — peeking Type-I math, sequential/always-valid options, Bonferroni vs FDR with
|
|
184
|
-
the 17-vs-12 example, SRM diagnosis, novelty/primacy effects, Simpson's paradox in segments, HARKing.
|
|
185
|
-
|
|
186
154
|
## Checkable artifact
|
|
187
155
|
|
|
188
156
|
When this skill emits a Python sizing/analysis script or an experiment-design doc, run
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: accessibility
|
|
3
|
-
description: "Use when making a web UI conform to WCAG 2.2 Level AA —
|
|
3
|
+
description: "Use when making a web UI conform to WCAG 2.2 Level AA — axe-core or Lighthouse a11y violations, keyboard operability, focus management, ARIA roles/names/live regions, contrast, tap-target size. NOT palette or visual intent (that is `design`), NOT test-runner setup (that is `testing-web`), NOT LCP/page-speed (that is `performance`)."
|
|
4
4
|
tags: [wcag, accessibility, a11y, aria, axe-core]
|
|
5
5
|
recommends: [testing-web, e2e-testing, design, react, performance]
|
|
6
6
|
origin: risco
|
|
@@ -76,7 +76,7 @@ Everything a mouse can do, a keyboard must do.
|
|
|
76
76
|
2. **Trap focus** inside while open — Tab from the last element wraps to the first.
|
|
77
77
|
3. **Escape closes**, and **focus returns to the trigger** that opened it.
|
|
78
78
|
|
|
79
|
-
Composite widgets (menus, tabs, grids) use **roving tabindex**: one element is `tabindex="0"`, the rest `-1`, arrow keys move the `0`. Full keyboard tables per pattern → `references/aria-patterns.md`.
|
|
79
|
+
Composite widgets (menus, tabs, grids) use **roving tabindex**: one element is `tabindex="0"`, the rest `-1`, arrow keys move the `0`. Full keyboard tables per pattern — modal, disclosure, tabs, combobox, menu, toast → `references/aria-patterns.md`.
|
|
80
80
|
|
|
81
81
|
## Visible focus & the WCAG 2.2 deltas
|
|
82
82
|
|
|
@@ -144,7 +144,7 @@ Mental model: **Name, Role, Value.** Every custom control needs an accessible *n
|
|
|
144
144
|
|
|
145
145
|
## Automate it (versioned, 2026-06-02)
|
|
146
146
|
|
|
147
|
-
Three layers — each catches what the cheaper one can't.
|
|
147
|
+
Three layers — each catches what the cheaper one can't.
|
|
148
148
|
|
|
149
149
|
**Lint (static, JSX only) — `eslint-plugin-jsx-a11y` 6.10.2.** Catches missing `alt`, label-less inputs, positive `tabindex`, invalid roles, at edit time.
|
|
150
150
|
|
|
@@ -190,7 +190,7 @@ Do these by hand before you call it done:
|
|
|
190
190
|
- [ ] **`prefers-reduced-motion`** honored — no autoplay parallax/animation that ignores it.
|
|
191
191
|
- [ ] **Alt text is meaningful, not decorative-as-content** — informative images describe; decorative images use `alt=""`.
|
|
192
192
|
|
|
193
|
-
Full AA checklist grouped by POUR, with the per-item auto/manual split → `references/wcag22-checklist.md`.
|
|
193
|
+
Full AA checklist grouped by POUR, with the per-item auto/manual split and the 6 new 2.2 criteria flagged → `references/wcag22-checklist.md`.
|
|
194
194
|
|
|
195
195
|
## Anti-patterns
|
|
196
196
|
|
|
@@ -207,10 +207,8 @@ Full AA checklist grouped by POUR, with the per-item auto/manual split → `refe
|
|
|
207
207
|
| Shipping on a green axe run | Covers ~57%; keyboard/SR/cognitive untested | run the manual checklist |
|
|
208
208
|
| Autoplaying motion, no reduced-motion guard | Triggers vestibular disorders (2.3.3) | gate behind `prefers-reduced-motion` |
|
|
209
209
|
|
|
210
|
-
##
|
|
210
|
+
## Hand off to
|
|
211
211
|
|
|
212
|
-
- Full WCAG 2.2 AA checklist (POUR, auto/manual tags, the 6 new criteria flagged) → `references/wcag22-checklist.md`
|
|
213
|
-
- Copy-ready accessible patterns with keyboard tables (modal, disclosure, tabs, combobox, menu, toast) → `references/aria-patterns.md`
|
|
214
212
|
- Test harness, render setup, fixtures, CI runner mechanics → `../testing-web/SKILL.md` (this skill supplies the a11y *assertions* that run inside it)
|
|
215
213
|
- Full browser-driven flow orchestration → `../e2e-testing/SKILL.md`
|
|
216
214
|
- Visual intent, color palette, spacing scale → `../design/SKILL.md` (this skill checks the contrast/target-size *outcome*, not the aesthetic)
|
package/skills/ads/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ads
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use when running or fixing paid acquisition on Google or Meta — campaign structure (Performance Max, Demand Gen, Search, Advantage+), platform-fit creative, budget/scaling rules, break-even ROAS math, and Consent Mode v2 / CAPI tracking gaps. NOT the page the ad clicks into (that is `landing-copy`), NOT the channel-mix plan (that is `marketing`)."
|
|
4
4
|
tags: [paid-ads, google-ads, meta-ads, roas, performance-max, ppc, paid-acquisition]
|
|
5
5
|
recommends: [marketing, landing-copy, brand-voice, ab-testing, analytics, dashboard, forecasting, lead-gen]
|
|
6
6
|
origin: risco
|
|
@@ -14,12 +14,9 @@ budget → ROAS**. Your subject is the live account and its economics — the ca
|
|
|
14
14
|
shape, the asset sets, the bid/budget config, and the math that says *keep scaling*
|
|
15
15
|
or *kill it*.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
all and the channel mix*; you execute *the Google/Meta buy inside that plan* down to
|
|
21
|
-
asset groups, bids, and break-even ROAS. "Should we even do paid?" → that is
|
|
22
|
-
`../marketing/SKILL.md`. "Structure and scale the account" → that is you.
|
|
17
|
+
The nearest miss is `marketing`: it decides *whether to run paid at all and the
|
|
18
|
+
channel mix* (`../marketing/SKILL.md`); you execute *the Google/Meta buy inside that
|
|
19
|
+
plan* down to asset groups, bids, and break-even ROAS.
|
|
23
20
|
|
|
24
21
|
## ROAS first — it gates everything
|
|
25
22
|
|
|
@@ -85,16 +82,17 @@ Good: 1 prospecting campaign above the conversion-data floor, untouched 4 weeks,
|
|
|
85
82
|
then act on the data.
|
|
86
83
|
```
|
|
87
84
|
|
|
88
|
-
PMax allows max **25 asset groups** per campaign — start with **1–2**.
|
|
89
|
-
|
|
85
|
+
PMax allows max **25 asset groups** per campaign — start with **1–2**. Full structure
|
|
86
|
+
detail and the Google Ads API version note for scripting are in
|
|
87
|
+
`references/platform-specs.md`.
|
|
90
88
|
|
|
91
89
|
## Creative
|
|
92
90
|
|
|
93
91
|
Write the ad-surface copy only. It must obey the brand's voice (`../brand-voice/SKILL.md`)
|
|
94
92
|
and click into a page you do not write (`../landing-copy/SKILL.md`).
|
|
95
93
|
|
|
96
|
-
Per-surface caps (summary — full tables, image/video orientations and sizes
|
|
97
|
-
`references/platform-specs.md`):
|
|
94
|
+
Per-surface caps (summary — full tables, image/video orientations and sizes, and the
|
|
95
|
+
Low/Good/Best rotation playbook in `references/platform-specs.md`):
|
|
98
96
|
|
|
99
97
|
| Surface | Headlines | Descriptions | Media |
|
|
100
98
|
|---|---|---|---|
|
|
@@ -157,19 +155,6 @@ the signal; they build the read-out.
|
|
|
157
155
|
|
|
158
156
|
## Handoff
|
|
159
157
|
|
|
160
|
-
- **Destination page** the ad clicks into → `../landing-copy/SKILL.md`.
|
|
161
|
-
- **Voice/tone** the copy must obey → `../brand-voice/SKILL.md`.
|
|
162
158
|
- **Real experiment design** (sample size, significance) → the `ab-testing` skill.
|
|
163
|
-
- **Reporting & dashboards** of the numbers → the `analytics` / `dashboard` skills.
|
|
164
159
|
- **Blended/next-quarter revenue projection** → the `forecasting` skill.
|
|
165
|
-
- **"Should we run paid at all?" / channel mix** → `../marketing/SKILL.md`.
|
|
166
160
|
- **Top-of-funnel B2B prospect lists** (not paid media) → the `lead-gen` skill.
|
|
167
|
-
|
|
168
|
-
## References
|
|
169
|
-
|
|
170
|
-
- `references/platform-specs.md` — full asset spec tables per surface, image/video
|
|
171
|
-
orientations and sizes, the Low/Good/Best rotation playbook, the 25-asset-group rule,
|
|
172
|
-
and the Google Ads API version note for scripting.
|
|
173
|
-
- `references/roas-model.md` — worked break-even and target-ROAS math, the
|
|
174
|
-
platform-ROAS vs MER vs incrementality table, a geo-holdout test design, and the
|
|
175
|
-
scale/hold/kill decision rule.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-eval
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use when measuring whether an LLM or agent system actually got better and gating merges on it: golden sets, fixing an inflated LLM-as-judge, scoring RAG (faithfulness, contextual recall) or agent trajectories (tool correctness, completion), or picking an eval framework. NOT building the agent loop, tools or RAG plumbing (that is `building-agents`)."
|
|
4
4
|
tags: [evals, llm, agents, llm-as-judge, regression-gate, ai]
|
|
5
5
|
recommends: [building-agents, prompt-engineering, observability]
|
|
6
6
|
origin: risco
|
|
@@ -10,24 +10,7 @@ origin: risco
|
|
|
10
10
|
|
|
11
11
|
Turn "the agent feels better" into a number you can put in a PR check. You own the eval dataset, the scorer mix, the LLM-as-judge calibration, and the block-on-regression CI gate — framework-neutral, provider-neutral.
|
|
12
12
|
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
> A score you do not trust is worse than no score. Calibrate the scorer against human labels and report the agreement **before** you gate anything on it. An uncalibrated judge gives false confidence, which is more dangerous than admitted ignorance.
|
|
16
|
-
|
|
17
|
-
> Build your own golden set. A public leaderboard number is not your number — identical model weights swing SWE-Bench Verified by 10–20 points just by changing the harness. Measure *your* task on *your* data.
|
|
18
|
-
|
|
19
|
-
## When to use / When NOT
|
|
20
|
-
|
|
21
|
-
**Use when:**
|
|
22
|
-
- "Is the new prompt/model actually better?" — before/after on a fixed dataset.
|
|
23
|
-
- "Build a golden set / regression suite for this agent."
|
|
24
|
-
- "Our judge gives everything 9/10 / the scores are inflated" — judge calibration.
|
|
25
|
-
- "Fail the PR when answer quality / faithfulness / tool-call accuracy drops" — CI gate.
|
|
26
|
-
- Scoring a RAG pipeline (faithfulness, answer relevancy, contextual recall/precision).
|
|
27
|
-
- Scoring an agent's *trajectory* — tool calls, task completion — not just the final string.
|
|
28
|
-
- Picking between DeepEval / Inspect AI / promptfoo / Braintrust.
|
|
29
|
-
|
|
30
|
-
**Do NOT use — route instead:**
|
|
13
|
+
## Do NOT use — route instead
|
|
31
14
|
|
|
32
15
|
| The ask | Route to | Why it is not this skill |
|
|
33
16
|
| --- | --- | --- |
|
|
@@ -39,8 +22,6 @@ Turn "the agent feels better" into a number you can put in a PR check. You own t
|
|
|
39
22
|
| Per-token cost budgets and accounting | `cost-tracking` | You report cost-per-task as one metric; the discipline lives there. |
|
|
40
23
|
| A/B stats on product/funnel metrics | `ab-testing` | Web experiments, not offline model comparison on a fixed set. |
|
|
41
24
|
|
|
42
|
-
(`building-agents`, `ab-testing`, `chatbot` are linkable siblings here; the rest are KNOWN ids you name but cannot link yet.)
|
|
43
|
-
|
|
44
25
|
## The eval anatomy
|
|
45
26
|
|
|
46
27
|
Every framework instantiates the same five-stage pipeline. Learn it once; the tool is a detail.
|
|
@@ -56,7 +37,7 @@ DeepEval, Inspect AI, and promptfoo are all just opinionated wrappers around thi
|
|
|
56
37
|
|
|
57
38
|
## Build the dataset first
|
|
58
39
|
|
|
59
|
-
The dataset is the asset
|
|
40
|
+
Build your own golden set — a public leaderboard number is not your number, because identical model weights swing SWE-Bench Verified by 10–20 points just by changing the harness. Measure *your* task on *your* data. The dataset is the asset; everything else is replaceable. Rules:
|
|
60
41
|
|
|
61
42
|
- **50–200 hand-labeled cases per failure mode**, not per total. Coverage of how the system fails beats raw volume. 80 real failure cases > 1000 generic ones.
|
|
62
43
|
- **Never synthetic-only.** A set the model wrote will not surface the model's blind spots. Mine real traffic / tickets / transcripts and hand-label.
|
|
@@ -112,13 +93,13 @@ class FaithfulnessJudge:
|
|
|
112
93
|
|
|
113
94
|
## LLM-as-judge you can trust
|
|
114
95
|
|
|
115
|
-
A
|
|
96
|
+
A score you do not trust is worse than no score: an uncalibrated judge gives false confidence, which is more dangerous than admitted ignorance. Each rule, with its why:
|
|
116
97
|
|
|
117
98
|
- **Judge model ≥ system under test.** A weaker judge cannot reliably rank a stronger system — it scores noise.
|
|
118
99
|
- **The rubric must force a written rationale before the score.** Rationale-first judging is what pushes judge–human agreement to ~85% — higher than two humans agree with each other. A bare number is a vibe with a decimal point.
|
|
119
100
|
- **Pairwise beats pointwise for stability.** "Is A or B better?" is more reproducible than "rate A from 1–10," which inflates and clusters at 8–9.
|
|
120
101
|
- **Swap positions and average.** Judges favor whichever answer came first; run A-then-B and B-then-A to cancel position bias.
|
|
121
|
-
- **Calibrate against human gold and report agreement
|
|
102
|
+
- **Calibrate against human gold and report the agreement before you gate anything on the judge.** Not a formality — this is the step that makes every number downstream defensible.
|
|
122
103
|
|
|
123
104
|
> Bad judge prompt: "Rate this answer 1–10." → everything lands 8–9, useless.
|
|
124
105
|
> Good: "Compare answer A and answer B against the reference. First write one sentence on each per the rubric, then output the better label." → forces reasoning, gives a stable signal.
|
|
@@ -139,7 +120,7 @@ Score the path, not only the destination. Beyond exact/judge:
|
|
|
139
120
|
- **Task completion / goal accuracy** — did it finish the job, not just produce plausible text.
|
|
140
121
|
- **Trajectory scoring** — grade the sequence of steps. A correct final answer from a wrong path will fail differently next time; only trajectory scoring catches it.
|
|
141
122
|
|
|
142
|
-
The system side of these (how the loop and tools are built) is `../building-agents/SKILL.md`.
|
|
123
|
+
The system side of these (how the loop and tools are built) is `../building-agents/SKILL.md`; a common system-under-test is `../chatbot/SKILL.md`.
|
|
143
124
|
|
|
144
125
|
## The regression gate
|
|
145
126
|
|
|
@@ -199,15 +180,8 @@ Pick by where the eval runs and what it must do. Versions as of 2026-06 — re-v
|
|
|
199
180
|
|
|
200
181
|
## Project grounding
|
|
201
182
|
|
|
202
|
-
If the workspace has a `02-DOCS/` harness, record the eval policy in `02-DOCS/wiki/stack/evals.md`: dataset location, scorer mix, gate baseline file, judge model, and the failure modes covered.
|
|
183
|
+
If the workspace has a `02-DOCS/` harness, record the eval policy in `02-DOCS/wiki/stack/evals.md`: dataset location, scorer mix, gate baseline file, judge model, and the failure modes covered. Follow the harness [`wiki-article-template.md`](../harness/references/wiki-article-template.md) (`type: stack`) and index it in `02-DOCS/wiki/index.md`. This is **recorded, not gated** — skip silently if there is no harness.
|
|
203
184
|
|
|
204
185
|
## verify.sh
|
|
205
186
|
|
|
206
187
|
`scripts/verify.sh` is read-only and tool-detecting. It validates that every `*.jsonl` golden set in the project parses and that each line carries the required `id`, `input`, `expected` keys; checks the shape of any `eval-report.json`; and runs `ruff` / `mypy` on example Python and `markdownlint` on docs when those tools are installed. Every missing tool prints a yellow WARN and is skipped — never a failure. An empty or clean target exits 0.
|
|
207
|
-
|
|
208
|
-
## See also
|
|
209
|
-
|
|
210
|
-
- `../building-agents/SKILL.md` — builds the agent/RAG/tool system you score here.
|
|
211
|
-
- `../chatbot/SKILL.md` — a common system-under-test for these evals.
|
|
212
|
-
- KNOWN siblings to route to (not yet linkable): `prompt-engineering`, `observability`, `agent-safety`, `cost-tracking`, `testing-py`, `ab-testing`.
|
|
213
|
-
- External (no link): RAGAS, DeepEval, Inspect AI, promptfoo, Braintrust.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-safety
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use when bounding an LLM agent that already runs — scoping its task domain, gating tools to least privilege, defending against prompt injection in untrusted web/email/RAG text, requiring human approval on irreversible actions, capping runtime and cost, or triaging what it already did. NOT building the loop, tools, or RAG (that is `building-agents`)."
|
|
4
4
|
tags: [agent-security, guardrails, prompt-injection, least-privilege, owasp-agentic]
|
|
5
5
|
recommends: [building-agents, secure-coding, agent-eval]
|
|
6
6
|
origin: risco
|
|
@@ -11,9 +11,14 @@ origin: risco
|
|
|
11
11
|
You are the security review for an agent's **agency**, not for its code. The loop works,
|
|
12
12
|
tools are wired, memory persists — your job is to make that autonomy *bounded*. If you
|
|
13
13
|
want to review ordinary endpoints, auth, or secrets handling, that is
|
|
14
|
-
`../secure-coding/SKILL.md
|
|
14
|
+
`../secure-coding/SKILL.md` — this skill is the *Agentic* Top 10, the risks that exist only
|
|
15
|
+
because a model has tools and autonomy. If the loop or tools do not exist yet, that is
|
|
15
16
|
`../building-agents/SKILL.md`. You arrive *after* both.
|
|
16
17
|
|
|
18
|
+
`references/threat-model.md` carries the OWASP Agentic Top 10 2026 risks mapped to the
|
|
19
|
+
controls below, the pre-ship guardrail checklist, and the incident-triage flow for "the
|
|
20
|
+
agent did X" — open it when you are reviewing before ship or reconstructing an incident.
|
|
21
|
+
|
|
17
22
|
## The ownership split
|
|
18
23
|
|
|
19
24
|
Agent security splits into four layers — **Model · Harness · Tools · Environment**. The
|
|
@@ -162,15 +167,3 @@ Log every tool call (arguments redacted) and alert on repeated approval-bypass a
|
|
|
162
167
|
| Scope/limits stated only in the prompt | Prompt is advisory; the model can be talked out of it | Enforce at the tool/harness boundary |
|
|
163
168
|
| No loop / cost / rate cap | A hijacked or looping agent runs until it runs out of money | Hard fail-closed kill-switches |
|
|
164
169
|
| Redact PII only in the UI | The secret was already written to memory/logs | Redact before persistence, at the source |
|
|
165
|
-
|
|
166
|
-
## References
|
|
167
|
-
|
|
168
|
-
- `references/threat-model.md` — OWASP Agentic Top 10 2026 risks mapped to the controls
|
|
169
|
-
above, a pre-ship guardrail checklist, and an incident-triage flow for "the agent did X".
|
|
170
|
-
|
|
171
|
-
## Related
|
|
172
|
-
|
|
173
|
-
- `../building-agents/SKILL.md` — builds the loop, tools, RAG, MCP server. Hand off here once
|
|
174
|
-
it exists; it recommends secure-coding, agent-safety is the deeper guardrail layer.
|
|
175
|
-
- `../secure-coding/SKILL.md` — STRIDE/OWASP for ordinary code and web endpoints. agent-safety
|
|
176
|
-
is the *Agentic* Top 10: risks that exist only because a model has tools and autonomy.
|
package/skills/ai-media/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ai-media
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use when a creative goal must become a finished media file: pick and order generative-media models per modality — AI voiceover, image-to-video clips, score — then glue them with ffmpeg (mux, duck, loudnorm, concat). NOT still-image generation/editing (that is `replicate-images`); NOT code-rendered React compositing (that is `remotion-video`)."
|
|
4
4
|
tags: [ai-media, text-to-speech, image-to-video, voiceover, music-generation, ffmpeg, media-pipeline, elevenlabs]
|
|
5
5
|
recommends: [replicate-images, fal, replicate, remotion-video, video-shorts]
|
|
6
6
|
origin: risco
|
|
@@ -10,19 +10,15 @@ origin: risco
|
|
|
10
10
|
|
|
11
11
|
You are the cross-modal director. You decide **which** generative-media model to call per modality, in **what order**, with **what params**, then **assemble** the pieces with ffmpeg into one finished file. You do not own a single provider's API surface and you do not prompt still images — you orchestrate and glue.
|
|
12
12
|
|
|
13
|
-
## The one rule
|
|
14
|
-
|
|
15
|
-
**Plan the whole pipeline before you generate a single asset.** Media generation is slow and metered: a re-roll of a 10 s Veo clip or a 90 s music track costs real money and minutes. Lock the scene list, the aspect ratio, the target loudness, and the model per modality *first*, then generate once. A draft pass at low res/short duration is cheaper than discovering at mux time that your clips are 9:16 and your VO is the wrong sample rate.
|
|
16
|
-
|
|
17
13
|
## Pipeline shape — decide what the goal needs
|
|
18
14
|
|
|
19
|
-
Map the goal to modalities and an ordered step list. The "delegate to" column is where the actual call mechanics live — you pick the model and params, those skills run the call.
|
|
15
|
+
Map the goal to modalities and an ordered step list, and **lock that plan before you generate a single asset** — media generation is slow and metered, so a re-roll of a 10 s Veo clip or a 90 s music track costs real money and minutes. Fixing the scene list, aspect ratio, target loudness and model per modality *first* is cheaper than discovering at mux time that your clips are 9:16 and your VO is the wrong sample rate. The "delegate to" column is where the actual call mechanics live — you pick the model and params, those skills run the call.
|
|
20
16
|
|
|
21
17
|
| Goal | Needs | Ordered steps | Delegate calls to |
|
|
22
18
|
|------|-------|---------------|-------------------|
|
|
23
19
|
| Narrated explainer | stills + img→video + VO + music | script → per-scene stills → clip per scene → VO → music → conform → concat → mix+duck → loudnorm → MP4 | `replicate-images`, `fal`/`replicate` |
|
|
24
20
|
| Product teaser (1 hero) | 1 still + img→video + music | still → clip → music → mix → loudnorm → MP4 | `replicate-images`, `fal`/`replicate` |
|
|
25
|
-
| Faceless short | stills + img→video + VO + music + captions | (explainer pipeline) + burn captions | `replicate-images
|
|
21
|
+
| Faceless short | stills + img→video + VO + music + captions | (explainer pipeline) + burn captions | `replicate-images`; `../video-shorts/SKILL.md` for the script |
|
|
26
22
|
| Just a voiceover | VO only | script → TTS → loudnorm | — |
|
|
27
23
|
| Just a clip from a still | img→video only | still (input) → clip | `fal`/`replicate` |
|
|
28
24
|
| Code-rendered explainer | none of the above | render from React/TS | **stop — route to `remotion-video`** |
|
|
@@ -96,7 +92,7 @@ Costs are per-minute and plan-dependent — treat them as approximate and **veri
|
|
|
96
92
|
|
|
97
93
|
## Assembly with ffmpeg
|
|
98
94
|
|
|
99
|
-
Four operations. Each is a copy-paste recipe; full filter graphs and pitfalls are in `references/ffmpeg-assembly.md`.
|
|
95
|
+
Four operations. Each is a copy-paste recipe; full filter graphs, caption burning and pitfalls are in `references/ffmpeg-assembly.md`.
|
|
100
96
|
|
|
101
97
|
**(a) Mux VO onto video** — map both streams, copy video, take the shorter duration:
|
|
102
98
|
|
|
@@ -182,15 +178,3 @@ Emit this as a runnable script. `scripts/verify.sh` lints it (loudnorm present,
|
|
|
182
178
|
| Shipping generated music without checking rights | "generated" ≠ "licensed to sell" — legal exposure | confirm commercial rights per model/plan |
|
|
183
179
|
| Prompting/editing the still inside this skill | duplicates `replicate-images`' job, worse prompts | delegate the still, consume it here |
|
|
184
180
|
| Mastering loudness by cranking the TTS | clipping, no true-peak control | set level with `loudnorm`, not the generator |
|
|
185
|
-
|
|
186
|
-
## Hand-offs
|
|
187
|
-
|
|
188
|
-
- Still-image generation/editing (the source frames) → `../replicate-images/SKILL.md`
|
|
189
|
-
- The per-provider call mechanics (queue, webhook, FileOutput, cost) → `../fal/SKILL.md`, `../replicate/SKILL.md`
|
|
190
|
-
- Code-rendered, frame-exact compositing in React/TS → `../remotion-video/SKILL.md`
|
|
191
|
-
- Writing the short's script + cut direction → `../video-shorts/SKILL.md`
|
|
192
|
-
|
|
193
|
-
## References
|
|
194
|
-
|
|
195
|
-
- `references/models-and-params.md` — current per-modality model map (TTS tiers + output_format codes + per-char cost; img→video duration/aspect/fps/control/native-audio/open-source + fal & replicate endpoint ids; music cost/licensing/duration).
|
|
196
|
-
- `references/ffmpeg-assembly.md` — full ffmpeg cookbook: mux, two-pass loudnorm, sidechaincompress with worked filter graphs, amix fallback, concat demuxer vs filter, conforming res/fps/SAR, burning captions, pitfalls.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: analytics
|
|
3
|
-
description: "Use when instrumenting product or web analytics —
|
|
3
|
+
description: "Use when instrumenting product or web analytics — GA4/PostHog SDK wiring, event taxonomy, funnels, double-counted events, consent gating, PII scrubbing. NOT charting that data (that is dashboard), NOT choosing which metrics matter (that is kpi-framework), NOT experiment math (that is ab-testing), NOT cookie-policy text (that is gdpr-privacy)."
|
|
4
4
|
tags: [analytics, ga4, posthog, event-tracking, telemetry, consent-mode, funnels, privacy]
|
|
5
5
|
recommends: [kpi-framework, ab-testing, gdpr-privacy, nextjs, dashboard, clickhouse-analytics]
|
|
6
6
|
origin: risco
|
|
@@ -14,23 +14,7 @@ artifacts — an event taxonomy, tracking code (GA4 and/or PostHog), and a conse
|
|
|
14
14
|
downstream of capture (charts, KPI choice, experiment stats, raw-event SQL, legal text) belongs to a
|
|
15
15
|
sibling; see the routing table below.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
**An event name is a contract. Design the taxonomy before you write a single SDK call, and never rename a
|
|
20
|
-
live event in production.** Why: every funnel, audience, dashboard, and saved insight downstream is keyed
|
|
21
|
-
by the exact event name and property keys. Rename `signup_completed` to `sign_up` after launch and you
|
|
22
|
-
silently fork the metric into two — the old funnel flatlines, the new one starts from zero, and nobody
|
|
23
|
-
notices for a week. You can add events forever; you can never safely rename one. So the order of work is
|
|
24
|
-
fixed: **taxonomy → SDK wiring → consent gate → PII scrub → funnel + validation.**
|
|
25
|
-
|
|
26
|
-
## When to use
|
|
27
|
-
|
|
28
|
-
- "Add analytics to my app", "set up GA4", "install PostHog", "track signups and checkout".
|
|
29
|
-
- Designing or auditing an **event taxonomy** — naming convention, event-vs-property, identify-vs-anonymous.
|
|
30
|
-
- Defining a **funnel** (signup → activation → purchase) and the events that feed it.
|
|
31
|
-
- Debugging **double-counting**, missing `client_id`/`distinct_id`, or events that fire on every render.
|
|
32
|
-
- Making collection **privacy-safe**: Consent Mode v2, opt-out, redacting emails/tokens from props.
|
|
33
|
-
- **Server-side** events for actions off the browser (webhook, cron, payment confirmation).
|
|
17
|
+
The order of work is fixed: **taxonomy → SDK wiring → consent gate → PII scrub → funnel + validation.**
|
|
34
18
|
|
|
35
19
|
## When NOT to use
|
|
36
20
|
|
|
@@ -46,9 +30,6 @@ fixed: **taxonomy → SDK wiring → consent gate → PII scrub → funnel + val
|
|
|
46
30
|
| Predict future values from a series | `forecasting` |
|
|
47
31
|
|
|
48
32
|
The load-bearing line: `analytics` = events flow **in**; `dashboard`/`reporting` = events flow **out**.
|
|
49
|
-
`kpi-framework` decides *what* to measure; `analytics` makes the measurement *happen in code*.
|
|
50
|
-
`ab-testing` owns the experiment math; `analytics` owns the event the experiment reads. `gdpr-privacy`
|
|
51
|
-
owns the legal text; `analytics` owns the `gtag('consent', ...)` call and the PII scrubber.
|
|
52
33
|
|
|
53
34
|
## Decision: GA4 vs PostHog vs both
|
|
54
35
|
|
|
@@ -63,6 +44,12 @@ thing everywhere. Do not let the two tools drift into two naming schemes.
|
|
|
63
44
|
|
|
64
45
|
## Step 1 — Event taxonomy first, code second
|
|
65
46
|
|
|
47
|
+
**An event name is a contract: design the taxonomy before you write a single SDK call, and never rename a
|
|
48
|
+
live event in production.** Every funnel, audience, dashboard, and saved insight downstream is keyed by the
|
|
49
|
+
exact event name and property keys. Rename `signup_completed` to `sign_up` after launch and you silently
|
|
50
|
+
fork the metric into two — the old funnel flatlines, the new one starts from zero, and nobody notices for a
|
|
51
|
+
week. You can add events forever; you can never safely rename one.
|
|
52
|
+
|
|
66
53
|
Name events `object_action` in `snake_case`: `signup_completed`, `checkout_started`, `invoice_paid`. The
|
|
67
54
|
**object** is the noun, the **action** is a past-tense verb. Detail goes in **properties**, never in the
|
|
68
55
|
name — `cta_clicked` with `{ location: "navbar" }`, not three events `navbar_cta`, `hero_cta`, `footer_cta`.
|
|
@@ -208,12 +195,3 @@ the ≤ 40-char / leading-letter / charset rule; GA present without a `gtag('con
|
|
|
208
195
|
| Server `user_id` ≠ browser `user_id` | Creates duplicate users; funnel splits | Use the same stable id on both sides; stitch within 48h |
|
|
209
196
|
| `posthog.init` with no proxy host | Ad-blockers eat ~20-40% of events | Serve SDK + ingest under a first-party path (`/ingest`) |
|
|
210
197
|
| Email as GA4 `user_id` | PII leak + Google policy violation | A stable opaque id (DB id / UUID) |
|
|
211
|
-
|
|
212
|
-
## References
|
|
213
|
-
|
|
214
|
-
- `references/ga4-setup.md` — gtag + Next.js install, full Consent Mode v2 with region-scoped defaults,
|
|
215
|
-
Measurement Protocol server event, recommended-event param tables, DebugView.
|
|
216
|
-
- `references/posthog-setup.md` — `init` options, `identified_only`, EU vs US host, reverse proxy,
|
|
217
|
-
`@posthog/next` server capture, feature-flag read, autocapture tuning, `optIn`/`optOut`.
|
|
218
|
-
- `references/event-taxonomy.md` — naming rules, starter SaaS + e-commerce catalog, property conventions,
|
|
219
|
-
identify vs group, the anti-rename rule.
|