Skill State Manager (SSM) for Openclaw

A Meta Skill that automates API key management and state persistence through native conversational prompts for AI agents.

qipengguo
v0.0.1
Apr 3, 2026
1
613
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install skill-state-manager

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 skill-state-manager 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 Skill State Manager (SSM)?

The Skill State Manager (SSM) is a powerful Meta Skill designed to streamline the authentication workflow for AI coding agents. Instead of manual configuration of environment variables or hardcoded secrets, SSM provides a native conversational experience that allows agents to request, store, and manage API keys on the fly. By integrating this capability into Openclaw Skills, developers can ensure their AI assistants handle third-party integrations with Jira, Notion, and custom APIs seamlessly while maintaining secure local storage across different platforms.

Skill State Manager (SSM) Use Cases

  • Triggering authentication workflows when a custom tool requires secret keys
  • Automatically handling 401 or 403 unauthorized errors during API calls
  • Centralizing state persistence for multi-tool workflows without manual config
  • Eliminating the need for manual .env file editing in AI CLI environments

How Skill State Manager (SSM) Works

  1. The AI agent detects a need for credentials or encounters an authentication failure during tool execution.
  2. The system checks the local environment to identify the platform, such as Claude Code or Codex.
  3. SSM searches for existing credentials in platform-specific global storage directories like ~/.ai-skills-state/.
  4. If credentials are missing, the agent prompts the user directly in the chat for the required token or secret.
  5. Upon receipt, the agent writes the data to a secure local JSON file and resumes the original workflow immediately.

Skill State Manager (SSM) Setup

The Skill State Manager is typically integrated into the system prompt or skill manifest of your AI agent. To ensure the storage directories are prepared for Openclaw Skills, you can use the following commands:

# Create default state directory
mkdir -p ~/.ai-skills-state/

# For Claude Code specific environments
mkdir -p ~/.claude/skills-state/

Once directories are established, the SSM logic will manage file creation and updates automatically during your chat sessions.

Skill State Manager (SSM) Data Schema & Taxonomy

SSM organizes data into platform-specific directories with a simple JSON structure per tool. For example, a Jira integration would create a jira-tool.json file.

Path Description
~/.claude/skills-state/ Storage for Claude Code specific skill states
~/.ai-skills-state/ Generic storage for other CLI agents using Openclaw Skills
.json Contains key-value pairs of required secrets and persistent metadata

Skill State Manager (SSM) Advanced Features

  • Automatic platform detection for environment-specific storage path resolution
  • Real-time secret recovery and injection during active agentic workflows
  • Seamless integration with custom third-party API tools via Openclaw Skills
  • Native conversational auth logic that prevents workflow disruption and context loss

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*