claude-oauth-refresher
Keep your Claude access token fresh 24/7. Automatically refreshes OAuth tokens before expiry so you never see authentication failures.
Why use this skill?
Keep your Claude Code CLI logged in 24/7. Automatically refresh OAuth tokens before they expire with this secure macOS utility for OpenClaw.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/tunaissacoding/claude-oauth-refresherWhat This Skill Does
The claude-oauth-refresher is a specialized utility designed for developers and power users who rely on the Claude Code CLI. Because OAuth tokens for CLI tools often have relatively short expiry windows, users frequently face authentication interruptions during long-running tasks or after computer sleep cycles. This skill automates the token refresh lifecycle by monitoring your active session and proactively re-authenticating before your token expires. It operates silently in the background via macOS launchd, ensuring you stay authenticated 24/7 without manual intervention. Beyond simple refreshing, the tool provides robust logging and an optional notification system that keeps you informed of your authentication status, alerting you immediately if a refresh attempt fails so you can intervene before your workflow is blocked.
Installation
To install, ensure you have the OpenClaw agent running and your environment configured. Navigate to your local Clawd directory and execute the following command: cd ~/clawd/skills/claude-oauth-refresher && ./install.sh. The installer is an interactive script that verifies your macOS Keychain access, checks your existing Claude Code CLI setup, and guides you through configuring your notification preferences. The process is one-time only; once installed, it registers a persistent background process that automatically triggers every 2 hours to validate and refresh your credentials as needed.
Use Cases
This skill is essential for users who frequently work within the terminal or run long-duration AI-assisted coding projects. It is perfect for developers working on distributed teams where staying logged in is critical for CI/CD pipeline automation or overnight script execution. It effectively eliminates the "unauthorized" or "token expired" errors that plague CLI users who depend on the Claude ecosystem for complex software engineering tasks.
Example Prompts
- "disable Claude refresh start notifications"
- "enable all Claude refresh notifications"
- "turn on Claude token refresh success messages"
Tips & Limitations
- Limitation: This skill is exclusive to macOS environments due to its reliance on the macOS Keychain for secure token storage.
- Tip: Keep all notifications enabled for the first 24 hours of use to ensure that the background process is successfully communicating with your authentication provider.
- Tip: If you suspect issues, run the included
./verify-setup.shscript to check permissions and token validity before troubleshooting your network or account status.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-tunaissacoding-claude-oauth-refresher": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, code-execution
Related Skills
publisher
Make your skills easy to understand and impossible to ignore
claude-connect
Connect Claude to Clawdbot instantly and keep it connected 24/7. Run after setup to link your subscription, then auto-refreshes tokens forever.
twitter-bookmark-sync
Automatically ranks your Twitter bookmarks daily and delivers a curated reading list
portable-tools
Build cross-device tools without hardcoding paths or account names