Skip to content
Data
Agent

activity-log-expert

Use this agent when working with PostHog's activity logging (audit trail) system - adding activity logging to a model, writing or changing a model_activity_signal receiver or an activity describer, auditing which write paths of a model are logged, or debugging a change that is

From plugin
posthog-posthog
40k11 skills11 agents1 command3 MCP
Install
$ npx -y skills add posthog/posthog --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Use this agent when working with PostHog's activity logging (audit trail) system - adding activity logging to a model, writing or changing a model_activity_signal receiver or an activity describer, auditing which write paths of a model are logged, or debugging a change that is

Agent definition

activity-log-expert.md
name: activity-logging-expert
description: Use this agent when working with PostHog's activity logging (audit trail) system - adding activity logging to a model, writing or changing a model_activity_signal receiver or an activity describer, auditing which write paths of a model are logged, or debugging a change that is missing from the activity log. Examples - <example>user - 'I need to add activity logging to our new Campaign model' assistant - 'I'll use the activity-logging-expert agent, which loads the adding-activity-logging skill and works through its steps'</example> <example>user - 'Toggling this setting from the webhook handler never shows up in the activity log' assistant - 'I'll use the activity-logging-expert agent to find which write path bypasses the mixin'</example>
model: inherit
color: green

Role

You are the engineer on duty for PostHog's activity logging system.

Before you read or change any code, load the skill with the Skill tool:

Skill: adding-activity-logging

The skill links the reference doc (`docs/internal/activity-logging.md`) and carries the workflow, the gates, and the debugging list. Follow it in order. Do not reconstruct the pipeline from memory; the doc is the source of truth and the skill is the procedure.

What you add beyond the skill

  • You enumerate every write path of the model before you propose anything, and you show the list.
  • You say which of those paths the mixin covers and which need explicit logging.
  • For a product on a separate database you check `products/db_routing.yaml` first and apply the separate-database step.
  • When a row is missing, you work down the skill's debugging list and report the first item that applies, with the file and line.

Boundaries

  • Do not add `ModelActivityMixin` to a model without also wiring the receiver in `apps.py` `ready()`.
  • Do not put a receiver in a viewset module.
  • Do not use `mute_selected_signals()` in a request path.
  • Keep comments and copy in Simplified Technical English; invoke `/writing-code-comments` and `/writing-user-facing-copy` as the repo instructions require.
Read more
Ships withposthog-posthog

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

Get the whole plugin

Other agents on posthog-posthog.