Gkm audit
Skill technanimals/geekmidas-skills/.cursor/skills/gkm-audit
Use when editing files that import from @geekmidas/audit, use DefaultAuditor, KyselyAuditStorage, AuditableAction, or implement type-safe audit logging for database transactions.From its SKILL.md
npx -y skills add technanimals/geekmidas-skills --skill gkm-auditAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.7 KB, as published. Nobody here has run it
gkm-audit
Docs: https://geekmidas.github.io/toolbox/packages/audit.html
Activation
- Files importing
@geekmidas/audit - Files using
DefaultAuditor,KyselyAuditStorage,AuditableAction - Files calling
.audit(),.flush(), or defining audit action schemas - Transactional audit writes alongside domain operations
Key patterns
import { DefaultAuditor, KyselyAuditStorage } from '@geekmidas/audit';
import type { AuditableAction } from '@geekmidas/audit';
type AppAuditAction =
| AuditableAction<'user.created', { userId: string; email: string }>
| AuditableAction<'order.placed', { orderId: string; total: number }>;
const storage = new KyselyAuditStorage({ db, tableName: 'audit_logs' });
const auditor = new DefaultAuditor<AppAuditAction>({
actor: { id: 'user-123', type: 'user' },
storage,
});
auditor.audit('user.created', { userId: '789', email: '[email protected]' });
await auditor.flush();
- Compile-time validation of audit action names and payload shapes
- Transactional support — audit writes are atomic with domain changes
- KyselyAuditStorage is the default persistence adapter; pluggable for other ORMs
- Actor tracking:
{ id, type, metadata }injected per audit call - Batch
flush()for high-throughput scenarios
Integration points
@geekmidas/db— KyselyAuditStorage depends on Kysely DB instance@geekmidas/logger— audit events can be streamed to structured logs@geekmidas/constructs— emit audit events from endpoint handlers