self-nudge-loop

self-nudge-loop is a skill for Claude Code, Codex from kirodotdev/KiroCrew. It costs 131 tokens per session (3,801 once invoked), scanned A, original, Apache-2.0.

A same-session automation loop that sends a new prompt to an agent when its current turn finishes and the session stays idle. It keeps the same conversation, tools, and memory, and can continue after a logout or restart.

In plain words
What is it for?
Use it for continuous improvement, roadmap-driven work, or tasks that should resume after inactivity. Use a separate scheduled job for fresh sessions, parallel tasks, or callbacks from outside systems.
Why use it?
It removes the need to manually restart ongoing work in a long-lived session. It is intended for one continuing task, rather than separate tasks that need isolated sessions.

Skill for Claude CodeCodex

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 skills/kirodotdev/kirocrew/self-nudge-loop
Any agent
npx skills add kirodotdev/KiroCrew --skill self-nudge-loop
Clone the repo
git clone --depth 1 https://github.com/kirodotdev/KiroCrew

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 self-nudge-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/kirodotdev/kirocrew/self-nudge-loop.svg)](https://agentmods.dev/skills/kirodotdev/kirocrew/self-nudge-loop)
Your own site
<a href="https://agentmods.dev/skills/kirodotdev/kirocrew/self-nudge-loop"><img src="https://agentmods.dev/badge/skills/kirodotdev/kirocrew/self-nudge-loop.svg" alt="Measured on agentmods" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,801 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00131 $0.03801
Opus 5 $0.00066 $0.01901
Sonnet 5 $0.00026 $0.00760
Haiku 4.5 $0.00013 $0.00380

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

Security

Grade A, and why

self-nudge-loop 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 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scaffold.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

TOKEN=$(curl -sf -H "X-Local-Secret: $SECRET" \
skills/self-nudge-loop/SKILL.md · 241 lines

How it starts

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

Self-Nudge Loop

Overview

AutoNudgeService (in kiro_crew.autonudge) keeps a single dashboard chat slot working toward a goal by re-feeding a nudge message every time the slot goes idle. Unlike cron_add, the nudge runs IN the same slot — warm memory, same tools, same conversation history. State persists across gateway restarts via ~/.kiro/crew/autonudge.json.

Usage

Use when the user wants:

  • "continuous improvement" that doesn't die between chats
  • one long-lived session that auto-resumes whenever idle
  • a north-star / roadmap / tasks anchor-file pattern driving autonomous work
  • the loop to survive logout and gateway restart

Do NOT use for:

  • work best run in fresh isolated session → use plain cron_add
  • parallel independent tasks → use spawn_run
  • external-system callbacks → use register_hook

Feature flag

On by default. To disable:

export KIROCREW_AUTONUDGE=0   # add to systemd unit Environment= or ~/.kiro/crew/env
kirocrew restart

When disabled, the REST API returns 503 and the UI popover surfaces the error.

Core Concepts

Reactive idle timer — after every HOOK_EVENT_STOP (turn completes), the service arms a per-slot asyncio timer for idle_secs. If a user message arrives, timer cancels (user wins). If the timer fires, the configured nudge is injected into the slot as a distinctively-styled msg msg-nudge bubble and _run_chat processes it normally.

Three files the agent owns (convention, not enforced):

File Role
north_star.md Immutable goal. Why the loop exists.
roadmap.md Phases / milestones. Agent may edit as it learns.
tasks.md Active checklist. Agent checks off / adds items each cycle.

Kill switches (any of the below):

  • The looping agent itself calls the autonudge_stop MCP tool — preferred, works from inside the loop with no ID lookup needed. The tool identifies the current slot from KIROCREW_SESSION_KEY and deletes the bound loop.
  • Click the Stop loop button in the UI popover.
  • Create the configured STOP sentinel file — next cycle halts.
  • max_cycles reached — loop deactivates (not removed, so you can resume).
  • DELETE /api/autonudge/{loop_id} or autonudge_svc.remove(id).

Read the full file on GitHub · 241 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 241 lines · 131 tokens per session scan A bd54f53a075c

Subscribe to this mod's changes

self-nudge-loop is a skill published in the GitHub repository kirodotdev/KiroCrew (3,532 stars, last pushed yesterday), licensed Apache-2.0. It adds 131 tokens to every session and 3,801 once invoked, about $0.0007 per session on Opus 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-30.

Related

Other skills, from other repositories

reskin

Author a NEW skin for the reskinnable-demo app. A skin is a self-contained domain plugin under src/skins/ / that implements the frozen Skin contract (src/shell/skin-contract.ts) to swap the app's entire experience — brand, theme, layout, pages, tools, data, and agent — as a live sales demo. Use when the user says "add…

CopilotKit/CopilotKit · 154 tokens

copilotkit-setup

Use when adding CopilotKit to an existing project or bootstrapping a new CopilotKit project from scratch. Covers framework detection, package installation, runtime wiring (managed Intelligence or self-hosted SSE), provider setup, and first working chat integration.

CopilotKit/CopilotKit · 56 tokens

copilotkit-integrations

Use when wiring an external agent framework (LangGraph, CrewAI, PydanticAI, Mastra, ADK, LlamaIndex, Agno, Strands, Microsoft Agent Framework, or others) into a CopilotKit application via the AG-UI protocol.

CopilotKit/CopilotKit · 61 tokens

a2ui-renderer

Render A2UI (Agent-to-UI declarative surfaces) in CopilotKit v2. Enable the runtime via CopilotRuntime({ a2ui: {...} }), then enable the provider via . Auto-activates via /info — do NOT manually pass renderActivityMessages. createA2UIMessageRenderer ships from @copilotkit/react-core/v2; low-level primitives…

CopilotKit/CopilotKit · 175 tokens

copilotkit-develop

Use when building AI-powered features with CopilotKit v2 -- adding chat interfaces, registering frontend tools, sharing application context with agents, handling agent interrupts, and working with the CopilotKit runtime.

CopilotKit/CopilotKit · 46 tokens

copilotkit-upgrade

Use when migrating a CopilotKit v1 application to v2 -- updating package imports, replacing deprecated hooks and components, switching from GraphQL runtime to AG-UI protocol runtime, and resolving breaking API changes.

CopilotKit/CopilotKit · 48 tokens