klaussy-agents httpx.instructions.md

klaussy-agents httpx.instructions.md is an instructions file for GitHub Copilot from steph-dove/klaussy-agents. It costs 1,106 tokens per session, scanned A, original, MIT.

A repository instruction file containing the same kind of Python coding conventions shown in the httpx library. It gives examples for data classes, constants, enums, and related implementation choices.

In plain words
What is it for?
Use it as a style reference while editing the referenced httpx Python modules.
Why use it?
It helps an agent preserve local style when modifying the project.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot chat mode or prompt.

Install

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.

agentmods
npx agentmods add instructions/steph-dove/klaussy-agents/httpx
Clone the repo
git clone --depth 1 https://github.com/steph-dove/klaussy-agents

Made for: GitHub Copilot.

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 klaussy-agents httpx.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/steph-dove/klaussy-agents/httpx.svg)](https://agentmods.dev/instructions/steph-dove/klaussy-agents/httpx)
Your own site
<a href="https://agentmods.dev/instructions/steph-dove/klaussy-agents/httpx"><img src="https://agentmods.dev/badge/instructions/steph-dove/klaussy-agents/httpx.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,106 This file is loaded in full into every session.
When invoked 1,106 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.01106 $0.01106
Opus 5 $0.00553 $0.00553
Sonnet 5 $0.00221 $0.00221
Haiku 4.5 $0.00111 $0.00111

Measured 2d ago against content hash 87f771605d4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

klaussy-agents httpx.instructions.md scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/httpx/.github/instructions/httpx.instructions.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Conventions

  • Data classes: NamedTuple: Use NamedTuple for structured data. 2/2 structured classes use this pattern. Example context from httpx/_urlparse.py (lines 153-163):
    # the stdlib 'ipaddress' module for IP address validation.
    IPv4_STYLE_HOSTNAME = re.compile(r"^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$")
    IPv6_STYLE_HOSTNAME = re.compile(r"^\[.*\]$")
    
    
    class ParseResult(typing.NamedTuple):
        scheme: str
        userinfo: str
        host: str
        port: int | None
        path: str
    
  • lowercase constant naming: Name constants using lowercase style. Example context from httpx/_multipart.py (lines 269-273):
            """
            boundary_length = len(self.boundary)
            length = 0
    
            for field in self.fields:
    
  • Enum usage: Enum: Use Python enums for categorical values. Found 2 enum class(es). Types: Enum (1), IntEnum (1). Example context from httpx/_client.py (lines 120-130):
    ACCEPT_ENCODING = ", ".join(
        [key for key in SUPPORTED_DECODERS.keys() if key != "identity"]
    )
    
    
    class ClientState(enum.Enum):
        # UNOPENED:
        #   The client has been instantiated, but has not been used to send a request,
        #   or been opened by entering the context of a `with` block.
        UNOPENED = 1
        # OPENED:
    
  • Custom decorator pattern: @click.option: Use custom decorator @click.option (17 usages). Example context from httpx/_main.py (lines 310-320):
        ctx.exit()
    
    
    @click.command(add_help_option=False)
    @click.argument("url", type=str)
    @click.option(
        "--method",
        "-m",
        "method",
        type=str,
        help=(
    
  • Limited exception chaining: Preserve exception context: use raise X from Y or raise X from None. Example context from httpx/_decoders.py (lines 73-79):
                if was_first_attempt:
                    self.decompressor = zlib.decompressobj(-zlib.MAX_WBITS)
                    return self.decode(data)
                raise DecodingError(str(exc)) from exc
    
        def flush(self) -> bytes:
            try:
    
  • Context manager usage: Manage resource lifecycles using context managers (e.g., Use context managers for resource management. 24 with statements. Types: http_client (5).). Example context from httpx/_main.py (lines 476-482):
            method = "POST" if content or data or files or json else "GET"
    
        try:
            with Client(proxy=proxy, timeout=timeout, http2=http2, verify=verify) as client:
                with client.stream(
                    method,
                    url,
    
  • Configuration via os.environ direct access: Use os.environ direct access. Example context from httpx/_config.py (lines 31-37):
        import certifi
    
        if verify is True:
            if trust_env and os.environ.get("SSL_CERT_FILE"):  # pragma: nocover
                ctx = ssl.create_default_context(cafile=os.environ["SSL_CERT_FILE"])
            elif trust_env and os.environ.get("SSL_CERT_DIR"):  # pragma: nocover
                ctx = ssl.create_default_context(capath=os.environ["SSL_CERT_DIR"])
    
  • High type annotation coverage: Standardize on typing: Type annotations are commonly used in this codebase. 396/396 functions have at least one type annotation.. Example context from httpx/_decoders.py (lines 32-42):
    except ImportError:  # pragma: no cover
        zstandard = None  # type: ignore
    
    
    class ContentDecoder:
        def decode(self, data: bytes) -> bytes:
            raise NotImplementedError()  # pragma: no cover
    
        def flush(self) -> bytes:
            raise NotImplementedError()  # pragma: no cover
    
  • Manual validation (ValueError/TypeError): Validate inputs and parameters: Use Manual validation (ValueError/TypeError) for input validation. 17/17 validation patterns use this approach.. Example context from httpx/_urls.py (lines 95-101):
                for key, value in kwargs.items():
                    if key not in allowed:
                        message = f"{key!r} is an invalid keyword argument for URL()"
                        raise TypeError(message)
                    if value is not None and not isinstance(value, allowed[key]):
                        expected = allowed[key].__name__
                        seen = type(value).__name__
    

Read the full file on GitHub · 119 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. 2d ago First seen · 119 lines · 1,106 tokens per session scan A 87f771605d4c

Subscribe to this mod's changes

klaussy-agents httpx.instructions.md is an instructions file published in the GitHub repository steph-dove/klaussy-agents (16 stars, last pushed 9d ago), licensed MIT. It adds 1,106 tokens to every session, about $0.0055 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.