Synthèse automatique
Capture et compare des instantanés du prompt système envoyé par claude-agent-sdk afin de repérer les changements du preset Claude Code et de la requête propre à agent-container.
Points forts
- Distingue clairement la dérive du preset Anthropic de celle du prompt interne d'agent-container.
- Fournit une procédure de triage obligatoire — porter, adapter ou ignorer — pour chaque modification du preset.
- S'appuie sur des captures versionnées à la version du SDK épinglée, ce qui rend les comparaisons reproductibles.
- Couvre aussi les descriptions d'outils et les prompts de sous-agents, pas seulement le prompt principal.
Limites
- Les instantanés sont ignorés par Git, donc l'historique des captures n'est pas partagé via le dépôt.
- Le processus dépend de conteneurs, d'un proxy et de scripts dont les détails ne sont pas entièrement décrits dans le SKILL.md.
- Ne couvre que l'écosystème Anthropic et claude-agent-sdk, pas les autres fournisseurs de modèles.
À utiliser lors d'une montée de version de @anthropic-ai/claude-agent-sdk, pour analyser un comportement inattendu du modèle après une mise à jour ou vérifier ce qu'une PR change dans le prompt envoyé.
À ne pas utiliser pour concevoir ou réécrire le prompt système lui-même, ni avec des agents qui ne reposent pas sur claude-agent-sdk.
Analyse de sécurité
PrudenceThe skill is a documentation-driven local tooling workflow: build an agent-container image, drive the SDK through a capture proxy with a dummy key, and diff rendered prompt snapshots. That legitimately requires docker, network, and shell execution, which warrants caution rather than a safe rating, but there is no evidence of destructive commands, secret exfiltration to third parties, obfuscated payloads, or attempts to override the agent's instructions. Main residual risks are unverifiable bundled scripts and credential/prompt-data handling in captures.
- •Bundled scripts (capture.sh, proxy.mjs, pure-baseline/run.mjs) are referenced but not included in the submitted content, so their actual behavior (network calls, file writes, docker invocation) cannot be verified from this artifact.
- •`capture.sh` runs `docker build ./agent-container` on every invocation against unpinned base images and `npm install` transitive deps — build-time supply-chain exposure and elevated host resource use.
- •A pass-through HTTP proxy intercepts full `/v1/messages` request bodies (system prompt, messages, tool schemas) and writes them to `snapshots/` on disk; the gitignore mitigates but does not prevent accidental sharing of prompt/credential-adjacent payloads.
- •`--anthropic-api-key` is passed into containers; the doc suggests supplying a 'real-looking key' when validation complains, which risks real credentials ending up in process args, container env, or captured request headers if a live key is used.
- •No destructive, obfuscated, or exfiltrating instructions present; network and container use are clearly scoped to local prompt capture and diffing.
- •capture.sh builds and runs Docker containers (`docker build ./agent-container`, `node:20` proxy container); with `--pr <num>` it fetches `origin/pull/<num>/head` into a detached worktree and builds that PR code, meaning unreviewed contributor code is executed inside the local build — a real supply-chain surface, though scoped to the user's own repo.
- •A local pass-through proxy intercepts the `/v1/messages` request body (full system prompts, tool definitions, conversation messages) and writes it to `snapshots/`. Content is gitignored per `.gitignore` but is still persisted in plaintext on disk and may include proprietary prompt text.
- •`--anthropic-api-key` is injected into containers and docs permit passing a "real-looking key" when the CLI validates locally; a genuine key placed there would be exposed in container env / process listings and to anything reachable from the container network.
- •Requires outbound network access to Anthropic's API for the proxy to forward captured requests upstream.
- •Uses `jq`/`curl`/`git` and worktree create/remove, but no destructive commands (no `rm -rf /`, no `curl | sh`, no base64 payloads, no credential exfiltration to a third party).
Exemples
Bump @anthropic-ai/claude-agent-sdk to the latest version, capture the pure-claude and superagent prompts, and show me the diffs against the previous snapshots.The pure-claude prompt drifted. Triage each hunk against agent-container/src/system-prompt.md and the subagent prompts, and tell me whether to port, adapt, or skip it.Preview what this PR changes in the on-wire Claude prompt by capturing both axes before and after the change, then summarize the superagent diff.description: Detect drift in the Claude system prompt that agent-container sends to Anthropic. Captures two axes — the bare claude_code preset (Anthropic baseline) and agent-container's fully custom wire request — at the SDK version pinned in agent-container/package-lock.json, then stores versioned snapshots in <skill>/snapshots/ (gitignored). Because SuperAgent REPLACES the preset with its own system prompt, preset drift never reaches our sessions automatically — every pure-claude change must be triaged for porting into system-prompt.md. Use when bumping @anthropic-ai/claude-agent-sdk, debugging unexpected model behavior after an SDK upgrade, previewing what a PR changes in the on-wire prompt, or auditing what Anthropic silently changed in the Claude Code preset.
Claude Prompt Drift Check
Capture + diff of the /v1/messages request body that claude-agent-sdk emits, at two layers:
| Axis | What it captures |
| ------------- | --------------------------------------------------------------------------------------------- |
| pure-claude | Bare { type: 'preset', preset: 'claude_code' } baseline — no MCP, no append, no custom tools |
| superagent | What agent-container actually puts on the wire (skills, MCP, claudeMd, etc.) |
Key architectural fact: claude-code.ts passes systemPrompt as a plain string (rendered from agent-container/src/system-prompt.md), which REPLACES the claude_code preset entirely — the preset never reaches our sessions. Our prompt is a separate, parallel document covering similar ground in its own words, so when Anthropic improves the preset, our prompt silently falls behind unless someone ports the change. That protection is the point of this skill.
The interesting signal is each axis's drift across captures:
pure-claudedrift → Anthropic changed the preset. This is never merely informational — because we replace the preset, no preset improvement reaches our agents automatically. Run the porting triage below on every hunk.superagentdrift → our own prompt/wiring changed (edited system-prompt.md, added/removed an MCP server, changed claudeMd, bumped SDK, etc.). Expected when we shipped prompt changes; a red flag when we didn't (means the SDK/CLI altered how it assembles our request).
Porting triage (mandatory when pure-claude drifts)
For each hunk in the pure-claude system.md diff, decide port / adapt / skip against our prompt sources:
agent-container/src/system-prompt.md— the main session promptagent-container/src/web-browser-agent-prompt.md,dashboard-builder-agent-prompt.md,computer-use-agent-prompt.md— subagent prompts
Triage rules:
- Behavioral guidance (tone, safety, communication, memory discipline — e.g. the 2.1.219 they/them pronoun paragraph): usually port, adapted to our prompt's voice and section structure. Anthropic adds these from behavioral data; our agents talk to real humans and inherit none of it.
- Product-surface text (fast mode, /commands, terminal UI, Claude Code feature descriptions): skip — describes their product, not ours.
- Facts that go stale (model rosters, model IDs, knowledge cutoffs, pricing): our main prompt deliberately carries none of these — keep it that way, but check the subagent prompts for hardcoded model IDs and route those to the
update-modelsskill. - Tool-description drift (
tools.mddiff): only actionable if our prompt or subagent prompts restate guidance about that tool — check before dismissing.
Record the port/skip decision per hunk in the upgrade PR description so the next drift run doesn't re-litigate old hunks.
Files in this skill
.claude/skills/claude-prompt-drift/
├── SKILL.md
├── .gitignore ← ignores `snapshots/`
├── capture.sh ← orchestrator (containers + proxy + drive)
├── diff.sh ← cross-snapshot diff
├── proxy.mjs ← pass-through capture proxy (runs in node:20 container)
├── pure-baseline/run.mjs ← bare-preset SDK driver (runs inside agent-container image)
└── snapshots/ ← captured data, local only (gitignored)
snapshots/ is build output, not source. It lives next to the script so it's trivially discoverable (ls .claude/skills/claude-prompt-drift/snapshots/) but never enters git.
Snapshot layout
Default location: <this skill>/snapshots/. Override precedence: --snapshots-dir <path> > $SNAPSHOTS_DIR env > default.
Layout under the snapshots root:
pure-claude/<sdk-version>/<model>/{system,messages,tools}.md + meta.json
superagent/<sa-key>/<model>/{system,messages,tools}.md + meta.json
<sa-key> shape:
| Source | Shape | Example |
| ---------------- | ---------------------------------- | ----------------------------- |
| main / release | <sdk>+<sa-version> | 0.2.118+0.3.24 |
| --pr <num> | <sdk>+pr<num>-<short-sha> | 0.2.118+pr73-fef927c2 |
| dirty tree | suffix -dirty (needs --allow-dirty) | 0.2.118+0.3.24-dirty |
The two axes are keyed differently because they depend on different things: pure-claude only on the SDK version, superagent also on what SuperAgent ships. Mixing them in one key would silently overwrite the superagent axis when SuperAgent changes without an SDK bump.
When to use
- After bumping
@anthropic-ai/claude-agent-sdkinagent-container/package.json. - "Model is behaving weirdly since the SDK upgrade" — diff to see what shifted.
- Reviewing a PR that touches
agent-containerprompts/tools — capture the PR head and diff against main. - Auditing whether Anthropic silently changed the
claude_codepreset.
Prerequisites
- Docker running.
jq,curl,giton PATH.- Skill run from inside the SuperAgent repo (so
--superagent-pathcan auto-resolve).
Usage
Capture the current SDK version (default = working tree)
cd /path/to/SuperAgent
.claude/skills/claude-prompt-drift/capture.sh
Capture a PR head without touching the working tree
.claude/skills/claude-prompt-drift/capture.sh --pr 73
--pr fetches origin/pull/<num>/head, builds in a detached worktree, captures, removes the worktree on exit.
Capture against an arbitrary checkout
git worktree add --detach /tmp/sa-old origin/main~10
.claude/skills/claude-prompt-drift/capture.sh --superagent-path /tmp/sa-old
git worktree remove /tmp/sa-old
Flags
| Flag | Default | Meaning |
| ----------------------- | ------------------------------------------ | -------------------------------------------------------- |
| --model | claude-opus-4-7 | Model id (one snapshot per model) |
| --axis | both | pure-claude, superagent, or both |
| --pr <num> | none | Capture against a PR head (mutually exclusive with --superagent-path) |
| --force | off | Re-capture even if snapshot exists |
| --allow-dirty | off | Allow superagent capture from a dirty working tree. Key gets a -dirty suffix. |
| --snapshots-dir | $SNAPSHOTS_DIR or <skill>/snapshots | Where to write snapshots (gitignored at the default location) |
| --superagent-path | auto | Override SuperAgent repo path |
| --anthropic-api-key | dummy-for-capture | API key passed to the containers. Proxy captures the request body before forwarding upstream, so a 401 is fine. Claude Code's CLI does light local validation — pass a real-looking key if it complains. |
| --tool-search | true | ENABLE_TOOL_SEARCH on the superagent axis — true is what the Anthropic, Platform and subscription providers send. Always pinned: behind the capture proxy an unset value means on since CLI 2.1.304 and off before it. The pure-claude axis always runs with it false, so every preset tool's full description is on the wire for triage. Snapshots taken before this flag (≤ 0.3.303) are tool-search-off captures; compare them to a --tool-search false capture. |
Diff two snapshots
.claude/skills/claude-prompt-drift/diff.sh pure-claude <old-sdk> <new-sdk>
.claude/skills/claude-prompt-drift/diff.sh superagent <old-key> <new-key>
Exits non-zero on drift (CI-friendly). Diff is per-axis on purpose — the two axes have different key shapes.
What the between-axes diff means
In a single capture, pure-claude/<sdk>/<model>/system.md and superagent/<key>/<model>/system.md are two unrelated documents — the preset vs our full replacement prompt (~80 vs ~700 lines, different section structure). Diffing them line-by-line is meaningless and is not what this skill is for. This skill tracks how each axis evolves over time; the pure axis exists purely as the canary for preset changes to feed the porting triage above.
Noise handling
proxy.mjs redacts two volatile fields before writing the rendered .md:
- The capture timestamp is dropped from
.md(it lives inmeta.json). cch=<hex>in the billing header (system[0]) is replaced withcch=<redacted>. Claude Code regenerates this per request even for identical input, so leaving it raw makes every diff flap.
Real signal fields like cc_version=... and cc_entrypoint= are kept.
Notes
- One capture per
(axis, key, model)is intentional — captures are large and the static prefix is stable per session. Use--forceto redo. raw.jsonand.seen-models.jsonare produced during capture but excluded from diffs.pure-baseline/run.mjsuses the SDK that's already installed inside the agent-container image (no separatenpm install), avoiding the glibc/musl mismatch that broke earlier attempts at running the baseline undernode:20-alpine.- Working tree state matters. When pointing at the working repo directly, the script reads
git rev-parse HEADandgit status --porcelain— make sure that's what you mean to capture (typicallyorigin/mainor a PR head, not a stale local branch). --modelmust match what agent-container actually puts on the wire. The container ignores the session's requested model and uses its own default (currentlyclaude-opus-4-8); if--modelnames anything else, the proxy writes the snapshot under the real model's dir while the script polls the wrong path and times out. The pure axis honors--modelvia theDRIFT_MODELenv var.- Windows/Git Bash: capture.sh disables MSYS path conversion for container-side docker args (
MSYS2_ARG_CONV_EXCL) and renders host mount paths viacygpath -m— required, or the-vmounts get rewritten toC:\Program Files\Git\...and the proxy crash-loops. Needsjqon PATH (not bundled with Git for Windows).
Known caveat: local build ≠ GHCR image
capture.sh runs docker build ./agent-container locally each invocation; it does not pull ghcr.io/skillfulagents/superagent-agent-container-base:<sha> (the image users actually run). The two are not byte-identical — different base-image digest resolution, npm install transitive-dep timing, build-cache state — so for a strict bit-for-bit integrity audit this skill is not the right tool.
For wire-prompt drift, this is acceptable: system / tools / messages content all originate in agent-container/src/ (system-prompt.md, MCP registrations, claude-code.ts tool wiring), which both the local build and CI bake in the same way. If a finding ever looks suspicious, re-check by pulling the GHCR image at the same SHA and inspecting out-of-band — but the common case doesn't require it.
CI only publishes the base image on push to main (see .github/workflows/build-container.yml), so for PR captures local build is the only option regardless.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/claude-prompt-drift-check-mwfwowi8/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/claude-prompt-drift-check-mwfwowi8' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/claude-prompt-drift-check-mwfwowi8/download' --output '.skill-downloads/claude-prompt-drift-check-mwfwowi8/SKILL.md.part' && mv '.skill-downloads/claude-prompt-drift-check-mwfwowi8/SKILL.md.part' '.skill-downloads/claude-prompt-drift-check-mwfwowi8/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Extrait original : Prerequisites
- Docker running.
jq,curl,giton PATH.- Skill run from inside the SuperAgent repo (so
--superagent-pathcan auto-resolve).
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Le fichier ne fournit pas un en-tête name/description exploitable pour cette procédure native. Le téléchargement reste disponible pour lecture ; utilisez le mode manuel ci-dessous.
Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/claude-prompt-drift-check-mwfwowi8/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.