Infrastructure Change Workflow

VerifiedSafe

Safe infrastructure change workflow: pre-flight checks, branch creation, logically grouped commits, and push.

Sby Skills Guide Bot
DevOpsIntermediate
9/21/2026
Claude Code
#git-workflow#infrastructure#ci-cd#branching#commits

Recommended for

Automated summary

Guides safe infrastructure edits by requiring a clean main branch, creating an infra/ branch, committing changes in logical batches, and pushing the branch.

Strengths

  • Runs pre-flight checks before editing: clean working tree, current branch is main, and origin/main is pulled.
  • Creates a short descriptive branch with the infra/ prefix derived from the request.
  • Splits changes into separate commits by concern, such as CI/CD, Dockerfiles, compose/Traefik, or dependent layers.
  • Pushes the branch and reports the branch name plus commit SHAs from the new branch.

Limitations

  • Assumes the primary branch is named main and that origin/main exists.
  • Stops if there are uncommitted or unstaged changes, or if the current branch is not main.
  • Does not cover testing, rollback, or conflict resolution, and defers pull request creation to /pr.
When to use it

Use this skill when preparing a versioned infrastructure change such as a CI/CD workflow, Dockerfile, compose file, or Traefik configuration.

When not to use it

Avoid it when you need to work directly on a non-main branch or when the working tree cannot be cleaned, since the skill will stop before applying changes.

Security analysis

Safe
Quality score90/100

The skill instructs standard, legitimate git workflow commands (status, branch, checkout, add, commit, push) and explicitly includes pre-flight checks to avoid overwriting or mixing changes. No destructive, exfiltration, or obfuscated actions are present.

No concerns found

How this analysis is made

Examples

Split CI deploy workflow
/infra split the GitHub Actions deploy workflow into separate build and deploy jobs
Enable Traefik TLS
/infra update the Traefik configuration to enable TLS and adjust the docker-compose labels
Add migration Dockerfile stage
/infra add a production Dockerfile stage for migrations and wire it into docker-compose

name: infra description: "Make infrastructure changes safely: create a branch first, apply changes in logically grouped commits, and push. Use when modifying docker-compose files, CI/CD workflows, Traefik config, Dockerfiles, or any file under infra/ or .github/workflows/." argument-hint: "<change description> — describe the infrastructure change to make"

Infra Changes Workflow

Before touching any files, set up a branch. Then apply changes in logical batches, each with its own commit. Finally push.

Change requested: $ARGUMENTS

Step 0 — Pre-flight checks

Run the following checks before doing anything else. If any check fails, stop and inform the user — do not proceed.

  1. Check for uncommitted or unstaged changes:

    git status --porcelain
    

    If the output is non-empty, cancel with:

    "There are uncommitted or unstaged changes in the working tree. Please commit, stash, or discard them before proceeding with infra changes."

  2. Ensure you are on main:

    git branch --show-current
    

    If the current branch is not main, cancel with:

    "You are currently on branch <branch>, not main. Please switch to main before starting infra changes."

  3. Pull the latest main:

    git pull origin main
    

    Confirm the pull succeeded before continuing.

Step 1 — Create a branch

Derive a short, descriptive branch name from the user's request using the prefix infra/ (e.g. infra/split-deploy-jobs, infra/traefik-ssl-config).

Run:

git checkout -b <branch-name>

Confirm the branch was created before proceeding.

Step 2 — Apply changes in logical batches

Group the planned changes by concern. Each group becomes one commit. Typical groupings for this repo:

  • CI/CD — files under .github/workflows/
  • Container config — Dockerfile, Dockerfile.prod, Dockerfile.migrate
  • Compose / infra — files under infra/ (docker-compose files, traefik config)
  • Mixed — if a change spans groups, split by layer (e.g. compose changes first, then workflow changes that depend on them)

For each batch:

  1. Make the file edits.
  2. Stage only the files for that batch: git add <files>
  3. Commit with a concise imperative message: git commit -m "<what and why>"

Do not mix unrelated files in a single commit.

Step 3 — Push the branch

git push -u origin <branch-name>

Step 4 — Done

Report to the user:

  • Branch name
  • Commit SHA(s) (from git log --oneline origin/main..HEAD)

Run /pr to open the pull request when ready.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/infrastructure-change-workflow-muar2zxq/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/infrastructure-change-workflow-muar2zxq' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/infrastructure-change-workflow-muar2zxq/download' --output '.skill-downloads/infrastructure-change-workflow-muar2zxq/SKILL.md.part' && mv '.skill-downloads/infrastructure-change-workflow-muar2zxq/SKILL.md.part' '.skill-downloads/infrastructure-change-workflow-muar2zxq/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/infrastructure-change-workflow-muar2zxq/SKILL.md' && test -s '.skill-downloads/infrastructure-change-workflow-muar2zxq/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/infra' && cp -R '.skill-downloads/infrastructure-change-workflow-muar2zxq' '.claude/skills/infra'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/infrastructure-change-workflow-muar2zxq'

openskills read 'infrastructure-change-workflow-muar2zxq'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/infrastructure-change-workflow-muar2zxq/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills