api-relay-audit

Audit third-party AI API relays for prompt injection and stream integrity.

786|73|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/toby-bridges/api-relay-audit --skill api-relay-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-relay-audit
Source: https://github.com/toby-bridges/api-relay-audit/tree/main
Command: npx skills add https://github.com/toby-bridges/api-relay-audit --skill api-relay-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpx, and includes scripts (resource) components.

What problem does it solve?

It helps you determine whether a third-party AI API relay/proxy is altering your request or response in unsafe ways, including hidden prompt injection, prompt leakage, instruction override, context truncation, tool-call/package substitution, error-response data leakage, SSE stream integrity anomalies, and Web3-specific prompt injection risks.

Core Features & Use Cases

  • Run a local end-to-end relay security audit: produces a structured Markdown report that summarizes findings with an overall LOW/MEDIUM/HIGH risk verdict.
  • Detect security-critical tampering patterns: token-delta hidden prompt injection, prompt extraction attempts, identity hijacking for Chinese-market substitutes, tool-call/package substitution (AC-1.a), and error-response header/body leakage (AC-2 adjacent).
  • Validate end-to-end behavior: context truncation via canary markers with coarse scan + binary search, SSE stream integrity invariants for Anthropic streaming, plus infrastructure fingerprinting and latency variance (informational checks).
  • Use cases: audit a relay you plan to trust, compare multiple proxy providers, verify whether a relay blocks prompt exfiltration, and assess Web3 wallet-safety risks when agents sign or transfer.

Quick Start

Download and run the standalone audit by executing one command that fetches audit.py and immediately starts the audit using your relay base URL and API key.

Frequently Asked Questions about api-relay-audit

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

FAQPage Schema
How do I audit an AI API relay for prompt injection and data leakage?

To audit an AI API relay for prompt injection and data leakage, run a local end-to-end scan that sends deterministic probes to detect hidden prompt tampering, identity hijacking, and error-response credential leaks, yielding a structured Markdown risk report.

What is API relay prompt tampering and how does it affect LLM security?

API relay prompt tampering occurs when a third-party proxy alters requests or responses by injecting hidden instructions, truncating context, or leaking prompts. It compromises LLM security by enabling instruction overrides and unauthorized data exfiltration.

Can I check SSE stream integrity for Anthropic-compatible endpoints through a proxy?

Yes, you can check SSE stream integrity for Anthropic-compatible endpoints by validating stream invariants against deterministic probe sets. This detects context truncation and stream manipulation anomalies introduced by the relay.

Does this API relay audit detect Web3 wallet-safety risks and tool-call substitution?

Yes, this API relay audit detects Web3 wallet-safety risks and tool-call substitution by applying profile-gated checks for package substitution and malicious prompt injection designed to compromise agent signing or transfer operations.

Do I need Python dependencies to run a local security audit on an OpenAI API proxy?

You do not need complex Python dependencies to run a local security audit on an OpenAI API proxy; you can execute a single standalone script using curl-only transport, though a modular Python implementation with httpx is also supported.

What is the best way to compare multiple AI proxy providers for supply chain safety?

The best way to compare multiple AI proxy providers for supply chain safety is to run deterministic audit probes against each endpoint, evaluating risk scores for prompt leakage, tool-call substitution, and infrastructure fingerprinting to generate comparative reports.