authentication-rbac
Use when designing, implementing, reviewing, or testing authentication, protected routes, sessions, roles, permissions, ownership rules, or authorization…
Skill by gowebknot
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/gowebknot-authentication-rbac
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/authentication-rbac
What's inside
- Skill name
authentication-rbac- Description
- Use when designing, implementing, reviewing, or testing authentication, protected routes, sessions, roles, permissions, ownership rules, or authorization boundaries across server, web, and mobile applications.
- License
- MIT
- Instructions
- 82 lines in SKILL.md · view on GitHub
Files (7)
- SKILL.md
- .gitkeep · assets/
- .gitkeep · examples/
- .gitkeep · references/
- authentication-rbac-checklist.md · references/
- .gitkeep · scripts/
- .gitkeep · templates/
SKILL.md (first lines)
# Authentication and RBAC Use this skill for authentication or authorization work, including sessions, protected routes, roles, permissions, ownership rules, access-denied UX, or security tests. ## Establish the boundary first 1. Read the nearest `AGENTS.md`, existing auth implementation, contracts, environment rules, and tests before editing. 2. Map the user journey and route-group-to-feature ownership before adding a route. Route modules compose the owning feature; they do not become the only owner of auth or authorization behavior. 3. Identify the identity source, session transport, protected resources, roles, permissions, and failure states. Record unsupported provider or platform behavior instead of inventing it. 4. Load the repository's test-first, security, backend, frontend, React, contract, API-flow, and E2E skills whenever their boundaries apply. ## Authentication flow - Keep authentication state in the established auth provider/context or server session boundary. - Model loading, authenticated, signed-out, invalid-session, expired-session, network-failure, and logout states explicitly. - On a protected web route, redirect unauthenticated users to login with the current location as a validated in-app return value. Never accept arbitrary external redirect destinations. - Re-throw intentional router redirects; treat session lookup failures as authentication failures and fail closed according to the app's documented recovery behavior. - Pass hook/context-derived auth state into the router through its supported context mechanism; do not call React hooks from route loaders or other non-component code. - Preserve the current repository provider scope. Do not add OAuth, email delivery, or provider environment variables unless the task explicitly expands that boundary. ## Authorization and RBAC - Treat a route guard as a navigation/UI convenience, never as a data authorization boundary. Every private server function, controller, server action, API route, and data access operation must authorize the request independently before reading or mutating protected data. - Keep authorization decisions close to the protected use case and before persistence or external side effects. Prefer a small policy function or service over duplicated component checks. - Define roles and permissions centrally. Make role checks explicit (one role, any role, or all roles) and permission checks explicit (one, any, or all). Document inheritance and precedence. - Check resource ownership and tenant scope in addition to roles and permissions. Never trust an identifier, role, or permission supplied by the client. - Fail closed for missing, malformed, stale, or unverifiable identity and authorization data. Return stable safe errors without exposing secrets, tokens, policy internals, or private records. - Give signed-in users lacking access a forbidden/unauthorized experience; use login redirects only for users without a valid session. Preserve a return location only when it is in-app and safe. - Use component-level guards only to hide or explain unavailable actions. They must not replace the server check or act as a security mechanism. ## Platform adaptations - TanStack Router: use `beforeLoad` for protected navigation and router context for auth state; throw redirects rather than imperatively navigating during route loading. - NestJS/API: keep transport handlers thin, authenticate at the request boundary, delegate to an authorization-aware use case, and keep Better Auth/infrastructure construction out of controllers. - Next.js: distinguish server and client components; enforce private data access on the server and use middleware/layout checks only as complementary navigation behavior. - Expo Router and React Navigation: use layouts or navigation boundaries for UX gating, but repeat authorization in the API/server boundary. Do not assume browser cookie or chunking semantics. - Shared entities, API clients, and query hooks must consume authoritative auth/authorization contracts rather than redefining user, role, permission, or error shapes locally. ## Testing requirements Plan one exact case for each reachable branch: valid session, signed-out access, session-check failure, login failure, logout, expired session, allowed role, wrong role, allowed permission, missing permission, wrong owner/tenant, malformed identity, unsafe return URL, and server-side bypass attempts where applicable. - Use synthetic users, sessions, roles, permissions, tokens, and resource identifiers. - Assert both the decision and the absence of protected reads, writes, or external effects after rejection. - Mock identity providers, databases, email services, and network calls unless an explicitly authorized local integration owns them. Never log credentials, raw tokens, authorization headers, or private fixtures. - Test user-visible behavior through accessible interactions in Playwright or Maestro. Keep unit and API tests at their owning boundaries with independent fixtures. - Verify retry, logout, repeated request, cache invalidation, and fail-open/fail-closed behavior when those branches exist. Read `references/authentication-rbac-checklist.md` for detailed planning and review prompts.
From gowebknot/monorepo-template, MIT.
More from gowebknot/monorepo-template
- 0.529score
backend-standards
gowebknot
Use when implementing, reviewing, refactoring, or debugging backend services, modules, controllers, persistence, request validation, response serialization…
SkillBFreshness: BClaude Code +9 - 0.529score
checklist-tracking
gowebknot
Use when a task creates, edits, reviews, or completes Markdown checklists, implementation plans, task lists, status tables, or tracked test cases.
SkillBFreshness: BClaude Code +9 - 0.529score
react-19
gowebknot
Required when writing or reviewing React 19 components, hooks, forms, actions, transitions, optimistic updates, refs, or server-state UI in any application or…
SkillBFreshness: BClaude Code +9 - 0.529score
release-flow
gowebknot
Use only in this template repository when preparing a release, version change, changelog, release notes, migration, deprecation, package publication, or…
SkillBFreshness: BClaude Code +9 - 0.529score
e2e-regression-test-writer
gowebknot
Plan and write Playwright end-to-end coverage for user-facing generated application features, flows, and failure states.
SkillBFreshness: BClaude Code +9 - 0.529score
maestro-mobile-e2e-test-writer
gowebknot
Plan and write Maestro mobile end-to-end coverage for user-facing generated Expo or React Native flows, including applicable failure paths and dedicated…
SkillBFreshness: BClaude Code +9 - 0.529score
security-testing-policy
gowebknot
Use when designing, implementing, reviewing, or troubleshooting security tests, authorization checks, input validation, secret handling, dependency…
SkillBFreshness: BClaude Code +9 - 0.529score
code-review
gowebknot
Use when reviewing a change, pull request, patch, refactor, migration, configuration update, dependency change, or release preparation.
SkillBFreshness: BClaude Code +9 - 0.529score
contract-validation
gowebknot
Use when defining, changing, reviewing, or debugging runtime-validated contracts across application boundaries, including schemas, request and response…
SkillBFreshness: BClaude Code +9 - 0.529score
end-to-end-api-flow
gowebknot
Use when implementing, reviewing, debugging, or tracing API-backed behavior across shared contracts, backend endpoints, typed API clients, query hooks, and…
SkillBFreshness: BClaude Code +9 - 0.529score
frontend-standards
gowebknot
Use when implementing, reviewing, refactoring, or debugging frontend routes, components, Atomic Design composition, forms, tables, loading and error states…
SkillBFreshness: BClaude Code +9 - 0.529score
jsx-component-extraction
gowebknot
Use when writing, reviewing, or refactoring React JSX or TSX with deeply nested markup, repeated UI blocks, complex conditional branches, mapped content…
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 28, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/gowebknot/monorepo-template
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from gowebknot
- 0.529score
checklist-tracking
gowebknot
Use when a task creates, edits, reviews, or completes Markdown checklists, implementation plans, task lists, status tables, or tracked test cases.
SkillBFreshness: BClaude Code +9 - 0.529score
end-to-end-api-flow
gowebknot
Use when implementing, reviewing, debugging, or tracing API-backed behavior across shared contracts, backend endpoints, typed API clients, query hooks, and…
SkillBFreshness: BClaude Code +9 - 0.529score
code-review
gowebknot
Use when reviewing a change, pull request, patch, refactor, migration, configuration update, dependency change, or release preparation.
SkillBFreshness: BClaude Code +9 - 0.529score
contract-validation
gowebknot
Use when defining, changing, reviewing, or debugging runtime-validated contracts across application boundaries, including schemas, request and response…
SkillBFreshness: BClaude Code +9 - 0.529score
backend-standards
gowebknot
Use when implementing, reviewing, refactoring, or debugging backend services, modules, controllers, persistence, request validation, response serialization…
SkillBFreshness: BClaude Code +9 - 0.529score
frontend-standards
gowebknot
Use when implementing, reviewing, refactoring, or debugging frontend routes, components, Atomic Design composition, forms, tables, loading and error states…
SkillBFreshness: BClaude Code +9
Cite this page
authentication-rbac skill. Agent Mart. https://agentmart.dev/skills/gowebknot-authentication-rbac (last updated 2026-10-24)