httpstat: Instructions file for Codex

AGENTS.md

httpstat AGENTS.md is an instructions file for Codex, OpenCode from reorx/httpstat. It costs 1,193 tokens per session, scanned A, original, MIT.

A project plan for httpstat, a Python command-line tool that measures details of an HTTP request. It describes completed maintenance work, testing gaps, and planned structured output.

In plain words
What is it for?
Planning or implementing JSON and JSONL output, service-level thresholds, stable tests, schema improvements, and agent-friendly error handling.
Why use it?
It shows where the tool is reliable today and identifies problems such as tests that depend on public websites and missing machine-readable results.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is reorx/httpstat's own configuration. It tells Codex and OpenCode how to work on httpstat itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything httpstat configures →

About the project

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.

reorx/httpstat · 6,220 stars · on GitHub

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/reorx/httpstat/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/reorx/httpstat

Made for: Codex, OpenCode.

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 httpstat AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/reorx/httpstat/agents-md/github.svg)](https://agentmods.dev/instructions/reorx/httpstat/agents-md)
Your own site
<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.

agentmods 80×15 button for httpstat AGENTS.md

Your own site · 80×15
<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>
Per session 1,193 This file is loaded in full into every session.
When invoked 1,193 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01193 $0.01193
Opus 5.5 $0.00477 $0.00477
Sonnet 5.5 $0.00239 $0.00239
Haiku 4.5 $0.00119 $0.00119

Measured 2mo ago against content hash 92d29ac94d34, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 转换。
AGENTS.md · 99 lines

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 模式下在输出末尾用红色标注超标指标。
颜色控制

Read the full file on GitHub · 99 lines

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. 2mo ago First seen · 99 lines · 1,193 tokens per session scan A 92d29ac94d34

Subscribe to this mod's changes

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.

Related

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).

microsoft/vscode · 9,715 tokens

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.

vercel/next.js · 7,461 tokens

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).

microsoft/vscode · 5,262 tokens

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.

langchain-ai/langchain · 4,680 tokens

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).

microsoft/vscode · 2,731 tokens

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.

deepseek-ai/deepseek-harness · 4,261 tokens