/be:audit-logfrom Backend Skills
The audit log of a Next.js API — evidence of who did what, when, from where and what changed: platform, organisation and account scopes with their readers, what earns an entry (including refusals), the entry's fields and actor kinds, writes that are never lost and never fail the request, append-only storage with tamper evidence, retention and erasure, scoped reads that are themselves audited, export and streaming, and how it differs from an activity feed. Use when adding a privileged action, an audit action or an audit view.
Ships in Backend Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
An audit log is evidence: the record an investigation, a customer's security review or a compliance check relies on to say who did what, when, from where, and what changed. What makes a log an audit log isn't who reads it but what it guarantees — complete for every security-relevant event, refusals included; attributed; append-only and tamper-evident; retained by a policy and surviving the deletion of the user it names; and exportable.
Before applying this skill, read the project's root AGENTS.md, the AGENTS.md closest to the files in question, and any doc they link for this skill's topic. Names, values and choices — budgets, tiers, tokens, voice, paths — come from those files, never from this skill.
| Scope | Who reads it | What it holds |
|---|---|---|
| The platform | The product's own operators, in the admin panel | Every privileged action across all customers, and every operator action |
| An organisation or team — in products where accounts belong to one | That organisation's owners and admins | Everything that changed the organisation: members, roles, settings, keys, billing, and its members' sensitive actions within it |
| One account | The account holder | Their own security events: sign-ins, password and email changes, second-factor changes, sessions revoked, keys and tokens issued |
Each entry records its scope (and the organisation, where there is one), so one event appears in every log that should hold it — an owner removing a member shows in the organisation's log and the platform's. A reader only ever sees the scope they're accountable for.
The sensitivity of the action, not the role of the actor:
Every other refusal (someone without access to one record) goes to the security log with the actor, method, path and IP, so probing shows up and alerts, but stays out of the audit log, where it would bury the entries that matter (backend-security). Ordinary edits to a person's own content don't belong in either.
scope.resource.action names, the same grammar as the permission verbs (access-control), registered before the feature that uses it ships; never an ad-hoc string;backend-security);after() (nextjs), never as a dangling promise a serverless instance can freeze mid-write; it retries, and a final failure goes to the error log and alerts.firestore), so neither lands without the other.access-control).AGENTS.md), often set by what its customers' compliance asks for (a year is common; some regimes ask for longer).access-control).api-architecture).webhook-delivery, plan-entitlements).An activity feed is a product feature: recent actions shown to members for awareness ("Ada published the event"). It may be fed from the same events, but it promises none of the above — it shows a selection, carries little detail, can be pruned, and goes with the content it describes. Its design belongs in the project's feature docs. Keep both apart from any per-record version history.
Each privileged route's test asserts its audit entry — the action, the actor, the target and the change — and that a refused call writes the failure (testing). A test over the action list asserts every privileged verb has an action that's written somewhere.
Where the audit step sits in a route api-architecture · guards, verbs and impersonation access-control · the security log and what never gets logged backend-security · after() nextjs · the transaction firestore · streaming webhook-delivery · plan features plan-entitlements · tests testing · retention and erasure across the product field-encryption.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub timonwa/engineering-skills --plugin be22 skills in this plugin
/access-controlAccess control for a Next.js API on Firebase — roles, relationships and attributes (RBAC, ReBAC, ABAC) behind permission verbs and one pure can(); guards as the only gate, 404 before 403; tenant scoping; invitations; escalation limits; two-person approval and access reviews; stale claims; API-key scopes; share links and passcodes; where plan and flag checks sit; UI gates that only hide; and tests. Use when adding a permission, role, guarded route, API key, share link, or a control only some people see./access-control-auditManually invoked. Access-control audit — guards on every route and Server Action (BFLA), 404 before 403 and tenant scoping (BOLA), allowlisted writes and projected reads (BOPLA), verbs never role names, roles that add up, escalation and invitations, claims and revocation, sessions and sign-in, API keys and share links, the plan and flag order, UI gates, data rules and the tests. Verifies each finding and writes a prioritised report./api-architectureHow an API route is built in a Next.js API — the fixed order of rate limit, authorise, validate, delegate, audit, respond; thin routes over services; the response envelope and typed errors; caching headers; concurrent edits; long-running work; cursor pagination and allowlisted sorts; resource paths, versions, deprecation and state-transition sub-routes; and what every new route ships with. Cron, webhooks and audit logs are references. Use when adding, changing or reviewing a route handler or the API layer's structure.Other plugins' skills for the same job