self-checkup

self-checkup is a command for Claude Code from alifanov/darkflow. It costs 32 tokens per session (6,815 once invoked), scanned B, original, MIT.

A maintenance command that audits the Dark Flow code repository, registered projects, configuration, files, logs, database, and task records.

In plain words
What is it for?
Use it for routine control-plane health checks and for producing prioritized maintenance recommendations.
Why use it?
It gathers consistency and health problems in one report, including which checks were skipped if the PostgreSQL database is unavailable.

Command for Claude Code

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 commands/alifanov/darkflow/self-checkup
Clone the repo
git clone --depth 1 https://github.com/alifanov/darkflow

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 self-checkup

README.md
[![agentmods](https://agentmods.dev/badge/commands/alifanov/darkflow/self-checkup.svg)](https://agentmods.dev/commands/alifanov/darkflow/self-checkup)
Your own site
<a href="https://agentmods.dev/commands/alifanov/darkflow/self-checkup"><img src="https://agentmods.dev/badge/commands/alifanov/darkflow/self-checkup.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 6,815 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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 $0.00032 $0.06815
Opus 5 $0.00016 $0.03408
Sonnet 5 $0.00006 $0.01363
Haiku 4.5 $0.00003 $0.00681

Measured 5d ago against content hash 95e847c99c70, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

self-checkup scanned grade B 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 5d 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.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

`rm -rf "<localPath>/.darkflow.d/state/.lock"` or `rm -f` the stale slot file.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

.claude/commands/self-checkup.md · 486 lines

How it starts

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

Run a full control-plane health audit of Dark Flow. You are running this from the Dark Flow repo (/Users/vampire/code/darkflow) as the maintainer. This is NOT a per-project command — it inspects this repo's own consistency AND every project registered in the central Postgres database.

Do the eight audits below in order, collect findings as you go, then synthesize the recommendations grouped by priority. Print the whole report to the console — do not write any file.

Язык вывода: весь отчёт и рекомендации печатай на русском языке. Команды, SQL-запросы, имена полей БД, имена лейблов (status:approved и т.п.) и пути к файлам оставляй как есть — не переводи их. Переводи только пояснения, заголовки разделов, описания проблем и действия.


Step 0 — Setup

  • Read DATABASE_URL from webapp/.env (default postgresql://darkflow:darkflow@localhost:5432/darkflow). Run all DB queries with:
    psql "$DATABASE_URL" -At -c '<SQL>'
    
    If Postgres is unreachable, print a clear note and still run Step 1 (static, no DB) and Step 5 (git worktrees, filesystem-only). Every other step needs the DB (Step 6 now reads the task store from Postgres, not GitHub) — note them as skipped. Suggest make up to start Postgres.
  • Read the current version from VERSION — this is the source of truth for "outdated".
  • gh is no longer required to run this audit — Step 6 now reads the task store via df/ psql, not gh issue. gh auth status only matters for the Step 2 token check below (which covers vulnerability-check, the one remaining routine that calls gh api for security alerts).

Step 1 — Prompt ↔ settings consistency (this repo, static)

Cross-check that the repo's own pieces don't contradict each other. Report every mismatch.

  • Routines: every routine in the catalog webapp/src/lib/routines.ts (ALL_ROUTINES) must have (a) a command template at templates/.claude/commands/darkflow/<name>.md and (b) a reference doc at routines/<name>.md. List any catalog routine missing either, and any command/doc with no catalog entry. (Schedule + per-project overrides live in the DB; there is no routines.yml anymore.)
  • Commands: every command in install.sh's ALL_DF_COMMANDS array must have an existing template at templates/.claude/commands/darkflow/<name>.md, and vice-versa. Flag any command listed with no template file, and any template with no array entry.
  • Task field values: install.sh no longer provisions any label taxonomy (task queue moved to the Issue table's status/priority/source/action/needsHuman columns — there's nothing left to "create"). Grep the command templates and routines/ docs for df task create --status/--priority/--source/--action values and flag any that drift from the canonical set below (typo or a routine inventing a new value the webapp/UI doesn't render): action: fix, reply; priority: critical, high, medium, low; source: ads, build, ci, code-health, design, gsc, mailbox, manual, openpanel, security-review, seo, signoz, uptime, user-feedback; status: proposed, approved, rejected, in-progress, none.
  • Modules: the _module_active() case statement in install.sh must list every MOD_* module flag defined in the script (a known past gotcha — docs-audit and product-overview were once missing from it). Diff the two sets.
  • Version: VERSION must equal the most recent ## [X.Y.Z] heading in CHANGELOG.md.

Read the full file on GitHub · 486 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. 5d ago First seen · 486 lines · 32 tokens per session scan B 95e847c99c70

Subscribe to this mod's changes

self-checkup is a command published in the GitHub repository alifanov/darkflow (2 stars, last pushed 5d ago), licensed MIT. It adds 32 tokens to every session and 6,815 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.