claude-code
Claude Code (Official CLI) - Babata Edition 😈
This skill wraps the @anthropic-ai/claude-code tool. It provides a powerful, agentic coding experience directly in your terminal.
🛠️ Prerequisites & Installation
Based on the official docs (https://code.claude.com/docs):
- Native Install (Recommended):
- macOS/Linux:
curl -fsSL https://claude.ai/install.sh | bash - Windows (PowerShell):
irm https://claude.ai/install.ps1 | iex
- macOS/Linux:
- Authenticate:
Follow the browser flow to connect your Anthropic account.claude login
🚀 Usage Patterns (Optimized for Clawdbot)
Always use pty:true for claude commands to ensure proper interaction and output formatting.
1. One-Shot Agentic Prompt (Recommended)
Use the -p flag for single, non-interactive tasks. This is the primary method for Babata to delegate work.
# General task
bash pty:true workdir:/path/to/project command:"claude -p 'Fix the bug in auth.ts where the token expires too soon'"
# Analysis task
bash pty:true workdir:/path/to/project command:"claude -p 'Read the src/ directory and summarize the architecture'"
2. Sub-Agent Orchestration
Claude Code can spawn multiple agents to work on different parts of a task simultaneously.
bash pty:true command:"claude -p 'Spawn a sub-agent to write tests for the API while I implement the logic'"
3. Git Workflow Automation
Claude Code understands your git history and can automate commits and PRs.
bash pty:true command:"claude -p 'Commit my changes with a descriptive message and push to origin/feature-branch'"
🧠 Memory & Project Context
CLAUDE.md
Create a CLAUDE.md file in your project root to teach Claude about your project's style, build commands, and architecture. This is mandatory for any complex project.
# CLAUDE.md
- Build: `npm run build`
- Test: `npm test`
- Guidelines: Use TypeScript, functional components, and Tailwind.
- Memory: The MT5 bot requires FOK filling mode.
Auto Memory
Claude Code builds "Auto Memory" as it works, saving learnings like build commands and debugging insights across sessions.
🎛️ Key Commands & Flags
| Command / Flag | Description |
|---|---|
claude |
Start interactive session |
claude -p "text" |
Run one-shot prompt (The "Clawdbot Standard") |
/compact |
Reduce context window usage (in session) |
/cost |
Show current session cost (in session) |
/init |
Initialize a new project with CLAUDE.md |
⚠️ Best Practices
- Workdir Matters: Always specify
workdirto the root of the git repository so Claude has full context. - Extended Thinking: For complex logic, Claude Code automatically uses extended thinking.
- Security: Claude Code can run shell commands. Monitor its plan before it executes.
- Updates: Run
npm update -g @anthropic-ai/claude-coderegularly or follow the native install update path.
More from epinvest516-web/openclaw-skills
mt5-trading
Automated trading system management using Python and MetaTrader 5 API. V6.6 Predator Version with Infinite RR, Self-Evolution, and Triple-Resonance.
136trading-research
Research trading strategies from the web, codify them into Python classes, and backtest them against historical data. Uses Brave Search for knowledge and Claude/LLM for logic extraction.
1