stacks-browser
Skill by stacksjs
stacks-browser documents the browser and frontend side of Stacks through the @stacksjs/browser package. It is for developers who need client login, session handling, API calls and Stripe billing helpers.
Install stacks-browser
Built from the published package, never by AI.
git clone --depth 1 https://github.com/stacksjs/stacks /tmp/stacks && mkdir -p ~/.claude/skills && cp -r /tmp/stacks/storage/framework/defaults/ai/skills/stacks-browser ~/.claude/skills/stacks-browserRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/stacksjs/stacks /tmp/stacks && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/stacks/storage/framework/defaults/ai/skills/stacks-browser ~/.gemini/antigravity-cli/skills/stacks-browserAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
stacks-browser is a skill for working with browser and frontend functionality in Stacks, using the @stacksjs/browser package. It covers the useAuth composable for login, registration, logout and token management, along with session recovery, the API fetch client, and browser model loading. It also describes Stripe billing helpers such as loadCardElement and confirmPayment, plus retry utilities.
The source stresses that imported availability differs from STX runtime globals. It also says server routes, permissions and payment actions keep authority over access and payments, and that a client model is not a direct SQL connection. The skill is aimed at developers building frontend features in Stacks who need to know how client authentication, API transport and billing helpers behave.
Written from the project's SKILL.md and checked against it.
What it can do
- useAuth composableProvides login, register, logout and session methods with shared client refs.
- Session recoveryCovers refreshSession, fetchAuthUser and authGuard behavior on 401, 403 and network failures.
- Social login handoffcompleteSocialLogin redeems a one-use code through the /auth/handoff path.
- API transportsUses initApi for the query builder and the older Fetch facade for JSON requests.
- Error messagesdescribeResponseError and describeThrownError normalize client messages and field errors.
- CSRF helpersreadCsrfToken and withCsrfHeader support cookie-writing requests.
- Browser modelsloadBrowserModels and getBrowserModel work with registered model definitions.
- Stripe helpersExports loadCardElement, confirmPayment and related billing functions.
- Retry utilitiesretry and calculateDelay validate options and cap backoff delays at the timer maximum.
What you need
- Bun 1.3.0 or later
- TypeScript
- Stripe.js and a Stripe public key for billing helpers
Try asking
- Add a login form that uses useAuth and shows validation errors.
- Set up authGuard on my dashboard page so it redirects to /login on expiry.
- Use Fetch.get and Fetch.post to call my Stacks API from a frontend page.
Good to know
- API access stays subject to server routes, permissions and row scoping.
- authGuard controls client navigation only, so server pages must be guarded separately.
- initApi does not change the baseURL of the older Fetch facade.
- Stripe helpers need Stripe.js and a public key.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: storage/framework/defaults/ai/skills/stacks-browser/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Read Edit Write Bash Grep Glob
-
SKILL.md6 KB
Alternatives to stacks-browser
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
stacks-browser: common questions
Does stacks-browser sign users out on network errors?
No. The source says a network failure, 5xx, 403 or other non-401 answer keeps the token, user and isAuthenticated. Only a 401 ends a session.
Does stacks-browser handle Stripe payments?
It exports Stripe helpers such as loadCardElement and confirmPayment. Stripe.js and the public key are prerequisites, and server payment actions keep authority over amounts and completion.
Is a browser model a direct database connection?
No. The source says a client model is not a direct SQL connection or authorization layer, and API access stays subject to server routes and permissions.
How do I install stacks-browser?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is stacks-browser free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is stacks-browser safe to use?
It scores 75 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to stacks-browser?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
