본문으로 건너뛰기
TakoAPI
스킬로 돌아가기

rotate-openrouter-key

chunhualiao 제작

Coding Agents & IDEs
338clawskills.sh가 보고한 다운로드 수
0조회수
좋아요 0개로그인하면 이 스킬에 좋아요를 누를 수 있습니다
—아직 평가 없음
내 평가

요약

Safely rotate the OpenRouter API key across all config files in an OpenClaw installation.

설명

이 스킬이 하는 일

Handles OpenRouter API key rotation across an entire OpenClaw installation. Finds every config location where the key is stored, updates them according to the priority chain, restarts the gateway, and verifies the new key works before advising you to disable the old one.

Manually updating config files is error-prone because OpenClaw reads the key from three sources at different priority levels, so missing a higher-priority location means lower-priority updates have no effect.

사용 시점

  • Replacing a leaked or compromised OpenRouter key
  • Rotating keys periodically for security compliance
  • Fixing 401 errors after disabling an old key on openrouter.ai
  • Updating all configs after generating a new key
  • Syncing a new key across multiple machines running OpenClaw

예시 워크플로

입력

User asks: rotate my OpenRouter key, I just generated sk-or-v1-abc123

에이전트
  1. 1

    Confirm the new key starts with sk-or-v1-

  2. 2

    Search all files under ~/.openclaw/ for the existing key pattern

  3. 3

    Run update-openrouter-key.py with --dry-run to preview what will change

  4. 4

    Run update-openrouter-key.py with --verify to update all locations and confirm the new key is accepted by OpenRouter

  5. 5

    Restart the gateway with openclaw gateway restart

출력

All config files updated, gateway restarted, new key verified against the OpenRouter API. User advised to disable the old key at openrouter.ai/keys.

요구 사항

  • OpenRouter account with a new API key generated at openrouter.ai/keys

설치

clawhub install chunhualiao/rotate-openrouter-key

CLI 명령을 실행하거나, 프롬프트를 Claude Code, Cursor, Codex 등 사용하는 코딩 에이전트에 붙여넣으세요.

링크