verify

โดย anthropic

ตรวจสอบการเปลี่ยนแปลงของ harness แบบ end-to-end โดยไม่ใช้ docker — ขับ CLI ที่ปักหมุดจริงกับเซิร์ฟเวอร์ stub ที่จับ header ด้วย 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).

Skills เพิ่มเติมจาก anthropic

analyzing-financial-statements
anthropic
ทักษะนี้คำนวณอัตราส่วนทางการเงินและตัวชี้วัดสำคัญจากข้อมูลงบการเงินเพื่อการวิเคราะห์การลงทุน
applying-brand-guidelines
anthropic
ทักษะนี้ใช้การสร้างแบรนด์และสไตล์องค์กรที่สอดคล้องกันกับเอกสารที่สร้างขึ้นทั้งหมด รวมถึงสี แบบอักษร เค้าโครง และข้อความ
creating-financial-models
anthropic
ทักษะนี้มีชุดเครื่องมือสร้างแบบจำลองทางการเงินขั้นสูง พร้อมการวิเคราะห์ DCF การทดสอบความไว การจำลองแบบมอนติคาร์โล และการวางแผนสถานการณ์สำหรับการลงทุน…
board-minutes
anthropic
ร่างรายงานการประชุมคณะกรรมการหรือคณะอนุกรรมการในรูปแบบขององค์กรของคุณ ตรวจจับการประชุมคณะกรรมการและคณะอนุกรรมการที่กำลังจะมาถึงจากปฏิทินของคุณโดยอัตโนมัติ สอบถามวาระการประชุมและ…
crm-cleanup
anthropic
สแกน HubSpot เพื่อหาดีลที่ค้างอยู่ คอนแทคที่ซ้ำกัน และฟิลด์ที่ขาดหาย จากนั้นแก้ไขตามที่เจ้าของอนุมัติ รองรับอาร์กิวเมนต์ขอบเขตแบบเลือกได้สำหรับดีล คอนแทค…
redshift-api
anthropic
รัน SQL กับ Amazon Redshift — ส่งคำสั่ง ตรวจสอบสถานะ เรียกดูผลลัพธ์แบบแบ่งหน้า และเรียกดูฐานข้อมูล/สคีมา/ตาราง ใช้สิ่งนี้เมื่อผู้ใช้ต้องการ…
ticket-deflector
anthropic
อ่านอีเมลหรือตั๋วของลูกค้าที่ถูกส่งต่อ ดึงสถานะคำสั่งซื้อ/การคืนเงินจาก PayPal และประวัติบัญชีจาก HubSpot ร่างคำตอบที่ปรับโทนเสียงให้ตรงกับเจ้าของ...
reg-feed-watcher
anthropic
ตรวจสอบฟีดข้อบังคับตอนนี้และรายงานสิ่งใหม่ตั้งแต่การตรวจสอบครั้งล่าสุด โดยกรองตามเกณฑ์ความสำคัญที่คุณกำหนด ใช้เมื่อผู้ใช้พูดว่า "ตรวจสอบฟีด"…