/hypervibe:rgpd-auditfrom hypervibe
Audits a Next.js project's RGPD compliance by scanning code, env vars, and dependencies to detect third-party services, comparing them with the privacy policy registry, and offering to fix gaps, generate the privacy policy page, and link it from legal notices.
Ships in hypervibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
/bootstrap carries no language signal by itself). If nothing in the conversation gives a signal, fall back to the OS locale (node -e "console.log(Intl.DateTimeFormat().resolvedOptions().locale)") before defaulting to English. ALWAYS reply in that language for every user-facing message: questions, progress, confirmations, summaries, errors - including any example text quoted in this skill, which is illustrative and must be translated, never sent verbatim.You will audit the project's RGPD compliance: detecting the third-party subprocessors actually used, comparing them with the registry, generating/synchronizing the privacy policy page, and linking it from the legal notices.
Announce each major block clearly.
Verify that you are at the root of a Next.js project:
test -f package.json || test -f apps/web/package.json && echo OK || echo "Not a Next.js project"
If the output is not OK, tell the user that /rgpd-audit must be run from the root of a project and stop.
Run the bundled script:
node "${CLAUDE_SKILL_DIR}/../../scripts/rgpd-audit.mjs"
The script returns a JSON object with:
webRoot - root of the code (apps/web for monorepos, root otherwise)registryPath - path of the registry, subprocessors.json in the lib/ folder next to the application (src/lib/ in a project with src/)appDir - the application folder Next.js serves, where a page must be writteni18nRoutingPath - the project's i18n routing file, or null for a single-language projectpolicyPageIgnoredPath, mentionsLegalesIgnoredPath - a page found where Next.js does NOT serve it (null otherwise)registryExists - booleanpolicyPagePath - path of the policy page if found, otherwise nullmentionsLegalesPath - path of the legal notices page if foundregistryKeys - keys present in the registrydetectedKeys - keys detected in the codedetected - object { key: true } for each detected subprocessorevidence - for each detected key, the evidence (package, env var, or source pattern)missing - keys detected BUT absent from the registry (to add)stale - keys present in the registry BUT no longer detected (to remove or justify)staleWithheld - keys that would be stale, but a file could not be read (see unreadable): never propose to remove them in this passunrecognised - keys in the registry that the audit does not recognise while signals name that very service, each { key, signals }: the entry lacks its detection rule, it is NOT staleunreadable - files that exist but could not be read, each { file, error } (a package.json with a stray comma, a malformed registry): "I could not see" is not "there is nothing"unidentified - signs of a remote service the audit could not name for sure, each { kind, value, where?, service? }: a variable named like a key or an address (variable), a package of a service outside the catalogue (package, with the service's name in service), a host the code reaches (host, with the file in where). Plain links, JSON-LD sameAs, comments, the project's own domain and the web's standards are already left out.reviewed - signs the person already set aside, with their reason (not to raise again)notProcessors - hosts reached without anyone's personal data (placeholder images), with the reasoncustomKeys - registry entries the project documented for itself, recognised by their own detect signsCapture the output. You will reason about it in the following Steps.
Present the diagnosis clearly. Format:
🔍 RGPD audit
Subprocessors detected in the code (X):
<key>-- …
State of the
subprocessors.jsonregistry:
- ✅ Present: entries
- ❌ Absent (never initialized)
Privacy policy page:
- ✅ Found:
<path>- ❌ Missing
Registry vs code diff:
- ❌ Missing from the registry:
<missing keys>(to add)- ⚠️ Stale in the registry:
<stale keys>(to remove if truly no longer used)- ✗ Could not be read:
<files>(nothing is proposed for removal until they are fixed)- ~ Used but not recognised:
<unrecognised keys>(the entry needs its detection rule, it stays in the policy)- ✅ Everything is aligned (if missing, stale, unrecognised, unreadable and unidentified are all empty)
To identify (X): one line per service, not per sign (a package, its variable and its host are often the same service)
- <what it is, in plain words> - <the signs: package, variable, address reached>
Mention reviewed in one line ("already looked at, set aside: …") and notProcessors in one line, without asking anything about them.
Certains services ne laissent aucune trace dans le dépôt : ils se configurent sur le tableau de bord d'un fournisseur. L'audit ne peut pas les détecter, donc il faut poser la question. Une seule fois, et seulement si la clé n'est pas déjà au registre.
| Ce qu'il faut demander | Clé à ajouter si la réponse est oui |
|---|---|
| Le domaine de ce projet reçoit-il des emails redirigés, une adresse du type contact@ ou support@ dont les messages arrivent dans une autre boîte ? | cloudflare |
| Un service de suivi ou de journaux est-il branché dans la console de l'hébergeur (une intégration installée depuis sa boutique, un envoi des journaux vers un autre outil, une surveillance de disponibilité) ? | aucune clé toute faite : le documenter comme au Step 4b, avec manuallyDeclared: true à la place de detect |
Formule-la en langage courant, jamais en jargon :
Est-ce que ce site a une adresse email à lui, du genre contact@ton-domaine, dont les messages arrivent dans une autre boîte (Gmail, Outlook…) ? Si oui, les messages passent par un intermédiaire, et ça doit figurer dans la politique.
Si la réponse est oui, ajoute la clé au moment de la synchronisation (Step 4).
Ces fiches portent manuallyDeclared : aux passages suivants, l'audit ne les
proposera jamais à la suppression, alors même qu'il ne les détecte pas. La
question ne se pose donc qu'une fois dans la vie du projet.
For each service behind the unidentified signs, one at a time:
node "${CLAUDE_SKILL_DIR}/../../scripts/privacy/review.mjs" add --kind <variable|package|host> --value "<value>" --reason "<why no personal data reaches it>"
The reason is kept in the project (.hypervibe/privacy-review.json, versioned with it) and the next audit does not ask again.Ask the user which actions to run, as a menu:
Would you like to:
- Synchronize the registry (add
missing, document what Step 2 ter identified, removestale)- Generate / refresh the page of the privacy policy
- Update the legal notices to point to the privacy policy
- Do everything (1 + 2 + 3)
- Exit without changing anything
For each key in missing, call the _update-privacy-policy helper:
node "${CLAUDE_SKILL_DIR}/../../scripts/update-privacy-policy.mjs" --add <key>
You can pass several --add in a single call.
For each key in stale, ask the user before removing:
The subprocessor
brevois in the registry but no longer detected in the code. Remove it? (y/N)
If yes:
node "${CLAUDE_SKILL_DIR}/../../scripts/update-privacy-policy.mjs" --remove <key>
If unreadable is not empty, say which file could not be read and why, and propose no removal: stale is then empty and staleWithheld holds what it would have held. Suggest fixing the file and running the audit again.
For each key in unrecognised, never propose to remove it: the project uses the service, the audit simply has no rule to recognise it. Copy its entry from the registry into a temporary file, add detect with the signals listed (a package in deps, a variable in env, a host in hosts), add sources and checkedAt if it has none (Step 4b), and apply it with --entry.
The catalogue covers the services the plugin installs and the most common others. Any other subprocessor is documented for this project, with an entry supplied whole. It is published as a legal statement on the site, so the facts come from the provider itself:
key (kebab-case), name (the legal entity that contracts), address (as the provider states it), country, purpose, dataTypes, retention, legalBasis, isEUResident, transferMechanism (null inside the EU), privacyUrl, dpaUrl when one exists; French at the root and English under i18n.en, like the catalogue (--catalog shows examples). Add:
"custom": true;"detect": the signs that revealed it, in the shape { "deps": [...], "env": [...], "envPrefixes": [...], "hosts": [...] }, so the next audit recognises it. Hand-declared services with no trace in the code (Step 2 bis) take "manuallyDeclared": true instead. One of the two is required: without it, the next audit would call the service stale;"sources": the official pages actually opened (https addresses, at least one);"checkedAt": today's date (YYYY-MM-DD).node "${CLAUDE_SKILL_DIR}/../../scripts/update-privacy-policy.mjs" --entry <file.json>
The helper checks every required field, the detection rule, the sources and the date included, refuses a placeholder where an address is expected, and refuses a half-filled entry.policyPagePath === null (no page)If privateTool is true, create nothing: the project is marked as a private tool (no page for the public, the marker sits in its CLAUDE.md). Say so in one line, and that the marker is to be removed the day a page becomes public.
Create the page from the template. The template to use depends on the project's i18n state:
i18nRoutingPath is not null (multilingual project) → use ${CLAUDE_SKILL_DIR}/../../templates/privacy-policy/i18n.tsx, and then run node ${CLAUDE_SKILL_DIR}/../../scripts/_i18n-merge-messages.mjs --web-dir <web-root> --feature privacy-policy to merge the privacy.* keys into the messages/<locale>.json files.${CLAUDE_SKILL_DIR}/../../templates/privacy-policy/plain.tsx.Substitute in the template:
{{PROJECT_NAME}} (read the web-root's package.json){{LAST_UPDATED}} (today's date, format YYYY-MM-DD)Page location: always in appDir, the folder the audit reports, which is the one Next.js serves (app/ at the project's root when it exists, src/app/ otherwise). Next.js ignores src/app as soon as an app/ exists at the root: a page written there builds without a warning and answers 404.
<appDir>/[locale]/ exists → <appDir>/[locale]/politique-de-confidentialite/page.tsx<appDir>/politique-de-confidentialite/page.tsxCreate the folder then write the file. Verify that the page does import ~/lib/subprocessors. If the ~/ alias is not configured in the project (rare), replace it with the appropriate relative path.
policyPageIgnoredPath !== null (a page exists, where Next.js never serves it)Tell the person plainly that their privacy policy page exists but is not online (the site answers 404 on it), because it sits in a folder Next.js ignores in this project. Move it into appDir (git mv, keeping its content), then continue as in Case B. Same for mentionsLegalesIgnoredPath.
policyPagePath !== null (the page already exists)Ask the user:
A privacy policy page already exists at
<path>. You can:
- Keep it as is - the registry is updated but the page is not modified
- Replace it with the data-driven template (the current page will be overwritten - useful if the existing page is outdated, hand-written, or out of sync)
If the user chooses 2, make a backup first:
cp <policyPagePath> <policyPagePath>.backup
Then regenerate from the template.
If mentionsLegalesPath !== null, open the page and verify that it contains a link to /politique-de-confidentialite. Otherwise, add a mention in the "Données personnelles et RGPD" section (or create it if absent):
<p>
Pour le détail complet du traitement de vos données et la liste de nos sous-traitants,
consultez notre <Link href="/politique-de-confidentialite">politique de confidentialité</Link>.
</p>
If the user has a very detailed hand-written policy (the Hypervibe case), do not touch it in this skill - that is a separate refactor. Mention it in the summary.
If you touched one or more .tsx files, do the global UTF-8 self-check:
node -e "
const fs = require('node:fs');
for (const f of process.argv.slice(1)) {
const c = fs.readFileSync(f, 'utf8');
const m = c.match(/\\\\u[0-9a-fA-F]{4}/g);
if (m) { console.log(f, ':', m.length, 'escapes'); process.exit(1); }
}
console.log('UTF-8 OK');
" <files-touched>
If Unicode escapes are reported, fix them with the quick recovery script documented in the global CLAUDE.md (section "Règle prioritaire UTF-8").
Re-run the script:
node "${CLAUDE_SKILL_DIR}/../../scripts/rgpd-audit.mjs" --pretty
Present the output to the user. Everything should be ✅ aligned.
Present a short recap:
✅ RGPD audit complete
- Registry: documented subprocessors
- Policy page:
<path>(created / refreshed / unchanged depending on the case)- Legal notices: (updated to point to the policy / already up to date)
To do manually:
- Replace
[email protected]in the page with your real contact address- Check the legal content of sections 5 (rights) and 6 (cookies) - the template provides standard wording, but your case may require adjustments (minors vs adults, health data, etc.)
- The services documented for this project only (outside the catalogue) were checked on the date each entry carries: re-check them about once a year, providers move
@vercel/analytics installed but never imported in the layout), inform the user - they can pnpm remove the dependency, or you can extract the key from the registry via --remove.--add still rejects unknown keys, on purpose: nothing may invent legal data. A service outside the catalogue goes through Step 4b, researched from its official pages and validated by the person. When the same service keeps coming back across projects, it deserves a catalogue entry on the plugin side.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub flavien-ia/hypervibe-craft --plugin hypervibe90 skills in this plugin
/accessibilityAccessibility audit of a Next.js app: reads the code (images, buttons, links, form fields, keyboard, focus, zoom, motion), measures the live pages with PageSpeed Insights, explains each problem plainly, then applies the fixes the user approves./add-2faAdd two-factor authentication (2FA TOTP) to an existing T3 project's login. Orchestrator - asks which authenticator app the user wants, detects whether the project uses admin auth (single fixed login) or user accounts, and delegates to the right setup. Admin mode - 2FA is mandatory for the single admin, secret + backup codes stored in the Bitwarden vault. User mode - 2FA is optional per user, each user enables it from their account page, secrets + backup codes stored per-user in the database. Requires the project to already have hypervibe auth (`/add-auth`)./add-agent-dashboardAdd a monitoring screen for AI agents in the project admin: cost, run history, turn-by-turn traces, and a button to launch a run by hand. Installed when an agent is created, safe to re-run./add-aiAdd AI to an existing Next.js project: chat assistant, content processing, or generation. Estimates the cost from live prices and provisions a spending-capped key before writing any code. Model-independent through OpenRouter./add-analyticsAdd Google Analytics (GA4) to an existing Next.js project. Includes RGPD cookie consent banner./add-authAdd NextAuth (Auth.js) authentication to an existing T3 project. One structured question decides the mode - admin (fixed login in env vars) or users (DB-backed email+password with signup, signin, account page, delete account, and optional forgot-password if email is configured). OAuth providers (Google, GitHub) are offered as optional add-ons AFTER the user-credentials baseline, never as a replacement. This skill is an orchestrator - it delegates the actual implementation to `_setup-auth-admin` or `_setup-auth-users` depending on the chosen mode.Other plugins' skills for the same job