verify

Harness-Änderungen End-to-End ohne Docker verifizieren — die echte festgelegte CLI gegen einen Header-erfassenden Stub-Server mit der exakten Umgebung resolve_auth_env() treiben…

npx skills add https://github.com/anthropics/defending-code-reference-harness --skill verify

Verifying harness changes on a docker-less host

The pipeline's real surface is the in-container claude -p process and its outbound API requests. Without docker, drive the same pinned CLI binary directly with the env dict the harness would inject via docker -e.

Recipe

  1. Get the pinned CLI (version from harness/agent_image.py:CLAUDE_CODE_VERSION): npm install --no-save @anthropic-ai/claude-code@<pin> in a temp dir → binary at node_modules/@anthropic-ai/claude-code/bin/claude.exe (the .exe name is the real native-binary entry on Linux too, filled in by the package's postinstall — not a Windows leftover).
  2. Stub API server: a tiny HTTP server that appends each request's headers to a JSONL file and returns a 400 invalid_request_error (non-retryable, so the CLI exits fast; exit=1 is expected).
  3. Build the agent env exactly as the pipeline does: python3 -c "from harness.auth import resolve_auth_env; ..." and dump to an export-lines file with shlex.quote (values contain newlines — NEVER pass via env $(...), word-splitting mangles them; source the file).
  4. Emulate the container env: unset ANTHROPIC_CUSTOM_HEADERS (and any other ambient var not in the resolved dict) before sourcing — a Claude Code session in this repo injects .claude/settings.json env into shells, which containers never see.
  5. Run: ANTHROPIC_BASE_URL=http://127.0.0.1:<port> CLAUDECODE= IS_SANDBOX=1 timeout 30 <cli> -p hi --model claude-sonnet-4-5 --max-turns 1, then read the captured JSONL.

Gotchas

  • Unit tests in tests/test_patch.py / tests/test_patch_grade.py need docker and fail on docker-less hosts — pre-existing, not your change.
  • The docker -e injection leg itself can't be exercised without docker; it's the same mechanism that carries ANTHROPIC_API_KEY in production.
  • For the interactive-skills surface, copy .claude/settings.json into a fresh temp dir and run the host claude from there (with ambient ANTHROPIC_CUSTOM_HEADERS unset so settings.json is the only source).

Mehr Skills von anthropic

access
anthropic
Verwalte den Discord-Kanalzugriff — genehmige Paarungen, bearbeite Zulassungslisten, lege DM/Gruppen-Richtlinien fest. Verwende dies, wenn der Benutzer darum bittet, jemanden zu paaren, zu genehmigen, zu prüfen, wer zugelassen ist, …
official
session-report
anthropic
Generieren Sie einen erkundbaren HTML-Bericht über die Nutzung von Claude Code-Sitzungen (Tokens, Cache, Subagenten, Fähigkeiten, teure Prompts) aus Transkripten von ~/.claude/projects.
official
build-mcp-server
anthropic
Diese Fähigkeit sollte verwendet werden, wenn der Benutzer darum bittet, "einen MCP-Server zu bauen", "einen MCP zu erstellen", "eine MCP-Integration zu machen", "eine API für Claude zu wrappen", "Werkzeuge für … bereitzustellen".
official
cookbook-audit
anthropic
Auditieren eines Anthropic Cookbook-Notebooks basierend auf einer Bewertungsmatrix. Verwenden Sie dies, wann immer eine Notebook-Überprüfung oder -Audit angefordert wird.
official
handle-complaint
anthropic
Bearbeitet eine eingehende Kundenbeschwerde durchgängig – zieht Kontext, entwirft eine Antwort und schlägt eine operative Lösung vor. Akzeptiert optionale E-Mail oder Ticket-ID…
official
use-case-triage
anthropic
Schnell feststellen, ob eine Verarbeitungstätigkeit eine PIA, eine obligatorische DSGVO-DPIA erfordert oder fortgesetzt werden kann – zeigt Datenschutzkonflikte auf und leitet zur richtigen…
official
board-minutes
anthropic
Erstellt Sitzungsprotokolle für Vorstands- oder Ausschusssitzungen in Ihrem Hausformat. Erkennt automatisch bevorstehende Vorstands- und Ausschusssitzungen aus Ihrem Kalender, fragt nach der Tagesordnung und…
official
renewal-tracker
anthropic
Zeige Verträge mit bevorstehenden Kündigungsfristen an und warne vor Ablauf von Kündigungsfenstern, basierend auf einem gepflegten Verlängerungsregister. Verwende, wenn der Benutzer fragt…
official