dagster: Command for Claude Code

.claude/commands/validate_changed_docstrings.md

validate_changed_docstrings is a command for Claude Code from dagster-io/dagster. It costs 0 tokens per session (324 once invoked), scanned A, original, Apache-2.0.

A command that checks Python docstrings—the documentation written inside code—for formatting errors using Sphinx, a documentation tool.

In plain words
What is it for?
Use it after editing Python files to locate changed files, inspect documented classes and functions, and report invalid reStructuredText syntax or other parsing issues.
Why use it?
It finds problems in documentation for files you have changed before they reach the wider documentation build.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is dagster-io/dagster's own configuration. It tells Claude Code how to work on dagster 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 dagster configures →

About the project

Dagster is a platform for developing, running, and observing data assets, such as datasets and the processes that produce them. It is used to organize and automate data workflows.

dagster-io/dagster · 16,348 stars · on GitHub · dagster.io

Reuse

Borrowing it

Nothing to install: this file belongs to dagster-io/dagster. 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/dagster-io/dagster/master/.claude/commands/validate_changed_docstrings.md
Clone the repo
git clone --depth 1 https://github.com/dagster-io/dagster

Made for: Claude Code.

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 validate_changed_docstrings

README.md
[![agentmods](https://agentmods.dev/badge/commands/dagster-io/dagster/validate_changed_docstrings/github.svg)](https://agentmods.dev/commands/dagster-io/dagster/validate_changed_docstrings)
Your own site
<a href="https://agentmods.dev/commands/dagster-io/dagster/validate_changed_docstrings"><img src="https://agentmods.dev/badge/commands/dagster-io/dagster/validate_changed_docstrings/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 validate_changed_docstrings

Your own site · 80×15
<a href="https://agentmods.dev/commands/dagster-io/dagster/validate_changed_docstrings"><img src="https://agentmods.dev/badge/commands/dagster-io/dagster/validate_changed_docstrings.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 324 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.00324
Opus 5.5 $0.00000 $0.00130
Sonnet 5.5 $0.00000 $0.00065
Haiku 4.5 $0.00000 $0.00032

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

Security

Grade A, and why

validate_changed_docstrings 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 1mo 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.

.claude/commands/validate_changed_docstrings.md · 40 lines

What it actually says

Validate Changed Docstrings

Validates Python docstrings in all uncommitted changed files using Sphinx parsing.

This command finds files with uncommitted changes (staged or unstaged), extracts Python symbols with docstrings, and validates them using the existing docstring validation tool to catch RST syntax errors and other docstring issues early in development.

Usage

Run the validation script on changed files:

dagster-docs check docstrings --changed

What it does

  1. Uses git diff --name-only HEAD to find uncommitted Python files
  2. Parses each file's AST to extract classes, functions, and methods with docstrings
  3. Validates each symbol's docstring using the Sphinx parsing pipeline
  4. Reports errors and warnings with clear symbol paths
  5. Returns non-zero exit code if any errors are found

Example output

Found 2 uncommitted Python files:
  python_modules/dagster/dagster/_core/definitions/decorators/asset_decorator.py
  python_modules/dagster/dagster/_core/definitions/asset.py

Validating 8 symbols with docstrings...

--- dagster._core.definitions.decorators.asset_decorator.asset ---
  ERROR: RST syntax: <string>:111: (WARNING/2) Cannot analyze code. No Pygments lexer found for "pythonkjdfkd".

Summary: 1 errors, 0 warnings
✗ Some docstring validations failed

This helps catch docstring issues before they reach the documentation build process.

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. 1mo ago First seen · 40 lines · 0 tokens per session scan A a74b4479fb12

Subscribe to this mod's changes

validate_changed_docstrings is a command published in the GitHub repository dagster-io/dagster (16,348 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 324 tokens. 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.