Maintainer Mode
Sign in with GitHub
Work in progress. Maintainer Mode changes every day: pages, numbers and links can change or break. Tell us what is wrong or missing.

Actions and LLMs

All docs · The source is docs/actions.md.

The buttons that start work on your behalf, in your own repositories.

Actions

Two buttons start work in GitHub Actions of a repository you own, with your token, when you press one. Nothing runs on the Maintainer Mode host. Signed out, /actions says what the buttons do. Signed in, it opens /me/runs.

Set it up

/me/settings#workflows shows these steps as a checklist. Each step shows its state: done, to do, or not checked.

  1. Fork Defelo/nixpkgs-review-gha.
  2. Copy gha/update.yml into .github/workflows/ of your fork, on its default branch. It calls the reusable workflow in .github/workflows/update.yml of this repository.
  3. Add a GH_TOKEN secret that can push to your fork of nixpkgs. The step links to the secrets page of your fork.
  4. Install the GitHub App on that fork only. On maintainermode.org, the App is maintainer-mode-app. It needs the Repository permission "Actions: read and write" and nothing else. With it, your login token can start a workflow. After the installation, GitHub sends you back to /me/settings#workflows.
  5. Save the repository names. They default to <login>/nixpkgs-review-gha and <login>/nixpkgs.

An operator names the App with MAINTAINER_MODE_GITHUB_APP_SLUG, or the NixOS option githubAppSlug. Without it, step 4 shows no button.

The setup check

When /me/settings opens, a check reads your setup with your own token. It only reads, and the page never shows the token. The check asks GitHub:

StepRequestOK when
1GET /repos/<repo>the workflow repository exists
2GET /repos/<repo>/contents/.github/workflows/...review.yml and update.yml exist
3GET /repos/<fork>your nixpkgs fork exists
4GET /user/installations, then GET /user/installations/<id>/repositoriesan installation of the App includes the repository
5noneyou saved the names; else the defaults apply

Step 4 lists the installations of the App that your login token can see. It does not ask the Actions API: on a public repository, that API answers any token, with or without the App.

Each line says OK, or what is missing and how to fix it. The check cannot read secrets, so step 3 always asks you to check GH_TOKEN yourself. When GitHub does not answer, the line says "Check again later" and blocks nothing.

The server keeps the result for five minutes. Check again drops it. A save of the names, a run that failed to start, and the return from the App installation also drop it. After five minutes, the buttons start the check again on the next click.

While a step is missing, Review in CI and Update with nix-update link to /me/settings#workflows. They do not start a run that fails. A missing update.yml or nixpkgs fork blocks only the update button. A click also runs the check first. When a step is missing, the click opens the settings and tells you which step.

Move the pin of the reusable workflow

gha/update.yml calls the reusable workflow at a full commit SHA, not at main. A change on main therefore does not run with your GH_TOKEN until you move the pin. To move the pin:

  1. Find the newest commit that changes the reusable workflow: gh api 'repos/numtide/maintainermode/commits?path=.github/workflows/update.yml&per_page=1' --jq '.[0].sha'.
  2. Read the change at that commit.
  3. In .github/workflows/update.yml of your workflow repository, put the new SHA after @ on the uses: line.
  4. Change the comment after the SHA to # main of <date>, with the date of that commit on main.
  5. Run nix run nixpkgs#actionlint on the file, then commit it.

LLMs, if you want them

/me/settings#llm has one choice: "I am OK with LLMs using my data on this site". It is off by default. Each person sets it for themselves. When it is off, nothing below is available to that person.

The MCP server

/mcp is a read-only MCP server. It uses JSON-RPC 2.0 over the Streamable HTTP transport of the MCP specification 2025-06-18.

ToolReturns
searchpackages, modules and areas that match a name, with their health flags
packageone package, as /api/v1/packages/<attr>
moduleone NixOS module, as /api/v1/modules/<file>; nixos/<name> also works
areaone path of the tree, as /api/v1/areas/<path>
personthe record of a login and what it maintains, as /api/v1/people/<login>
prsone queue, as /api/v1/prs; queue is foryou by default
watchingyour subscriptions, with their health flags
sync_statusthe data of /state?tab=status
CodeMeaning
200a JSON-RPC answer
202a notification; there is no answer
400an MCP-Protocol-Version other than 2025-06-18 or 2025-03-26
401no token, or an unknown token
403the choice is off, or an Origin other than this site

To add it to Claude Code on your machine:

claude mcp add --transport http maintainer-mode https://<host>/mcp --header "Authorization: Bearer <token>"

A Claude Code session on a pull request

Each open pull request row gets a Claude Code button next to Review in CI. It opens /claude/pr/<number>. That page shows the prompt in a copy box. Its link opens Claude Code on the web with the prompt filled in and NixOS/nixpkgs selected, through the documented prompt and repositories parameters. Nothing runs until you send the prompt. The session runs in your own Claude account.

The prompt gives: