Borrowing it
Nothing to install: this file belongs to yhyatt/DMAF. 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/yhyatt/DMAF/main/AGENTS.mdgit clone --depth 1 https://github.com/yhyatt/DMAFWrote 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/instructions/yhyatt/dmaf/agents-md)<a href="https://agentmods.dev/instructions/yhyatt/dmaf/agents-md"><img src="https://agentmods.dev/badge/instructions/yhyatt/dmaf/agents-md/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/instructions/yhyatt/dmaf/agents-md"><img src="https://agentmods.dev/badge/instructions/yhyatt/dmaf/agents-md.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.02828 | $0.02828 |
| Opus 5.5 | $0.01131 | $0.01131 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (3 stars, last pushed 7mo ago), licensed MIT. It adds 2,828 tokens to every session, about $0.0113 per session on Opus 5.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
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.