Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Relogin

ASecurity

Renew the hermit's Claude credential (token or claude.ai sign-in, per `auth_mode`) over the channel, before it expires. Relays a one-time sign-in link to the operator, takes the code back, installs the new token, and restarts. Activates on messages like 'relogin', 'renew my login', 'reauth', 'the login is expiring', or when doctor's credential-expiry check flags the Claude credential.

74 stars
0 votes
0 copies
1 views
Added 10/3/2026
ai-agentsgodockerapi

Works with

terminalcliapi

Security Analysis

A100/100

Scanned 10/3/2026

$npx -y skills add gtapps/hermitd --skill relogin --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Relogin?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Relogin
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gtapps-relogin-hermitd/badge)](https://www.skillsdirectory.com/skills/gtapps-relogin-hermitd)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: relogin
description: "Renew the hermit's Claude credential (token or claude.ai sign-in, per `auth_mode`) over the channel, before it expires. Relays a one-time sign-in link to the operator, takes the code back, installs the new token, and restarts. Activates on messages like 'relogin', 'renew my login', 'reauth', 'the login is expiring', or when doctor's credential-expiry check flags the Claude credential."
---

# Relogin

Renews this hermit's Claude credential (token or claude.ai sign-in, per `auth_mode`) without anyone touching the box. The operator opens a link, signs in, sends back a code; you install the token and restart.

Use this when doctor warns that the credential is expiring, or the operator asks to renew. If the hermit is *already* dead from an expired token, this skill is not the path — the watchdog runs the same flow deterministically without a model (`setup-token-mint.ts relay`), because a dead hermit can't run a skill.

**Never run `/logout`.** Renewal never needs it. Retiring the old `.credentials.json` is fine — the install does it for you (see Notes) — but `/logout` *also* resets first-launch state, after which the interactive wizard demands a login and refuses the env token. That reset is the hazard, not the credential removal.

## Step 0 — Preflight

```
bun ${CLAUDE_PLUGIN_ROOT}/scripts/setup-token-mint.ts status
```

- `auth_mode: external` → an API key or cloud provider owns this hermit's credential. Nothing here can renew that; say so plainly and stop.
- `pending: true` → a sign-in is already staged and applies at the next restart. Don't start a second one; offer to restart now instead.
- `in_progress` non-null → a renewal is already running. Don't start a second one.
- Otherwise report the current `expires_at` in plain language and continue. Say which cadence this hermit is on when it's relevant: `auth_mode: login` renews about every 30 days, `token` about yearly.

## Step 1 — Mint and relay the link

```
bun ${CLAUDE_PLUGIN_ROOT}/scripts/setup-token-mint.ts start
bun ${CLAUDE_PLUGIN_ROOT}/scripts/setup-token-mint.ts await-url
```

Send the operator the `url` from the second command, in your own voice — one line, the link, and what you need back. Something like: "Time to renew your Claude sign-in. Open this and send me the code it gives you: `<url>`".

**If a `maintainer_channel_id` is configured for the active channel** (`channels.<platform>.maintainer_channel_id` in `config.json`), send that message via the maintainer channel instead of the client chat, so the sign-in link never reaches an end-user's chat. Pipe the text on stdin:

```
bun ${CLAUDE_PLUGIN_ROOT}/scripts/channel-send.ts .hermit --tier maintainer -
```

The operator still pastes the code back through the primary chat (Step 2 is unchanged). When no maintainer channel is configured, keep the current in-chat/terminal path above; that remains the documented owner-recipient contract.

The link is one-time and short-lived. Don't mint it before the operator is ready to use it.

## Step 2 — Take the code back

When the operator replies with the code:

```
bun ${CLAUDE_PLUGIN_ROOT}/scripts/setup-token-mint.ts submit-code "<code>"
bun ${CLAUDE_PLUGIN_ROOT}/scripts/setup-token-mint.ts await-token-and-install
```

The install prints `{ok, expires_at}` and nothing else — the token itself never reaches you, by design. It goes from the mint pane straight into a 0600 file on the config volume.

If either step fails, run `abort`, tell the operator plainly that nothing changed, and offer to try again.

## Step 3 — Confirm, then restart (order matters)

The new token only takes effect when the claude process restarts — and that restart kills the session running this skill. So:

1. **First**, send the confirmation: "You're signed back in, nothing else needed. Next renewal is due `<expires_at>`, and I'll ask you then."
2. **Then**, as the final act of the skill:

```
bun ${CLAUDE_PLUGIN_ROOT}/scripts/setup-token-mint.ts finish
```

It fires the restart detached and returns immediately. Anything you write after it will never run — send the message first, every time.

## Notes

- The one-time link and the login code cross the channel; the credential never does.
- **In `login` mode nothing is installed by this skill.** The sign-in is written to a staging config dir and `await-token-and-install` only records a pointer to it; the watchdog moves it into place inside the restart in Step 3, where no session is refreshing the file underneath the write. So "signed in" and "in effect" are one restart apart, which is why the confirmation says nothing else is needed.
- Installing a *token* parks any stored `/login` credential (`.credentials.json` → `.credentials.json.pre-token.bak`). Interactive sessions prefer a stored login over the env token, so an unparked file would 401 the hermit once its old access token lapsed. The rename is restorable; nothing is deleted.
- Where expiry lives differs by mode: a token's is hermit-tracked in `state/setup-token.json` (the CLI exposes no expiry surface for those), a login's is `refreshTokenExpiresAt` inside `.credentials.json` — the one field a silent refresh does not move. Doctor's `credential-expiry` check reads whichever applies and warns 3 days out.
- Switching modes is an intent, not an action: setting `auth_mode` records which credential the hermit *should* use, and nothing changes until this skill (or `hermitd-docker login` / `setup-token`) actually signs in with it.
- Renewal is container-internal on purpose: the token lives on the persistent config volume, not in `.env`, so nothing on the host has to be recreated.

Attribution

gtappsgtapps
View sourceSee grades on GitHubMore from gtapps →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698431 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →