SYS.CHEAT×SHEET

CLAUDE_CODE / GITHUB / CLOUDFLARE / SHELL

V1.0 // ZACISZE BUILD // BOOTING_

Twelve panels. Every command you'll actually need to ship the build without summoning a worktree daemon. Hover panels to reveal. Tap to jump.

01

SHELL // TERMINAL BASICS

Where am I

pwd
Print current folder path
ls
List visible files in current folder
ls -la
List all files including hidden, with permissions and sizes

Move around

cd "path with spaces"
Change folder — quote paths with spaces or special chars
cd ..
Go up one folder
cd ~
Go to your home folder (/Users/macbookpro)
cd -
Jump back to the previous folder
open .
Open current folder in Finder

File ops

mkdir "Folder Name"
Create a folder
cp file.txt dest/
Copy file to destination
mv old new
Rename or move
rm file.txt
Delete file. No trash. Permanently gone.
rm -rf folder
Delete folder and everything inside it. Triple-check the path.
cat file.txt
Print file contents to terminal
head -20 file.txt
Show first 20 lines
tail -20 file.txt
Show last 20 lines

Survival

↑ / ↓
Recall previous commands
Tab
Autocomplete file paths and commands
Ctrl + C
Cancel the running command
Ctrl + L
Clear the terminal screen (or type clear)
02

CLAUDE // SESSION CONTROL

Start a session

claude
Start a normal interactive session in the current folder
claude --version
Check the installed Claude Code version (need 2.1.51+ for Remote Control)
claude --remote-control
Interactive session, also drivable from web and mobile
claude --rc "Zacisze"
Same as above with a custom session title shown in claude.ai/code

Server mode (multi-session)

claude remote-control
Run as a background server that can host many sessions on demand
claude remote-control --spawn=same-dir
Force every spawned session into the current folder. Default — but worth being explicit.
claude remote-control --spawn=worktree
DO NOT USE. Creates a fresh git worktree per session — the exact behavior you're escaping.

Resume / end

/resume
Inside a session: pick a previous session to continue
/exit
End the current session

Always launch from your project root. If pwd shows anything under .claude/worktrees/ → stop, cd back to project root, restart.

03

CLAUDE // SLASH COMMANDS

Status & info

/help
List every slash command available
/status
Show login account, plan, and connection state
/context
How much of the context window is used
/usage
Today's token usage vs your plan limit
/extra-usage
Detailed usage breakdown
/recap
Quick summary of the session so far

Context management

/compact
Summarize the conversation to free up context. Use mid-task when context fills up.
/clear
Wipe conversation context entirely. Drastic. Use only between unrelated tasks.

Session control

/remote-control "Name"
Enable Remote Control on an already-running session
/rc "Name"
Short form of above
/rename "New Title"
Rename the current session
/mobile
QR code to download the Claude mobile app
/config
Open the settings UI (enable Remote Control by default here)
/reload-plugins
Reload skills and plugins without restarting
/mcp
List and manage connected MCP servers
/plugin
Manage skills, plugins, and marketplaces
04

CLAUDE // AUTH

From terminal (no session)

claude auth login
Sign in via claude.ai browser flow
claude auth logout
Sign out completely from this device

Inside a session

/status
See who you're signed in as and your plan
/login
Sign in (opens claude.ai in your browser)
/logout
Sign out of the current account

If Remote Control won't connect

echo $ANTHROPIC_API_KEY
Check whether an API key is set. If anything prints, that's why remote breaks.
unset ANTHROPIC_API_KEY
Remove the API key from this terminal session
nano ~/.zshrc
Remove or comment out any export ANTHROPIC_API_KEY=... line if it persists across terminals
05

CLAUDE // SKILLS & PLUGINS

Manage from inside Claude

/plugin
Open the plugin manager UI
/plugin marketplace add anthropics/skills
Add the official Anthropic skills marketplace
/plugin install frontend-design@anthropic-agent-skills
Install the frontend design skill (recommended for your project)
/plugin install skill-creator@anthropic-agent-skills
Install the skill-builder skill (use it to create custom skills)
/plugin install document-skills@anthropic-agent-skills
Bundle: docx + pdf + pptx + xlsx

From the shell

ls ~/.claude/skills
List user-level skills (available in every project)
ls .claude/skills
List project-level skills (only this project)
mkdir -p .claude/skills/my-skill
Scaffold a project skill folder

A skill is a folder with a SKILL.md file: YAML frontmatter (name, description) + markdown instructions. Claude auto-loads relevant skills when their description matches the task.

06

CLAUDE // TROUBLESHOOTING

Kill rogue worktrees

git worktree list
Show every worktree attached to this repo
git worktree remove .claude/worktrees/<name> --force
Remove one worktree, discarding any uncommitted work in it
git worktree prune
Clean up stale worktree references
rm -rf .claude/worktrees
Nuke the worktrees folder entirely after pruning

Stop the worktree habit

// Use the CLI, never the desktop app
Desktop creates a worktree per session by design — no toggle.
// Launch only from project root
If pwd starts with .claude/worktrees/ — exit, cd to project root, restart claude.

Reset Claude state

ls ~/.claude/projects
See every project Claude Code thinks exists (each cwd is a separate project)
rm -rf ~/.claude/projects/<stale-path>
Delete fragmented project metadata for old worktree paths

After cleanup, run git status from the project root. Expected: "On branch main, nothing to commit, working tree clean."

07

GIT // DAILY DRIVING

