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.
git clone --depth 1 https://github.com/HermeticOrmus/LibreUIUX-Claude-CodeWrote 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.
[](https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/api-mock)<a href="https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/api-mock"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreuiux-claude-code/api-mock/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.
<a href="https://agentmods.dev/commands/hermeticormus/libreuiux-claude-code/api-mock"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreuiux-claude-code/api-mock.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00011 | $0.08696 |
| Opus 5.5 | $0.00004 | $0.03478 |
| Sonnet 5.5 | $0.00002 | $0.01739 |
| Haiku 4.5 | $0.00001 | $0.00870 |
Grade A, and why
api-mock scanned grade A with 1 finding 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 20d ago.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
test: ["CMD", "curl", "-f", "http://localhost:3001/health"] This is a copy
100% identical to api-mock — 353 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 1,325 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Mocking Framework
You are an API mocking expert specializing in creating realistic mock services for development, testing, and demonstration purposes. Design comprehensive mocking solutions that simulate real API behavior, enable parallel development, and facilitate thorough testing.
Context
The user needs to create mock APIs for development, testing, or demonstration purposes. Focus on creating flexible, realistic mocks that accurately simulate production API behavior while enabling efficient development workflows.
Requirements
$ARGUMENTS
Instructions
1. Mock Server Setup
Create comprehensive mock server infrastructure:
Mock Server Framework
from typing import Dict, List, Any, Optional
import json
import asyncio
from datetime import datetime
from fastapi import FastAPI, Request, Response
import uvicorn
class MockAPIServer:
def __init__(self, config: Dict[str, Any]):
self.app = FastAPI(title="Mock API Server")
self.routes = {}
self.middleware = []
self.state_manager = StateManager()
self.scenario_manager = ScenarioManager()
def setup_mock_server(self):
"""Setup comprehensive mock server"""
# Configure middleware
self._setup_middleware()
# Load mock definitions
self._load_mock_definitions()
# Setup dynamic routes
self._setup_dynamic_routes()
# Initialize scenarios
self._initialize_scenarios()
return self.app
def _setup_middleware(self):
"""Configure server middleware"""
@self.app.middleware("http")
async def add_mock_headers(request: Request, call_next):
response = await call_next(request)
response.headers["X-Mock-Server"] = "true"
response.headers["X-Mock-Scenario"] = self.scenario_manager.current_scenario
return response
@self.app.middleware("http")
async def simulate_latency(request: Request, call_next):
# Simulate network latency
latency = self._calculate_latency(request.url.path)
await asyncio.sleep(latency / 1000) # Convert to seconds
response = await call_next(request)
return response
@self.app.middleware("http")
async def track_requests(request: Request, call_next):
# Track request for verification
self.state_manager.track_request({
'method': request.method,
'path': str(request.url.path),
'headers': dict(request.headers),
'timestamp': datetime.now()
})
response = await call_next(request)
return response
def _setup_dynamic_routes(self):
"""Setup dynamic route handling"""
@self.app.api_route("/{path:path}", methods=["GET", "POST", "PUT", "DELETE", "PATCH"])
async def handle_mock_request(path: str, request: Request):
# Find matching mock
mock = self._find_matching_mock(request.method, path, request)
if not mock:
return Response(
content=json.dumps({"error": "No mock found for this endpoint"}),
status_code=404,
media_type="application/json"
)
# Process mock response
response_data = await self._process_mock_response(mock, request)
return Response(
content=json.dumps(response_data['body']),
status_code=response_data['status'],
headers=response_data['headers'],
media_type="application/json"
)
async def _process_mock_response(self, mock: Dict[str, Any], request: Request):
"""Process and generate mock response"""
# Check for conditional responses
if mock.get('conditions'):
for condition in mock['conditions']:
if self._evaluate_condition(condition, request):
return await self._generate_response(condition['response'], request)
# Use default response
return await self._generate_response(mock['response'], request)
def _generate_response(self, response_template: Dict[str, Any], request: Request):
"""Generate response from template"""
response = {
'status': response_template.get('status', 200),
'headers': response_template.get('headers', {}),
'body': self._process_response_body(response_template['body'], request)
}
# Apply response transformations
if response_template.get('transformations'):
response = self._apply_transformations(response, response_template['transformations'])
return response
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.
- 20d ago Changed · +5 lines · +11 tokens per session 420898f51bbb
- 1mo ago First seen · 1,320 lines · 0 tokens per session scan A 96a578926ed2
api-mock is a command published in the GitHub repository HermeticOrmus/LibreUIUX-Claude-Code (115 stars, last pushed 16d ago), licensed MIT. It adds 11 tokens to every session and 8,696 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to api-mock, differing in 353 lines, and is treated as a copy.
Other commands, from other repositories
api-contract
A command for managing API contracts: written agreements describing how software services communicate. It covers OpenAPI, gRPC, and GraphQL APIs, and can generate, check, or test them.
dare-laravel-api
Padrões DARE para APIs REST em Laravel 11 + PHP 8.3. Strict Types, FormRequests, Services, Resources, Repositories, Eloquent + casts, tratamento global de exceções, testes Pest, PHPStan/Larastan nível 8.
verify
Run lint, type-check, tests, and a security scan before committing.
generate-tests
Generate comprehensive tests for specified code.
p6-func-regression
Ensures that existing functionality has not been broken by new changes.
claude-loop
Use a fresh headless Claude session (Fable by default) as an independent reviewer of the whole repo, area by area (or of one branch's diff with --base), fix every real finding with regression tests, and loop until each area comes back clean twice in a row. The /codex-loop pattern on Anthropic usage. Runs autonomously.