guard-src-drift

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

A safety guide for changes to the src/drift core module of an analyzer. It flags recurring design and maintenance risks when work affects core analysis, scoring, caching, orchestration, or public entry points.

In plain words
What is it for?
Use it when changing specified files under src/drift, editing its analyzer or pipeline logic, modifying scoring, or responding to AVS, EDS, MDS, or PFS drift findings.
Why use it?
Changes in this central module can affect scan correctness and how agents behave across the project. The guide helps identify when the module's broad impact requires extra care.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

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

Install

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.

agentmods
npx agentmods add skills/mick-gsk/drift/guard-src-drift
Any agent
npx skills add mick-gsk/drift --skill guard-src-drift
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

README.md
[![agentmods](https://agentmods.dev/badge/skills/mick-gsk/drift/guard-src-drift.svg)](https://agentmods.dev/skills/mick-gsk/drift/guard-src-drift)
Your own site
<a href="https://agentmods.dev/skills/mick-gsk/drift/guard-src-drift"><img src="https://agentmods.dev/badge/skills/mick-gsk/drift/guard-src-drift.svg" alt="Measured on agentmods" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,152 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00088 $0.01152
Opus 5 $0.00044 $0.00576
Sonnet 5 $0.00018 $0.00230
Haiku 4.5 $0.00009 $0.00115

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

Security

Grade A, and why

guard-src-drift 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 6d 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/SKILL.md · 73 lines

How it starts

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

Guard: src/drift

src/drift ist der Kern des gesamten Analyzers. Er enthaelt analyzer.py, pipeline.py, cache.py, scoring/, mcp_*.py-Orchestrierung und alle oeffentlichen Einstiegspunkte. Jede Aenderung hier hat breite Auswirkungen auf Scan-Korrektheit, Scoring und Agenten-Verhalten.

Konfidenz: 0.95 — alle vier Hauptsignale treten wiederholt auf.

When To Use

  • Du aenderst eine Datei direkt in src/drift/ (nicht in einem Unterpaket)
  • Du bearbeitest analyzer.py, pipeline.py, cache.py, api_helpers.py, task_graph.py oder scoring/
  • Ein Drift-Scan meldet AVS, EDS, MDS oder PFS fuer Dateien im Wurzelpaket
  • Vor einem Commit der src/drift/__init__.py oder oeffentliche Exports aendert

Nicht benutzen fuer Aenderungen ausschliesslich in src/drift/signals/, src/drift/api/ oder src/drift/output/ — dafuer gibt es dedizierte Guards.

Warum dieses Modul kritisch ist

src/drift/ ist das einzige Modul mit allen vier Hochrisiko-Signalen gleichzeitig:

Signal Was es bedeutet Konkretes Risiko hier
AVS God-Module / Abstraction Violation analyzer.py baut Verantwortlichkeiten auf — neue Logik dort zieht AVS an
EDS Unexplained Complexity drift_map, pipeline.py haben bereits EDS — neue verschraenkte Logik verschlimmert das
MDS Exakte Duplikate Hilfsfunktionen entstehen oft doppelt wenn man nicht _utils.py oder api_helpers.py nutzt
PFS Pattern Fragmentation MCP-Handler (mcp_*.py) haben schon inkonsistente Muster — neue Varianten erhoehen PFS

Core Rules

  1. Keine neue Logik direkt in analyzer.py oder pipeline.py — diese Dateien sind bereits God-Module-Kandidaten (AVS). Neue Faehigkeiten gehoeren in dedizierte Untermodule oder Klassen.

  2. Duplikate aktiv vermeiden — vor dem Schreiben einer neuen Hilfsfunktion grep_search in _utils.py, api_helpers.py, scoring/ und task_graph.py laufen lassen. MDS entsteht fast immer dadurch, dass eine existierende Funktion nicht gefunden wurde.

Read the full file on GitHub · 73 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. 6d ago First seen · 73 lines · 88 tokens per session scan A c05f37249d3f

Subscribe to this mod's changes

guard-src-drift is a skill published in the GitHub repository mick-gsk/drift (14 stars, last pushed 1mo ago), licensed MIT. It adds 88 tokens to every session and 1,152 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.