- Prerequisites & Setup (5 min)
- What is Claude Code? (5 min)
- Extension Points Overview (5 min)
- Our Implementation (15 min)
- Live Demo (5 min)
- Happy & Remote Access (5 min)
- Q&A (5 min)
Before using our Claude Code setup, install these tools:
# 1. GitHub CLI (for gists, PRs, issues)
brew install gh
gh auth login # Follow prompts to authenticate
# 2. Happy CLI (Claude Code wrapper with web UI)
npm install -g @anthropic-ai/claude-code
npm install -g @anthropic-ai/happy # or via https://happy.engineering
# 3. Gemini CLI (for code reviews)
# Install Google Cloud CLI first: https://cloud.google.com/sdk/docs/install
brew install --cask google-cloud-sdk
# Then install Gemini CLI
gcloud components install gemini
# 4. Go tools (for our Go projects)
brew install go
go install golang.org/x/tools/gopls@latestImportant: Run Gemini once in your source folder to grant permissions and login.
# Navigate to your project
cd ~/src/skydaddy
# Run gemini to trigger login flow
gemini "Hello, confirm you're working"
# This will:
# 1. Open browser for Google OAuth
# 2. Grant Gemini access to your account
# 3. Cache credentials for future useVerify it works:
echo "What is 2+2?" | gemini -m gemini-3-flash-preview -y "test"
# Should output: 4Happy wraps Claude Code with additional features.
# Install Happy
npm install -g @anthropic-ai/happy
# Or download from https://happy.engineering
# First run - will prompt for Anthropic API key
cd ~/src/skydaddy
happy
# Happy stores config in ~/.happy/Verify installation:
which happy
# /usr/local/bin/happy (or similar)
happy --version# Install
brew install gh
# Authenticate (opens browser)
gh auth login
# Verify
gh auth status
# Should show: Logged in to github.com as <username>
# Test it works
gh repo viewRequired for:
- Creating gists (
gh gist create) - PR workflows (
gh pr create) - Issue management (
gh issue)
Anthropic's official CLI for Claude - an agentic coding assistant that:
- Reads and writes files directly
- Runs shell commands
- Uses tools autonomously
- Maintains conversation context
- Works in any terminal (iTerm, tmux, VS Code)
# Run via Happy (recommended)
cd your-project && happy
# Or run Claude Code directly
cd your-project && claudeKey insight: Claude Code is extensible through the .claude/ directory.
Happy is a Claude Code enhancement layer that provides:
| Feature | Description |
|---|---|
| Web UI | Access Claude Code from any browser |
| Session Sync | Continue conversations across devices |
| Mobile Access | Check on long-running tasks from phone |
| Team Sharing | Share sessions with colleagues |
| History | Searchable conversation history |
| Notifications | Get alerts when Claude needs input |
Why use happy instead of claude?
- Same Claude Code underneath
- Adds web dashboard at https://happy.engineering
- Sessions persist even if terminal closes
- Access from laptop, phone, or tablet
# Start a session
happy
# Your session is now accessible at:
# https://happy.engineering/sessions/<session-id>.claude/
├── settings.json # Permissions, hooks config
├── agents/ # Custom sub-agents
├── commands/ # Slash commands (/improvements)
├── skills/ # Complex workflows (/tdd)
├── hooks/ # Shell scripts triggered on events
├── templates/ # Reusable code snippets
└── docs/ # Context documents
Six main extension points:
- Rules (CLAUDE.md)
- Permissions (settings.json)
- Hooks (PreToolUse, PostToolUse, etc.)
- Skills (guided workflows)
- Agents (specialized sub-agents)
- Commands (slash commands)
Project-specific instructions loaded into every session.
# CLAUDE.md (project root)
## Code Style
- Use Go 1.21+ features
- Proto-first API design
- Table-driven tests
## Commands
- `make test` - Run all tests
- `make build` - Build everything
## Architecture
- Services in /internal
- Protos in /protoWhere rules can live:
- Project root:
CLAUDE.md - User level:
~/.claude/CLAUDE.md - Workspace:
.claude/rules/*.md
Control what Claude can and cannot do.
{
"permissions": {
"allow": [
"Bash(make :*)",
"Bash(git :*)",
"Bash(go :*)",
"Write(**/*.go)",
"mcp__linear__*"
],
"deny": [
"Read(.env)",
"Read(**/*.pem)",
"Bash(rm -rf /)",
"Bash(curl :*)"
]
}
}Pattern types:
Bash(pattern)- Shell commandsRead/Write(glob)- File accessmcp__server__*- MCP tool access
Shell scripts triggered at specific lifecycle events.
| Hook | When it runs |
|---|---|
PreToolUse |
Before any tool executes |
PostToolUse |
After tool completes |
PostToolUseFailure |
After tool fails |
UserPromptSubmit |
When user sends message |
Notification |
On any notification |
PermissionRequest |
When permission needed |
Stop |
When Claude stops |
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [{
"type": "command",
"command": ".claude/hooks/build-on-edit.sh",
"timeout": 120
}]
}
],
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [{
"type": "command",
"command": ".claude/hooks/protect-git-clean.sh"
}]
}
]
}
}Hook can:
- Exit 0 → Allow
- Exit 2 → Block with message
- Output feedback to Claude
Multi-step interactive workflows invoked via slash commands.
.claude/skills/
└── tdd/
└── SKILL.md
---
name: tdd
description: Guide TDD cycles for Go projects
---
# TDD Skill
When invoked with `/tdd <feature>`:
1. RED: Write failing test first
2. GREEN: Minimal implementation
3. REFACTOR: Clean up codeSkills are:
- User-invoked (
/tdd,/workflow-optimizer) - Stateful across the conversation
- Can have specific model preferences (Haiku for speed)
Background workers with specific expertise.
.claude/agents/
└── code-simplifier.md
---
name: code-simplifier
description: "Refactor code for readability"
tools: Edit, Write
model: haiku
---
You are an expert code simplification specialist...
- Remove dead code
- Flatten nested conditionals
- Reduce complexityAgents are:
- System-invoked (Claude decides when to use)
- Run as background Task tool
- Can use subset of tools
- Can use cheaper models (Haiku)
Quick actions without full skill complexity.
.claude/commands/
└── improvements.md
---
description: Analyze session and propose improvements
model: haiku
---
Review the session for:
- Code quality improvements
- Workflow efficiency
- Error preventionCommands vs Skills:
- Commands: One-shot analysis
- Skills: Multi-step interactive workflows
.claude/
├── settings.json # 200+ lines of config
├── agents/
│ └── code-simplifier.md # Auto-refactoring
├── commands/
│ └── improvements.md # Session analysis
├── skills/
│ ├── tdd/SKILL.md # Test-Driven Development
│ └── workflow-optimizer/SKILL.md
├── hooks/
│ ├── go-build-check.sh # Auto build/fmt/vet
│ ├── gemini-review.sh # Gemini code reviews
│ ├── protect-git-clean.sh
│ ├── discord-notify.sh # Mobile notifications
│ └── build-on-edit.sh
├── templates/
│ └── null-safety-test.go
└── docs/
└── *.md # Context documents
Allowed (auto-approved):
make, git, go, npm, docker, psql, gemini
Edit, Write for code files
MCP servers: linear, zen, gopls
Denied (blocked):
.env files, secrets, credentials
*.pem, *.key, *_rsa files
curl, wget (no arbitrary downloads)
System directories (/etc, /usr, /bin)
Why this matters:
- Claude runs autonomously for hours
- Can't accidentally leak secrets
- Can't make network requests without approval
# After ANY tool use
make go-fmt # Format code
make go-vet # Static analysis
make go-build # Verify compilation
make go-tidy # Clean dependenciesResult: Code always compiles, never commit broken code.
# Before Bash commands with 'git clean'
# Check for uncommitted changes
# BLOCK with exit 2 if dangerousResult: Can't accidentally delete untracked files.
Every code change gets a second opinion from Gemini.
{
"PostToolUse": [{
"matcher": "Edit|Write",
"hooks": [
{ "command": "go fmt ./..." },
{ "command": "go vet ./..." },
{ "command": "make build" },
{ "command": "go test -short ./internal/..." },
{ "command": "./.claude/gemini-review.sh" } // ← Gemini reviews!
]
}]
}After EVERY Edit/Write:
- Format code
- Run static analysis
- Build to verify compilation
- Run unit tests
- Send diff to Gemini for independent review
Claude writes code. Gemini reviews it. Both must agree.
┌─────────────┐ writes ┌─────────────┐
│ Claude │ ───────────────►│ Code │
│ (Opus 4) │ │ Changes │
└─────────────┘ └──────┬──────┘
│
▼ PostToolUse hook
┌───────────────┐
│ gemini-review │
│ .sh │
└───────┬───────┘
│
▼
┌─────────────┐ reviews ┌─────────────┐
│ Gemini │ ◄──────────────│ Diff │
│ (Flash 3) │ │ Output │
└──────┬──────┘ └─────────────┘
│
▼
Feedback shown to Claude
(bugs, best practices, security)
Why two models?
- Different training data catches different bugs
- Independent verification of logic
- Security vulnerabilities from fresh perspective
gemini-review.sh - what it does:
# Extract unified diff of Go changes
DIFF=$(git diff --unified=3 -- '*.go')
# Send to Gemini with focused prompt
echo "$PROMPT" | gemini -m gemini-3-flash-preview
# Review criteria:
# 1. Potential bugs or logic errors
# 2. Go best practices violations
# 3. Error handling issues
# 4. Security vulnerabilities
# 5. Race conditions
# 6. Nil pointer dereferences
# 7. Testability gapsOutput: Severity-grouped feedback (Critical/High/Medium/Low)
If clean: Returns LGTM (Looks Good To Me)
Not just code - also review design docs:
# gemini-review.sh design
DIFF=$(git diff --unified=3 -- '*.md' 'docs/**')
# Design review focuses on:
# 1. Clarity and completeness
# 2. Technical accuracy
# 3. Missing edge cases
# 4. Consistency with architecture
# 5. Actionability - can this be implemented?When it runs:
- Pre-commit hook (before you commit)
- Post-commit hook (reference for next time)
- Manual:
./scripts/gemini-code-review.sh main..HEAD
Get notified on your phone when Claude needs you.
# discord-notify.sh
# Sends webhook notifications for:
- Permission requests
- Claude stopping
- Questions (AskUserQuestion)
- ErrorsNotification includes:
- Event type with emoji
- Context/message
- Project name
- Muxile link for remote access
Enforces Test-Driven Development discipline.
/tdd implement sweep detection for NY open
Phase 1: RED
- Write failing test first
- Run
make test-unit - Verify it fails for RIGHT reason
Phase 2: GREEN
- Minimal implementation
- Just enough to pass
Phase 3: REFACTOR
- Clean up code
- Keep tests green
Includes: Null safety testing requirements for all public functions.
Analyzes session for efficiency improvements.
Uses Haiku model for fast analysis:
model: claude-haiku-4-5-20251001Identifies:
- Token waste (repeated context)
- Sequential operations that could parallelize
- Verbose confirmations
- Missing template opportunities
Output:
- Efficiency score (0-100)
- Top inefficiencies with token cost
- Quick wins to implement
- Automation opportunities
Auto-triggered after writing complex code.
# Triggers when:
- Nested if-then-else statements
- Large feature implementations
- Complex validation logicActions:
- Remove dead code
- Flatten with early returns
- Extract helper functions
- Simplify boolean logic
Key: Runs on Haiku (cheap, fast) - no approval needed.
-
Start Happy
cd ~/src/skydaddy && happy
-
Show settings.json - permissions, hooks
-
Trigger a hook
Edit a .go file → watch go-build-check + gemini-review run -
Use /tdd skill
/tdd add validation for empty mission name -
Show Discord notification
-
Open Happy web UI - https://happy.engineering
Happy (https://happy.engineering/)
Continue your Claude Code session from anywhere.
| Feature | Benefit |
|---|---|
| Web Dashboard | See all active sessions |
| Session Persistence | Terminal closes? Session continues |
| Mobile Responsive | Check progress from phone |
| Team Sharing | Pair program with colleagues |
| Searchable History | Find past conversations |
| Webhook Integration | Connect to Slack/Discord |
Our commit messages include:
Generated with Claude Code
via Happy
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Happy <[email protected]>
For long-running sessions:
# Start persistent session
tmux new-session -s claude
# Run Happy
happy
# Detach and go mobile
Ctrl+b, dMuxile: Share tmux via QR code
- View session on phone
- Send commands remotely
- No app needed (web-based)
See: .claude/docs/remote-access.md
# 1. GitHub CLI
brew install gh && gh auth login
# 2. Happy (Claude Code wrapper)
npm install -g @anthropic-ai/happy
# 3. Gemini CLI
brew install --cask google-cloud-sdk
gcloud components install gemini
cd ~/src/skydaddy && gemini "test" # Login
# 4. Go tools
brew install go
go install golang.org/x/tools/gopls@latest| Type | Location | Invocation | Use Case |
|---|---|---|---|
| Rules | CLAUDE.md | Auto-loaded | Project conventions |
| Permissions | settings.json | Auto-enforced | Security boundaries |
| Hooks | hooks/*.sh | Event-triggered | Automation, validation, Gemini reviews |
| Skills | skills/*/SKILL.md | /skill-name |
Guided workflows |
| Agents | agents/*.md | Auto by Claude | Specialized tasks |
| Commands | commands/*.md | /command |
Quick analysis |
Claude (Opus) writes → Hook triggers → Gemini (Flash) reviews → Feedback to Claude
Every code change is independently verified by a second AI model.
Claude is fully aware of its extension system.
Just ask Claude to create what you need:
"Add a hook that runs ESLint after every file edit"
"Create a skill for database migrations"
"Write a pre-commit hook that blocks commits without tests"
"Add a permission rule to deny access to production configs"
Claude will:
- Create the hook script in
.claude/hooks/ - Update
settings.jsonwith the hook config - Write the SKILL.md for new skills
- Set up proper permissions
You dream it, Claude implements it.
- Claude Code is extensible - customize to your workflow
- Claude knows its config - ask it to create skills, hooks, rules
- Hooks prevent mistakes - auto-build, protect files
- Dual-model reviews - Claude writes, Gemini reviews (both must agree)
- Skills enforce discipline - TDD, consistent patterns
- Agents save tokens - use Haiku for simple tasks
- Discord + Muxile - stay connected remotely
- Happy - continue from anywhere via web UI
Our .claude/ is version controlled - share improvements!
Resources:
- Claude Code docs: https://docs.anthropic.com/claude-code
- Happy: https://happy.engineering/
- Our config:
.claude/directory
Try it:
cd ~/src/skydaddy && happy
/tdd
/workflow-optimizer
/improvementscd ~/src/skydaddy && happy/tdd <feature> # Test-Driven Development
/workflow-optimizer # Analyze token efficiency
/improvements # Session improvement suggestions
./scripts/gemini-code-review.sh # Review current changes
./scripts/gemini-code-review.sh main..HEAD # Review branch vs mainConfigure in .claude/hooks/discord-notify.sh