api-harness

api-harness is a skill for Claude Code, Codex from sabbour/agentweaver. It costs 0 tokens per session (1,776 once invoked), scanned A, original, MIT.

A command-line harness for testing a software service through its REST API, a web interface that exchanges data through HTTP requests. It records requests and responses and produces a standard verdict.

In plain words
What is it for?
Running backend end-to-end checks, validating API behavior, and investigating reported API issues.
Why use it?
It helps detect broken API behavior and contract regressions with complete request and response evidence.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Running backend end-to-end checks, validating API behavior, and investigating reported API issues.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sabbour/agentweaver/api-harness
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sabbour/agentweaver --skill api-harness
Clone the repo
git clone --depth 1 https://github.com/sabbour/agentweaver

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-harness

README.md
[![agentmods](https://agentmods.dev/badge/skills/sabbour/agentweaver/api-harness.svg)](https://agentmods.dev/skills/sabbour/agentweaver/api-harness)
Your own site
<a href="https://agentmods.dev/skills/sabbour/agentweaver/api-harness"><img src="https://agentmods.dev/badge/skills/sabbour/agentweaver/api-harness.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,776 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01776
Opus 5 $0.00000 $0.00888
Sonnet 5 $0.00000 $0.00355
Haiku 4.5 $0.00000 $0.00178

Measured 2d ago against content hash c9deab468f28, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

api-harness scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 12 executable files (lib/auth-providers/recorder-session.mjs, lib/client.mjs, lib/generation-checks.mjs, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

scripts/api-harness/SKILL.md · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API harness CLI contract

Use the API harness to drive Agentweaver through its REST API, capture the complete request/response evidence, and emit a normalized agentweaver.persona-judge-verdict/v1 JSON verdict. It is for backend/API end-to-end validation; use the UI or MCP harness for those surfaces.

Run all commands below from the repository root. The harness requires Node 18 or newer. It requires an access token from the transient AGENTWEAVER_TOKEN environment or the explicit recorder-session provider. It never accepts bearer material in process arguments and never borrows gh auth token or GITHUB_TOKEN for a remote target.

Token acquisition for staging (Entra Conditional Access)

Agentweaver staging uses Entra Conditional Access. The token cannot be retrieved via device-code flow or plain browser. With an already authenticated demo-recording session, use the recorder-session provider. It reads the protected session token only in memory for each request; never export it to an environment variable, CLI argument, transcript, finding, verdict, or log:

node scripts/api-harness/run-persona.mjs `
  --scenario generated-artifacts-seam `
  --target https://<host>.staging.<domain> `
  --auth-provider recorder-session

The provider uses scripts/demo-recording/.auth/ by default; use --recorder-auth-root only for an existing protected recording-auth root. Verify the recording session first with npm run demo:record -- status. If its bearer is expired, the human-only recording sign-in flow must refresh it.

Driving a persona scenario (the only way — dynamic, no fixed scripts, no HTTP-calling wrapper)

There is no curated list of named scenario subcommands, no per-persona fixed step sequence, and no scripted HTTP-calling layer standing between the driving actor and the target. Harness dispatches a fresh PersonaActor sub-agent (.github/agents/persona-actor.agent.md — a real CLI agent with shell/execute access) to fully impersonate the persona in an isolated context — handed ONLY that persona's brief — scripts/persona-briefs/personas/<id>.md + scripts/persona-briefs/surfaces/<id>.api.md — and it decides every next action live by calling whatever operation it resolves from the real API's OpenAPI/ Swagger document, one turn at a time, reacting only to the real response it gets back. This is what lets the actor push back, poll events, and adapt — a fixed script (or a fixed subcommand wrapper) structurally cannot.

Read the full file on GitHub · 154 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed · +4 lines c9deab468f28
  2. 4d ago First seen · 150 lines · 0 tokens per session scan A ef3678da717d

Subscribe to this mod's changes

api-harness is a skill published in the GitHub repository sabbour/agentweaver (5 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,776 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.