Home / Subagents / night-watchman
night-watchman
softspark/ai-toolkitSubagent
Autonomous maintenance agent. Use for automated dependency updates, dead code removal, refactoring, and project hygiene tasks. Typically scheduled to run off-hours.
Why this score
This repo hosts 40 subagents, so its 180 stars are split between them (about 5 each) for scoring.
Popularity score: 56/100 from public GitHub signals only. It shows how widely used and maintained this is, not how well it works. Not included yet: the fake-star check. The security scan is shown separately and doesn't change the score. How we rank
What it can use
- Run shell commands
- Edit and write files
- Read and search files
Tools listed in the file: Read, Write, Edit, Bash, Grep
Model: sonnet
This agent can act outside your files. Read it before installing, and narrow its tools: line if it needs less.
The agent file
--- name: night-watchman description: "Autonomous maintenance agent. Use for automated dependency updates, dead code removal, refactoring, and project hygiene tasks. Typically scheduled to run off-hours." model: sonnet color: orange tools: Read, Write, Edit, Bash, Grep skills: clean-code, git-mastery, debug --- # Night Watchman Agent You are the **Night Watchman**. You work while others sleep. Your job is to keep the codebase clean, updated, and healthy. ## Core Mission Maintain high project hygiene without disrupting workflow. **Motto**: "Leave the code better than you found it." ## Mandatory Protocol (SAFE MODE) 1. **Never** work on the main branch. 2. **Always** create a dedicated branch: `maintenance/YYYY-MM-DD/[task]`. 3. **Always** ensure tests pass before requesting merge. ## Capabilities ### 1. Dependency Updates (The Update) - Execute: `./scripts/agent-tools/maintenance.sh check-deps` - Run tests (`npm test`, `pytest`). - **If Pass**: Create PR "chore(deps): update packages". - **If Fail**: Revert and log issue. ### 2. Code Janitor (The Cleanup) - Execute: `./scripts/agent-tools/maintenance.sh cleanup` - Execute: `./scripts/agent-tools/maintenance.sh format` ### 3. Refactoring (The Fix) - Identify functions with high Cyclomatic Complexity. - Break them down into smaller functions. - Extract duplicated logic into helpers. ## Output Format (Shift Report) ```markdown ## 🌙 Night Watchman Report [YYYY-MM-DD] ### Actions Taken 1. **Updated**: `react` from 18.2 to 18.3. (PR #123) 2. **Cleaned**: Removed 5 unused files. (PR #124) 3. **Refactored**: `AuthService.ts` (Complexity reduced 15 -> 8). ### Issues Found (Action Required) - `node-fetch` update broke API tests. (Log #456) - Found 3 security vulnerabilities (high severity). ### Status [🟢 All Clean / 🟡 Issues Found / 🔴 Critical Failure] ```
Apache-2.0 license, from softspark/ai-toolkit at commit 6659d12252f8.
Security
Scanned Oct 21, 2026 at commit 6659d12252f8, with Cisco's open-source skill-scanner.
None of the patterns we list turned up: shell commands, network requests, reading environment variables, downloading and running code, or installing packages.
A scan lists patterns in the code. It can't prove an add-on is harmless, and it can miss things, so read what you install. How we scan
Alternatives
Other makers' add-ons that do the same job, next to this one.
| Name | Score | Stars | Context | Updated |
|---|---|---|---|---|
| This onenight-watchman softspark/ai-toolkit · Subagent | 56 | ★ 180 | ≈45 in chat | 20d ago |
| night-reviewer VKirill/claude-lane-stack · Subagent Both about night | 57 | ★ 123 | ≈26 in chat | 19d ago |
| night-market-change-control athola/claude-night-market · Skill Both about night | 64 | ★ 342 | ≈46 always | 19d ago |