Claude Nights Watch plugin
A Claude Code plugin that takes a to-do list from task.md and runs it on the usage window timer, leaving an action log.
- 369 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- Autonomous runs skip confirmations, so the agent edits files unattended.
- Safety rules in `rules.md` are followed by the model itself and are not technically enforced.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add plugins/claude-nights-watchDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Autonomous runs skip confirmations, so the agent edits files unattended.
- Safety rules in `rules.md` are followed by the model itself and are not technically enforced.
This is third-party code. Review the repository files before installing.
What it does
Claude Nights Watch runs the tasks written in `task.md` inside Claude Code. A daemon watches the usage window and, as it nears its end, reads the tasks and executes them without a human. Constraints for the agent live in `rules.md`. The plugin adds seven `/nights-watch` commands: `setup`, `start`, `stop`, `status`, `logs`, `task` and `restart`. It also ships a Task Executor agent, session hooks and a local MCP server with tools such as `get_daemon_status`, `start_daemon`, `read_task` and `write_task`. The timer uses `ccusage` for exact data or falls back to elapsed time. A start hour can be set with `--at`.
Who it is for. Developers on a Claude Code plan who have spare window hours and recurring jobs such as linting and test runs.
Good fit when
- Linting, tests and a coverage report must run overnight from a list in `task.md`.
- The usage window is closing while a queue of routine edits is still untouched.
- A record of what the agent did unattended is needed.
- A team wants one safety rule set for autonomous runs.
Not a fit when
- The repository holds data an agent must not touch without confirmations.
- The job needs a human decision at every step.
- The environment forbids background processes.
Example request
Set up Nights Watch: create a `task.md` that runs the linter and tests, and a `rules.md` that forbids deleting files.Limitations
The daemon starts Claude with `--dangerously-skip-permissions`, so no confirmations are requested. Rules in `rules.md` are text for the model, not a technical barrier. Exact timing needs `ccusage`, otherwise a time-based check runs. The older shell-script method stays as a fallback. The daemon depends on the subscription usage window, so check the timer behaviour on another plan. `task.md` is read in full, so vague wording leads to arbitrary actions.
How to disable. Stop the daemon with `/nights-watch stop`, then remove the plugin from Claude Code along with `task.md` and `rules.md`.
FAQ
Which tasks does Nights Watch run?
Those written in `task.md`, from linting and dependency updates to tests and a change summary. A sample sits in `examples/task.example.md`.
How do I restrict the agent?
Write the rules in `rules.md`: work only inside the project directory, never delete files without a backup, use branches. The file is read together with the tasks.
How do I see what was done?
The `/nights-watch logs` command shows the log and the `-f` flag follows it in real time.
Is `ccusage` required?
No, it is optional. With it the timer is more exact, without it the daemon checks elapsed time on its own.
Which tools does the MCP server have?
Among them `get_daemon_status`, `start_daemon`, `stop_daemon`, `get_logs`, `read_task`, `read_rules`, `write_task` and `write_rules`: eight in all.
Discussion
No questions or reviews yet.
Related
PluginsA Claude Code plugin that runs tasks on a schedule: code reviews, security checks and summaries through launchd, cron or Windows Task Scheduler
A plugin that makes Claude Code a background assistant: scheduled tasks, Telegram, Discord and Slack replies, a web dashboard.
Sleepless Agent is a background-job CLI for Claude Code with a SQLite queue that retains pending work after a session ends.
A self-hosted control plane for running several agents: task dispatch, run review, spend tracking, connected via MCP, CLI or REST
A Telegram bot drives Claude Code on your computer: you message the chat and the agent edits the project and streams the reply.
The @itsaplan/runner CLI takes tasks from the It's a Plan tracker and hands them to Claude Code, Codex or opencode locally.
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Repository stars | Main difference |
|---|---|---|---|
| Claude Nights Watch (this card) | no | 369 | |
| claude-code-scheduler | no | 513 | runs jobs on a schedule; Nights Watch is tied to the usage window and keeps its list in `task.md` |
| Ralph Wiggum | no | 313 | loops one prompt until done; Nights Watch takes a set of tasks from a file |
README in short
The project extends the claude-auto-renew idea: instead of a bare greeting at the window end, it runs the task list from `task.md`. It works as a Claude Code plugin or as a standalone shell-script daemon.