Skip to content
cccskills
FreePublished on GitHub

verify

Check harness changes on a host without Docker by running the pinned Claude Code CLI against a local mock API server. Capture request headers and verify behavior using the authentication environment generated by the harness.

OriginalShow the original description

Verify harness changes end-to-end without docker — drive the real pinned CLI against a header-capturing stub server with the exact env resolve_auth_env() produces.

See how to install

Good for

  • Check authentication changes without Docker
  • Inspect headers sent by the real CLI
  • Reproduce the environment passed to container agents
  • Check settings.json behavior in a fresh directory

Files included (1)

  • SKILL.md2.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

customize

FreeSummary

Adapt a C/C++ vulnerability pipeline to another language, target, or detection method. The workflow gathers requirements, proposes file changes for approval, updates the implementation, and validates it against a test target containing known bugs.

  • Adapt the pipeline for web application vulnerabilities
  • Plan a port for smart contract auditing
  • Change detection signals and report criteria
anthropics/defending-code-reference-harness7.6KUpdated Aug 7, 2026

dnr-hunt

FreeSummary

Hunt for signs of compromise in web and application logs without an initial alert. Establish normal activity, record investigative hypotheses, check source code, and reproduce issues locally before producing incident records and a report.

  • Hunting for compromise without an initial alert
  • Tracing related activity across application logs
  • Distinguishing attack attempts from successful exploitation
anthropics/defending-code-reference-harness7.6KUpdated Aug 7, 2026

dnr-respond

FreeSummary

Investigate an alert or suspicious identifier using logs and source code. Assess attack success, measure affected data and users, test the suspected flaw locally, and produce a response plan for human review and execution.

  • Investigating a security alert
  • Measuring affected records and customers
  • Checking a suspected flaw with a local proof of concept
anthropics/defending-code-reference-harness7.6KUpdated Aug 7, 2026

patch

FreeSummary

Turn security findings into candidate code fixes with review results and summaries. Depending on the input, use independent source review or a pipeline with execution checks, then provide diffs for a person to review and apply.

  • Generating candidate fixes from triaged findings
  • Preparing diffs for the highest-priority vulnerabilities
  • Independently reviewing proposed security fixes
anthropics/defending-code-reference-harness7.6KUpdated Aug 7, 2026

quickstart

FreeSummary

Get started with vulnerability review through a guided practice target, from threat modeling to scanning and triage. Ask questions about the pipeline and receive answers grounded in its documentation and source, with references and a next command.

  • Learn the vulnerability review workflow
  • Try a first scan on the bundled practice target
  • Find commands with supporting documentation
anthropics/defending-code-reference-harness7.6KUpdated Aug 7, 2026

threat-model

FreeSummary

Build a threat model that identifies valuable assets, attack entry points, potential threats, and mitigation priorities. Use source code and past vulnerabilities, an interview with the application owner, or a combination of both.

  • Reviewing security risks during system design
  • Assessing an inherited codebase without its owner
  • Refining a code-based draft with the application owner
anthropics/defending-code-reference-harness7.6KUpdated Aug 7, 2026

See all skills by anthropics

Report a problem with this skill