본문으로 건너뛰기
cccskills
무료GitHub에 공개

use-native-credential-proxy

Replace OneCLI gateway with the built-in credential proxy. For users who want simple .env-based credential management without installing OneCLI. Reads API key or OAuth token from .env and injects into container API requests.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Use Native Credential Proxy

This skill replaces the OneCLI gateway with NanoClaw's built-in credential proxy. Containers get credentials injected via a local HTTP proxy that reads from .env — no external services needed.

Phase 1: Pre-flight

Check if already applied

Check if src/credential-proxy.ts is imported in src/index.ts:

grep "credential-proxy" src/index.ts

If it shows an import for startCredentialProxy, the native proxy is already active. Skip to Phase 3 (Setup).

Check if OneCLI is active

grep "@onecli-sh/sdk" package.json

If @onecli-sh/sdk appears, OneCLI is the active credential provider. Proceed with Phase 2 to replace it.

If neither check matches, you may be on an older version. Run /update-nanoclaw first, then retry.

Phase 2: Apply Code Changes

Ensure upstream remote

git remote -v

If upstream is missing, add it:

git remote add upstream https://github.com/qwibitai/nanoclaw.git

Merge the skill branch

git fetch upstream skill/native-credential-proxy
git merge upstream/skill/native-credential-proxy || {
  git checkout --theirs package-lock.json
  git add package-lock.json
  git merge --continue
}

This merges in:

  • src/credential-proxy.ts and src/credential-proxy.test.ts (the proxy implementation)
  • Restored credential proxy usage in src/index.ts, src/container-runner.ts, src/container-runtime.ts, src/config.ts
  • Removed @onecli-sh/sdk dependency
  • Restored CREDENTIAL_PROXY_PORT config (default 3001)
  • Restored platform-aware proxy bind address detection
  • Reverted setup skill to .env-based credential instructions

If the merge reports conflicts beyond package-lock.json, resolve them by reading the conflicted files and understanding the intent of both sides.

Update main group CLAUDE.md

Replace the OneCLI auth reference with the native proxy:

In groups/main/CLAUDE.md, replace:

OneCLI manages credentials (including Anthropic auth) — run onecli --help.

with:

The native credential proxy manages credentials (including Anthropic auth) via .env — see src/credential-proxy.ts.

Validate code changes

npm install
npm run build
npx vitest run src/credential-proxy.test.ts src/container-runner.test.ts

All tests must pass and build must be clean before proceeding.

Phase 3: Setup Credentials

AskUserQuestion: Do you want to use your Claude subscription (Pro/Max) or an Anthropic API key?

  1. Claude subscription (Pro/Max) — description: "Uses your existing Claude Pro or Max subscription. You'll run claude setup-token in another terminal to get your token."
  2. Anthropic API key — description: "Pay-per-use API key from console.anthropic.com."

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, add it to .env:

# Add to .env (create file if needed)
echo 'CLAUDE_CODE_OAUTH_TOKEN=<token>' >> .env

Note: ANTHROPIC_AUTH_TOKEN is also supported as a fallback.

API key path

Tell the user to get an API key from https://console.anthropic.com/settings/keys if they don't have one.

Add it to .env:

echo 'ANTHROPIC_API_KEY=<key>' >> .env

After either path

If the user's response happens to contain a token or key (starts with sk-ant- or looks like a token): write it to .env on their behalf using the appropriate variable name.

Optional: If the user needs a custom API endpoint, they can add ANTHROPIC_BASE_URL=<url> to .env (defaults to https://api.anthropic.com).

Phase 4: Verify

  1. Rebuild and restart:
npm run build

Then restart the service:

  • macOS: launchctl kickstart -k gui/$(id -u)/com.nanoclaw
  • Linux: systemctl --user restart nanoclaw
  • WSL/manual: stop and re-run bash start-nanoclaw.sh
  1. Check logs for successful proxy startup:
tail -20 logs/nanoclaw.log | grep "Credential proxy"

Expected: Credential proxy started with port and auth mode.

  1. Send a test message in the registered chat to verify the agent responds.

  2. Note: after applying this skill, the OneCLI credential steps in /setup no longer apply. .env is now the credential source.

Troubleshooting

"Credential proxy upstream error" in logs: Check that .env has a valid ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN. Verify the API is reachable: curl -s https://api.anthropic.com/v1/messages -H "x-api-key: test" | head.

Port 3001 already in use: Set CREDENTIAL_PROXY_PORT=<other port> in .env or as an environment variable.

Container can't reach proxy (Linux): The proxy binds to the docker0 bridge IP by default. If that interface doesn't exist (e.g. rootless Docker), set CREDENTIAL_PROXY_HOST=0.0.0.0 as an environment variable.

OAuth token expired (401 errors): Re-run claude setup-token in a terminal and update the token in .env.

Removal

To revert to OneCLI gateway:

  1. Find the merge commit: git log --oneline --merges -5
  2. Revert it: git revert <merge-commit> -m 1 (undoes the skill branch merge, keeps your other changes)
  3. npm install (re-adds @onecli-sh/sdk)
  4. npm run build
  5. Follow /setup step 4 to configure OneCLI credentials
  6. Remove ANTHROPIC_API_KEY / CLAUDE_CODE_OAUTH_TOKEN from .env

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Add /compact command for manual context compaction. Solves context rot in long sessions by forwarding the SDK's built-in /compact slash command. Main-group or trusted sender only.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nanocoai/nanoclaw-gmail22026년 4월 3일 업데이트

Add Discord bot channel integration to NanoClaw.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nanocoai/nanoclaw-gmail22026년 4월 3일 업데이트

add-emacs

무료

Add Emacs as a channel. Opens an interactive chat buffer and org-mode integration so you can talk to NanoClaw from within Emacs (Doom, Spacemacs, or vanilla). Uses a local HTTP bridge — no bot token or external service needed.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nanocoai/nanoclaw-gmail22026년 4월 3일 업데이트

add-gmail

무료

Add Gmail integration to NanoClaw. Can be configured as a tool (agent reads/sends emails when triggered from WhatsApp) or as a full channel (emails can trigger the agent, schedule tasks, and receive replies). Guides through GCP OAuth setup and implements the integration.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nanocoai/nanoclaw-gmail22026년 4월 3일 업데이트

Add image vision to NanoClaw agents. Resizes and processes WhatsApp image attachments, then sends them to Claude as multimodal content blocks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nanocoai/nanoclaw-gmail22026년 4월 3일 업데이트

Add a macOS menu bar status indicator for NanoClaw. Shows a bolt icon with a green/red dot indicating whether NanoClaw is running, with Start, Stop, and Restart controls. macOS only.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nanocoai/nanoclaw-gmail22026년 4월 3일 업데이트

nanocoai의 스킬 모두 보기

이 스킬의 문제 신고