use-native-credential-proxy

Injects Anthropic credentials from .env into NanoClaw containers, bypassing the OneCLI gateway.

2|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/RADHA0-max/selfhealbackend --skill use-native-credential-proxy-radha0-max
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-native-credential-proxy
Source: https://github.com/RADHA0-max/selfhealbackend/tree/main/nanoclaw/.claude/skills/use-native-credential-proxy
Command: npx skills add https://github.com/RADHA0-max/selfhealbackend --skill use-native-credential-proxy-radha0-max

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires typescript, vitest.

What problem does it solve? NanoClaw routes all Anthropic API credentials through the OneCLI agent vault with an HTTPS proxy and certificates. Users who prefer simple .env-based credential management need a way to opt out of that gateway and supply their API key or OAuth token directly to the container. ## Core Features & Use Cases - Native .env Credential Injection: Reads ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, or CLAUDE_CODE_OAUTH_TOKEN from .env and threads them into the container as Docker -e environment variables that the Claude Agent SDK reads natively. - Flag-Gated Opt-Out: All logic is gated behind NANOCLAW_NATIVE_CREDENTIALS=true; when unset, the OneCLI gateway path is completely untouched. - Tested Integration: Ships a behavior test driving the real .env read and a wiring test asserting the one-line reach-in exists in buildContainerArgs. - Use Case: A user with a Claude Pro/Max subscription runs claude setup-token, stores the token in .env, and the container agent authenticates directly against the Anthropic API without configuring the OneCLI vault. ## Quick Start Ask the AI to apply the use-native-credential-proxy skill so NanoClaw reads your Anthropic credential from .env instead of the OneCLI gateway, then restart the service.

Frequently Asked Questions about use-native-credential-proxy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use an Anthropic API key from .env instead of the OneCLI gateway?

Set NANOCLAW_NATIVE_CREDENTIALS=true and add ANTHROPIC_API_KEY to your .env file. The skill copies a proxy module into src/ that reads the credential via core's readEnvFile and injects it into the container as Docker -e arguments.

How do I use a Claude Pro or Max subscription token with NanoClaw?

Run claude setup-token in another terminal to mint a token, then add it to .env as CLAUDE_CODE_OAUTH_TOKEN along with NANOCLAW_NATIVE_CREDENTIALS=true. ANTHROPIC_AUTH_TOKEN is also accepted as an alternative variable name.

Does the native credential proxy remove the OneCLI gateway?

No, the skill is additive and does not remove or rewrite the OneCLI gateway. When NANOCLAW_NATIVE_CREDENTIALS is unset, nativeCredentialEnvArgs() returns an empty array and the gateway path works exactly as before.

Why does the container fail with 'no Anthropic credential found in .env'?

This error occurs when NANOCLAW_NATIVE_CREDENTIALS=true is set but none of ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, or CLAUDE_CODE_OAUTH_TOKEN exists in .env. Add one of these credentials and restart the service.

Can I use a custom Anthropic API endpoint with .env credentials?

Yes, add ANTHROPIC_BASE_URL to your .env file and it is forwarded into the container alongside the credential. When absent, requests default to https://api.anthropic.com.

How do I revert to the OneCLI gateway after applying this skill?

Follow REMOVE.md: delete the copied proxy files from src/, remove the import and args.push reach-in from container-runner.ts, strip the NANOCLAW_NATIVE_CREDENTIALS key from .env, then rebuild and restart the service.