Agent skill

Night Watch

by softspark in softspark/ai-toolkit

Autonomous maintenance (dep updates, dead code, small refactors) in isolated branch, off-hours.

Apache-2.0Auto-check: notesDevelopment

Install Night Watch

skills CLI
$ npx skills add softspark/ai-toolkit --skill night-watch -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install softspark/ai-toolkit night-watch --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/softspark/ai-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/app/skills/night-watch .claude/skills/night-watch && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
night-watch
GitHub stars
179
Token cost
~565 tokens
SKILL.md length
267 words
Files
1
Skills in repo
112
Repo updated
First seen
Licence
Apache-2.0

At a glance

Autonomous maintenance (dep updates, dead code, small refactors) in isolated branch, off-hours.

  • Works in 4 steps: Checkout: Create maintenance/ branch. → Execute: Run night-watchman agent skills. → Verify: Run full test suite. → …
  • Tasks that involve Refactoring
  • SKILL.md covers Usage, Protocol, Rules and Gotchas, plus 1 more section
  • Calls git, npm and pip

What it does

Night Watch is an agent skill from softspark/ai-toolkit. Autonomous maintenance (dep updates, dead code, small refactors) in isolated branch, off-hours. Triggers: night watch, autonomous maintenance, dep updates.

Its SKILL.md is about 570 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Refactoring. It works with Git. The repository describes itself as: Professional-grade AI coding toolkit: 94 skills, 44 agents, multi-platform (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Antigravity, Codex CLI… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Refactoring

Example prompts

  • “/night-watch”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Bash, Read, Edit, Grep

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Checkout: Create maintenance/ branch.
  2. Execute: Run night-watchman agent skills.
  3. Verify: Run full test suite.
  4. Report: Generate Shift Report.

What it can do on your machine

Read from SKILL.md and the folder at commit e40ed87. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Edit
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • npm
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, npm and pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Night Watch loads about 565 tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 267 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~565

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Edit, Grep

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from softspark/ai-toolkit at commit e40ed87, republished under its Apache-2.0 licence (© softspark). 267 words, ~565 tokens.

Download SKILL.mdSave it as .claude/skills/night-watch/SKILL.md (or your agent's skills folder).
name
night-watch
description
Autonomous maintenance (dep updates, dead code, small refactors) in isolated branch, off-hours. Triggers: night watch, autonomous maintenance, dep updates.
allowed-tools
Bash, Read, Edit, Grep
effort
medium
disable-model-invocation
true
context
fork
agent
night-watchman

Night Watch Command

Triggers the autonomous maintenance agent.

Usage

bash
/night-watch [scope]
# Example: /night-watch deps
# Example: /night-watch cleanup
# Default: runs full suite

Protocol

  1. Checkout: Create maintenance/ branch.
  2. Execute: Run night-watchman agent skills.
  3. Verify: Run full test suite.
  4. Report: Generate Shift Report.

Rules

  • MUST work on a dedicated maintenance/ branch — never commit to main or the user's active branch
  • NEVER push without the full test suite passing
  • CRITICAL: stop on the first failing test and surface it — do not try to "fix" tests opportunistically
  • MANDATORY: every change lands in a discrete commit with a conventional message

Gotchas

  • npm audit fix bumps to the latest major version when --force is set — quietly introducing breaking changes. Always use plain npm audit fix first and only escalate to --force after the user approves each named package.
  • pip install --upgrade without a constraints file resolves differently each run due to transitive dependencies. Pin via pip-compile and commit the lockfile, otherwise maintenance runs produce "mysterious" unrelated changes.
  • git add -A on a maintenance run can pull in build artifacts and IDE caches if .gitignore is incomplete. Prefer explicit git add <path> per change category (deps, docs, lint-fixes) to keep commits attributable.
  • Pre-commit hooks that format on commit may re-modify files AFTER your edit — the resulting commit may differ from the planned diff. Run the formatter as a separate step and verify git diff --staged before committing.

When NOT to Use

  • For planned refactors with a known scope — use /refactor-plan
  • For immediate bug fixes — use /fix or /debug
  • In a repo the user is actively working in — wait for idle time
  • When there are uncommitted changes on the current branch — abort until clean

© softspark, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in app/skills/night-watch of softspark/ai-toolkit.

Open the folder on GitHubat commit e40ed87

Compare with similar skills

Night Watch next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Night Watch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Night Watch this skillsoftspark/ai-toolkit179—~565Automated safety check: NotesApache-2.0
Codexskills-directory/skill-codex1.5k3 repos~1.8kAutomated safety check: PassMIT
Nexus MapperHaaaiawd/Nexus-skills166—~2.5kAutomated safety check: NotesNone
Refactoring Auditepam/ai-dial-chat504—~4.3kAutomated safety check: PassApache-2.0
Nexus QueryHaaaiawd/Nexus-skills166—~1.1kAutomated safety check: PassNone
Refactortermide/termide172—~2.8kAutomated safety check: PassMIT

Similar skills

  • Codex

    skills-directory/skill-codex

    A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

    1.5k GitHub starsUsed in 3 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Nexus Mapper

    Haaaiawd/Nexus-skills

    Generate a persistent .nexus-map/ knowledge base that lets any AI session instantly understand a codebase's architecture, systems, dependencies, and change hotspots.

    166 GitHub stars~2.5k tokensUpdated 6 mo ago
    DevelopmentAuto-check: notes
  • Refactoring Audit

    epam/ai-dial-chat

    Deep codebase refactoring audit for AI DIAL Chat. An agent skill from epam/ai-dial-chat.

    504 GitHub stars~4.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Nexus Query

    Haaaiawd/Nexus-skills

    Precise, instant code structure queries for active development — answer 'who depends on this interface before I refactor it', 'how many modules break if I change this', 'what is the real impact…

    166 GitHub stars~1.1k tokensUpdated 6 mo ago
    DevelopmentAuto-check passed
  • Refactor

    termide/termide

    Full-workspace code quality analysis and refactoring with validation

    172 GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Merge Master

    keybase/client

    A skill your agent uses when periodically merging upstream master commits into a long-running refactor branch where code has moved, been renamed, or restructured — guiding careful per-commit…

    9.3k GitHub stars~1.3k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from softspark/ai-toolkit

All 112 skills in this repo
  • Prepare Test Env

    softspark/ai-toolkit

    Prepare or verify a project QA environment with source identity, readiness, browser access, evidence paths and owned cleanup.

    179 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check: notes
  • A11y Validate

    softspark/ai-toolkit

    Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check: notes
  • Analyze

    softspark/ai-toolkit

    Analyzes code quality, complexity, patterns across codebase.

    179 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Autonomous Dev

    softspark/ai-toolkit

    Drives a brief, specification, issue or existing PR through implementation, review, tests and QA to a ready PR.

    179 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: notes
  • Brand Voice

    softspark/ai-toolkit

    Direct technical voice for docs, README, user-facing text. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • CI

    softspark/ai-toolkit

    Detect/generate/debug CI pipeline config (GitHub Actions, GitLab CI).

    179 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check: notes

Works with

Categories

Questions about Night Watch

What does Night Watch do?

Autonomous maintenance (dep updates, dead code, small refactors) in isolated branch, off-hours. Night Watch is an agent skill from softspark/ai-toolkit. Autonomous maintenance (dep updates, dead code, small refactors) in isolated branch, off-hours.

When should I use Night Watch?

Night Watch fits situations like: tasks that involve Refactoring.

How do I install Night Watch in Claude Code?

Run `npx skills add softspark/ai-toolkit --skill night-watch -a claude-code`. Or copy the skill folder (app/skills/night-watch in softspark/ai-toolkit) into .claude/skills/night-watch in your project. Claude Code loads it when a task matches its description.

How do I install Night Watch in Codex?

Run `npx skills add softspark/ai-toolkit --skill night-watch -a codex`. Or copy the skill folder (app/skills/night-watch in softspark/ai-toolkit) into .agents/skills/night-watch in your project. Codex loads it when a task matches its description.

Can I use Night Watch in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add softspark/ai-toolkit --skill night-watch -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/night-watch, .gemini/skills/night-watch, .github/skills/night-watch and .opencode/skills/night-watch in your project.

What does Night Watch need to run?

Going by SKILL.md and its folder, Night Watch needs the command-line tools its instructions call (git, npm and pip). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash, Read, Edit, Grep.

Does Night Watch access the network?

SKILL.md contains no URLs. Its commands use git, npm and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Night Watch safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Night Watch use?

Night Watch is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Night Watch use?

About 565 tokens (SKILL.md is roughly 2.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Night Watch?

Skills that share tags, products or a category with Night Watch: Codex (skills-directory/skill-codex, 1.5k stars), Nexus Mapper (Haaaiawd/Nexus-skills, 166 stars), Refactoring Audit (epam/ai-dial-chat, 504 stars) and Nexus Query (Haaaiawd/Nexus-skills, 166 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Night Watch?

softspark (a GitHub user) maintains it in softspark/ai-toolkit, which has 179 GitHub stars. The repository holds 112 skills in this directory. The repository was last updated on October 8, 2026.

Source: softspark/ai-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.