drift: Skill for Claude Code

.github/skills/guard-src-drift-commands/SKILL.md

guard-src-drift-commands is a skill for Claude Code from mick-gsk/drift. It costs 81 tokens per session (923 once invoked), scanned A, original, MIT.

A project-specific guard for command handlers in src/drift/commands, where each command-line subcommand has its own file. It checks patterns such as how commands call the application and handle arguments and output.

In plain words
What is it for?
It is for adding or changing command-line subcommands, argument parsing, output handling, exit codes, or repeated drift findings in this folder.
Why use it?
It helps prevent command handlers from bypassing the intended application interface or handling errors inconsistently. It is not meant for changes to the main CLI definition in cli.py.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

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

Part of the drift plugin — 31 skills, 17 agents shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to mick-gsk/drift. 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/mick-gsk/drift/main/.github/skills/guard-src-drift-commands/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/mick-gsk/drift

Made for: Claude Code.

Or install drift, the plugin that ships this one along with the rest of its 31 skills, 17 agents.

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 guard-src-drift-commands

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mick-gsk/drift/guard-src-drift-commands"><img src="https://agentmods.dev/badge/skills/mick-gsk/drift/guard-src-drift-commands.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 923 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.00081 $0.00923
Opus 5 $0.00041 $0.00462
Sonnet 5 $0.00016 $0.00185
Haiku 4.5 $0.00008 $0.00092

Measured 9d ago against content hash 644da1435d74, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

guard-src-drift-commands 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 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.

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.

.github/skills/guard-src-drift-commands/SKILL.md · 57 lines

How it starts

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

Guard: src/drift/commands

src/drift/commands enthaelt die CLI-Command-Handler. Jeder Subbefehl (analyze, verify, serve, calibrate, ...) hat eine eigene Datei. EDS entsteht wenn Commands direkt in pipeline.py oder Analyzer() einsteigen. PFS entsteht wenn Commands inkonsistente Argument-Parsing- oder Output-Handling-Muster verwenden.

Konfidenz: 0.89 — EDS und PFS treten regelmaessig auf, oft nach Features die Shortcuts einbauen.

When To Use

  • Du fuegest einen neuen CLI-Subbefehl hinzu
  • Du aenderst wie ein bestehender Befehl Argumente verarbeitet oder Ergebnisse ausgibt
  • Du aenderst wie Exit-Codes gesetzt werden
  • Drift meldet EDS oder PFS fuer eine Datei in src/drift/commands/

Nicht benutzen fuer Aenderungen an der CLI-Definition in cli.py — das ist ein anderer Scope.

Warum dieses Modul kritisch ist

Signal Ursache in commands/
EDS Command-Handler die direkt pipeline.run(), Analyzer() oder scoring/-Module aufrufen — Command sollte ausschliesslich die entsprechende api/-Funktion aufrufen
PFS Inkonsistente Exit-Code-Logik: manche Commands nutzen sys.exit(1), andere raise SystemExit, andere geben 1 zurueck

Core Rules

  1. Commands delegieren an api/ — ein Command-Handler tut folgendes: Argumente lesen → api.function(...) aufrufen → Ergebnis mit output/ rendern → Exit-Code setzen. Kein direkter Aufruf von pipeline.py oder Analyzer().

  2. Konsistente Exit-Code-Konvention0 = Erfolg, 1 = Findings ueber Threshold, 2 = Konfigurationsfehler, 3 = interne Fehler. Kein eigenes Exit-Code-Schema in einem neuen Command.

  3. Output-Formatierung nicht im Command-Handler — der Command-Handler uebergibt das Ergebnis an einen Formatter aus output/. Kein print(json.dumps(...)) direkt im Command.

  4. --format-Flag konsistent — alle Commands die Ausgabe erzeugen, unterstuetzen dasselbe --format-Flag mit denselben Werten (rich, json, markdown). PFS steigt wenn ein neuer Command andere Werte einfuehrt.

Read the full file on GitHub · 57 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. 9d ago First seen · 57 lines · 81 tokens per session scan A 644da1435d74

Subscribe to this mod's changes

guard-src-drift-commands is a skill published in the GitHub repository mick-gsk/drift (15 stars, last pushed 1mo ago), licensed MIT. It adds 81 tokens to every session and 923 once invoked, about $0.0004 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.