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.
npx agentmods add instructions/yhyatt/dmaf/agents-mdgit clone --depth 1 https://github.com/yhyatt/DMAFWhat 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 | $0.02828 | $0.02828 |
| Opus 5 | $0.01414 | $0.01414 |
| Sonnet 5 | $0.00566 | $0.00566 |
| Haiku 4.5 | $0.00283 | $0.00283 |
Grade A, and why
DMAF AGENTS.md scanned grade A with 1 finding 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 2d 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
Tests live in `tests/test_mcp_server.py` — all tools mocked via `patch("subprocess.run")`. How it starts
The opening of the file, as written. The whole thing — 282 lines — stays where its author put it; the contents beside it link to each section on GitHub.
DMAF — Coding Agent Guide
For Claude Code, GitHub Copilot, Cursor, and any other AI coding assistant. Read this before touching anything. It will save you hours.
What This Is
DMAF (Don't Miss A Face) — WhatsApp media → face recognition → Google Photos.
Photos and videos arrive from WhatsApp groups, get staged in a GCS bucket, a Cloud Run job scans them with face recognition, and matched media (people you care about) gets uploaded to Google Photos automatically.
Architecture
WhatsApp groups
│ (photos/videos from other group members)
▼
OpenClaw Gateway ← unofficial WhatsApp Web client (Baileys)
~/.openclaw/media/inbound/
│ (system cron, every 30 min, zero LLM cost)
▼
GCS staging bucket ← gs://your-bucket/
gs://your-project-whatsapp-media/
│ (Cloud Scheduler, hourly)
▼
Cloud Run Job: dmaf-scan ← Docker image from Cloud Build
│ scans each file, face recognition against known_people/
│ two-layer dedup via Firestore (path + content SHA-256)
▼
Google Photos ← matched faces only, organised into named album
Key constraint: OpenClaw's self-chat protection means your OWN sent photos never reach the pipeline. Only photos sent by others in groups are captured.
Codebase Map
src/dmaf/
├── __main__.py # CLI entrypoint + Uploader class (on_match / on_match_video)
├── config.py # Pydantic Settings — all config fields with defaults + docs
├── watcher.py # Core scan loop: scan_and_process_once, _process_image_file,
│ # _process_video_file, NewImageHandler base class
├── video_processor.py # iter_frames (generator), find_face_in_video (early exit)
├── gcs_watcher.py # GCS helpers: list_gcs_images, list_gcs_videos,
│ # download_gcs_blob, cleanup_temp_file
├── database.py # SQLiteDatabase (local dev) + FirestoreDatabase (cloud)
│ # Both implement: seen, add_file_with_score, mark_uploaded
├── known_refresh.py # Auto-add high-quality matched frames to known_people
├── alerting/
│ ├── alert_manager.py # AlertManager: batches events, sends email on schedule
│ └── templates.py # format_error_alert, format_borderline_alert
│ # _format_ts(ts, tz_name) — configurable timezone
├── face_recognition/ # Backend factory: dlib, InsightFace, AuraFace
├── google_photos/ # upload_bytes, create_media_item, ensure_album
└── utils/ # retry decorator, sha256_of_file, etc.
deploy/
├── README.md # Full GCP deployment walkthrough
├── setup-secrets.md # ALL credentials setup (start here for a new deployment)
└── openclaw-integration.md # OpenClaw → GCS media sync setup
tests/ # pytest — mirrors src/dmaf structure
config.cloud.yaml.example # Annotated config template
cloudbuild.yaml # Cloud Build: docker build + push to GCR
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.
- 2d ago First seen · 282 lines · 2,828 tokens per session scan A 24483da6f556
DMAF AGENTS.md is an instructions file published in the GitHub repository yhyatt/DMAF (2 stars, last pushed 6mo ago), licensed MIT. It adds 2,828 tokens to every session, about $0.0141 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
databasement CLAUDE.md
Claude Code instructions for David-Crty/databasement, covering claude.md, project overview, development commands, setup and installation and running the application.
pv-migrate AGENTS.md
AGENTS.md instructions for utkuozdemir/pv-migrate, covering pv-migrate — agent guide, what this repo is, the two workflows, and the strategy ladder, code map and the command values are shell strings.
pv-migrate copilot-instructions.md
Copilot instructions for utkuozdemir/pv-migrate: Read AGENTS.md in the repository root first. It is the project guide, and everything below is only the short version for when you have not opened it.
gocron AGENTS.md
Instructions for flohoss/gocron, covering agent guidance, principles, tooling — always via docker compose, never on the host, common commands and compose pinned versions.
pv-migrate CLAUDE.md
Claude Code instructions for utkuozdemir/pv-migrate, a project described as: CLI tool to easily migrate or backup/restore Kubernetes persistent volumes.
mcp-ssh-manager CLAUDE.md
Instructions for bvisible/mcp-ssh-manager, covering claude.md, project overview, architecture, commands and setup and installation.