safe-editing

Solid

Ensure AI agents work in an isolated Git worktree to prevent changes to the main working directory. Use when AI is about to make its first code modification in a session, or when the user requests isolated/safe editing. Triggers include starting to edit files, implementing features, or fixing bugs.

AI & Automation 9 stars 1 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 79/100

Stars 20%
33
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Safe Editing Use Git worktree to isolate AI-driven changes from the main working directory. ## Trigger Conditions Activate this skill when: - AI is about to make its **first code modification** in the current session - User explicitly requests safe/isolated editing - Starting a new feature implementation or bug fix ## Workflow ### 1. Check Current State ```bash git rev-parse --show-toplevel git worktree list git status --porcelain ``` Verify: - In a Git repository - No uncommitted changes in main directory - Not already in a worktree If uncommitted changes exist, ask user how to proceed (stash, commit, or abort). ### 2. Determine Branch Name Analyze the task and generate a branch name: | Task Type | Branch Format | Example | |-----------|---------------|---------| | New feature | `feature/<scope>-<summary>` | `feature/auth-add-oauth` | | Bug fix | `fix/<scope>-<summary>` | `fix/api-null-pointer` | | Refactor | `refactor/<scope>-<summary>` | `refactor/utils-cleanup` | | Docs | `docs/<summary>` | `docs/update-readme` | - Use lowercase kebab-case - Translate Japanese to English - Keep concise but descriptive ### 3. Create Worktree Use the `gwt` alias (defined in `.zshrc`): ```bash gwt <branch-name> ``` This creates: - New branch: `<branch-name>` - Worktree at: `../git-worktrees/<repo-name>-<branch-name>` ### 4. Navigate to Worktree ```bash cd ../git-worktrees/<repo-name>-<branch-name> ``` Confirm the switch: ```bash pwd git branch --show-current ``` ###...

Details

Author
koborin-ai
Repository
koborin-ai/site
Created
9 months ago
Last Updated
3 days ago
Language
MDX
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category