← All use cases

中文

Building software · Claude Code

Let Claude Code edit server configs but apply every change yourself

Idea + starter prompt, not run by us yet

For: Self-hosters who manage home servers from a config repo

The author manages all their NixOS machines, two used laptops serving as home servers, from a single config repo. Claude Code makes edits there but is not allowed to run the command that applies them. The author reads each change and applies it manually.

Steps

  1. Keep your server configs in one Git repo.
  2. Block the agent from running the command that applies config to live machines.
  3. Paste the starter prompt and review the diff.
  4. Apply the change yourself, one machine at a time.

Starter prompt

Starter prompt. Change the [brackets] first.

This repo holds the configs for my servers. I want to [describe the change, such as add a service or change a setting] on [machine name].

Read the current config first and explain your plan. Then edit only the files needed and show me the diff.

Do not run any command that applies the config to a live machine. I will review and apply it myself.

Original post: Hacker News · found via agentusecases.ai. Written up in our own words. We haven't run it, so test it on made-up data first.