AI SummaryEnsure every critical action is logged (vital for UAG/Trust Room).
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to install the "audit_logging" skill in my project. Please run this command in my terminal: # Install skill into your project (2 files) mkdir -p .claude/skills/audit-logging && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/audit-logging/SKILL.md "https://raw.githubusercontent.com/majiayu000/claude-skill-registry/main/skills/development/audit-logging/SKILL.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/audit-logging/metadata.json "https://raw.githubusercontent.com/majiayu000/claude-skill-registry/main/skills/development/audit-logging/metadata.json" Then restart Claude Code (or reload the window in Cursor) so the skill is picked up.
Description
Ensure every critical action is logged (vital for UAG/Trust Room).
1. Principles
• No Invisible Actions: Every state-changing API call (POST, PUT, DELETE) must produce a log entry. • Traceability: Logs must include userId, action, resourceId, and metadata.
2. Implementation Standards
• Backend (API): • Use the project's standard Logger service (e.g., src/services/logger.ts or similar). • Example: `typescript await Logger.info({ event: 'POST_CREATED', userId: user.id, metadata: { postId: newPost.id } }); ` • Database (Supabase): • Ensure tables have created_at, updated_at, and created_by columns. • Check if specific Audit Table inserts are required (e.g. audit_logs table).
3. Verification Checklist
• [ ] Does the new API endpoint call Logger? • [ ] Are logs visible in Supabase/Dashboards? • [ ] Is the log level appropriate (Info vs Error)? • [ ] Does the log contain enough context to debug issues later?
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster