api-harness

api-harness is a skill for Claude Code, Codex from sabbour/agentweaver. It costs 0 tokens per session (5,163 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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-harness

Your own site · 80×15
<a href="https://agentmods.dev/skills/sabbour/agentweaver/api-harness"><img src="https://agentmods.dev/badge/skills/sabbour/agentweaver/api-harness.svg" alt="Reviewed on agentmods" width="80" 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 5,163 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.05163
Opus 5.5 $0.00000 $0.02065
Sonnet 5.5 $0.00000 $0.01033
Haiku 4.5 $0.00000 $0.00516

Measured 19d ago against content hash a734c7a290d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 19d ago.

The scan reads SKILL.md. This mod also ships 24 executable files (issue-1603-live-retest.mjs, lib/auth-providers/local-test.mjs, lib/auth-providers/recorder-session.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 · 400 lines

How it starts

The opening of the file, as written. The whole thing — 400 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. At its first authenticated call, it obtains the complete Authorization value only through the cached UI-harness recorder-session provider, in memory, and never accepts bearer material in process arguments or borrows gh auth token or GITHUB_TOKEN for a remote target.

Browser-managed authentication for staging (Entra Conditional Access)

Agentweaver staging uses Entra Conditional Access. Before an authenticated API run, run the documented demo-recording session setup once for that target. The recorder-session provider reads its cached UI storage/session sidecar, verifies it belongs to the requested origin, and returns the complete Authorization value only in memory. Pass that value to the header unchanged; do not add another scheme. It never starts a second browser sign-in or exports the value 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>

The provider uses scripts/demo-recording/.auth/recording.storageState.json and its .sessionStorage.json sidecar by default; use --recorder-auth-root only for an explicitly chosen protected auth root. To reuse a supported UI login:

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

run-oracle-acceptance.mjs accepts the same --recorder-auth-root; the context budget CLI uses --auth-root scripts/ui-harness/.auth. In an explicit root, recording.storageState.json takes precedence if both layouts exist; otherwise staging.storageState.json and its matching seed are used. No search in another directory or fallback after an invalid selected cache occurs. --auth-provider recorder-session remains accepted for clarity but is the default. If the cached recorder session is absent, expired, or belongs to another origin, it fails with npm run demo:record -- open --base-url <origin> for the recorder layout, or node scripts/ui-harness/login-chrome-default.mjs --base-url <origin> for the selected UI layout. Microsoft Entra account selection, credentials, MFA, and consent remain human-only. For a decoded JWT with an exp claim, a provider reuses the in-memory Authorization value only while it remains unexpired. After expiry it revalidates the same selected cache path and origin; a refreshed session can be reused without creating a new provider, but an expired or wrong-origin replacement fails before an API call. Tokens without a decodable expiry retain the existing behavior. Do not fall back to generic Playwright, direct CDP/DevTools, ad-hoc profile launch/copy, or manual browser automation; surface the provider's recovery error and use the demo-recording login/cached-session flow. That flow requires the installed literal Google Chrome chrome.exe on Playwright's chrome channel, never bundled Chromium.

Read the full file on GitHub · 400 lines

Files

What ships with it

36 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 19d ago Changed · +12 lines a734c7a290d9
  2. 21d ago Changed · +25 lines 03b54e481cd2
  3. 23d ago Changed · +73 lines b5e5e72c9d7d
  4. 28d ago Changed · +2 lines fad9c9ced7b0
  5. 29d ago Changed · +22 lines eb3e904b9297
  6. 1mo ago Changed · +24 lines c902d2d586b1
  7. 1mo ago Changed · +34 lines fe9d065b8c11
  8. 1mo ago Changed · +24 lines fdce26752146
  9. 1mo ago Changed cbd7ecfd0448
  10. 1mo ago First seen · 184 lines · 0 tokens per session scan A a7ac619cc499

Subscribe to this mod's changes

api-harness is a skill published in the GitHub repository sabbour/agentweaver (7 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 5,163 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.