While you sleep, an AI agent runs maintenance jobs across your repositories. You wake up to commits and PRs, and a one-line summary in each project's history file.
Night Shift installs as a Claude Code skill — a local file in ~/.claude/skills/. Once installed, type /night-shift in any project to set up, run, or manage it.
Install (run in your shell, not in Claude):
mkdir -p ~/.claude/skills/night-shift && \
curl -fsSL https://raw.githubusercontent.com/frontkom/night-shift/main/skill/SKILL.md \
-o ~/.claude/skills/night-shift/SKILL.mdThat fetches one file into your local skills directory. No code execution, no Claude trust required — you can read the file before or after with cat ~/.claude/skills/night-shift/SKILL.md.
Use:
In any Claude Code session, type:
/night-shift
Claude will walk you through setup interactively — pick repos, choose tasks, confirm before anything is created.
Night Shift supports two backends:
| Backend | How it runs | Requirements |
|---|---|---|
| Schedule | Claude Code routines (runs on your account) | Claude subscription — no API key needed |
| GitHub Actions | GitHub-hosted runners via a reusable workflow | ANTHROPIC_API_KEY in org/repo secrets + gh CLI |
During setup, /night-shift runs a per-repo task picker — for each repo you add, you choose which of the 12 tasks should run nightly. Defaults are all-on, with a warning that the 4 audit tasks open PRs when they find issues. To change a repo's selection later, re-run /night-shift and pick Change tasks for a repo.
- Planned features partly built — picks the next phase from a
docs/*-PLAN.mdfile and opens a PR - Updated docs — changelog entries, user guide pages, decision records
- New test coverage — fills coverage gaps following your existing test patterns
- Fixed accessibility issues — WCAG AA violations on key pages
- Translated UI strings — moves hardcoded text into your i18n system
- Audit PRs — security, bug, SEO, and performance issues, each as its own PR
Each affected repo gets a one-line entry in docs/NIGHTSHIFT-HISTORY.md.
| Bundle | What it does | Mode |
|---|---|---|
| plans | Implements the next phase of a planning document | One PR per plan |
| docs | Updates changelog, user guide, decision records, suggestions | Direct to main |
| code-fixes | Adds tests, fixes accessibility, completes translations | Direct to main |
| audits | Finds security / bug / SEO / performance issues | One PR per area |
manifest.yml is the single source of truth for what tasks exist, what they do, what bundle they belong to, and what order they run in. Edit one file to add, rename, reorder, or move tasks.
To use the GitHub Actions backend, an org admin needs to add ANTHROPIC_API_KEY as an organization secret:
- Go to your org's Settings → Secrets and variables → Actions
- Click New organization secret
- Name:
ANTHROPIC_API_KEY, Value: your Anthropic API key - Repository access: select the repos Night Shift will manage (or "All repositories")
This is a one-time setup. Once the secret exists, any repo member can run /night-shift, choose GitHub Actions, and the skill will create PRs with the workflow file — no local clone needed.
You also need the GitHub CLI (gh) installed and authenticated on your machine for the setup process.
Add either:
- An empty file
.nightshift-skipat the repo root - A line
Night Shift: skipinCLAUDE.md,AGENTS.md, orREADME.md
The wrapper reports opted-out for that repo and moves on.
Add a ## Night Shift Config section to the project's CLAUDE.md. All fields are optional — anything unset uses sensible defaults autodetected from your package.json and repo layout.
## Night Shift Config
- Doc language: Norwegian (nb)
- Test command: npm test
- Build command: npm run build
- Push: git push mirror main && git push origin main
- Key pages: /dashboard, /surveys, /peopleTask selection is not in this file. Which tasks run on which repo is decided at setup time via the picker in /night-shift, and stored in the routine prompts themselves. To change a repo's task selection, re-run /night-shift and pick Change tasks for a repo.
To test tasks against a sandbox repo before running them on real projects, install the separate Night Shift Test skill.
See HOW-TO.md — five copy-paste recipes covering the common operations.
