Back to libraryfleet
Claude Code CLI
Fleet skill: Claude Code CLI — software inventory and operations reference
by skynetv1.0.0
software-claude-codefleetfleetsoftware
0
Total Uses
0
Successes
0%
Success Rate
Compatible Agents
claude-codecodexgeminikimi
Instruction
---
name: software-claude-code
description: Expert guidance for managing and utilizing the Anthropic Claude Code CLI across the skynet fleet. Use this skill when deploying, configuring, or troubleshooting Claude Code, or when orchestrating agentic workflows that involve the `claude` command.
metadata:
author: skynet
version: 1.0.0
---
# Claude Code CLI
Claude Code is Anthropic's agentic CLI tool designed for autonomous software engineering. This guide provides fleet-wide context, configuration standards, and operational patterns for James's (skynet) environment.
## Fleet Installation Status
Claude Code is deployed on primary interactive and agent-hosting nodes. It is explicitly **not** installed on production servers or air-gapped vaults.
| Machine | Status | Version | Role |
|---------|--------|---------|------|
| **Dev Workstation** | Installed | 2.1.89 | Primary dev environment |
| **Mac Mini (Bots)** | Installed | 2.1.62 | AI agent hosting & background tasks |
| **Mac Mini (Jarvis)** | Installed | 2.1.74 | Personal assistant integration |
| **DGX Spark** | Not Installed | N/A | Dedicated to local inference/GPU |
| **Dev Server** | Not Installed | N/A | Preview hosting only |
| **Vault** | Not Installed | N/A | Credential isolation |
## Core Commands
The `claude` binary supports both interactive and scripted modes.
### Interactive Mode
```bash
# Start an interactive session in the current directory
claude
# Start with a specific initial prompt
claude "Refactor the authentication logic in src/auth.ts"
```
### Scripting & Automation (Non-Interactive)
When calling Claude Code from other scripts or agents, use the `-p` (print) flag to prevent the CLI from hanging on interactive UI elements.
```bash
# Run a one-off command and exit
claude -p "Explain the current project structure"
# Limit the number of agent turns to prevent infinite loops/cost overruns
claude --max-turns 10 "Fix all lint errors in the current directory"
# Restrict available tools for security or focus
claude --allowedTools "read_file,ls,grep_search" "Audit dependencies"
```
## Configuration & Auth
### Auth Tokens
Claude Code stores session tokens and preferences in the user's home directory.
- **Path:** `~/.claude/`
- **Key Files:**
- `~/.claude/auth.json`: Contains session tokens (DO NOT COMMIT).
- `~/.claude/settings.json`: Main configuration file.
### Settings (`~/.claude/settings.json`)
Use this file to define global behavior, hooks, and tool permissions.
```json
{
"autoApprove": {
"read_file": true,
"ls": true,
"grep_search": true
},
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/skynet/dev"]
}
},
"theme": "dark",
"historyLimit": 50
}
```
## Model Context Protocol (MCP)
Claude Code is a native MCP host. It can be extended with specialized tools via `settings.json`.
- **Internal Filesystem:** Always ensure the filesystem MCP is configured to allow access to `~/dev` and `~/infra`.
- **Fleet Management:** Custom MCP servers can be added to allow Claude Code to SSH into other machines (e.g., Spark or Server) to run commands or check logs.
## Common Workflows
### 1. Project Initialization
When starting a new project, use Claude Code to generate the initial boilerplate and `GEMINI.md` or `INFRASTRUCTURE.md` files.
```bash
claude "Initialize a FastAPI project with Docker support and create an INFRASTRUCTURE.md"
```
### 2. Fleet-Wide Updates
To update Claude Code across the fleet (on supported machines):
```bash
# On Workstation, Bots, and Jarvis
npm install -g @anthropic-ai/claude-code
```
### 3. Automated Refactoring
Use the `--max-turns` flag to ensure complex refactors don't spin indefinitely.
```bash
claude -p --max-turns 20 "Migrate all React class components to functional components in src/"
```
## Troubleshooting
- **Auth Failures:** If `claude` reports "Unauthorized," run `claude logout` followed by `claude login`. Ensure the browser can open on the target machine or use the link provided in the terminal.
- **Permission Denied:** Claude Code respects `.gitignore`. If it cannot see a file, check if it is ignored. You may need to use `--no-ignore` if the command supports it, or temporarily modify `.gitignore`.
- **Hanging Processes:** In non-interactive environments, always use `-p`. If a process hangs, check for an accidental interactive prompt (e.g., git commit message without `-m`).
- **Resource Exhaustion:** On the Mac Mini (Bots), monitor memory usage if running multiple `claude` instances, as the Node.js runtime can be heavy during large codebase indexing.
## Fleet-Specific Patterns
### Cross-Machine Orchestration
Since Claude Code is not on Spark, if a task requires GPU inference debugging:
1. Run `claude` on **Workstation**.
2. Instruct it to `ssh spark` to inspect logs or run `nvidia-smi`.
3. Use the output to adjust code on the **Workstation**.
### Integration with Gemini CLI
Gemini CLI (this agent) should be used for high-level orchestration, while Claude Code can be delegated to for deep, file-intensive surgical edits within a single repository.
- **Use Gemini CLI for:** Fleet management, multi-machine SSH tasks, and high-level strategy.
- **Use Claude Code for:** Deep code understanding, complex refactoring within a repo, and interactive debugging.
## References
- **Docs:** https://docs.anthropic.com/en/docs/claude-code
- **MCP Registry:** https://github.com/modelcontextprotocol/servers
- **Skynet Global Config:** `~/.gemini/GEMINI.md`
Install
curl -s https://skills.skynet.ceo/api/skills/software-claude-code/skill.md