browser-auth-spa

browser-auth-spa is a skill for Claude Code from abel30567/fermi-mcp. It costs 31 tokens per session (552 once invoked), scanned A, original, MIT.

A procedure for signing into browser-based single-page apps by placing authentication tokens in both browser storage and cookies. Single-page apps load and update their pages without full reloads, and some check both locations.

In plain words
What is it for?
Use it to authenticate Fermi browser sessions to token-based apps, including apps using Cognito, by injecting and refreshing tokens on the correct website origin.
Why use it?
It avoids manually typing credentials and prevents apps from sending the browser back to the login page after a reload when only one token location is filled.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to authenticate Fermi browser sessions to token-based apps, including apps using Cognito, by injecting and refreshing tokens on the correct website origin.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abel30567/fermi-mcp/browser-auth-spa
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add abel30567/fermi-mcp --skill browser-auth-spa
Clone the repo
git clone --depth 1 https://github.com/abel30567/fermi-mcp

Made for: Claude Code.

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 browser-auth-spa

README.md
[![agentmods](https://agentmods.dev/badge/skills/abel30567/fermi-mcp/browser-auth-spa/github.svg)](https://agentmods.dev/skills/abel30567/fermi-mcp/browser-auth-spa)
Your own site
<a href="https://agentmods.dev/skills/abel30567/fermi-mcp/browser-auth-spa"><img src="https://agentmods.dev/badge/skills/abel30567/fermi-mcp/browser-auth-spa/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 browser-auth-spa

Your own site · 80×15
<a href="https://agentmods.dev/skills/abel30567/fermi-mcp/browser-auth-spa"><img src="https://agentmods.dev/badge/skills/abel30567/fermi-mcp/browser-auth-spa.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 552 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.00031 $0.00552
Opus 5 $0.00015 $0.00276
Sonnet 5 $0.00006 $0.00110
Haiku 4.5 $0.00003 $0.00055

Measured 8d ago against content hash de6c5f29ea63, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

browser-auth-spa 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 8d 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.

packages/worker/seeds/skills/browser-auth-spa/SKILL.md · 41 lines

What it actually says

SPA browser auth via token injection

Programmatic login without typing credentials, proven on AWS Skill Builder (issue #19, commits e5eb4463 + 18956a9d).

Core rule: localStorage AND cookies, simultaneously

SPAs that use Cognito (and similar) check BOTH stores. Setting only localStorage fails — the app bounces to login on reload. Inject the same token set into localStorage and document.cookie in one evaluate script, then reload and wait (~20s) for SPA hydration.

Procedure

  1. browser_session_launch, navigate to the app origin (cookies must be set on the right origin), accept any consent banner.
  2. Run an evaluate action whose script contains {{secret:NAME}} placeholders — Fermi resolves them server-side (and audits the resolution) before the script reaches the page. The secret must list browser_action in its allowed_capabilities and the page host in allowed_hosts.
  3. In the script: refresh tokens via the provider's CORS-enabled endpoint (e.g. Cognito InitiateAuth with REFRESH_TOKEN_AUTH works from browser JS), then write localStorage keys (LastAuthUser, idToken, accessToken, refreshToken, clockDrift) AND matching document.cookie entries.
  4. Reload the same URL, wait for hydration, verify with browser_extract (check you are NOT on the login page before declaring success).
  5. setCookies actions also resolve {{secret:...}} in cookie values when a raw cookie header is all you need.

Known limits — when to escalate

  • Google login is blocked by bot detection on headless Chromium. Not viable.
  • Cloudflare Turnstile and similar bot checks cannot be solved in the cloud browser. Escalate to the Local Agent (fermi issue #16) or ask the owner to complete the challenge via browser_session_request_human.
  • OAuth-callback-only cookies (e.g. aws-token-a-c) usually are NOT required for SPA auth — test without them first.
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. 8d ago First seen · 41 lines · 31 tokens per session scan A de6c5f29ea63

Subscribe to this mod's changes

browser-auth-spa is a skill published in the GitHub repository abel30567/fermi-mcp (1 stars, last pushed 12d ago), licensed MIT. It adds 31 tokens to every session and 552 once invoked, about $0.0002 per session on Opus 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-08-31.

Related

Other skills, from other repositories

camofox-browser

Anti-detection browser automation for AI agents. Use when the user needs stealth web browsing, undetectable scraping, fingerprint spoofing, proxy rotation, or privacy-focused browser automation. Triggers include "stealth scrape", "anti-detection", "bypass fingerprinting", "camofox", "camoufox", "undetectable browser"…

redf0x1/camofox-browser · 93 tokens

playwright-bot-bypass

This skill should be used when the user asks to "bypass bot detection", "avoid CAPTCHA", "stealth browser automation", "undetected playwright", "bypass Google bot check", "rebrowser-playwright", or needs to automate websites that detect and block bots.

greekr4/playwright-bot-bypass · 62 tokens

camofox-cli

CamoFox CLI — 50 commands for anti-detection browser automation from the terminal. Use when the user needs CLI reference for camofox commands, terminal-based browser control, or a quick lookup of command syntax. Triggers include "camofox command", "CLI reference", "terminal browser", or any request for camofox…

redf0x1/camofox-browser · 77 tokens

skill

Anti-detection browser automation MCP skill for OpenClaw agents with 47 tools for navigation, interaction, observation, extraction, downloads, profiles, sessions, and stealth web search.

redf0x1/camofox-mcp · 0 tokens

stealth-browser

Anti-detection behavioral rules for stealth browser automation.

WingedGuardian/GENesis-AGI · 13 tokens

reddit

Reddit automation with CamoFox CLI — login, browse, post, comment, reply with anti-detection. Use when the user needs to automate Reddit interactions, post to subreddits, comment on threads, or browse Reddit programmatically. Triggers include "reddit", "post to reddit", "reddit comment", "reddit automation", or any…

redf0x1/camofox-browser · 81 tokens