u-claw: Instructions file for Claude Code

CLAUDE.md

u-claw CLAUDE.md is an instructions file for Claude Code from dongsheng123132/u-claw. It costs 3,966 tokens per session, scanned C, original, MIT.

Project instructions for working on dongsheng123132/u-claw, a portable USB distribution of Node.js and OpenClaw. They explain the repository structure, setup process, and supported distribution formats.

In plain words
What is it for?
Use them when developing, building, packaging, or copying the portable, bootable Linux, or one-line-install versions of u-claw.
Why use it?
They prevent confusion about what belongs in the repository and what setup.sh adds later, including which versions are published by continuous integration.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code; built for openclaw.

This is dongsheng123132/u-claw's own configuration. It tells Claude Code how to work on u-claw itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything u-claw configures →

About the project

U-Claw is a portable AI workspace that places an OpenClaw assistant, its configuration, memory, sessions, and tools on a USB drive. Users set it up on supported computers and carry the workspace between them, configuring a model with their own API key. The catalogue contains skills and instructions related to using or preparing this portable setup.

dongsheng123132/u-claw · 1,747 stars · on GitHub · u-claw.org

Reuse

Borrowing it

Nothing to install: this file belongs to dongsheng123132/u-claw. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dongsheng123132/u-claw/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/dongsheng123132/u-claw

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for u-claw CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dongsheng123132/u-claw/claude-md/github.svg)](https://agentmods.dev/instructions/dongsheng123132/u-claw/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/dongsheng123132/u-claw/claude-md"><img src="https://agentmods.dev/badge/instructions/dongsheng123132/u-claw/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for u-claw CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dongsheng123132/u-claw/claude-md"><img src="https://agentmods.dev/badge/instructions/dongsheng123132/u-claw/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,966 This file is loaded in full into every session.
When invoked 3,966 The same file — it is already loaded in full.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.03966 $0.03966
Opus 5 $0.01983 $0.01983
Sonnet 5 $0.00793 $0.00793
Haiku 4.5 $0.00397 $0.00397

Measured 8d ago against content hash c3cc43294a28, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade C, and why

u-claw CLAUDE.md scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

3. **One-line install** (`install/`): `curl | bash` or `irm | iex` — download and install from network, no USB needed. User-run scripts (not in CI).

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

3. **One-line install** (`install/`): `curl | bash` or `irm | iex` — download and install from network, no USB needed. User-run scripts (not in CI).
CLAUDE.md · 202 lines

How it starts

The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview — CRITICAL MENTAL MODEL

This repo IS the USB drive content, minus large dependencies. The relationship:

代码库(git)= U 盘骨架(脚本 + HTML + 小文件)
     ↓ bash setup.sh
完整文件夹 = U 盘内容(骨架 + Node.js + OpenClaw)
     ↓ 拷贝到 U 盘
U 盘 = 插上就能用

The repo is NOT a "build tool" or "generator" — it IS the USB structure. setup.sh only fills in large deps that can't go in git. After setup.sh, the portable/ folder is directly copyable to a USB drive.

Distribution forms:

  1. Portable USB (portable/): Run from USB on existing Mac/Windows, zero install. This is the only form CI publishes (Windows full zip; Mac runs setup.sh on first launch).
  2. Bootable Linux USB (bootable/): Ventoy + Ubuntu 24.04 — boots any x86_64 PC from USB, no OS needed. Independent module, user-run scripts (not in CI).
  3. One-line install (install/): curl | bash or irm | iex — download and install from network, no USB needed. User-run scripts (not in CI).

Deprecated (2026-06-19): Electron desktop app (u-claw-app/, DMG/EXE) is no longer built or published — it was a weaker duplicate of the commercial ClawX desktop and had cold-start gateway-timeout bugs. Code is kept for archive only; see u-claw-app/DEPRECATED.md. The desktop-windows/desktop-mac CI jobs were removed from release.yml.

Removed: usb-release/ — an abandoned older predecessor of portable/ (last touched 2026-04, core/+skills/ layout, referenced nowhere). Deleted 2026-06-19.

Development Commands

# Portable version — build dev copy
cd portable && bash setup.sh    # Downloads Node.js v22 + OpenClaw + WeChat/QQ plugin to app/
bash Mac-Start.command          # Launch (Mac ARM64). Windows: Windows-Start.bat

# Copy to USB drive
cp -R portable/ /Volumes/YOUR_USB/U-Claw/

# Electron desktop app
cd u-claw-app && bash setup.sh  # One-click: Node.js + Electron + deps (China mirrors)
npm run dev                     # Dev mode
npm run build:mac-arm64         # Build Mac ARM64 DMG
npm run build:win               # Build Windows NSIS + portable

# Bootable Linux USB (run on Windows PowerShell as Admin)
cd bootable
.\1-prepare-usb.ps1             # Write Ventoy to USB (formats drive!)
.\2-download-iso.ps1            # Download Ubuntu ISO (~5.8GB, China mirrors)
.\3-create-persistence.ps1      # Create 20GB ext4 persistence image
.\4-copy-to-usb.ps1             # Copy ISO + persistence + scripts to USB

Read the full file on GitHub · 202 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago Changed · +1 lines · +31 tokens per session c3cc43294a28
  2. 11d ago First seen · 201 lines · 3,935 tokens per session scan C 730190b1c74d

Subscribe to this mod's changes

u-claw CLAUDE.md is an instructions file published in the GitHub repository dongsheng123132/u-claw (1,747 stars, last pushed 3d ago), licensed MIT. It adds 3,966 tokens to every session, about $0.0198 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens