| name | claude-code-tips-productivity |
| description | Master Claude Code with 45 expert tips covering voice input, context management, workflows, custom status lines, container usage, and advanced automation techniques |
| triggers | ["how do I use Claude Code more effectively","what are best practices for Claude Code","show me Claude Code tips and tricks","how to optimize my Claude Code workflow","help me set up voice input for Claude","how do I manage context in Claude Code","teach me advanced Claude Code techniques","what are essential Claude Code slash commands"] |
Claude Code Tips & Productivity
Skill by ara.so — Claude Code Skills collection.
This skill provides expertise in using Claude Code effectively, based on the comprehensive tips collection from ykdojo/claude-code-tips. It covers everything from basic slash commands to advanced workflows including custom status lines, voice input, context management, container usage, and multi-agent automation.
Core Concepts
Essential Slash Commands
The most important built-in commands:
/usage - Check rate limits and token usage
/chrome - Toggle native browser integration
/mcp - Manage Model Context Protocol servers
/stats - View usage statistics with activity graph
/clear - Clear conversation and start fresh
To see all available commands, type / in the chat.
Context Management Philosophy
"AI context is like milk; it's best served fresh and condensed!"
Key principles:
- Proactively compact context before it becomes bloated
- Break down large problems into smaller conversations
- Use Git and worktrees to isolate work
- Clone/fork conversations for parallel experimentation
Custom Status Line Setup
Create a custom status bar showing model, directory, git branch, uncommitted files, and token usage.
Installation:
curl -o ~/.claude-status.sh https://raw.githubusercontent.com/ykdojo/claude-code-tips/main/scripts/context-bar.sh
chmod +x ~/.claude-status.sh
echo 'status_line_command: "~/.claude-status.sh"' >> CLAUDE.md
Configuration (in script):
COLOR_THEME="orange"
SHOW_MODEL=true
SHOW_DIRECTORY=true
SHOW_GIT_BRANCH=true
SHOW_TOKEN_USAGE=true
Example output:
Opus 4.5 | 📁project-name | 🔀main (2 uncommitted, synced 12m ago) | ██░░░░░░░░ 18% of 200k tokens
💬 Last message preview...
Voice Input Integration
Voice input dramatically increases communication speed with Claude Code.
Local Voice Transcription Options
macOS:
Setup Example (Super Voice Assistant):
git clone https://github.com/ykdojo/super-voice-assistant
cd super-voice-assistant
pip install -r requirements.txt
{
"model": "parakeet-v3",
"hotkey": "cmd+shift+space",
"output_method": "clipboard"
}
python main.py
Best Practices:
- Claude understands mistranscribed words from context
- Use earphones/EarPods for quiet whispering in offices
- Works even in noisy environments (planes, cafes)
- Built-in voice mode also available in recent Claude Code versions
Context Optimization Techniques
Proactive Context Compaction
Breaking Down Large Problems
User: "Build a full-stack app with auth, payments, and notifications"
Better approach:
1. "Set up project structure and auth system"
2. "Integrate payment processing" (new conversation)
3. "Add notification system" (new conversation)
Git Worktrees for Parallel Work
git worktree add ../feature-branch feature-branch
git worktree add ../bugfix bugfix
Terminal & Git Workflow
Recommended Aliases
alias c='claude'
alias cwd='pwd | pbcopy'
alias gst='git status'
alias glog='git log --oneline --graph --all'
alias cc='claude --prompt "Continue where we left off"'
Git Integration Best Practices
git checkout -b feature/new-task
gh pr create --title "Feature: ..." --body "..."
gh pr review --approve
Getting Terminal Output
npm test 2>&1 | pbcopy
npm run build > build-output.txt 2>&1
Container Usage for Risky Tasks
Run Claude Code itself in a container for isolated, long-running, or risky operations.
# Dockerfile
FROM node:18-slim
RUN apt-get update && apt-get install -y git curl
# Install Claude Code
RUN npm install -g @anthropic-ai/claude-code
# Set up workspace
WORKDIR /workspace
CMD ["claude"]
docker build -t claude-sandbox .
docker run -it \
-v $(pwd):/workspace \
-v ~/.gitconfig:/root/.gitconfig:ro \
-e ANTHROPIC_API_KEY \
claude-sandbox
docker run -d --name claude-worker \
-v $(pwd):/workspace \
claude-sandbox
docker logs -f claude-worker
Using Gemini CLI as Fallback
When Claude Code can't access certain sites or APIs, use Gemini CLI as a "minion."
npm install -g @google/generative-ai-cli
export GOOGLE_API_KEY=your_key_here
gemini "Search for latest React documentation on hooks" > gemini-output.txt
Advanced Workflow Patterns
Multi-Agent Workflows
claude --session main
claude --session tests
claude --session docs
Clone/Fork Conversations
# In active conversation, ask:
"Clone this conversation so I can experiment with approach B"
# Or use conversation history:
# 1. Open conversation list
# 2. Right-click conversation
# 3. Select "Fork from here"
Background Tasks
nohup npm run build > build.log 2>&1 &
BUILD_PID=$!
tail -f build.log
CLAUDE.md vs Skills vs Plugins
CLAUDE.md (Project-level instructions):
# Project: MyApp
## Code Style
- Use TypeScript strict mode
- Prefer functional components
- Max line length: 100
## Testing
- Write tests for all new features
- Run `npm test` before committing
## Commands
- `npm run dev` - Start dev server
- `npm run build` - Production build
Skills (Global expertise):
- Installed via MCP or direct import
- Available across all projects
- This file is a Skill!
Plugins (Tool integrations):
claude plugin install dx
{
"plugins": {
"dx": {
"enabled": true,
"shortcuts": {
"test": "npm test",
"lint": "npm run lint"
}
}
}
}
Real-World Code Examples
Interactive PR Review
const { execSync } = require('child_process');
const fs = require('fs');
function preparePRReview(prNumber) {
const prData = execSync(`gh pr view ${prNumber} --json title,body,files`);
const pr = JSON.parse(prData);
const diff = execSync(`gh pr diff ${prNumber}`).toString();
const context = {
title: pr.title,
description: pr.body,
files: pr.files.map(f => f.path),
diff: diff
};
fs.writeFileSync('pr-context.json', JSON.stringify(context, null, 2));
console.log('PR context saved to pr-context.json');
console.log('\nTell Claude: "Review @pr-context.json for code quality, bugs, and improvements"');
}
(process.[]);
Audit Approved Commands
#!/bin/bash
HISTORY_FILE="$HOME/.claude/command-history.log"
echo "Recent approved commands:"
tail -n 50 "$HISTORY_FILE" | while read -r cmd; do
echo " $cmd"
done
echo -e "\nMost common commands:"
sort "$HISTORY_FILE" | uniq -c | sort -rn | head -10
echo -e "\nRisky patterns to review:"
grep -E "(rm -rf|sudo|curl.*sh|eval)" "$HISTORY_FILE" || echo " None found"
Test-Driven Development Pattern
describe('User Authentication', () => {
test('should hash password before saving', async () => {
const user = await User.create({
email: 'test@example.com',
password: 'plaintext123'
});
expect(user.password).not.toBe('plaintext123');
expect(user.password).toMatch(/^\$2[ayb]\$.{56}$/);
});
});
Troubleshooting
Rate Limit Issues
claude /usage
{
"apiKeys": [
{"key": "${ANTHROPIC_KEY_1}", "priority": 1},
{"key": "${ANTHROPIC_KEY_2}", "priority": 2}
]
}
Context Window Full
# Symptoms: Claude says "context window is full"
# Solutions:
1. /clear and summarize: "Summarize our work, then start fresh"
2. Extract key code to files: "Save important functions to utils.js"
3. Use conversation fork: Fork before context fills up
4. Start new specialized conversation for sub-tasks
Commands Not Executing
auto_approve_commands:
- "npm test"
- "git status"
- "ls -la"
command_patterns:
- "npm (test|run|install)"
- "git (status|log|diff)"
Performance Issues
SHOW_GIT_STATUS=false
SHOW_DISK_USAGE=false
node_modules/
.git/
dist/
build/
*.log
Best Practices Summary
- Voice First: Use voice input for 3-5x faster communication
- Context Hygiene: Compact early and often, break down problems
- Git Everything: Use branches, worktrees, and let Claude handle commits
- Test Driven: Write tests first, let Claude implement
- Automate Yourself: Build scripts and workflows that make you faster
- Multi-Agent: Run parallel Claude sessions for complex projects
- Container Isolation: Use Docker for risky or long-running tasks
- Monitor Usage: Keep /usage open in a tab, watch your limits
- Custom Status: Always know your context, branch, and token usage
- Keep Learning: The tool evolves fast, experiment with new features
Quick Setup Script
#!/bin/bash
set -e
echo "Setting up Claude Code optimal workflow..."
curl -o ~/.claude-status.sh https://raw.githubusercontent.com/ykdojo/claude-code-tips/main/scripts/context-bar.sh
chmod +x ~/.claude-status.sh
mkdir -p ~/.claude
cat > ~/CLAUDE.md.template << 'EOF'
status_line_command: "~/.claude-status.sh"
- Follow project's existing patterns
- Write tests for new features
- Keep functions small and focused
## Workflow
- Always use git branches
- Run tests before committing
- Keep context fresh - summarize when needed
EOF
# Add useful aliases
cat >> ~/.bashrc << 'EOF'
# Claude Code aliases
alias c='claude'
alias cwd='pwd | pbcopy'
alias cnew='claude --new'
EOF
# Install dx plugin (if available)
claude plugin install dx 2>/dev/null || echo "dx plugin not available yet"
echo "Setup complete! Restart your terminal or run: source ~/.bashrc"
echo "Copy ~/CLAUDE.md.template to your project directories"
Run with:
curl -s https://raw.githubusercontent.com/ykdojo/claude-code-tips/main/quick-setup.sh | bash