See what's going on

git status
What's changed, what's staged, what branch you're on. Run before every commit.
git diff
Show line-by-line unstaged changes
git diff --staged
Show line-by-line staged changes (what will be committed)
git log --oneline -20
Last 20 commits, one line each
git log --graph --oneline --all
Visual graph of all commits and refs

Save and ship

git add -A
Stage every change (new, modified, deleted)
git add path/to/file
Stage only one file
git commit -m "clear message"
Commit staged changes with a message
git push
Upload commits to GitHub
git push origin main
Same, but explicit about remote and branch

Sync

git pull
Download and merge latest from GitHub (rare on solo main-only work)
git fetch
Check the remote without merging anything
git remote -v
Which GitHub repo does this folder point at
08

GIT // RESCUE OPS

Undo recent work

git reset --soft HEAD~1
Undo last commit, keep changes staged
git reset HEAD~1
Undo last commit, keep changes unstaged (default mode)
git reset --hard HEAD~1
Undo last commit AND throw away the changes. Use carefully.

Big red button

git reset --hard origin/main
Wipe every local change and match GitHub exactly. The full reset.
git clean -fd
Delete untracked files and folders (use after reset --hard to remove leftover junk)

Stash work in progress

git stash
Temporarily shelve uncommitted changes
git stash pop
Reapply the most recent stash and remove it from the stack
git stash list
Show all stashed sets

The safety net

git reflog
Log of EVERY action git took locally. Even "lost" commits live here for ~90 days.
git reset --hard <hash>
Restore to any commit hash from reflog
git checkout <hash> -- path/to/file
Restore one file from a past commit without touching the rest

Tag milestones

git tag stable-2026-05-18-content-crawl
Bookmark current state with a label
git push --tags
Upload tags to GitHub so they're remote-backed too
09

GH // GITHUB CLI

Setup

brew install gh
Install GitHub CLI on macOS via Homebrew
gh auth login
First-time setup — browser-based OAuth
gh auth status
Show which GitHub account you're signed in as

Repos

gh repo view --web
Open the current repo in your browser
gh repo clone brand-mind-ai/claude-code
Clone a repo by shorthand
gh repo list
List your repos

Issues

gh issue list
List open issues in current repo
gh issue create
Create a new issue (interactive)
gh issue view 42 --web
Open issue #42 in browser

Pull requests (if ever needed)

gh pr list
List open pull requests
gh pr view --web
Open the current branch's PR in browser
gh pr checks
CI status for the current branch

Actions / deploys

gh run list
Recent GitHub Actions runs
gh run watch
Live-tail an in-progress Actions run
gh release create v1.0
Create a release from a tag
10

NPM // NODE & ASTRO

Versions

node --version
Check installed Node version (Astro needs 18.20.8+)
npm --version
Check npm version

Dependencies

npm install
Install everything in package.json (run once after clone)
npm install <pkg>
Add a production dependency
npm install -D <pkg>
Add a dev-only dependency
npm uninstall <pkg>
Remove a dependency
npm outdated
Show which deps have newer versions available
npm audit
Security report for installed packages
npm audit fix
Auto-fix vulnerabilities where safe

Astro project scripts

npm run dev
Start local dev server (default http://localhost:4321)
npm run build
Build production bundle to dist/
npm run preview
Preview the built bundle locally before deploy
npm run typecheck
Run TypeScript type checking (must pass with 0 errors)
npm run lint
Run the linter on source files

One-off tools

npx <pkg>
Run any npm package once without installing it permanently
npx astro check
Astro's full check (types + content schema)
11

WRANGLER // CLOUDFLARE

Setup

npm install -g wrangler
Install Cloudflare CLI globally
wrangler --version
Check installed version
wrangler login
OAuth flow to connect your Cloudflare account
wrangler whoami
Confirm which account you're connected to

Pages projects

wrangler pages project list
List your Cloudflare Pages projects
wrangler pages project create
Create a new Pages project (interactive)
wrangler pages deploy dist --project-name=zacisze
Manual deploy of the built site to a project
wrangler pages dev dist
Local preview that matches Cloudflare's edge environment
wrangler pages download config
Pull project config (build settings, env vars) to local file

Logs & diagnostics

wrangler pages deployment list --project-name=zacisze
List recent deployments for a project
wrangler tail <project>
Live-tail logs from a Pages project

Normal flow on this project: push to GitHub main → Cloudflare Pages auto-deploys. Wrangler is for manual previews, emergency redeploys, and reading logs when something breaks at the edge.

12

WORKFLOW // DAILY RHYTHM

A safe, repeatable session loop. Memorize it and you'll never end a day wondering what state the project is in.

  1. cd "/Users/macbookpro/Documents/Claude/Projects/Claude Code/zaciszeturawa-pl"  — land in the project root
  2. git status  — confirm clean tree, on main
  3. git pull  — sync with GitHub before any work
  4. claude --rc "Zacisze"  — start the session
  5. ...do work, ask Claude to show diffs as it goes...
  6. /recap  — ask Claude what got done before exiting
  7. /exit  — end the Claude session
  8. git status && git diff  — eyeball every change yourself
  9. git add -A && git commit -m "clear message"  — commit the batch
  10. git push origin main  — ship to GitHub (Cloudflare auto-deploys)
  11. git tag stable-YYYY-MM-DD-milestone  — if a real milestone, tag it
  12. cd "../../Claude Backups/Zacisze Mirror" && git pull  — refresh hot mirror