Terminal
Terminal/Skill
Audits and cleans up a Mixpanel project's Lexicon, the registry of event and property metadata, by scoring, filling and tagging it.
By Mixpanel
Works with
npx skills add mixpanel/ai-plugins --skill manage-lexiconEngine required — resolve an engine per
ENGINE.md: one named in the conversation or loaded instructions is mandatory (not set up → offer/mixpanel:installfor it); otherwise use the Mixpanel MCP server, or offer/mixpanel:installif it's unavailable.
This skill manages a Mixpanel project's Lexicon — the registry of tracked events and properties. It scores metadata quality, bulk-enriches missing descriptions / display names / tags, resets metadata, triages data quality issues, and renames or deletes tags. It runs as a single interactive session per project; do not invoke in parallel for the same project.
The skill is built from a small set of abstractions. The Execution section below tells you how to use them.
Each command lives in its own file under commands/ and is loaded on demand. Match commands explicitly (user names them) or implicitly (message matches a trigger phrase below).
| Command | File | Match if message contains any of |
|---|---|---|
score-lexicon | commands/score-lexicon.md | score, audit, health, grade |
enrich-and-tag | commands/enrich-and-tag.md | enrich, fill, auto-tag, generate descriptions |
reset-lexicon | commands/reset-lexicon.md | reset, wipe, clear metadata, clear tags |
review-issues | commands/review-issues.md | issues, drift, anomaly, data quality |
manage-tags | commands/manage-tags.md | rename tag, delete tag, merge tags |
If a message matches more than one command, show the Command menu instead.
Shown when no command was detected or inferred.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Manage Lexicon — [Project Name] ([project_id])
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Score Lexicon — Health score (0–100), auto-offer bulk enrich
2. Enrich & Tag — Fill empty display names, descriptions & tags
3. Reset Lexicon — Clear descriptions / display names / tags
4. Review Issues — Triage data quality issues
5. Manage Tags — Rename or delete existing tags
6. Exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The skill maintains a typed vocabulary of session state that persists across commands within a single session. Each command declares which keys it reads and writes at the top of its file (Session reads: / Session writes:). Commands check the session first and only fetch what's missing — never re-fetch what already exists.
| Key | Shape | Description |
|---|---|---|
project_id, project_name | string | Active project (set in Step 1). |
event_list | string[] | Event names in the project's Lexicon, post-exclusions. |
event_details_cache | map | event_name → full metadata (description, display_name, verified, tags, hidden, dropped). |
property_names | { event: [], user: [] } | Property name lists split by resource type. |
property_details_cache | map | property_name → full metadata. |
volume_rank_map | map | event_name → { volume, rank }. Empty {} if volume query fails. |
issues_list | array | Normalised data quality issues, populated by review-issues. |
existing_tags | array | Tag names in use across the project, populated by manage-tags and enrich-and-tag. |
Always-on filters. Apply before building any working set, gap list, or write payload — excluded entities are never read, scored, or written.
Ignored events
$ae_first_open, $ae_updated, $ae_session, $ae_iap, $ae_crashed — legacy auto-tracked mobile SDK events. Mixpanel-managed; customers cannot edit metadata.$session_start, $session_end — virtual events (project session definitions). No Lexicon row.Ignored properties
mp_ — Mixpanel-managed reserved namespace.$ — Mixpanel system properties.Not excluded: custom events that happen to start with $ (only the explicit $ae_* / $session_* list is filtered). Hidden and dropped events stay in the working set — they're part of hygiene scoring.
CONFIRM (case-sensitive). Anything else cancels, except EXPORT, which writes the preview to JSON without committing.exit always valid. Stop, discard uncommitted work, return to the Command menu.project_id.data-governance-runs/[ISO-timestamp]-[command].json in the working directory. Include project_id, command, counts of entities written, counts of failures.enrich-and-tag, add tags; don't replace. Add new tags to events without removing or replacing existing ones.enrich-and-tag. Only write to a field if it's currently null or empty. Never overwrite existing metadata. Use reset-lexicon first if regenerating.Follow these steps in order.
Resolve which Mixpanel project the user wants to operate on.
✅ [Project Name] ([project_id]), proceed.list (which re-fetches the project list and shows the table).list → fetch projects → show table.If the project listing fails because no Mixpanel capability is available, stop and ask the user whether to run /mixpanel:install now.
Start empty. Commands populate what they need and skip fetches whose data already exists in session.
For each user request, run these steps. Loop until the user exits or starts a new project.
/score-lexicon, "run reset", etc.) → use that command.If the command file is not already in context, read commands/[command].md.
Follow the instructions in the command file. Reuse session context wherever possible.
Print ✅ Done. Write the audit log entry per the Audit trail rule. Return to choosing the next command.
If the command itself produced a follow-on offer (Score → Enrich, Reset → Enrich, Review-Issues triage), honour that handoff before returning to command selection.