verify

作成者: anthropic

ハーネスの変更をエンドツーエンドで検証(Dockerなし)— 実際の固定CLIを駆動し、ヘッダーをキャプチャするスタブサーバーに対して、正確なenv resolve_auth_env()を使用…

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).

anthropicのその他のスキル

access
anthropic
Discordチャンネルのアクセスを管理 — ペアリングの承認、許可リストの編集、DM/グループポリシーの設定。ユーザーがペアリングを依頼したり、誰かを承認したり、誰が許可されているかを確認したりする際に使用します。
official
session-report
anthropic
~/.claude/projectsのトランスクリプトから、Claude Codeセッションの使用状況(トークン、キャッシュ、サブエージェント、スキル、高コストなプロンプト)を探索可能なHTMLレポートとして生成します。
official
build-mcp-server
anthropic
このスキルは、ユーザーが「MCPサーバーを構築する」「MCPを作成する」「MCP統合を行う」「Claude用のAPIをラップする」「ツールを公開する…」と依頼した場合に使用します。
official
cookbook-audit
anthropic
ルーブリックに基づいてAnthropic Cookbookのノートブックを監査します。ノートブックのレビューや監査が依頼されたときに使用してください。
official
handle-complaint
anthropic
顧客からのクレームをエンドツーエンドで処理します — コンテキストを取得し、返信を作成し、運用上の修正案を提案します。オプションでメールやチケットIDを受け付けます…
official
use-case-triage
anthropic
処理活動がPIA、必須のGDPR DPIAを必要とするか、またはそのまま進められるかを迅速に判断し、プライバシーポリシーの競合を表面化させて適切なルートへ導きます…
official
board-minutes
anthropic
取締役会や委員会の議事録を自社のフォーマットで草稿します。カレンダーから今後の取締役会や委員会の会議を自動検出し、議題などを尋ねます…
official
renewal-tracker
anthropic
維持された更新登録簿をもとに、キャンセル期限が迫っている契約を表示し、通知期間が終了する前に警告します。ユーザーが尋ねたときに使用します…
official