dagster: Command for Claude Code

.claude/commands/enforce_standards.md

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

A command that prepares a stacked branch and then runs the code-standards check. A stacked branch is a series of dependent changes managed together.

In plain words
What is it for?
Use it to squash and synchronize the current stack, detect conflicts, and start the code standards enforcer when preparation succeeds.
Why use it?
It prevents standards checks from running on a branch with unsolved merge conflicts or an out-of-date stack.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

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/enforce_standards.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 enforce_standards

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/dagster-io/dagster/enforce_standards"><img src="https://agentmods.dev/badge/commands/dagster-io/dagster/enforce_standards.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 538 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.00538
Opus 5.5 $0.00000 $0.00215
Sonnet 5.5 $0.00000 $0.00108
Haiku 4.5 $0.00000 $0.00054

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

Security

Grade A, and why

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

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/enforce_standards.md · 66 lines

How it starts

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

Enforce Standards Command

Step 0: Stack Preparation with Merge Conflict Detection

CRITICAL: Before running the code standards enforcer, we must prepare the stack properly and abort if there are merge conflicts.

Sequential commands (must be run in order):

  1. gt squash - Squash commits in the current branch for cleaner history
  2. gt restack - Ensure the stack is properly synced and up-to-date

Important: These commands must be run sequentially, not in parallel. If either command fails due to merge conflicts, abort the entire operation and inform the user that merge conflicts must be resolved manually before running standards enforcement.

Merge Conflict Detection:

  • If gt squash fails with merge conflicts, abort and tell user to resolve conflicts first
  • If gt restack fails with merge conflicts, abort and tell user to resolve conflicts first
  • Only proceed to standards enforcement if both commands succeed without conflicts

Step 1: Invoke Code Standards Enforcer Agent

After successful stack preparation, use the Task tool to launch the code-standards-enforcer agent with the following configuration:

Agent Type: code-standards-enforcer

Task Description: "Audit changed files for standards compliance"

Detailed Prompt:

Please perform a comprehensive audit of all changed files in the current PR against the coding standards defined in CLAUDE.md.

Focus on:
1. Files that have been modified in the current branch compared to the base branch
2. Compliance with coding conventions from .claude/coding_conventions.md
3. Adherence to development workflow requirements from .claude/dev_workflow.md
4. Proper use of type annotations and @record decorators
5. Code quality requirements including mandatory `just ruff` execution

After the audit, provide:
- A summary of any standards violations found
- Specific recommendations for fixes
- List of files that need attention
- Confirmation that mandatory code quality checks (just ruff) have been run

If no violations are found, confirm that all changed files comply with the project's coding standards.

Read the full file on GitHub · 66 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 · 66 lines · 0 tokens per session scan A 44b18df188f3

Subscribe to this mod's changes

enforce_standards 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 538 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.