httpstat is a dependency-free Python command-line tool that displays the timing stages of a curl HTTP request, including DNS lookup, connection, TLS, server processing, and data transfer. It helps developers diagnose slow endpoints and can also produce structured results or check timing thresholds. Its catalogue skill teaches coding agents to use httpstat for HTTP performance investigations.
Borrowing it
Nothing to install: this file belongs to reorx/httpstat. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/reorx/httpstat/master/AGENTS.mdgit clone --depth 1 https://github.com/reorx/httpstatWrote 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/instructions/reorx/httpstat/agents-md)<a href="https://agentmods.dev/instructions/reorx/httpstat/agents-md"><img src="https://agentmods.dev/badge/instructions/reorx/httpstat/agents-md/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/instructions/reorx/httpstat/agents-md"><img src="https://agentmods.dev/badge/instructions/reorx/httpstat/agents-md.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.01193 | $0.01193 |
| Opus 5.5 | $0.00477 | $0.00477 |
| Sonnet 5.5 | $0.00239 | $0.00239 |
| Haiku 4.5 | $0.00119 | $0.00119 |
Grade A, and why
httpstat AGENTS.md 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 2mo 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.
- `skills/httpstat/SKILL.md`:已完成初版诊断 skill,覆盖自动安装、瓶颈识别、SLO 阈值、curl 转换。 How it starts
The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
httpstat 项目规划
1) 项目现状
- 单文件 CLI (
httpstat.py, ~370 行),Python >=3.9,版本 2.0.0。 - 打包完全由
pyproject.toml驱动(setuptools),setup.py已删除。 - 构建/发布使用
uv build/uv publish。 - 测试为
httpstat_test.sh(端到端 shell 脚本,依赖外网站点)。
已完成的现代化工作
- 去除所有 Python 2 兼容代码,shebang 改为
#!/usr/bin/env python。 - 全量 f-string,新式 class 语法,类型标注(
Env类 overload、NoReturn)。 - 严格布尔解析
parse_bool(),替代'true' in value.lower()。 - 临时文件
try/finally统一清理,不再泄漏。 quit()重命名为_exit()并标注NoReturn。
2) 剩余技术债
A. 测试可靠性不足(高优先级)
- 仅有 shell E2E,强依赖公网与第三方站点行为,CI/本地结果不稳定。
- 缺少单元测试,核心逻辑(指标换算、区间计算、
parse_bool)没有稳定回归保障。
B. Agent 适配能力不足(中高优先级)
- 当前 JSON 输出缺少 schema version、状态码语义、错误结构、上下文元数据。
- 缺少"可机器判断"的 SLO/阈值能力(例如总耗时超阈值即非 0 退出)。
- 输出模式较少,无法直接覆盖 Agent 常见流水线(JSONL、紧凑 JSON、纯错误对象)。
3) 下一阶段推进方案
Phase 1:结构化输出 + SLO(本轮实施)
输出格式
- 新增
--format(-f):pretty | json | jsonl(默认pretty,兼容现有行为)。 HTTPSTAT_METRICS_ONLY环境变量保留兼容,等价于--format json。- JSON v1 schema(最小集,后续通过 schema_version 扩展):
{ "schema_version": 1, "url": "...", "ok": true, "exit_code": 0, "response": { "status_line": "HTTP/2 200", "status_code": 200, "remote_ip": "...", "remote_port": "...", "headers": {"Content-Type": "application/json", "Server": "nginx", "...": "..."} }, "timings_ms": { "dns": 5, "connect": 10, "tls": 15, "server": 50, "transfer": 20, "total": 100, "namelookup": 5, "initial_connect": 15, "pretransfer": 30, "starttransfer": 80 }, "speed": { "download_kbs": 1234.5, "upload_kbs": 0.0 }, "slo": { "pass": true, "violations": [] } }
SLO 阈值
- 单一参数
--slo key=value,...,例如--slo total=500,connect=100,ttfb=200。 - 支持的 key:
total、connect、ttfb(starttransfer)、dns、tls。 - 超阈值时退出码为
4,JSON 中slo.pass=false,slo.violations列出超标项。 - pretty 模式下在输出末尾用红色标注超标指标。
颜色控制
- 遵循
NO_COLOR环境变量(https://no-color.org)。设置后禁用所有 ANSI 颜色。 - 不新增
--no-color命令行参数,减少 flag 膨胀。
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.
- 2mo ago First seen · 99 lines · 1,193 tokens per session scan A 92d29ac94d34
httpstat AGENTS.md is an instructions file published in the GitHub repository reorx/httpstat (6,220 stars, last pushed 6mo ago), licensed MIT. It adds 1,193 tokens to every session, about $0.0048 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.