nara-auth-rbac

nara-auth-rbac is a skill for Claude Code, Codex from MasRama/nara. It costs 19 tokens per session (1,426 once invoked), scanned A, original, MIT.

A set of rules for adding sign-in, sessions, roles, and permission checks to an application. Authentication confirms who a user is; authorization decides what that user may access.

In plain words
What is it for?
Add server-side route guards, manage sessions and roles, enforce permissions, and connect browser authorization screens to the application’s auth feature.
Why use it?
It prevents protected routes from trusting missing or invalid sessions and keeps access decisions in one owned part of the codebase. This reduces accidental exposure of user data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Add server-side route guards, manage sessions and roles, enforce permissions, and connect browser authorization screens to the application’s auth feature.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/masrama/nara/nara-auth-rbac
View source ↗ MasRama/nara
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 MasRama/nara --skill nara-auth-rbac
Clone the repo
git clone --depth 1 https://github.com/MasRama/nara

Made for: Claude Code, 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 nara-auth-rbac

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/masrama/nara/nara-auth-rbac"><img src="https://agentmods.dev/badge/skills/masrama/nara/nara-auth-rbac.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,426 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.00019 $0.01426
Opus 5 $0.00010 $0.00713
Sonnet 5 $0.00004 $0.00285
Haiku 4.5 $0.00002 $0.00143

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

Security

Grade A, and why

nara-auth-rbac 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 4d 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.

.agents/skills/nara-auth-rbac/SKILL.md · 169 lines

How it starts

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

Auth & RBAC

Procedural guidance for modifying the local/reference Auth provider, session/RBAC behavior, or application-level Auth composition.

Scope: provider work, not reusable-Feature coupling

A reusable Feature must NOT directly depend on Auth implementation — not on its routes, services, repositories, tables, or session helpers. When a reusable Feature needs identity or authorization behavior it does not own, it declares a typed host requirement instead:

Reusable Feature
→ declares typed host requirements

Application binding
→ adapts host requirements

Chosen Auth provider
→ fulfills those requirements

Concretely: Users never imports Auth. Users declares UsersServerHost / UsersWebHost; src/app/bindings/users.server.ts and src/app/bindings/users.web.ts adapt those requirements to the selected Auth provider. Swapping the provider means writing a new binding, never editing the Feature. There is no DI container, service locator, or provider registry — bindings are plain TypeScript values passed to explicit factory arguments and route props.

Ownership

The Auth provider owns identity end to end:

Auth provider
→ identity
→ credentials
→ sessions
→ roles/permissions
→ provider-level authorization APIs

In the reference application that is src/features/auth/ (contract.ts, server/accounts.ts, server/service.ts, server/access.ts, server/repository.ts, plus routes). Other capabilities reach accounts only through the provider's public boundary or through a typed host requirement adapted in an application-owned binding — never through direct SQL on Auth-owned tables. Full model: ../../../ARCHITECTURE.md and ../../../docs/v3/database-lifecycle.md.

Host-requirement pattern (for reusable Features)

Declare the capability the Feature needs but does not own. The real UsersServerHost is the reference shape:

import type { UsersServerHost } from '@/features/users/server/host';

export function createUserRoutes(host: UsersServerHost) {
  // Resolve the actor through the host, never through Auth imports.
  const actor = host.resolveActor(sessionToken);
  if (!actor) return unauthorized(context);
  if (!host.canManageUsers(actor.id, 'edit')) return forbidden(context);
  if (rolesChanged && !host.canAssignRoles(actor.id)) return forbidden(context);
}

Read the full file on GitHub · 169 lines

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. 4d ago Changed · +38 lines f18e06e04572
  2. 7d ago First seen · 131 lines · 19 tokens per session scan A 9707d533a540

Subscribe to this mod's changes

nara-auth-rbac is a skill published in the GitHub repository MasRama/nara (5 stars, last pushed yesterday), licensed MIT. It adds 19 tokens to every session and 1,426 once invoked, about $0.0001 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-09-05.

Related

Other skills, from other repositories

vue-component-design

Designs or reviews Vue 3 component APIs. Handles prop drilling decisions, applies compound component patterns with provide/inject, defines minimal public API surfaces with typed props/emits/slots, and enforces Vue 3.4+ composition conventions. Invoked when creating new components, refactoring existing ones, or…

soulcodex/agentic · 70 tokens

vue-application-structure

Establishes or reviews the directory layout, component conventions, composable design, Pinia store structure, and Vue Router configuration for a Vue 3 TypeScript application. Invoked when the user asks to structure a Vue app, set up the project layout, or review Vue architecture.

soulcodex/agentic · 63 tokens

react-component-design

Designs or reviews React component APIs. Handles prop drilling decisions, composition patterns, controlled/uncontrolled contracts, and minimal public API surfaces for React 18+ TypeScript components. Invoked when creating new components, refactoring existing ones, or reviewing component contracts.

soulcodex/agentic · 56 tokens

scaffold-project

Scaffold a new app, API, backend, fullstack project, mobile app, polyglot service, monorepo, or starter with Better Fullstack. Use when the user wants to create, start, bootstrap, initialize, or generate a project from a stack description. Prefer the bundled Better Fullstack MCP server: guidance, schema…

Marve10s/Better-Fullstack · 80 tokens

frontmcp-guides

Tutorials, end-to-end walkthroughs, and complete reference projects for FrontMCP. Use when you want a getting-started guide, a full worked example, or to learn best practices by following a step-by-step build rather than a single API reference. Includes a beginner weather-API server (tool plus static resource, Zod…

agentfront/frontmcp · 157 tokens

admin-net-frontend

Use when building Vue 3 admin dashboard frontends with dynamic routing, permission-based menus, and CRUD page generation. Admin.NET Frontend: Vue 3 + Vite + TypeScript admin UI for Admin.NET backend.

znlgis/opengis-skills · 49 tokens