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.
npx agentmods add instructions/steph-dove/klaussy-agents/fastapigit clone --depth 1 https://github.com/steph-dove/klaussy-agentsWrote 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/steph-dove/klaussy-agents/fastapi)<a href="https://agentmods.dev/instructions/steph-dove/klaussy-agents/fastapi"><img src="https://agentmods.dev/badge/instructions/steph-dove/klaussy-agents/fastapi.svg" alt="Measured on agentmods" 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.01171 | $0.01171 |
| Opus 5 | $0.00585 | $0.00585 |
| Sonnet 5 | $0.00234 | $0.00234 |
| Haiku 4.5 | $0.00117 | $0.00117 |
Grade A, and why
klaussy-agents fastapi.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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Conventions
- URL-based API versioning: Use URL path versioning (e.g., /v1/, /api/v2/).
Example context from
fastapi/applications.py(lines 214-220):```python from fastapi import FastAPI app = FastAPI(openapi_url="/api/v1/openapi.json") ``` """ ), - Data class style: Pydantic for API + dataclasses for internal: Use Pydantic for API schemas (40) and dataclasses for internal DTOs (10). Good separation.
Example context from
fastapi/sse.py(lines 47-57):if v is not None and "\0" in v: raise ValueError("SSE 'id' must not contain null characters") return _check_single_line(v, "id") class ServerSentEvent(BaseModel): """Represents a single Server-Sent Event. When `yield`ed from a *path operation function* that uses `response_class=EventSourceResponse`, each `ServerSentEvent` is encoded into the [SSE wire format](https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream) - Background jobs with FastAPI BackgroundTasks: Use FastAPI BackgroundTasks for background task processing.
Example context from
fastapi/background.py(lines 1-10):from collections.abc import Callable from typing import Annotated, Any from annotated_doc import Doc from starlette.background import BackgroundTasks as StarletteBackgroundTasks from typing_extensions import ParamSpec P = ParamSpec("P") - Data classes: Pydantic models: Use Pydantic models for structured data. 62/80 structured classes use this pattern.
Example context from
fastapi/sse.py(lines 47-57):if v is not None and "\0" in v: raise ValueError("SSE 'id' must not contain null characters") return _check_single_line(v, "id") class ServerSentEvent(BaseModel): """Represents a single Server-Sent Event. When `yield`ed from a *path operation function* that uses `response_class=EventSourceResponse`, each `ServerSentEvent` is encoded into the [SSE wire format](https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream) - lowercase constant naming: Name constants using lowercase style.
Example context from
fastapi/params.py(lines 18-22):class ParamTypes(Enum): query = "query" header = "header" path = "path" - Enum usage: Enum: Use Python enums for categorical values. Found 4 enum class(es).
Example context from
fastapi/params.py(lines 14-24):Undefined, ) from .datastructures import _Unset class ParamTypes(Enum): query = "query" header = "header" path = "path" cookie = "cookie" - Custom decorator pattern: @deprecated: Use custom decorator @deprecated (4 usages). Also uses: @asynccontextmanager.
Example context from
fastapi/responses.py(lines 34-44):orjson = cast(_OrjsonModule, importlib.import_module("orjson")) except ModuleNotFoundError: # pragma: nocover orjson = None # type: ignore[assignment] @deprecated( "UJSONResponse is deprecated, FastAPI now serializes data directly to JSON " "bytes via Pydantic when a return type or response model is set, which is " "faster and doesn't need a custom response class. Read more in the FastAPI " "docs: https://fastapi.tiangolo.com/advanced/custom-response/#orjson-or-response-model " "and https://fastapi.tiangolo.com/tutorial/response-model/", - Limited exception chaining: Preserve exception context: use
raise X from Yorraise X from None. Example context fromfastapi/encoders.py(lines 350-356):data = vars(obj) except Exception as e: errors.append(e) raise ValueError(errors) from e return jsonable_encoder( data, include=include, - Mixed validation approaches: Validate inputs and parameters: Use multiple validation approaches: Pydantic validation, Manual validation (ValueError/TypeError), Decorator-based validation..
Example context from
fastapi/encoders.py(lines 21-27):from annotated_doc import Doc from fastapi.exceptions import PydanticV1NotSupportedError from fastapi.types import IncEx from pydantic import BaseModel from pydantic.networks import AnyUrl, NameEmail from pydantic.types import SecretBytes, SecretStr from pydantic_core import PydanticUndefinedType
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.
- 6d ago First seen · 121 lines · 1,171 tokens per session scan A 53210074e315
klaussy-agents fastapi.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,171 tokens to every session, about $0.0059 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-08-30.
Other instructions, from other repositories
django-starter-template AGENTS.md
Instructions for wilfredinni/django-starter-template, covering agents.md, commands, lint & typecheck, architecture and testing.
robs_awesome_python_template AGENTS.md
Instructions for tedivm/robs_awesome_python_template, covering agent instructions and key technologies.
apm python.instructions.md
Python development guidelines.
technocore-chat AGENTS.md
AGENTS.md instructions for flop-labs/technocore-chat: CI runs exactly these — run them before pushing.
foundry-local python-cffi-pointer-types.instructions.md
Use when working on the Python SDK's native bindings (cffi), especially when defining new Item subclasses, working with flItemQueue, or extending Request/Session methods that pass native handles.
pydantic-ai-gepa AGENTS.md
AGENTS.md instructions for indexedlabs/pydantic-ai-gepa, covering repository guidelines, mighty workflow, project structure & module organization, build, test, and development commands and coding style & naming conventions.