openclaude-portable
```markdown
What this skill does
```markdown
---
name: openclaude-portable
description: Run Claude Code and other AI coding agents from a USB drive or any folder with zero installation required
triggers:
- "set up openclaude portable"
- "run claude code from USB"
- "portable AI coding agent"
- "openclaude no install"
- "configure openclaude provider"
- "openclaude ollama offline mode"
- "openclaude dashboard setup"
- "use openclaude on any PC"
---
# OpenClaude Portable
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
OpenClaude Portable bundles a self-contained Node.js runtime, the OpenClaude AI coding engine, a system-prompt proxy for local models, and a web dashboard — all inside a single folder. Plug a USB drive into any Windows, Linux, or macOS machine and launch a full AI coding agent with no installation.
---
## Installation
### Option 1 — Clone to USB or any folder
```bash
git clone https://github.com/techjarves/OpenClaude-Portable
cd OpenClaude-Portable
```
### Option 2 — Download ZIP
Download and extract from GitHub, then navigate into the folder.
### First Launch (downloads Node.js ~25 MB and engine ~5 MB automatically)
**Windows:**
```bat
.\START.bat
```
**Linux / macOS:**
```bash
chmod +x start.sh
./start.sh
```
First-time setup requires internet. All downloads go into `engine/` and `data/` — nothing touches the host machine.
---
## Project Structure
```
OpenClaude-Portable/
├── START.bat # Windows entry point
├── start.sh # Linux/macOS entry point
├── RESUME.bat # Resume a session by ID (Windows)
│
├── data/ # ALL persistent data lives here
│ ├── ai_settings.env # Active provider, model, API key
│ ├── openclaude/ # Session history and agent memory
│ ├── ollama/ # Local Ollama binary and models
│ └── proxy.log # Speed proxy log (silent)
│
├── engine/ # Bundled Node.js + OpenClaude package
│ ├── node-win-x64/
│ └── node_modules/@gitlawb/openclaude/
│
├── tools/
│ ├── local-proxy.js # System-prompt trimming proxy
│ ├── Change_Provider.bat / change_provider.sh
│ ├── Open_Dashboard.bat / open_dashboard.sh
│ └── Setup_Local_Models.bat / setup_local_models.sh
│
└── dashboard/
├── server.mjs
└── index.html
```
---
## Main Menu
Running `START.bat` or `start.sh` presents:
```
1) Launch AI — Normal Mode (asks before writing files or running commands)
2) Limitless Mode — Auto-executes (fully autonomous, no approval prompts)
3) Open Dashboard — Web UI at http://localhost:3000
4) Change Provider — Switch model or API key
5) Setup Offline — Download local Ollama models
```
Auto-selects **Normal Mode** after 10 seconds if no key is pressed.
---
## Configuring an AI Provider
Provider settings are stored in `data/ai_settings.env`. You can edit this file directly or run the interactive switcher:
**Windows:**
```bat
.\tools\Change_Provider.bat
```
**Linux / macOS:**
```bash
./tools/change_provider.sh
```
### `data/ai_settings.env` format
```env
PROVIDER=openrouter
MODEL=openai/gpt-4o
API_KEY=$OPENROUTER_API_KEY
```
Supported `PROVIDER` values and where to get keys:
| Provider | PROVIDER value | Key source |
|---|---|---|
| NVIDIA NIM | `nvidia` | build.nvidia.com |
| DeepSeek | `deepseek` | platform.deepseek.com |
| OpenRouter | `openrouter` | openrouter.ai |
| Google Gemini | `gemini` | aistudio.google.com |
| Anthropic Claude | `anthropic` | console.anthropic.com |
| OpenAI | `openai` | platform.openai.com |
| Ollama (offline) | `ollama` | No key needed |
**Never hard-code API keys.** Reference environment variables or let the interactive setup write `data/ai_settings.env` for you. The file lives only on your drive and is not tracked by git if you add it to `.gitignore`.
---
## Session Management
### Resume an interrupted session (Windows)
```bat
.\RESUME.bat <session-id>
```
Session IDs are stored in `data/openclaude/`. List available sessions:
```bat
dir data\openclaude
```
**Linux / macOS equivalent:**
```bash
ls data/openclaude/
openclaude --resume <session-id>
```
---
## Web Dashboard
The dashboard provides a ChatGPT-style UI with agent mode, tool cards, and thinking visualisation.
**Launch:**
```bat
.\tools\Open_Dashboard.bat # Windows
./tools/open_dashboard.sh # Linux/macOS
```
Then open **http://localhost:3000** in any browser.
The dashboard server (`dashboard/server.mjs`) uses the same `data/ai_settings.env` as the CLI — no separate configuration needed.
---
## Offline Mode with Ollama
### Download a local model
**Windows:**
```bat
.\tools\Setup_Local_Models.bat
```
**Linux / macOS:**
```bash
./tools/setup_local_models.sh
```
### Recommended models for CPU inference
| Model | Size | Speed |
|---|---|---|
| `gemma3:1b` | ~800 MB | Fastest |
| `qwen2.5:1.5b` | ~1 GB | Fast |
| `phi3:mini` | ~2.3 GB | Moderate |
Models download into `data/ollama/` — everything stays on the drive.
### Speed proxy for local models
`tools/local-proxy.js` intercepts every Ollama request and trims the OpenClaude system prompt from ~10 000 tokens to ~300 tokens before forwarding. This drops first-token latency from 60–120 s to 5–20 s on CPU-only hardware.
The proxy runs silently in the background and logs to `data/proxy.log`. It binds to port **11435** (not the default Ollama port 11434).
To inspect proxy activity:
```bash
# Linux/macOS
tail -f data/proxy.log
# Windows PowerShell
Get-Content data\proxy.log -Wait
```
If you need to run the proxy manually:
```bash
node tools/local-proxy.js
```
---
## Environment Variables Set at Runtime
OpenClaude Portable redirects all config paths into `data/` so nothing touches the host:
```
XDG_CONFIG_HOME → <drive>/data
XDG_DATA_HOME → <drive>/data
CLAUDE_CONFIG_DIR → <drive>/data
```
These are set inside `START.bat` / `start.sh` — you do not need to set them manually.
---
## Real Code Examples
### Custom wrapper script (Linux/macOS) — launch with a specific provider
```bash
#!/usr/bin/env bash
# launch-with-gemini.sh — override provider for a single session
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
export XDG_CONFIG_HOME="$SCRIPT_DIR/data"
export XDG_DATA_HOME="$SCRIPT_DIR/data"
export CLAUDE_CONFIG_DIR="$SCRIPT_DIR/data"
# Temporarily override provider
cat > "$SCRIPT_DIR/data/ai_settings.env" <<EOF
PROVIDER=gemini
MODEL=gemini-2.0-flash
API_KEY=$GEMINI_API_KEY
EOF
NODE="$SCRIPT_DIR/engine/node-linux-x64/bin/node"
OPENCLAUDE="$SCRIPT_DIR/engine/node_modules/@gitlawb/openclaude/dist/cli.mjs"
"$NODE" "$OPENCLAUDE" "$@"
```
### Read current provider settings in a script
```bash
#!/usr/bin/env bash
# print-provider.sh
source ./data/ai_settings.env
echo "Provider : $PROVIDER"
echo "Model : $MODEL"
# Do NOT echo API_KEY
```
### PowerShell — list and resume sessions
```powershell
# list-sessions.ps1
$sessions = Get-ChildItem -Path ".\data\openclaude" -Directory
foreach ($s in $sessions) {
Write-Host $s.Name
}
# Resume the most recent session
$latest = $sessions | Sort-Object LastWriteTime -Descending | Select-Object -First 1
if ($latest) {
Write-Host "Resuming $($latest.Name)"
.\RESUME.bat $latest.Name
}
```
### Check proxy is running (Node.js)
```javascript
// check-proxy.js — run with bundled Node
import http from 'http';
const req = http.request(
{ hostname: 'localhost', port: 11435, path: '/health', method: 'GET' },
(res) => {
console.log(`Proxy status: ${res.statusCode}`);
}
);
req.on('error', () => console.log('Proxy not running'));
req.end();
```
Run it:
```bash
./engine/node-linux-x64/bin/node check-proxy.js
```
### Dashboard server — add a custom API route
```javascript
// dashboard/server.mjs (extend with your own endpoint)
import express from 'express';
import { readFileSync } from 'fs';
import { fileURLToPath } from 'url';
import path from 'path';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const app = express();
app.usRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.