一键导入
audit-log-integrator
Use when adding audit log entries for any mutation or security event
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when adding audit log entries for any mutation or security event
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | audit-log-integrator |
| description | Use when adding audit log entries for any mutation or security event |
Audit log is append-only. No UPDATE or DELETE from application code. PostgreSQL trigger enforces this.
from libs.db.skillhub_db.models.audit import AuditLog
def audit_log(db, event_type, actor_id, target_type, target_id, metadata=None, ip=None):
entry = AuditLog(
event_type=event_type,
actor_id=actor_id,
target_type=target_type,
target_id=target_id,
metadata=metadata or {},
ip_address=ip,
)
db.add(entry)
{domain}.{action} — examples:
skill.installed, skill.uninstalled, skill.forkedskill.favorited, skill.unfavoritedreview.created, review.updatedsubmission.created, submission.gate1_passedadmin.skill_featured, admin.skill_removedaccess.denied, access.requested, access.grantedInclude context needed for audit trail:
{"version": "2.3.1", "method": "mcp", "division": "engineering-org"}
@router.get("/api/v1/admin/audit-log")
def get_audit_log(event_type: str = None, target_type: str = None, ...):
query = db.query(AuditLog).order_by(AuditLog.created_at.desc())
if event_type: query = query.filter(AuditLog.event_type == event_type)
libs/db/skillhub_db/models/audit.pyapps/api/skillhub/routers/admin.pyapps/api/skillhub/services/social.pyRecord browser-based feature demos as GIFs via Playwright and optionally document them in docs/features/index.md. Trigger with "Demo <feature>" or "Demo and Document <feature>".
Use when creating service modules in apps/api/skillhub/services/
Use when writing API tests in apps/api/tests/
Use when implementing division-based access control on any endpoint
Use when adding services to docker-compose.yml or creating Dockerfiles
Use when implementing error handling across the API, frontend, or MCP server