confirm-edit

Verify Git remote, branch, working tree, and upstream divergence before multi-file edits.

1|Updated May 17, 2026
One-click install
npx skills add https://github.com/mykcs/myk-skills --skill confirm-edit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: confirm-edit
Source: https://github.com/mykcs/myk-skills/tree/main/confirm-edit
Command: npx skills add https://github.com/mykcs/myk-skills --skill confirm-edit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Confirming the correct Git repository and branch before applying multi-file edits prevents wasting time and accidentally modifying the wrong codebase, especially when working across multiple local paths and sites.

Core Features & Use Cases

  • Repository Context Validation: Checks origin URL, current branch, working tree status, and upstream divergence before proceeding.
  • Edit Safety Guardrails: Triggers for risky cases like batch edits across 3+ files or any changes under the specified path groups (~/Repo/webs/ and ~/Repo/mykcs/).
  • Operator Confirmation Workflow: Uses a clear confirmation template so the user can approve or provide an alternative target before the edits run.

Quick Start

Call confirm-edit before you start multi-file changes by telling the AI to confirm the target repository context and wait for your Enter confirmation.

Frequently Asked Questions about confirm-edit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify Git repository context before multi-file edits?

To verify Git repository context before multi-file edits, run git commands against your target repository to check the origin URL, current branch, working tree status, and upstream divergence. An explicit confirmation template presents uncommitted and behind-upstream commit counts before proceeding.

Why does context switching cause accidental edits in the wrong repository?

Context switching causes accidental edits when working across multiple local paths and sites because the active branch or remote origin may not match the intended codebase. Validating the Git working tree state and upstream divergence prevents modifying the wrong repository.

When do I need repo validation safety checks for batch modifications?

You need repo validation safety checks for batch modifications when applying risky multi-file edits across 3 or more files, or when making any changes under specified path groups like ~/Repo/webs/ and ~/Repo/mykcs/, to ensure you are targeting the correct branch.

What's the best way to confirm the current branch before applying code changes?

The best way to confirm the current branch before applying code changes is to execute git commands that fetch the remote origin URL and working tree status, then use an operator confirmation workflow requiring explicit approval before the edits run.

Can I use an operator confirmation workflow for edits across multiple local paths?

Yes, you can use an operator confirmation workflow for edits across multiple local paths. It applies to web and personal repo workflows, presenting a clear template so you can approve or provide an alternative target repository before proceeding with modifications.

What happens if my working tree has uncommitted changes during repo validation?

During repo validation, if your working tree has uncommitted changes, the safety checks will detect them and present the uncommitted commit counts in the confirmation template, requiring you to explicitly approve before proceeding with the multi-file edits.