autosync-enable

autosync-enable is a command for coding agents from Not-Diamond/self-care. It costs 9 tokens per session (1,256 once invoked), scanned A, original, MIT.

A command that turns on scheduled background syncing for a project's self-care trace source.

In plain words
What is it for?
Reading the existing provider configuration, loading current sync settings, and enabling recurring autosync through the project's autosync command.
Why use it?
It checks that the project is initialized and stores syncing settings and runtime data in the expected locations.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the self-care plugin — 12 commands, 2 agents shipped together

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/not-diamond/self-care/autosync-enable
Clone the repo
git clone --depth 1 https://github.com/Not-Diamond/self-care

Or install self-care, the plugin that ships this one along with the rest of its 12 commands, 2 agents.

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 autosync-enable

README.md
[![agentmods](https://agentmods.dev/badge/commands/not-diamond/self-care/autosync-enable.svg)](https://agentmods.dev/commands/not-diamond/self-care/autosync-enable)
Your own site
<a href="https://agentmods.dev/commands/not-diamond/self-care/autosync-enable"><img src="https://agentmods.dev/badge/commands/not-diamond/self-care/autosync-enable.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,256 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00009 $0.01256
Opus 5 $0.00005 $0.00628
Sonnet 5 $0.00002 $0.00251
Haiku 4.5 $0.00001 $0.00126

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

Security

Grade A, and why

autosync-enable 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 4d 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.

commands/autosync-enable.md · 170 lines

How it starts

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

Self-Care Autosync Enable

Enable background autosync for this project using Claude Code scheduled tasks.

Use the existing .self-care/config.json as the source of truth for the connected provider. Persist configurable autosync settings in .self-care/autosync.json.

Store runtime state, pending traces, and staged trace files under .self-care/autosync/ via the autosync CLI. Do not write runtime state into .self-care/autosync.json.

Step 1: Define Paths

CONFIG_PATH=".self-care/config.json"
STATE_PATH=".self-care/autosync.json"
AUTOSYNC_CLI="node "${CLAUDE_PLUGIN_ROOT}/lib/autosync.mjs""
PROJECT_NAME=<run `basename "$(pwd)"` and store the result>
TICK_PROMPT="/self-care:autosync-tick $PROJECT_NAME"

Step 2: Ensure Self-Care Is Initialized

Read $CONFIG_PATH.

If the file does not exist or is invalid JSON, stop and output:

✗ Self-Care is not initialized for this project.
  Run /self-care:init first, then retry /self-care:autosync-enable.

Step 3: Load Current Autosync Settings

Run:

node "${CLAUDE_PLUGIN_ROOT}/lib/autosync.mjs" status --config "$CONFIG_PATH" --state "$STATE_PATH"

Parse the JSON output and store:

  • poll_interval_minutes
  • sampling_rate
  • loop_task_id
  • current_scope

Defaults come from the status output if the autosync file does not exist yet.

Step 4: Confirm Or Update Settings

If .self-care/autosync.json already exists, output the current settings and ask via AskUserQuestion:

Autosync is already configured:
  Interval: every <poll_interval_minutes> minute(s)
  Sampling rate: <sampling_rate>

Would you like to keep these settings or change them?
1. Keep current settings
2. Change settings

If the user chooses to keep the current settings, reuse them as-is. Set POLL_INTERVAL_MINUTES and SAMPLING_RATE from the values returned in Step 3.

If there is no autosync config yet, or the user chooses to change settings, ask these questions via AskUserQuestion:

  1. Poll interval:
How often should autosync poll for traces?

1. Every 5 minutes
2. Every 10 minutes
3. Every 30 minutes
4. Every 60 minutes
5. Custom

Read the full file on GitHub · 170 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. 4d ago First seen · 170 lines · 9 tokens per session scan A 6ce9814c90ab

Subscribe to this mod's changes

autosync-enable is a command published in the GitHub repository Not-Diamond/self-care (28 stars, last pushed 4mo ago), licensed MIT. It adds 9 tokens to every session and 1,256 once invoked, about $0.0000 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-08-30.