跳到正文
cccskills
免费在 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.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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.

查看安装方法

适用场景

  • 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

包含的文件(1)

  • SKILL.md2.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

customize

免费

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-harness76042026年8月7日 更新

dnr-hunt

免费

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-harness76042026年8月7日 更新

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-harness76042026年8月7日 更新

patch

免费

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-harness76042026年8月7日 更新

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-harness76042026年8月7日 更新

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-harness76042026年8月7日 更新

查看 anthropics 的全部技能

报告此技能的问题