go-authcrunch: Skill for Codex

.codex/skills/refresh-token-implementation/SKILL.md

refresh-token-implementation is a skill for Codex from greenpau/go-authcrunch. It costs 47 tokens per session (3,050 once invoked), scanned A, original, Apache-2.0.

An implementation guide for optional portal refresh tokens, which let a client obtain a new access credential without repeating the full login. It covers token families, rotation, replay handling, storage, claims, and portal integration.

In plain words
What is it for?
Use it when changing refresh-token settings, issuing or rotating tokens, adding storage adapters, integrating key signing, or changing the portal lifecycle around refresh tokens.
Why use it?
It keeps refresh-token state and security checks consistent, including invalidating a token family when a reused or compromised token is detected.

Skill for Codex

Written for Codex: agents/openai.yaml present.

This is greenpau/go-authcrunch's own configuration. It tells Codex how to work on go-authcrunch itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything go-authcrunch configures →

Reuse

Borrowing it

Nothing to install: this file belongs to greenpau/go-authcrunch. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/greenpau/go-authcrunch/main/.codex/skills/refresh-token-implementation/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/greenpau/go-authcrunch

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for refresh-token-implementation

README.md
[![agentmods](https://agentmods.dev/badge/skills/greenpau/go-authcrunch/refresh-token-implementation/github.svg)](https://agentmods.dev/skills/greenpau/go-authcrunch/refresh-token-implementation)
Your own site
<a href="https://agentmods.dev/skills/greenpau/go-authcrunch/refresh-token-implementation"><img src="https://agentmods.dev/badge/skills/greenpau/go-authcrunch/refresh-token-implementation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for refresh-token-implementation

Your own site · 80×15
<a href="https://agentmods.dev/skills/greenpau/go-authcrunch/refresh-token-implementation"><img src="https://agentmods.dev/badge/skills/greenpau/go-authcrunch/refresh-token-implementation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,050 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.03050
Opus 5.5 $0.00019 $0.01220
Sonnet 5.5 $0.00009 $0.00610
Haiku 4.5 $0.00005 $0.00305

Measured 12d ago against content hash bd3612c7ed51, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

refresh-token-implementation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex/skills/refresh-token-implementation/SKILL.md · 236 lines

How it starts

The opening of the file, as written. The whole thing — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Refresh Token Implementation

The implementation is opt-in under authn.PortalConfig.RefreshTokens. The reusable token/session engine lives at pkg/authn/token_refresh, with Go package identifier tokenrefresh. Use that import path and qualifier in consumers. Read configuration and client contract when exposing settings, integrating clients, or changing public behavior. Read the managed storage contract when selecting a borrowed refresh backend, assembling a root or standalone portal, or changing generation activation and readiness. Use refresh-token-identity to change login proof, MFA completion, sandbox redemption, credential-version revalidation, and captured upstream provider evidence. Use refresh-token-transports to change refresh/logout HTTP routes, cookies, native transport, browser coordination, continuation, and fresh login. These are distinct boundaries; a change may require more than one owner.

Directive support here is the public parser package and its portal integration. The block example in the client contract describes an embedding parser's input; it does not establish implemented Caddyfile support. Keep the parser and its unit/E2E coverage in this module. Never modify sibling directories for consumer integration; those repositories are updated separately.

Ownership

  • pkg/authn/token_refresh_config.go: serializable config, defaults, canonical HTTPS origin/mount validation, cookie naming, durations, and capacity bounds. The public type is authn.TokenRefreshConfig. An empty CookieName inherits the portal cookie factory; validation must leave it empty. An enabled explicit override feeds cookie_config.refresh_token_cookie_name before the factory's defaults and collision checks. The factory owns the effective runtime name.
  • pkg/authn/token_refresh/parser: public NewTokenRefreshConfigFromDirectives([]string) (*authn.TokenRefreshConfig, error), using cfgutil.DecodeArgs for encoded statements from token refresh blocks. Directive keys use separate words; states use enabled/disabled keywords. Construction opts in, rejects duplicate/unknown/malformed directives, and delegates normalization to authn.TokenRefreshConfig.Validate. This package owns the parser implementation and its external-package unit tests; the portal model remains in pkg/authn. Additional authn.TokenRefreshConfig settings need corresponding grammar in this constructor and consumer coverage through PortalConfig.RefreshTokens.
  • pkg/authn/portal.go: configured-realm capability checks, selected-store preflight, pending publication, failed-construction cleanup, and Portal.Close().
  • pkg/authn/token_refresh_managed.go, persistent_state.go: persistent namespace/generation initialization, managed activation and publication.
  • pkg/authn/token_refresh/managed.go: typed descriptors, immutable prepared bindings, managed metadata/readiness and borrowed generation views.
  • pkg/authn/token_issuer.go: shared access/refresh issuance. HTTP and JSON sandbox login must call the same issuer; grantAccess only delivers signed output.
  • pkg/authn/token_refresh_runtime.go: portal adapters, current transformations, challenge checks, and KMS signing.
  • pkg/authn/token_refresh_provider.go: completed OAuth callback issuance, bounded provider snapshots, trust bindings, and provider-specific renewal.
  • pkg/authn/token_refresh/{token,store,memory,manager}.go: opaque encoding, store contract, bounded in-memory families, and staged issuance/rotation.
  • pkg/kms/crypto_keystore.go: legacy access signing-key lifetime selection.
  • pkg/authn/access_signing.go: selected external signing, exact staged-claim verification and effective lifetime. Read the selected signing contract for the borrowed root/standalone boundary, strict profile and issuer equality.

Read the full file on GitHub · 236 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago Changed · +22 lines bd3612c7ed51
  2. 26d ago Changed · +12 lines f9cb6141b53b
  3. 28d ago Changed 487d605d7587
  4. 29d ago Changed · +6 lines 61b2aed67149
  5. 1mo ago Changed · +12 lines 935a859da249
  6. 1mo ago Changed · +3 lines c936e2dc25b0
  7. 1mo ago Changed · +12 lines da36a66d8ff7
  8. 1mo ago Changed · +79 lines b3398f79ce97
  9. 1mo ago First seen · 90 lines · 47 tokens per session scan A f52be8b4f923

Subscribe to this mod's changes

refresh-token-implementation is a skill published in the GitHub repository greenpau/go-authcrunch (60 stars, last pushed 10d ago), licensed Apache-2.0. It adds 47 tokens to every session and 3,050 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-13.

Related

refresh-token-implementation compared with skills from other repositories

refresh-token-implementation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
refresh-token-implementationgreenpau/go-authcrunchSkill6010d agoApache-2.0A47Codex
mem0-oss-to-platformmem0ai/mem0Skill68k2d agoApache-2.0A217Claude Code, Codex
azure-mgmt-botservice-dotnetmicrosoft/skillsSkill3.2kyesterdayMITA78Claude Code
fastapi-router-pymicrosoft/skillsSkill3.2kyesterdayMITA46Claude Code
dev-runtimelangwatch/langwatchSkill5.0kyesterdayApache-2.0A172Claude Code
api-designericrisco/rsc-harnessSkill5032d agoMITA105Claude Code, Codex
migrate-segw-to-raparc-mcp/arc-1Skill252yesterdayMITA106Claude Code