# Upgrade flake

> Upgrade flake is an open-source agent skill for developer tools. Updates NixOS flake.lock to newest input commits without changing the release. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/richardgill/nix/tree/main/.claude/skills/upgrade-flake
- **Repository:** https://github.com/richardgill/nix
- **GitHub stars:** 39
- **License:** MIT
- **Skill name:** upgrade-flake
- **Collection:** https://github.com/richardgill/nix
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill refreshes a Nix flake's lock file so all inputs, such as nixpkgs and home-manager, move to their latest commits while the NixOS release channel stays the same. It is meant for getting newer packages without a major version jump.

The workflow runs a justfile update recipe that calls nix flake update, then a check recipe that builds every configuration as a dry run. Only after the build passes does the agent apply the change with a switch recipe. It then checks that the docker and tailscaled services are running with systemctl. The skill also reminds the agent to show the flake.lock diff before applying and to include rollback steps, reverting the system generation or restoring flake.lock from git.

It assumes a repository that defines the just recipes update, check and switch, and a NixOS setup managed with nixos-rebuild. The skill has a single file and no bundled scripts.

## When your agent uses it

> This skill updates flake.lock to get latest packages within current NixOS release. Triggers: "update flake", "upgrade flake", "nix flake update", "bump flake.lock", "update flake inputs", "refresh inputs", "update dependencies". Runs nix flake update, checks build, optionally applies. Not for NixOS release upgrades (use upgrade-nixos for major version changes).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/richardgill/nix/tree/HEAD/.claude/skills/upgrade-flake)
- [License: MIT](https://github.com/richardgill/nix/tree/HEAD/.claude/skills/upgrade-flake)

## Features

- **Lock file refresh:** Updates flake.lock to the latest commits of every flake input.
- **Dry-run build check:** Builds all configurations before anything is applied to the system.
- **Controlled apply step:** Switches to the updated configuration only once the build has passed.
- **Service verification:** Checks that key services such as docker and tailscaled are running afterwards.
- **Rollback instructions:** Explains how to revert the system generation or restore the previous flake.lock.

## Good for

- Update my flake inputs to get newer packages
- Bump flake.lock and check that the configuration still builds
- Refresh nixpkgs and home-manager without changing my NixOS release
- Show me what changed in flake.lock before I apply it
- Roll back a flake update that broke my system

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/upgrade-flake` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/upgrade-flake &&
cp -R "$tmp/.claude/skills/upgrade-flake" ~/.claude/skills/upgrade-flake &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/upgrade-flake` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/upgrade-flake` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/upgrade-flake &&
cp -R "$tmp/.claude/skills/upgrade-flake" ~/.agents/skills/upgrade-flake &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/upgrade-flake` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/upgrade-flake` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/upgrade-flake &&
cp -R "$tmp/.claude/skills/upgrade-flake" ~/.cursor/skills/upgrade-flake &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/upgrade-flake` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/richardgill/nix.git --path .claude/skills/upgrade-flake
```

Or copy the folder to `~/.gemini/skills/upgrade-flake` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/upgrade-flake`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/richardgill/nix.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/upgrade-flake &&
cp -R "$tmp/.claude/skills/upgrade-flake" ~/.copilot/skills/upgrade-flake &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/upgrade-flake` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/richardgill/nix.git
```

Then copy `nix/.claude/skills/upgrade-flake` into your agent's skills folder as `upgrade-flake`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Upgrade flake trigger?

It triggers on phrases such as update flake, upgrade flake, nix flake update, bump flake.lock, update flake inputs, refresh inputs and update dependencies.

### Does Upgrade flake upgrade to a new NixOS release?

No. It keeps the current release channel. For major version changes the description points to a separate upgrade-nixos skill.

### Does Upgrade flake apply changes automatically?

No. It builds first and applies only when the user is ready, using the switch step.

### Are any scripts included?

No. The skill is a single SKILL.md file and relies on just recipes defined in the user's repository.

### How do I install Upgrade flake in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/upgrade-flake to use it in all your projects, or to .claude/skills/upgrade-flake in one project.

### Does Upgrade flake run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Upgrade flake?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Upgrade flake?

The closest alternatives to Upgrade flake are Upgrade nixos, Mt skill manage, Upgrade js deps, Upgrade python deps and Vibe safe deploy.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Upgrade nixos](https://ai-powered.com/skills/upgrade-nixos): Upgrade nixos is an open-source agent skill for developer tools.
- [Mt skill manage](https://ai-powered.com/skills/mt-skill-manage): Mt skill manage is an open-source agent skill for developer tools.
- [Upgrade js deps](https://ai-powered.com/skills/upgrade-js-deps): Upgrade js deps is an open-source agent skill for developer tools.
- [Upgrade python deps](https://ai-powered.com/skills/upgrade-python-deps): Upgrade python deps is an open-source agent skill for developer tools.
- [Vibe safe deploy](https://ai-powered.com/skills/vibe-safe-deploy): Vibe safe deploy is an open-source agent skill for cloud and infrastructure.
- [Dependency upgrade](https://ai-powered.com/skills/dependency-upgrade): Dependency upgrade is an open-source agent skill for developer tools.
- [Sync CLI skill](https://ai-powered.com/skills/sync-cli-skill): Sync CLI skill is an open-source agent skill for developer tools.
- [Fix merge conflicts](https://ai-powered.com/skills/fix-merge-conflicts): Fix merge conflicts is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/upgrade-flake
