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/dstackai/dstack/agents-mdgit clone --depth 1 https://github.com/dstackai/dstackWhat 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 | $0.01242 | $0.01242 |
| Opus 5 | $0.00621 | $0.00621 |
| Sonnet 5 | $0.00248 | $0.00248 |
| Haiku 4.5 | $0.00124 | $0.00124 |
Grade A, and why
dstack AGENTS.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 yesterday.
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 — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Repository Guidelines
Before touching a subsystem, read the relevant notes in contributing/: ARCHITECTURE.md,
PIPELINES.md, LOCKING.md, MIGRATIONS.md, RUNS-AND-JOBS.md, AUTOSCALING.md,
BACKENDS.md, GPUHUNT.md, PROXY.md, RUNNER-AND-SHIM.md, FRONTEND.md, DOCS.md,
DEVELOPMENT.md, RELEASE.md.
Project Structure & Module Organization
- Core Python package lives in
src/dstack; internal modules (including server) sit under_internal, API surfaces underapi, and plugin integrations underplugins. - Tests reside in
src/testsand mirror package paths; add new suites alongside the code they cover. - Frontend lives in
frontend(React/webpack) and is built intosrc/dstack/_internal/server/statics. - Docs sources are in
mkdocs/docs/with extra contributor notes incontributing/*.md.
Build, Test, and Development Commands
- Install deps (editable package with extras):
uv sync --all-extras(uses.venvin repo). - Run CLI/server from source:
uv run dstack ...(e.g.,uv run dstack server --port 8000). - Lint/format:
uv run ruff check .anduv run ruff format .. - Type check:
uv run pyright -p .. - Test suite:
uv run pytest. - Frontend: from
frontend/runnpm install,npm run build, then copyfrontend/buildintosrc/dstack/_internal/server/statics/; for dev,npm run startwith API on port 8000.
Coding Style & Naming Conventions
- Python targets 3.10+ with 4-space indentation and max line length of 99 (see
pyproject.toml;E501is ignored but keep lines readable). - Imports are sorted via Ruff’s isort settings (
dstacktreated as first-party). - Keep primary/public functions before local helper functions in a module section.
- Roughly keep function definitions in the order they are referenced within a file so call flow stays easy to follow.
- Prefer early returns over nested
if/elseblocks when they make the control flow simpler. - Keep private classes, exceptions, and similar implementation-specific types close to the private functions that use them unless they are shared more broadly in the module.
- Prefer pydantic-style models in
core/models. - Document attributes when the note adds behavior, compatibility, or semantic context that is not obvious from the name and type. Use attribute docstrings without leading newline.
- Tests use
test_*.pymodules andtest_*functions; fixtures live near usage. - Never make network calls inside a DB session or transaction. Fetch what you need before opening the session, or commit and close it before the call.
- Don't use function-level (inner) imports to break circular imports. Inject the dependency or move the shared code to a lower-level module instead.
- Never edit a migration that has already been applied or released; add a new migration instead.
- Derive paths under
SERVER_DIR_PATHon access (aget_*function), not as module-level constants, so that patchingsettings.SERVER_DIR_PATHredirects all of them. Tests rely on this to keep server state out of the real~/.dstack. - Preserve client/server backward compatibility when updating Pydantic models. New fields must be excluded from client requests when unset, for compatibility with older servers (see
core/compatibility/*.py). If the allowed domain/type of an existing field is extended, server responses may need to be patched for older clients (seeserver/compatibility/*.py). No need to exclude new fields from server responses, since clients rely onvalidate_extra_ignore.
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.
- yesterday First seen · 53 lines · 1,242 tokens per session scan A b7036458ef45
dstack AGENTS.md is an instructions file published in the GitHub repository dstackai/dstack (2,229 stars, last pushed 4d ago), licensed MPL-2.0. It adds 1,242 tokens to every session, about $0.0062 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
marimo AGENTS.md
Instructions for marimo-team/marimo, covering marimo development guidelines, your primary responsibility is to the project and its users, quick setup, development commands and python.
gradio AGENTS.md
Instructions for gradio-app/gradio, covering agents.md, repository structure, pull request rules, code style and agentic contribution policy.
skypilot AGENTS.md
Instructions for skypilot-org/skypilot, covering claude.md - skypilot development guide, project overview, repository structure, development setup and environment setup.
FLAML copilot-instructions.md
Instructions for microsoft/FLAML, covering github copilot instructions for flaml, project overview, build and test commands, installation and basic installation.
marimo copilot-instructions.md
Instructions for marimo-team/marimo: For example, if there is a frontend change to make a border thicker, how does this look in run mode, app-view and edit-view? For a backend change, has the user tested different scenarios?
pygraphistry AGENTS.md
Instructions for graphistry/pygraphistry, covering agents.md, skill locations, platform path conventions, canonical -> tool-expected path and claude path to shared skills.