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.
curl -O https://raw.githubusercontent.com/greenpau/go-authcrunch/main/.codex/skills/refresh-token-implementation/SKILL.mdgit clone --depth 1 https://github.com/greenpau/go-authcrunchWrote 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.
[](https://agentmods.dev/skills/greenpau/go-authcrunch/refresh-token-implementation)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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 isauthn.TokenRefreshConfig. An emptyCookieNameinherits the portal cookie factory; validation must leave it empty. An enabled explicit override feedscookie_config.refresh_token_cookie_namebefore the factory's defaults and collision checks. The factory owns the effective runtime name.pkg/authn/token_refresh/parser: publicNewTokenRefreshConfigFromDirectives([]string) (*authn.TokenRefreshConfig, error), usingcfgutil.DecodeArgsfor encoded statements fromtoken refreshblocks. Directive keys use separate words; states useenabled/disabledkeywords. Construction opts in, rejects duplicate/unknown/malformed directives, and delegates normalization toauthn.TokenRefreshConfig.Validate. This package owns the parser implementation and its external-package unit tests; the portal model remains inpkg/authn. Additionalauthn.TokenRefreshConfigsettings need corresponding grammar in this constructor and consumer coverage throughPortalConfig.RefreshTokens.pkg/authn/portal.go: configured-realm capability checks, selected-store preflight, pending publication, failed-construction cleanup, andPortal.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;grantAccessonly 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.
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.
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.
- 12d ago Changed · +22 lines bd3612c7ed51
- 26d ago Changed · +12 lines f9cb6141b53b
- 28d ago Changed 487d605d7587
- 29d ago Changed · +6 lines 61b2aed67149
- 1mo ago Changed · +12 lines 935a859da249
- 1mo ago Changed · +3 lines c936e2dc25b0
- 1mo ago Changed · +12 lines da36a66d8ff7
- 1mo ago Changed · +79 lines b3398f79ce97
- 1mo ago First seen · 90 lines · 47 tokens per session scan A f52be8b4f923
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.
refresh-token-implementation compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| refresh-token-implementationgreenpau/go-authcrunch | Skill | 60 | 10d ago | Apache-2.0 | A | 47 | Codex |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 68k | 2d ago | Apache-2.0 | A | 217 | Claude Code, Codex |
| azure-mgmt-botservice-dotnetmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 78 | Claude Code |
| fastapi-router-pymicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 46 | Claude Code |
| dev-runtimelangwatch/langwatch | Skill | 5.0k | yesterday | Apache-2.0 | A | 172 | Claude Code |
| api-designericrisco/rsc-harness | Skill | 503 | 2d ago | MIT | A | 105 | Claude Code, Codex |
| migrate-segw-to-raparc-mcp/arc-1 | Skill | 252 | yesterday | MIT | A | 106 | Claude Code |