init-onecli — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited init-onecli (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill installs OneCLI, configures the Agent Vault gateway, and migrates any existing .env credentials into it. Run this after /update-nanoclaw introduces OneCLI as a breaking change, or any time OneCLI needs to be set up from scratch.
Principle: When something is broken or missing, fix it. Don't tell the user to go fix it themselves unless it genuinely requires their manual action (e.g. pasting a token).
onecli version 2>/dev/nullIf the command succeeds, OneCLI is installed, check for an Anthropic secret:
onecli secrets listIf an Anthropic secret exists, tell the user OneCLI is already configured and working. Use AskUserQuestion:
If they choose to keep, skip to Phase 5 (Verify). If they choose to reconfigure, continue.
grep "credential-proxy" src/index.ts 2>/dev/nullIf startCredentialProxy is imported, the native credential proxy skill is active. Tell the user: "You're currently using the native credential proxy (.env-based). This skill will switch you to OneCLI's Agent Vault, which adds per-agent policies and rate limits. Your .env credentials will be migrated to the vault."
Use AskUserQuestion:
If they cancel, stop.
grep "@onecli-sh/sdk" package.jsonIf @onecli-sh/sdk is NOT in package.json, the codebase hasn't been updated to use OneCLI yet. Tell the user to run /update-nanoclaw first to get the OneCLI integration, then retry /init-onecli. Stop here.
curl -fsSL onecli.sh/install | sh
curl -fsSL onecli.sh/cli/install | shVerify: onecli version
If the command is not found, the CLI was likely installed to ~/.local/bin/. Add it to PATH:
export PATH="$HOME/.local/bin:$PATH"
grep -q '.local/bin' ~/.bashrc 2>/dev/null || echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
grep -q '.local/bin' ~/.zshrc 2>/dev/null || echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrcRe-verify with onecli version.
Point the CLI at the local OneCLI instance, the ONECLI_URL was output from the install script above:
onecli config set api-host ${ONECLI_URL}grep -q 'ONECLI_URL' .env 2>/dev/null || echo 'ONECLI_URL=${ONECLI_URL}' >> .envThe gateway may take a moment to start after installation. Poll for up to 15 seconds:
for i in $(seq 1 15); do
curl -sf ${ONECLI_URL}/health && break
sleep 1
doneIf it never becomes healthy, check the gateway containers. The gateway is a Docker Compose stack (project onecli, compose file at ~/.onecli/docker-compose.yml). Inspect it through Docker rather than the host process list:
docker ps -a --filter "label=com.docker.compose.project=onecli" --format '{{.Names}}\t{{.Status}}'Both services have restart: unless-stopped, so they come back automatically once the Docker daemon is up. If Docker isn't running, start it (open -a Docker on macOS) and they'll restart on their own. To bring the stack up manually: docker compose -f ~/.onecli/docker-compose.yml up -d. If that fails, show the error and stop — the user needs to debug their OneCLI installation.
Read the .env file and look for these credential variables:
| .env variable | OneCLI secret type | Host pattern |
|---|---|---|
ANTHROPIC_API_KEY | anthropic | api.anthropic.com |
CLAUDE_CODE_OAUTH_TOKEN | anthropic | api.anthropic.com |
ANTHROPIC_AUTH_TOKEN | anthropic | api.anthropic.com |
Read .env:
cat .envParse the file for any of the credential variables listed above.
For each credential found, migrate it to OneCLI:
Anthropic API key (ANTHROPIC_API_KEY=sk-ant-...):
onecli secrets create --name Anthropic --type anthropic --value <key> --host-pattern api.anthropic.comClaude OAuth token (CLAUDE_CODE_OAUTH_TOKEN=... or ANTHROPIC_AUTH_TOKEN=...):
onecli secrets create --name Anthropic --type anthropic --value <token> --host-pattern api.anthropic.comAfter successful migration, remove the credential lines from .env. Use the Edit tool to remove only the credential variable lines (ANTHROPIC_API_KEY, CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_AUTH_TOKEN). Keep all other .env entries intact (e.g. ONECLI_URL, TELEGRAM_BOT_TOKEN, channel tokens).
Verify the secret was registered:
onecli secrets listTell the user: "Migrated your Anthropic credentials from .env to the OneCLI Agent Vault. The raw keys have been removed from .env — they're now managed by OneCLI and will be injected at request time without entering containers."
After handling Anthropic credentials (whether migrated or freshly registered), scan .env again for remaining credential variables that containers use for outbound API calls.
Important: Only migrate credentials that containers use via outbound HTTPS. Channel tokens (TELEGRAM_BOT_TOKEN, SLACK_BOT_TOKEN, SLACK_APP_TOKEN, DISCORD_BOT_TOKEN) are used by the NanoClaw host process to connect to messaging platforms — they must stay in .env.
Known container-facing credentials:
| .env variable | Secret name | Host pattern |
|---|---|---|
OPENAI_API_KEY | OpenAI | api.openai.com |
PARALLEL_API_KEY | Parallel | api.parallel.ai |
If any of these are found with non-empty values, present them to the user:
AskUserQuestion (multiSelect): "These credentials are used by container agents for outbound API calls. Moving them to the vault means agents never see the raw keys, and you can apply rate limits and policies."
For each credential the user selects:
onecli secrets create --name <SecretName> --type api_key --value <value> --host-pattern <host>If there are credential variables not in the table above that look container-facing (i.e. not a channel token), ask the user: "Is <VARIABLE_NAME> used by agents inside containers? If so, what API host does it authenticate against? (e.g., api.example.com)" — then migrate accordingly.
After migration, remove the migrated lines from .env using the Edit tool. Keep channel tokens and any credentials the user chose not to migrate.
Verify all secrets were registered:
onecli secrets listNo migration needed. Proceed to register credentials fresh.
Check if OneCLI already has an Anthropic secret:
onecli secrets listIf an Anthropic secret already exists, skip to Phase 4.
Otherwise, register credentials using the same flow as /setup:
AskUserQuestion: Do you want to use your Claude subscription (Pro/Max) or an Anthropic API key?
claude setup-token in another terminal to get your token."#### Subscription path
Tell the user to run claude setup-token in another terminal and copy the token it outputs. Do NOT collect the token in chat.
Once they have the token, AskUserQuestion with two options:
onecli secrets create --name Anthropic --type anthropic --value YOUR_TOKEN --host-pattern api.anthropic.com"#### API key path
Tell the user to get an API key from https://console.anthropic.com/settings/keys if they don't have one.
AskUserQuestion with two options:
onecli secrets create --name Anthropic --type anthropic --value YOUR_KEY --host-pattern api.anthropic.com"#### After either path
Ask them to let you know when done.
If the user's response happens to contain a token or key (starts with sk-ant- or looks like a token): handle it gracefully — run the onecli secrets create command with that value on their behalf.
After user confirms: verify with onecli secrets list that an Anthropic secret exists. If not, ask again.
pnpm run buildIf build fails, diagnose and fix. Common issue: @onecli-sh/sdk not installed — run pnpm install first.
Restart the service.
Run from your NanoClaw project root:
launchctl kickstart -k gui/$(id -u)/"$(. setup/lib/install-slug.sh && launchd_label)"systemctl --user restart "$(. setup/lib/install-slug.sh && systemd_unit)"bash start-nanoclaw.shCheck logs for successful OneCLI integration:
tail -30 logs/nanoclaw.log | grep -i "onecli\|gateway"Expected: OneCLI gateway config applied messages when containers start.
If the service is running and a channel is configured, tell the user to send a test message to verify the agent responds.
Tell the user:
onecli secrets list, or open ${ONECLI_URL}onecli rules create --helpset-secrets replaces the agent's entire secret list — it never appends. Always read the current list first and merge before calling it. This pattern is canonical across all skills that assign secrets:
AGENT_ID=$(onecli agents list | jq -r '.data[] | select(.identifier=="<agentGroupId>") | .id')
CURRENT=$(onecli agents secrets --id "$AGENT_ID" | jq -r '[.data[]] | join(",")')
MERGED=$(printf '%s' "$CURRENT,<new-secret-id>" | tr ',' '\n' | sort -u | paste -sd ',' -)
onecli agents set-secrets --id "$AGENT_ID" --secret-ids "$MERGED"
onecli agents secrets --id "$AGENT_ID"<agentGroupId> — the agentGroupId field in groups/<folder>/container.json<new-secret-id> — the id from onecli secrets listprintf stepOneCLI's proxy injects credentials proactively — injections_applied=1 appears in docker logs onecli even when git sends no auth header. However, OneCLI sets SSL_CERT_FILE for Node/Python/Deno but not GIT_SSL_CAINFO. Without it, git rejects the OneCLI MITM certificate.
Auth format matters: GitHub's git smart HTTP protocol (github.com) requires Basic auth, not Bearer. GitHub's REST API (api.github.com) accepts Bearer. These must be configured as separate secrets with different formats — see /add-github for the full setup.
If an agent uses git or gh, add to data/v2-sessions/<agent-group-id>/.claude-shared/settings.json:
"GIT_SSL_CAINFO": "/tmp/onecli-combined-ca.pem",
"GIT_TERMINAL_PROMPT": "0",
"GIT_CONFIG_COUNT": "1",
"GIT_CONFIG_KEY_0": "credential.helper",
"GIT_CONFIG_VALUE_0": "",
"GH_TOKEN": "ghp_onecli_proxy_replaces_this"Debugging injection: docker logs onecli 2>&1 | grep "github.com" shows every request with injections_applied=N and the HTTP status. If injections_applied=1 but status is still 401, the injected credential value is wrong or uses the wrong auth format for that endpoint.
"OneCLI gateway not reachable" in logs: The gateway isn't running. Check with curl -sf ${ONECLI_URL}/health. The most common cause is that Docker itself is down (the gateway is a Compose stack) — start Docker (open -a Docker on macOS) and the containers restart automatically. To bring them up manually: docker compose -f ~/.onecli/docker-compose.yml up -d.
Container gets no credentials: Verify ONECLI_URL is set in .env and the gateway has an Anthropic secret (onecli secrets list).
Old .env credentials still present: This skill should have removed them. Double-check .env for ANTHROPIC_API_KEY, CLAUDE_CODE_OAUTH_TOKEN, or ANTHROPIC_AUTH_TOKEN and remove them manually if still present.
Port 10254 already in use: Another OneCLI instance may be running. Check with lsof -i :10254 and kill the old process, or configure a different port.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.