audit_logging
15
总安装量
15
周安装量
#22326
全站排名
安装命令
npx skills add https://github.com/cityfish91159/maihouses --skill audit_logging
Agent 安装分布
opencode
15
codex
15
gemini-cli
14
antigravity
14
claude-code
14
windsurf
13
Skill 文档
Audit Logging Protocol
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, andmetadata.
2. Implementation Standards
- Backend (API):
- Use the project’s standard Logger service (e.g.,
src/services/logger.tsor similar). - Example:
await Logger.info({ event: 'POST_CREATED', userId: user.id, metadata: { postId: newPost.id }, });
- Use the project’s standard Logger service (e.g.,
- Database (Supabase):
- Ensure tables have
created_at,updated_at, andcreated_bycolumns. - Check if specific Audit Table inserts are required (e.g.
audit_logstable).
- Ensure tables have
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?