batch-api-audit

Audits Batch API pull requests against layer boundaries, streaming invariants, and error-handling contracts.

7|12|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/OpenRouterTeam/docs --skill batch-api-audit-openrouterteam
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: batch-api-audit
Source: https://github.com/OpenRouterTeam/docs/tree/main/.agents/skills/batch-api-audit
Command: npx skills add https://github.com/OpenRouterTeam/docs --skill batch-api-audit-openrouterteam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewing Batch API pull requests manually risks missing violations of architectural boundaries, streaming memory invariants, BYOK billing semantics, and stack scoping rules, leading to defects that slip into production. ## Core Features & Use Cases - Layer Boundary Checks: Verifies that packages/batch stays runtime-agnostic, edge workers contain only auth and forwarding, and consumers respect the package exports map. - Invariant Audits: Checks streaming and memory invariants, error-handling contracts (Result/ErrorT, Zod validation, no try/catch), BYOK billing semantics, and provider registration completeness. - Evidence-Based Reports: Produces a Markdown checklist report with PASS/FAIL/N-A verdicts and file:line evidence for every failure. - Use Case: Before requesting review on a stacked batch PR, run the audit to catch boundary violations, missing fixtures, or non-idempotent finalize logic and attach the conclusions to the PR description. ## Quick Start Audit my current Batch API pull request stack against the batch layer boundary and streaming rules and produce a checklist report.

Frequently Asked Questions about batch-api-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit a Batch API pull request before review?▼

Run the audit against the PR or stack, providing each layer's real base branch from gh pr view and the owned-file matrix from the feature manifest. It outputs a Markdown checklist report with PASS, FAIL, or N-A per item and file:line evidence for every failure.

What does a batch layer boundary audit check?▼

It verifies packages/batch stays runtime-agnostic with no Cloudflare or Spanner dependencies, the edge worker contains only auth and forwarding, and consumers import only subpaths listed in the package.json exports map. It also checks error handling, streaming invariants, and shared helper usage.

Does the batch audit modify or fix code automatically?▼

No, the audit is strictly read-only and never edits code. It produces a report, and fixes are applied separately following the stacked PR workflow, starting from the lowest owning PR and rebasing the stack.

Can the audit check stacked pull requests for scoping issues?▼

Yes, it diffs each layer against its actual base branch to confirm only owned files changed, verifies no layer imports symbols from higher layers, and checks the stack has linear history without rebase markers.

What BYOK billing rules does the batch audit verify?▼

It confirms is_byok flows from submit into the async_jobs row and finalize, affordability preflight skips BYOK endpoints, and emitted generations classify BYOK cost as byok_usage_inference with zero credits usage rather than credits usage.