self-update

self-update is a command for Claude Code from alifanov/darkflow. It costs 8 tokens per session (826 once invoked), scanned A, original, MIT.

A command that manually updates Dark Flow by downloading and running its installer. It can refresh the global worker, slash commands, project files, and stored version information.

In plain words
What is it for?
Use it to update Dark Flow globally or for the current project. The command asks the user to restart the worker; it does not restart it itself.
Why use it?
It keeps the installed Dark Flow files current while making clear that the running worker must be restarted before the update takes effect.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

Good fit Use it to update Dark Flow globally or for the current project. The command asks the user to restart the worker; it does not restart it itself.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/alifanov/darkflow/self-update
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/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-update

README.md
[![agentmods](https://agentmods.dev/badge/commands/alifanov/darkflow/self-update/github.svg)](https://agentmods.dev/commands/alifanov/darkflow/self-update)
Your own site
<a href="https://agentmods.dev/commands/alifanov/darkflow/self-update"><img src="https://agentmods.dev/badge/commands/alifanov/darkflow/self-update/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.

agentmods 80×15 button for self-update

Your own site · 80×15
<a href="https://agentmods.dev/commands/alifanov/darkflow/self-update"><img src="https://agentmods.dev/badge/commands/alifanov/darkflow/self-update.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 826 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00008 $0.00826
Opus 5.5 $0.00003 $0.00330
Sonnet 5.5 $0.00002 $0.00165
Haiku 4.5 $0.00001 $0.00083

Measured 1mo ago against content hash 4141f8b492bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

self-update 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

bash <(curl -fsSL https://raw.githubusercontent.com/alifanov/darkflow/main/install.sh) --force --yes
templates/.claude/commands/darkflow/self-update.md · 76 lines

How it starts

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

Step 1 — Run the installer

bash <(curl -fsSL https://raw.githubusercontent.com/alifanov/darkflow/main/install.sh) --force --yes

The installer is fully non-interactive: --yes skips all prompts, --force overwrites locally-modified templates. It refreshes the global worker (~/.darkflow/darkflow-run.sh), the user-scope slash commands (~/.claude/commands/darkflow/), this project's .darkflow.d/ files, and the version in .darkflow.d/state/config.json.

Updates are manual by design — the global worker never fetches or runs an installer on its own. To update just the worker + commands without touching a project, run bash <(curl -fsSL https://raw.githubusercontent.com/alifanov/darkflow/main/install.sh) --self-update --yes.

Step 1b — Ask the user to restart the global worker

A running worker holds the old script in memory, so the update has no effect until the worker is restarted. Do NOT restart it yourself. The worker's claude/codex engine authenticates from the user's interactive shell (keychain / env credentials a Claude Code session does not have); a worker you launch inherits your credential-less environment and every routine fails with Not logged in · Please run /login.

Check whether a worker is running and tell the user what to do:

pgrep -f /.darkflow/darkflow-run.sh >/dev/null && echo "worker running — needs restart" || echo "worker not running"

If it is running, print this and ask the user to run it in their own terminal (where claude -p "ok" works) — do not run it for them, not in the background, not even if asked to "just restart it":

pkill -f /.darkflow/darkflow-run.sh
sleep 1
nohup /usr/local/bin/bash ~/.darkflow/darkflow-run.sh >/dev/null 2>> ~/.darkflow/worker.err.log &

If no worker was running, just note that the user should start it themselves when ready. (You may stop/kill the worker on request — that needs no credentials — but never start or restart it.)

Step 2 — Ensure .darkflow.d/state/config.json is in .gitignore

Read the full file on GitHub · 76 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. 1mo ago Changed 4141f8b492bc
  2. 3mo ago First seen · 76 lines · 8 tokens per session scan A f7cb4bd34307

Subscribe to this mod's changes

self-update is a command published in the GitHub repository alifanov/darkflow (4 stars, last pushed yesterday), licensed MIT. It adds 8 tokens to every session and 826 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

self-update compared with commands from other repositories

self-update next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
self-updatealifanov/darkflowCommand4yesterdayMITA8Claude Code
localgetsentry/toolkitCommand977yesterdaynoneA0Claude Code
issuegetsentry/toolkitCommand977yesterdaynoneA0Claude Code
authgetsentry/toolkitCommand977yesterdaynoneA0Claude Code
debug-filesgetsentry/toolkitCommand977yesterdaynoneA0Claude Code
apigetsentry/toolkitCommand977yesterdaynoneA0Claude Code
eventgetsentry/toolkitCommand977yesterdaynoneA0Claude Code