backoffice

backoffice is a skill for Claude Code, Codex from latitude-dev/latitude-llm. It costs 32 tokens per session (1,747 once invoked), scanned A, original, MIT.

A set of rules for building and protecting a staff-only backoffice area, meaning an administrative part of a web application used by platform employees. It covers access checks in the page, server, and data layers.

In plain words
What is it for?
Use it when adding, changing, or securing cross-organisation admin features under a /backoffice route. It guides route protection, server-function checks, and the handling of unauthorised requests.
Why use it?
It prevents non-admin users from discovering or using internal administration tools. The rules require failed access attempts to look like ordinary missing pages rather than revealing the area.

Skill for Claude CodeCodex

About the project

Latitude is an open-source platform for monitoring AI agents by collecting execution traces, grouping failures, dispatching coding agents to make fixes, and replaying failures to verify them. Teams use it to observe agent behavior, investigate errors, and monitor whether fixes prevent regressions. The catalogue entries include skills, instructions, and an MCP server for working with Latitude.

latitude-dev/latitude-llm · 4,619 stars · on GitHub

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.

agentmods
npx agentmods add skills/latitude-dev/latitude-llm/backoffice
Any agent
npx skills add latitude-dev/latitude-llm --skill backoffice
Clone the repo
git clone --depth 1 https://github.com/latitude-dev/latitude-llm

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 backoffice

README.md
[![agentmods](https://agentmods.dev/badge/skills/latitude-dev/latitude-llm/backoffice.svg)](https://agentmods.dev/skills/latitude-dev/latitude-llm/backoffice)
Your own site
<a href="https://agentmods.dev/skills/latitude-dev/latitude-llm/backoffice"><img src="https://agentmods.dev/badge/skills/latitude-dev/latitude-llm/backoffice.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,747 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00032 $0.01747
Opus 5 $0.00016 $0.00873
Sonnet 5 $0.00006 $0.00349
Haiku 4.5 $0.00003 $0.00175

Measured 5d ago against content hash 0f8c1478e6fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

backoffice 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 5d 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/backoffice/SKILL.md · 99 lines

How it starts

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

Backoffice (staff-only admin area)

When to use: Adding, modifying, or guarding staff-only /backoffice features — cross-organisation admin tools gated behind users.role === "admin". The backoffice is where platform staff reproduce customer-reported bugs, spot-check data across tenants, and (future) impersonate users for support.

Absolute security invariant

Non-admin users — authenticated or not — MUST NOT be able to access, enumerate, or fingerprint the backoffice surface. Every response is indistinguishable from hitting a random 404. This is enforced by three independent guards; every guard is ship-blocking on its own.

The three guards

1. Route loader guard (UI layer)

apps/web/src/routes/backoffice/route.tsx asserts user.role === "admin" in beforeLoad and loader, throwing notFound() (not redirect or 403 — those leak the path) on failure. TanStack Start code-splitting means non-admins never fetch the backoffice chunk.

2. Server-function guard (RPC layer)

Every backoffice createServerFn handler MUST attach adminMiddleware from apps/web/src/server/admin-middleware.ts. The middleware fetches the session with Better Auth's cookie cache bypassed (so DB-level role demotions take effect on the next request, not 5 minutes later), rejects non-admins with NotFoundError (not 401/403 — the error shape must not fingerprint the admin surface), and injects context.adminUserId + context.user so handlers have admin identity available without re-fetching.

export const adminThing = createServerFn({ method: "GET" })
  .middleware([adminMiddleware])                    // GUARD, before input validation
  .inputValidator(inputSchema)
  .handler(async ({ data, context }): Promise<ThingDto> => {
    const client = getAdminPostgresClient()
    const result = await Effect.runPromise(
      thingUseCase(data).pipe(
        withPostgres(ThingRepositoryLive, client),  // org defaults to "system" → RLS off
        withTracing,
      ),
    )
    return toDto(result)
  })

Read the full file on GitHub · 99 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. 5d ago First seen · 99 lines · 32 tokens per session scan A 0f8c1478e6fa

Subscribe to this mod's changes

backoffice is a skill published in the GitHub repository latitude-dev/latitude-llm (4,619 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 1,747 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-30.