What problem does it solve?
Adding an audit event to a Nango endpoint touches many files across the monorepo — the vocabulary table, metadata types, middleware specs, route mounts, and the webapp filter list — and missing any one of them causes build errors or silently lost audit rows. This Skill provides the exact ordered workflow and gotchas so every audited endpoint is wired correctly.
Core Features & Use Cases
- Vocabulary-first workflow: Start from
AuditEventTable in packages/types/lib/audit-trail/event.ts and let the compiler drive the remaining changes across metadata types, middleware specs, and the webapp.
- Middleware and mounting rules: Defines spec placement in
packages/server/lib/middleware/audit/, barrel exports, and the requirement to mount audit middleware before withScope so denials are still recorded.
- Gotcha coverage: Documents resolver timing (raw
req.body before zod), targetFromResponse/metadataFromResponse for handler-generated values, and control-plane vs data-plane scoping.
- Use Case: When adding a new
integration.updated endpoint, follow the checklist to declare the action in the vocabulary, write the auditable spec, mount it before the scope check, add the webapp filter entry, and verify with a break-checked unit test.
Quick Start
Use the adding-audit-events skill to add an audit event for my new Nango endpoint and update all required files.