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.
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.
curl -O https://raw.githubusercontent.com/dagster-io/dagster/master/.claude/commands/erk/diag-lock-error.mdgit clone --depth 1 https://github.com/dagster-io/dagsterWrote 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/commands/dagster-io/dagster/diag-lock-error)<a href="https://agentmods.dev/commands/dagster-io/dagster/diag-lock-error"><img src="https://agentmods.dev/badge/commands/dagster-io/dagster/diag-lock-error/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.
<a href="https://agentmods.dev/commands/dagster-io/dagster/diag-lock-error"><img src="https://agentmods.dev/badge/commands/dagster-io/dagster/diag-lock-error.svg" alt="Reviewed on agentmods" width="80" 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.00011 | $0.01665 |
| Opus 5 | $0.00005 | $0.00833 |
| Sonnet 5 | $0.00002 | $0.00333 |
| Haiku 4.5 | $0.00001 | $0.00167 |
Grade D, and why
diag-lock-error scanned grade D with 2 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 9d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
SESSION_FILE=$(find ~/.claude/projects -name "${CLAUDE_SESSION_ID}.jsonl" 2>/dev/null | head -1) Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf "$DIAG_DIR" How it starts
The opening of the file, as written. The whole thing — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Diagnostic Report: Git Lock Error
When a git operation fails with fatal: Unable to create '.../.git/index.lock': File exists, this command collects diagnostic information and uploads it as a GitHub gist for analysis.
Usage
Run this command when you encounter a git index.lock error:
/erk:diag-lock-error
Implementation
Step 1: Identify the Lock Error in Context
Search the current conversation context for the git index.lock error. Look for:
- Tool results containing
fatal: Unable to createandindex.lock - The specific repository path where the error occurred (extract the full lock file path)
- The command that triggered the error
Extract the lock file path from the error message. Examples:
- Regular repo:
.git/index.lock - Worktree:
/path/to/.git/worktrees/<name>/index.lock
Save this path for Step 2c.
If no lock error is found in the recent context, ask the user: "No git index.lock error found. Run diagnostic anyway to capture system state?" If yes, proceed with data collection (error context will note "proactive collection - no current error").
Step 2: Collect Diagnostic Data
Create a temporary directory and collect all diagnostic files:
DIAG_DIR=$(mktemp -d)
echo "Collecting diagnostics in $DIAG_DIR"
2a. Error Context
Write the error details from the conversation to a file. Include:
- The exact command that failed (e.g.,
erk exec quick-submit,git add -A) - The full error message including the lock file path
- Timestamp if visible
- Whether the lock was removed and how (manual rm, or still present)
cat > "$DIAG_DIR/01-error-context.txt" << 'EOF'
# Error Context
Command: <command that triggered the error>
Time: <timestamp if known>
Repository: <working directory path>
Lock file path: <full path from error message>
Error output:
<full error message>
Resolution: <how it was resolved, or "still investigating">
EOF
2b. Git Status
git status > "$DIAG_DIR/02-git-status.txt" 2>&1
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.
- 9d ago First seen · 218 lines · 11 tokens per session scan D 88b2b9620179
diag-lock-error is a command published in the GitHub repository dagster-io/dagster (16,122 stars, last pushed 3d ago), licensed Apache-2.0. It adds 11 tokens to every session and 1,665 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
context
A project-context command that manages a .context directory containing decision notes, session logs, and history. It helps keep a record of why changes were made across Git branches and commits.
doctor
Diagnosticar y reparar problemas del framework Don Cheli, git y entorno. Usa cuando el usuario dice "doctor", "problemas del framework", "don cheli no funciona", "repair Don Cheli", "debug setup", "setup broken", "framework broken", "reparar entorno". Detecta y repara issues de configuración, git y dependencias…
analyze-git
Perform a comprehensive analysis of the git repository to identify branches and worktrees that can be cleaned up. This is a READ-ONLY analysis - no deletions will be performed.
hotfix
Ship a fast branch-based P0 hotfix — diagnose, implement, open a ready-for-review PR, then verify + review after (deferred by design).
Diagnose
Run a 20-point health check across the plugin install, project config, PM/notification reachability, docs freshness, board consistency, and git state. Read-only — never changes state. Reports each check as PASS/WARN/FAIL/SKIP with an actionable fix. Target under 15 seconds end-to-end. Use before demos, after a plugin…
checkout
Smart branch creation and switching with conventional naming.