daemon-loop

daemon-loop is a skill for Claude Code, Codex from winstonkoh87/Athena-Public. It costs 42 tokens per session (1,070 once invoked), scanned A, original, MIT.

A recurring-task pattern that runs agent workflows automatically at set intervals, similar to scheduled jobs or background services.

In plain words
What is it for?
Use it for repeated jobs including memory consolidation, database synchronization, dead-file cleanup, code review, stale-context checks, or delivery-queue scans.
Why use it?
It removes the need to start routine checks manually and keeps tasks such as reviews, synchronization, and workspace maintenance running on schedule.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: model in frontmatter; mentions Claude Code.

Good fit Use it for repeated jobs including memory consolidation, database synchronization, dead-file cleanup, code review, stale-context checks, or delivery-queue scans.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/winstonkoh87/athena-public/daemon-loop
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.

Any agent
npx skills add winstonkoh87/Athena-Public --skill daemon-loop
Clone the repo
git clone --depth 1 https://github.com/winstonkoh87/Athena-Public

Made for: Claude Code, Codex.

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 daemon-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/winstonkoh87/athena-public/daemon-loop.svg)](https://agentmods.dev/skills/winstonkoh87/athena-public/daemon-loop)
Your own site
<a href="https://agentmods.dev/skills/winstonkoh87/athena-public/daemon-loop"><img src="https://agentmods.dev/badge/skills/winstonkoh87/athena-public/daemon-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,070 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00042 $0.01070
Opus 5 $0.00021 $0.00535
Sonnet 5 $0.00008 $0.00214
Haiku 4.5 $0.00004 $0.00107

Measured 8d ago against content hash ccef21737a2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

daemon-loop 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 8d 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.

examples/skills/workflow/daemon-loop/SKILL.md · 117 lines

How it starts

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

Daemon Loop — Autonomous Agent Infrastructure

Source: Boris Cherny (Claude Code creator), X thread 2026-03-30 (CS-560) Pattern: "Turn workflows into skills, then loop them."

Core Concept

Traditional Athena workflows are pull-based — user triggers /start, /audit, /reindex manually. Daemon loops are push-based — they run autonomously at set intervals without user invocation.

This is the difference between a tool and infrastructure.

When to Use

Use Case Interval Workflow
Memory consolidation (dream pass) 24h (3-gate) /dream
Memory sync to Supabase 60m /reindex
Workspace hygiene + dead file pruning 24h /needful
PR/commit review (if git-active) 5m /check
Stale context detection (.context/ drift) 12h /audit (lightweight)
Client delivery queue check 30m Custom scan

Architecture

Option A: Cron + Headless Agent (Current-Compatible)

For environments where the agent platform supports CLI invocation:

# Example: reindex every hour
0 * * * * cd ./project && claude --bare -p "/reindex" 2>&1 >> .agent/temp/daemon.log

# Example: workspace hygiene daily at 4am
0 4 * * * cd ./project && claude --bare -p "/needful" 2>&1 >> .agent/temp/daemon.log

Key: --bare flag skips full context loading for speed. Only load what the specific daemon needs.

Option B: In-Session Loop (Manual Trigger)

When cron is unavailable, run a daemon within an active session:

User: "Loop /reindex every 60 minutes for the next 8 hours"
Agent: [Executes /reindex, sleeps 60m, repeats 8x]

Constraint: Requires an active session. Prefer Option A for true autonomy.

Option C: Async-Dev Integration

Combine with /async-dev (Sleeper Agent Protocol):

  1. User sets up daemon tasks before sleeping
  2. Agent executes loop overnight
  3. Morning: user reads STATUS.md for results

Daemon Registration

Track active daemons in .agent/temp/daemons.json:

Read the full file on GitHub · 117 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. 8d ago First seen · 117 lines · 42 tokens per session scan A ccef21737a2e

Subscribe to this mod's changes

daemon-loop is a skill published in the GitHub repository winstonkoh87/Athena-Public (585 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 1,070 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

imap-smtp-email

Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.

netease-youdao/LobsterAI · 82 tokens

task_automation

Design effective automated workflows using scheduled tasks, prompt chaining, and delivery channels.

siddsachar/row-bot · 19 tokens

skill-factory

A workflow that examines completed session work and turns reusable patterns into Claude Code skills.

sangrokjung/claude-forge · 122 tokens

session-wrap

Use when wrapping up a session before ending. 4 parallel subagents detect doc updates, repeated patterns, learning points, and follow-ups, then a verifier deduplicates and presents choices. Triggers on /session-wrap, session wrap, session cleanup, end of session.

sangrokjung/claude-forge · 58 tokens

lark-cli

Use when the user wants to operate Lark or Feishu via the local lark-cli (@larksuite/cli), including install, app credentials, OAuth, readiness checks, and safe read/write boundaries.

Peiiii/nextclaw · 46 tokens

relay

Session relay — compresses what's been done so far (writes a one-liner for /compact) and generates a "next task" prompt (a baton) for the user to hand off. Use on requests like "relay / hand off / next session / continue after compact / baton / handoff / clean up context and continue next task." Does not run /compact…

sangrokjung/claude-forge · 97 tokens