ワンクリックで
git-workflow
Quick reference for git operations, commit patterns, and workflow best practices
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Quick reference for git operations, commit patterns, and workflow best practices
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Project status briefing for Look Ma No Hands. Reads git activity, open PRs and issues, build health, and last-session handoff to produce a unified briefing. Only invoke when the user explicitly requests a status briefing.
Single-ticket implementation chain for Look Ma No Hands GitHub issues. Fetches the issue, assesses scope, routes to fast-path or standard-path, dispatches to engineering agents, and drives the review-fix-merge loop.
End-of-session summary for Look Ma No Hands. Reviews the conversation, writes session log, updates handoff file, and commits wrap-up files. Use at the end of every session.
Manage structured YAML expertise files as personal mental models. Use when starting tasks (read for context), completing work (capture learnings), or when your understanding of the system needs updating.
Analyze session transcript for corrections, approvals, and observations; append new learnings to project memory
Analyzes and optimizes Claude Code project configurations (CLAUDE.md, agents, skills directories) based on Vercel's agent eval research. Use when you want to improve agent performance in a repo by applying passive-context patterns, generating compressed documentation indexes, or auditing existing skill/agent setups for efficiency. Triggers on requests to "optimize my Claude setup", "improve agent performance", "audit my skills directory", or "apply AGENTS.md patterns".
| name | git-workflow |
| description | Quick reference for git operations, commit patterns, and workflow best practices |
This skill provides quick reference for common git operations, commit message patterns specific to this repository, and safety checklists for git workflows. Use this when you need a refresher on git commands or want to verify you're following project conventions.
What do you need to do?
├─ Save work locally
│ ├─ Stage specific files → git add <files>
│ ├─ Stage all changes → git add . (check for sensitive files first!)
│ └─ Commit changes → git commit (analyze style from git log first)
│
├─ Share work with team
│ ├─ Push current branch → git push (REQUIRES user confirmation)
│ ├─ Create pull request → gh pr create (analyze full branch history first)
│ └─ Update from remote → git pull
│
├─ Manage branches
│ ├─ Create new branch → git checkout -b <name> or git switch -c <name>
│ ├─ Switch branches → git checkout <name> or git switch <name>
│ ├─ List branches → git branch -vv (shows tracking info)
│ └─ Delete branch → git branch -d <name> (confirm if unmerged)
│
├─ Review changes
│ ├─ See current status → git status
│ ├─ View uncommitted changes → git diff
│ ├─ View commit history → git log --oneline --graph
│ ├─ View file history → git log -- <file>
│ └─ Compare branches → git diff <branch1>...<branch2>
│
├─ Fix mistakes
│ ├─ Undo last commit (keep changes) → git reset --soft HEAD~1
│ ├─ Amend last commit → git commit --amend
│ ├─ Discard local changes → git restore <file> (CONFIRM first)
│ └─ Hard reset → git reset --hard (CONFIRM first - destructive!)
│
└─ Temporary storage
├─ Save work in progress → git stash push -m "description"
├─ List stashes → git stash list
├─ Apply latest stash → git stash pop
└─ Apply specific stash → git stash apply stash@{N}
CRITICAL RULES:
Co-Authored-By: Claude Sonnet footer in commitsgit push)Based on analysis of this repository's commit history:
Format: <Action verb> <concise description>
Action Verbs:
Add - New features, files, or functionalityFix - Bug fixes or correctionsImprove - Enhancements to existing featuresRedesign - Significant UI/UX changesOptimize - Performance improvementsSecurity - Security-related changesRefactor - Code restructuring without behavior changeUpdate - Dependencies or configuration updatesExamples from this repo:
Add animated waveform visualization to recording indicator
Fix slow dictation transcription with enhanced logging and safety timeout
Improve waveform visualizer: fix amplitude scaling and light mode support
Redesign Meeting Transcription window and fix dictation indicator tracking
Optimize dictation latency for faster text insertion
Security: Redact transcription content from crash reports
Style Rules:
Before Staging Files:
git diff to understand what's being committedBefore Committing:
git status to see what will be committedgit log --oneline -5 to match commit message styleBefore Pushing:
git branch --show-current)git branch -vv)git log origin/<branch>..HEAD to see outgoing commitsBefore Destructive Operations:
Status & Information:
git status # Show working tree status
git status -sb # Short status with branch info
git diff # Show unstaged changes
git diff --staged # Show staged changes
git log --oneline --graph -10 # Pretty commit history
git log --oneline --all --graph # All branches history
git branch -vv # List branches with tracking info
Staging & Committing:
git add <file> # Stage specific file
git add <dir> # Stage directory
git add . # Stage all changes (check sensitive files!)
git restore --staged <file> # Unstage file
git commit -m "message" # Commit with message
git commit --amend # Modify last commit
Branching:
git switch -c <branch> # Create and switch to new branch
git switch <branch> # Switch to existing branch
git checkout -b <branch> # Create and switch (older syntax)
git branch -d <branch> # Delete merged branch (safe)
git branch -D <branch> # Force delete branch (confirm first!)
git branch -m <old> <new> # Rename branch
Remote Operations:
git fetch # Download remote changes
git pull # Fetch and merge
git push # Push to remote (REQUIRES confirmation)
git push -u origin <branch> # Push and set upstream
git remote -v # Show remote URLs
Stashing:
git stash push -m "description" # Save work in progress
git stash list # List all stashes
git stash pop # Apply and remove latest stash
git stash apply # Apply latest stash (keep in list)
git stash drop # Delete latest stash
git stash clear # Delete all stashes
Undo Operations:
git restore <file> # Discard local changes (CONFIRM!)
git reset --soft HEAD~1 # Undo last commit, keep changes
git reset --mixed HEAD~1 # Undo last commit and staging
git reset --hard HEAD~1 # Undo last commit and changes (CONFIRM!)
git revert <commit> # Create new commit that undoes changes
When creating a pull request:
Analyze full branch context:
git log main..HEAD # All commits in this branch
git diff main...HEAD # All changes since branching
git status # Current state
Draft PR components:
Closes #NNN so GitHub auto-closes the issue on mergePush and create:
git push -u origin <branch> # Get user confirmation first!
gh pr create --title "..." --body "..."
PR Body Template:
## Summary
- First major change
- Second major change
- Third major change
## Test Plan
- [ ] Step 1 to test
- [ ] Step 2 to test
- [ ] Step 3 to test
Closes #NNN
Note: Replace
#NNNwith the actual issue number. Omit theClosesline if the PR is not associated with an issue. GitHub recognizes:Closes,Fixes,Resolves(case-insensitive).
# 1. Note the commit hash
git log --oneline -1
# 2. Undo the commit (keep changes)
git reset --soft HEAD~1
# 3. Switch to correct branch
git switch <correct-branch>
# 4. Commit on correct branch
git add .
git commit -m "message"
# Keep changes, undo commit
git reset --soft HEAD~1
# Undo commit and unstage, keep changes
git reset --mixed HEAD~1
# Completely undo (DESTRUCTIVE - confirm first!)
git reset --hard HEAD~1
# From your feature branch
git fetch origin
git rebase origin/main
# Or if you prefer merge
git merge origin/main
# DANGEROUS - get user confirmation first!
# NEVER do this on main/master
git push --force-with-lease
# Option 1: Stash changes
git stash push -m "work in progress"
git switch <other-branch>
# Later: git stash pop
# Option 2: Commit changes
git add .
git commit -m "WIP: work in progress"
git switch <other-branch>
# Unstage specific file
git restore --staged .env
# Unstage all files
git restore --staged .
# Add to .gitignore to prevent future accidents
echo ".env" >> .gitignore
git add .gitignore
git commit -m "Add .env to .gitignore"
Destructive Commands (always confirm with user):
git reset --hard - Permanently deletes uncommitted changesgit push --force - Overwrites remote historygit branch -D - Deletes unmerged branchgit clean -fd - Deletes untracked filesgit stash drop - Permanently removes stashed changesNever Use Without Explicit User Request:
--no-verify - Skips pre-commit hooks--no-gpg-sign - Skips commit signing--force on main/master - Can break productionSensitive Files to Watch For:
.env, .env.local, .env.*credentials.json, secrets.**.key, *.pem, *.crtconfig/secrets.yml*.sqlite, *.db (if contains sensitive data)Git is powerful but unforgiving. This skill emphasizes: