skills/general/git/SKILL.md
Git operations for Nexus. Load when user mentions: git, sync upstream, fetch upstream, fetch origin, push origin, pull, commit, git status, git add, git log, git branch, git stash, git reset, git revert, undo commit, update from template, setup git, ssh key, clone repo, git config.
npx skillsauth add beam-ai-team/beam-next-skills gitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Version: 3.0
Git operations for Nexus repositories.
Before staging, committing, pushing, pulling with merge/rebase, stashing, resetting, reverting, changing remotes, configuring identity, or generating SSH keys, show the repository path, current branch, exact command, affected files or refs, and destructive risk. Require explicit user approval in the current turn before mutating the repository, credentials, or global git config. Read-only commands such as status, log, diff, branch listing, and config inspection do not require approval.
Never used git before? Start here. This walks you through everything from zero to a working repo.
Already set up? Run the diagnostic to check:
python3 skills/git/scripts/check_git_setup.pyIf all checks pass, skip to Which Operation Do I Need?
Check if git is installed:
git --version
If not installed:
| Platform | Command |
|----------|---------|
| macOS | xcode-select --install |
| Ubuntu/Debian | sudo apt update && sudo apt install git |
| Fedora/RHEL | sudo dnf install git |
| Windows | Download from https://git-scm.com/download/win |
Git needs to know who you are. This is attached to every commit you make.
git config --global user.name "Your Full Name"
git config --global user.email "[email protected]"
Verify:
git config --global user.name
git config --global user.email
SSH keys let you securely connect to GitHub without typing your password every time.
Check if you already have a key:
ls ~/.ssh/id_ed25519.pub
If the file exists, skip to Add key to GitHub below.
Generate a new SSH key:
ssh-keygen -t ed25519 -C "[email protected]"
Copy your public key:
| Platform | Command |
|----------|---------|
| macOS | pbcopy < ~/.ssh/id_ed25519.pub |
| Linux | cat ~/.ssh/id_ed25519.pub (then copy the output) |
| Windows | clip < ~/.ssh/id_ed25519.pub |
Add key to GitHub:
Beam Work Laptop (or whatever describes your machine)Test the connection:
ssh -T [email protected]
You should see: Hi {username}! You've successfully authenticated...
Something not working? See references/first-time-setup.md for troubleshooting.
git clone [email protected]:Beam-AI-Solutions/{repo-name}.git
cd {repo-name}
Replace {repo-name} with your actual repository name (e.g., nexus-client-acme).
Upstream connects your repo to the Nexus template so you can receive system updates.
git remote add upstream [email protected]:Beam-AI-Solutions/Nexus-Master-Suite.git
Verify remotes are set up:
git remote -v
You should see:
origin [email protected]:Beam-AI-Solutions/{repo-name}.git (fetch)
origin [email protected]:Beam-AI-Solutions/{repo-name}.git (push)
upstream [email protected]:Beam-AI-Solutions/Nexus-Master-Suite.git (fetch)
upstream [email protected]:Beam-AI-Solutions/Nexus-Master-Suite.git (push)
git status # Should show clean working tree
git fetch upstream # Should succeed without errors
You're all set! Continue to the daily operations below.
| I want to... | Operation | |--------------|-----------| | Set up git for the first time | First Time Setup | | Save my work locally | Add → Commit | | Share my work with team | Push | | Get my team's latest work | Pull | | Get system updates from template | Sync Upstream | | See what I've changed | Status / Diff | | Undo a mistake | Recovery |
Upstream: [email protected]:Beam-AI-Solutions/Nexus-Master-Suite.git
To change upstream URL:
git remote set-url upstream {new-url}
To add upstream (if not configured):
git remote add upstream [email protected]:Beam-AI-Solutions/Nexus-Master-Suite.git
Protected folders (never sync from upstream):
| Folder | Why Protected |
|--------|---------------|
| 01-memory/ | Your goals, learnings, config |
| 02-projects/ | Your active projects |
| 03-skills/ | Your custom skills |
| 04-workspace/ | Your client workspaces |
| 05-archived/ | Your archived items |
| .env | Your API keys |
Only 00-system/ is safe to sync from upstream.
These 5 operations cover 90% of daily use.
Stage files for commit.
git add {file} # Stage specific file
git add . # Stage all changes
Interactive (show user options):
Unstaged files:
1. skills/git/
2. 01-memory/goals.md
Which files to stage? (e.g., "1" or "1,2" or "all")
Commit staged changes.
Step 1: Show what's staged
git diff --cached --stat
Step 2: Ask user for commit message
Staged changes:
- skills/git/SKILL.md (+50/-20)
Commit message conventions:
[Dev] ... - Development/feature work
[Fix] ... - Bug fixes
[System] ... - System framework changes
[Memory] ... - Memory/config changes
[Project] ... - Project changes
[Skill] ... - Skill changes
[Workspace] ... - Workspace changes
What commit message would you like to use?
Step 3: Wait for user response, then commit
git commit -m "{user's message}"
IMPORTANT: Always ask user for commit message. Never commit without user confirmation.
Get latest changes from your team's repo and merge.
git pull origin {branch}
When to use: You want your teammates' latest work merged into yours.
Share your commits with your team.
Step 1: Check status
git status
Step 2: Show what will be pushed
git log origin/{branch}..HEAD --oneline
Step 3: Ask user to confirm
Ready to push to origin/{branch}:
- c07ff65 [Dev] Git skill v2.0
- abc1234 Previous commit
Push these commits? (yes/no)
Step 4: If confirmed, push
git push origin {branch}
IMPORTANT: Always show what will be pushed and ask for confirmation.
See current state.
git status
Shows: current branch, staged changes, unstaged changes, untracked files.
Show changes in detail.
git diff # Unstaged changes
git diff --cached # Staged changes
git diff HEAD..upstream/main # Compare with upstream
git diff HEAD..origin/main # Compare with origin
Show commit history.
git log --oneline -20 # Short format
git log --oneline --graph -20 # With branch graph
Download changes without merging. Use when you want to review before merging.
Fetch vs Pull:
| Command | Downloads | Merges | Use when |
|---------|-----------|--------|----------|
| fetch | Yes | No | Want to review changes first |
| pull | Yes | Yes | Ready to merge immediately |
git fetch origin # Fetch from your repo
git fetch upstream # Fetch from template
# After fetch, review:
git diff HEAD..origin/main # See what changed
git merge origin/main # Then merge if ready
Safely get system updates from the template repo.
What git_sync.py does:
Workflow:
python3 skills/git/scripts/git_sync.py --check-only
Present to user:
SAFE to sync (00-system/):
- skills/new-skill/
PROTECTED (will NOT sync):
- 01-memory/...
Options:
A) Sync 00-system/ only
B) Show diff first
C) Abort
Apply sync:
git checkout upstream/main -- 00-system/
git add 00-system/
git commit -m "[System] Sync from upstream"
git push origin {branch} # If user confirms
git branch -a # List all branches
git checkout -b {name} # Create and switch
git checkout {name} # Switch to existing
git branch -d {name} # Delete branch
Temporarily save uncommitted work.
git stash push -m "{desc}" # Save
git stash list # List saved
git stash pop # Restore and remove
git stash apply stash@{N} # Restore specific
git stash drop stash@{N} # Delete specific
CRITICAL: Never auto-resolve. Show user both versions, let them decide.
See references/conflict-resolution.md
Quick flow:
git diff --name-only --diff-filter=U - List conflictsgit add {file} - Mark resolvedgit commit - Complete mergegit reset {file} # Unstage specific file
git reset # Unstage all
Undo commit, keep changes staged:
git reset --soft HEAD~1
Undo commit, keep changes unstaged:
git reset HEAD~1
Undo commit, discard changes (DESTRUCTIVE):
git reset --hard HEAD~1
Create a new commit that reverses the changes (safe, preserves history):
git revert HEAD # Revert last commit
git revert {commit-hash} # Revert specific commit
git push origin {branch} # Push the revert
If NOT pushed yet:
git reset --hard HEAD~1 # Go back before merge
If already pushed (create revert commit):
git revert -m 1 HEAD # Revert merge commit
git push origin {branch}
Discard unstaged changes:
git checkout -- {file} # Specific file
git checkout -- . # All files
Discard EVERYTHING and match remote (DESTRUCTIVE):
git fetch origin
git reset --hard origin/{branch}
Common (90% of use):
| Task | Command |
|------|---------|
| Stage | git add {files} |
| Commit | git commit -m "msg" |
| Pull | git pull origin {branch} |
| Push | git push origin {branch} |
| Status | git status |
Advanced:
| Task | Command |
|------|---------|
| Diff | git diff |
| Log | git log --oneline -20 |
| Fetch | git fetch origin |
| Stash | git stash push -m "msg" |
| Branch | git branch -a |
Recovery:
| Problem | Solution |
|---------|----------|
| Unstage | git reset {file} |
| Undo commit (keep changes) | git reset --soft HEAD~1 |
| Undo pushed commit | git revert HEAD && git push |
| Discard local changes | git checkout -- . |
tools
Build a Palantir-shape, PDF-native use-case proposal document for a sophisticated enterprise account: research-grounded use cases (each with description, challenge, impact, value), an operating-graph ontology page, a recommended PoC with a week-by-week plan, and a closing page that asks for one decision. Load when a client asks us to 'propose high-impact use cases', requests a use-case presentation/catalog for a function (finance, HR, ops), or when a technical evaluation team will review candidates to pick a PoC. NOT for single-account cold outreach (use prospect-brief), full process diagnostics (use operating-diagnostic), or priced proposals (use proposal-creation).
development
Convert Beam Figma slide designs into high-fidelity, editable HTML presentation decks. Use when Codex is asked to audit Figma slides, extract slide templates, rebuild Beam slides as HTML decks, decide whether Figma imagery should be exported or rebuilt in HTML/CSS, create Beam/Prism-compatible deck templates, or improve fidelity of existing Beam HTML slide rebuilds.
development
Use the Beam AI reusable slide library: individual HTML slide templates extracted from Beam Figma rebuilds, kept separate from deck themes and full deck templates. Load when the user asks for a slide library, specific Beam slide patterns, reusable Figma-inspired slides, Prism slide-library items, or slide-level HTML templates.
development
Use Beam AI deck and report design packs, HTML templates, and curated examples to create sales decks, customer intro decks, RPO decks, and DIN A4 use-case proposal reports. Load when the user asks for Beam-branded presentation templates, Prism-compatible deck templates, Beam report templates, customer intro decks, commercial proposals, or reusable HTML deck/report examples.