external-auth-bridge-reuse

Read external CLI credentials and cache tokens in memory with TTL-based refresh.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/liuyu520/cc_source --skill external-auth-bridge-reuse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: external-auth-bridge-reuse
Source: https://github.com/liuyu520/cc_source/tree/main/.claude/skills/external-auth-bridge-reuse
Command: npx skills add https://github.com/liuyu520/cc_source --skill external-auth-bridge-reuse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Read-only credential bridge that reads credentials from external CLI tools (e.g., Codex, gcloud, aws-cli) and caches tokens in memory, never writing back to their credential stores.

Core Features & Use Cases

  • Read-only parsing of external tool credentials to avoid race conditions with editors/CLIs.
  • In-memory token caching with TTL and proactive refresh to ensure up-to-date access.
  • Multi-source credential priority chain (env var > memory cache > on-disk file) for seamless workflows.
  • Promise-based token refresh with exponential backoff to prevent thundering refreshes.

Quick Start

Configure your application to load credentials via the read-only bridge and rely on in-memory caching for token refresh.

Frequently Asked Questions about external-auth-bridge-reuse

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely reuse external CLI credentials in automation without causing race conditions?

A read-only credential bridge parses external CLI tokens and caches them in memory with TTL and proactive refresh, preventing thundering refreshes through promise-based exponential backoff while never writing back to disk.

What is the credential priority chain when reading tokens from external CLIs?

The credential priority chain follows an environment-first override, then checks the in-memory cache, and finally falls back to reading the on-disk credential file to ensure seamless workflow integration.

Can I use this approach to cache gcloud and aws-cli tokens for automated workflows?

Yes, this approach supports caching credentials from external CLIs including Codex, gcloud, and aws-cli, utilizing in-memory token caching with TTL and multi-source prioritization tailored for automation workflows.

How does in-memory token refresh prevent thundering refreshes in high-concurrency environments?

In-memory token refresh prevents thundering refreshes by using a promise-based refresh mechanism with exponential backoff, which deduplicates concurrent refresh requests to avoid race conditions.

Does reusing external CLI credentials modify the original credential stores on disk?

No, reusing external CLI credentials with this read-only bridge does not modify the original credential stores on disk. It strictly parses existing tokens and caches them in memory only.