Free SKILL.md scraped from GitHub. Clone the repo or copy the file directly into your Claude Code skills directory.
npx versuz@latest install vivekkarmarkar-claude-code-os-skills-gitstagegit clone https://github.com/VivekKarmarkar/claude-code-os.gitcp claude-code-os/SKILL.MD ~/.claude/skills/vivekkarmarkar-claude-code-os-skills-gitstage/SKILL.md--- name: gitstage description: Stage files for commit. Use when the user says "stage", "git add", "stage files", "stage changes", "add files", or wants to selectively stage changes before committing. Takes optional file paths or patterns as arguments. No arguments means stage everything. user-invocable: true allowed-tools: - Bash - Read - Glob --- # Git Stage — Stage Files for Commit Arguments passed: `$ARGUMENTS` ## Argument Handling - **No arguments** → stage all changes (`git add -A`), after safety checks - **File paths or patterns** (e.g., `src/`, `*.ts`, `app/page.tsx`) → stage only those ## Workflow ### Step 1: Pre-flight 1. Confirm this is a git repo. If not, stop. 2. Run `git status`. If nothing to stage, tell the user and stop. ### Step 2: Safety Check Before staging, scan for secrets in untracked files: - `.env`, `.env.local`, `.env.production`, credentials, API keys, tokens - If found, warn the user and add them to `.gitignore` instead of staging ### Step 3: Stage - If arguments provided: `git add <arguments>` - If no arguments: `git add -A` ### Step 4: Confirm Show what was staged: ``` Staged: Modified: 3 files New: 1 file Deleted: 0 files ``` ## Rules - **Never stage secrets.** Check first, warn, add to `.gitignore`. - **Show what was staged** so the user knows what will be in the next commit. - **Don't commit.** This skill only stages. Use `/gitcommit` to commit.