aniketkarne/ClaudeNightsWatch
Autonomous task execution system for Claude CLI that monitors your usage windows and executes predefined tasks automatically
What it solves
Claude Nights Watch is an autonomous task execution system for the Claude CLI. It solves the problem of manual task repetition by automatically executing predefined tasks when a user's Claude usage window is about to expire, ensuring productivity continues without manual intervention.
How it works
The system monitors Claude usage windows (using ccusage or timestamp-based fallbacks). When the usage window is nearly exhausted (within 2 minutes of the 5-hour limit), it reads a task.md file for instructions and a rules.md file for safety constraints. It then executes these tasks autonomously using the claude --dangerously-skip-permissions flag, which allows the AI to run commands without asking for confirmation.
Who it’s for
Developers and power users of the Claude CLI who want to automate recurring development tasks (like linting, updating dependencies, or running test suites) during their usage window transitions.
Highlights
- Dual Installation: Available as a full Claude Code plugin with slash commands or as a standalone shell-based daemon.
- Task-Based Workflow: Uses simple Markdown files (
task.mdandrules.md) to define what to do and how to stay safe. - AI Agent Integration: Includes a built-in Task Executor agent to help users plan autonomous workflows and debug logs.
- MCP Server Support: Provides programmatic tools for Claude to manage the daemon, read/write tasks, and check status.
- Smart Hooks: Automatically integrates with Claude Code sessions to prompt for daemon starts or log file changes.
Related
- Project
- Project
- Project
- Project