Keyswap for Openclaw

A specialized utility designed to automate the rotation and update of Claude Max API tokens across multiple OpenClaw Anthropic profiles.

jawaddxb
v1.0.0
Mar 3, 2026
0
975
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install keyswap

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install keyswap using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Keyswap?

The Keyswap skill is an essential maintenance tool for developers utilizing Openclaw Skills for their AI workflows. It provides a streamlined interface for updating sensitive API credentials, specifically targeting the Claude Max tokens used by the anthropic:jawadjarvis and anthropic:manual profiles.

By automating the replacement of tokens and the subsequent service restart, this skill ensures that your AI agents maintain uninterrupted access to Anthropic's models. It eliminates the need for manual configuration file editing, reducing the risk of syntax errors and downtime within your Openclaw Skills environment.

Keyswap Use Cases

  • Rotating a compromised or expired Claude Max API token.
  • Quickly updating credentials when switching between different Anthropic billing accounts.
  • Automating the process of updating multiple internal profiles in a single command.
  • Ensuring the OpenClaw gateway is correctly restarted after a credential change.

How Keyswap Works

  1. The user triggers the rotation by providing a new sk-ant- token or using a keyword phrase like swap key.
  2. The skill validates that the provided token follows the correct Anthropic format.
  3. A local bash script is executed to locate the OpenClaw installation and modify the profile configurations.
  4. The script updates both the jawadjarvis and manual profiles with the new API key.
  5. The OpenClaw gateway is automatically restarted to apply the changes immediately.
  6. The system provides a success confirmation or detailed error log to the user.

Keyswap Setup

To utilize Keyswap within the Openclaw Skills framework, ensure the skill is installed in your node_modules directory. The skill requires the underlying shell script to be accessible at the system level.

# The skill is typically invoked via the agent, but the underlying command is:
bash /opt/homebrew/lib/node_modules/openclaw/skills/keyswap/scripts/keyswap.sh <your_new_token>

Keyswap Data Schema & Taxonomy

The Keyswap skill modifies existing profile configurations within the OpenClaw environment. It does not create new data structures but manages the following fields:

Target Data Type Description
anthropic:jawadjarvis Profile Config The primary profile used by the AI agent for Claude Max requests.
anthropic:manual Profile Config The manual override profile for custom Anthropic configurations.
API Token String A valid Anthropic token starting with the sk-ant- prefix.

Keyswap Advanced Features

  • Multi-profile synchronization to ensure consistency across different Anthropic access points.
  • Intelligent gateway management that automatically triggers a restart only upon successful token validation.
  • Support for natural language triggers within the Openclaw Skills ecosystem, allowing for hands-free credential rotation.
  • Error handling that captures and reports shell-level execution failures for easier troubleshooting.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*