drift-detector

drift-detector is an agent for Claude Code from revfactory/harness-100. It costs 32 tokens per session (901 once invoked), scanned A, original, Apache-2.0.

An infrastructure drift detector compares infrastructure code with the cloud resources that actually exist. IaC, or infrastructure as code, means managing that setup through files and tools such as Terraform or Pulumi.

In plain words
What is it for?
Use it to compare declared and real infrastructure, classify differences, plan remediation, track manual changes, and organise regular audits and alerts.
Why use it?
It helps find manual, unauthorised, or mistaken changes before the real setup quietly differs from the approved code. It also helps check security, tags, and naming rules and plan safe fixes.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to compare declared and real infrastructure, classify differences, plan remediation, track manual changes, and organise regular audits and alerts.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/revfactory/harness-100/drift-detector
About the project

Harness 100 is a collection of ready-to-use Claude Code agent teams, with specialist agents, orchestrator skills, and domain-specific extensions across many types of work. It is for assembling coordinated agent workflows for software, content, business, education, and other tasks. The catalogue entries are examples of the agents in this collection.

revfactory/harness-100 · 1,259 stars · on GitHub

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.

Clone the repo
git clone --depth 1 https://github.com/revfactory/harness-100

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 drift-detector

README.md
[![agentmods](https://agentmods.dev/badge/agents/revfactory/harness-100/drift-detector.svg)](https://agentmods.dev/agents/revfactory/harness-100/drift-detector)
Your own site
<a href="https://agentmods.dev/agents/revfactory/harness-100/drift-detector"><img src="https://agentmods.dev/badge/agents/revfactory/harness-100/drift-detector.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 901 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.00032 $0.00901
Opus 5 $0.00016 $0.00451
Sonnet 5 $0.00006 $0.00180
Haiku 4.5 $0.00003 $0.00090

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

Security

Grade A, and why

drift-detector 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 3d 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.

en/26-infra-as-code/.claude/agents/drift-detector.md · 87 lines

How it starts

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

Drift Detector

You are an infrastructure drift detection and remediation expert. You detect and resolve discrepancies between code and actual infrastructure.

Core Responsibilities

  1. Configuration Drift Detection: Detect differences between code and actual state using terraform plan/pulumi preview
  2. Policy Compliance Verification: Verify adherence to security policies, tagging policies, and naming conventions
  3. Auto-remediation Strategy: Design automatic/manual remediation methods per drift type
  4. Change Tracking: Establish processes for tracking manual changes and reflecting them in code
  5. Regular Audits: Design drift detection schedules, reports, and escalation policies

Working Principles

  • Always reference the infrastructure and security design documents
  • Code is the source of truth: Manual changes must be reflected in code without exception
  • Automation first: Automate detection, alerting, and remediation where possible
  • Classify drift types: intentional change vs. unauthorized change vs. configuration error
  • Non-destructive remediation first: Minimize service impact during auto-remediation

Deliverable Format

Save as _workspace/04_drift_policy.md:

# Drift Detection Policy

## Detection Strategy
- **Detection Tool**: [terraform plan / driftctl / AWS Config]
- **Execution Frequency**: [Hourly / Daily / Event-based]
- **Alert Channel**: [Slack / PagerDuty / Email]

## Drift Classification System
| Classification | Description | Severity | Auto-remediate | Example |
|---------------|-------------|----------|---------------|---------|
| Security Drift | Unauthorized SG, IAM changes | RED | Immediate remediation | 0.0.0.0/0 inbound added to SG |
| Config Drift | Instance type, parameter changes | YELLOW | Manual review then remediate | Instance scale-up |
| Tagging Drift | Required tag missing/changed | YELLOW | Auto-remediate | Tag deleted |
| Naming Drift | Resource name convention violation | GREEN | Next deployment | — |

Read the full file on GitHub · 87 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. 3d ago First seen · 87 lines · 32 tokens per session scan A f3c85d6bd93c

Subscribe to this mod's changes

drift-detector is an agent published in the GitHub repository revfactory/harness-100 (1,259 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 901 once invoked, about $0.0002 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-09-03.

Related

Other agents, from other repositories

aws-architecture-review-expert

Provides expert AWS architecture and CloudFormation review capabilities specializing in Well-Architected Framework compliance, security best practices, cost optimization, and IaC quality. Validates AWS architectures and CloudFormation templates for scalability, reliability, and operational excellence. Use PROACTIVELY…

giuseppe-trisciuoglio/developer-kit · 76 tokens

azure-architect

Designs Azure cloud architecture, optimizes costs, and implements security best practices. Use when designing Azure infrastructure, selecting Azure services, or optimizing Azure deployments.

armanzeroeight/fastagent-plugins · 35 tokens

deployment-verifier

Verifies local deployment health — checks ports, starts app, polls health endpoint, inspects Docker containers.

asysta-act/agent-flow · 24 tokens

database-migration

Database migration and modernization specialist. USE FOR: planning database migrations, designing migration strategies, validating data integrity. DO NOT USE FOR: operational database management, routine backups.

ivegamsft/basecoat · 37 tokens

llm2bedrock-report-generator

Synthesize all prior phase results into a final Markdown migration report — model mapping, eval scores, code diffs, cost comparison, next steps. Writes MIGRATIONREPORT .md and returns a structured report object.

awslabs/startups · 52 tokens

staff-sre

Production reliability specialist. Use PROACTIVELY for incident response, production readiness reviews, SLO enforcement, capacity planning, and any production concern. First responder for incidents.

caiaffa/claude-code-ultimate-engineering-system · 38 tokens