Agent skill

Posthog Debug Bundle

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Collect a redacted, reproducible PostHog diagnostic bundle without capturing secrets or raw customer data.

MITAuto-check passedSales & Support

Install Posthog Debug Bundle

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-debug-bundle -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace posthog-debug-bundle --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/posthog-debug-bundle .claude/skills/posthog-debug-bundle && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
posthog-debug-bundle
GitHub stars
2.8k
Token cost
~2k tokens
SKILL.md length
289 words
Files
2 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Collect a redacted, reproducible PostHog diagnostic bundle without capturing secrets or raw customer data.

  • Works in 5 steps: Run Full Diagnostic Script → Test Event Capture Flow Only When Approved → Check Feature Flag Status → …
  • An integration failure needs escalation
  • SKILL.md covers Overview, Prerequisites, Instructions and Checklist, plus 5 more sections
  • Calls curl, npm and jq; reaches us.posthog.com and us.i.posthog.com; needs NEXT_PUBLIC_POSTHOG_KEY and POSTHOG_PERSONAL_API_KEY

What it does

Posthog Debug Bundle is an agent skill from jeremylongshore/tons-of-skills-marketplace. Collect a redacted, reproducible PostHog diagnostic bundle without capturing secrets or raw customer data. Use when an integration failure needs escalation or handoff. Trigger with "PostHog debug bundle", "collect PostHog evidence", or "PostHog support ticket".

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/official-docs.md`). Compatibility notes: Designed for Claude Code

It sits in Sales & Support, covering Customer support. It works with PostHog. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • An integration failure needs escalation
  • With PostHog debug bundle
  • Collect PostHog evidence
  • PostHog support ticket

Example prompts

  • “PostHog debug bundle”
  • “collect PostHog evidence”
  • “PostHog support ticket”
  • “/posthog-debug-bundle”

Requirements

  • Python 3
  • A credential in NEXT_PUBLIC_POSTHOG_KEY
  • A credential in POSTHOG_PERSONAL_API_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Bash(grep:*), Bash(curl:*), Bash(tar:*), Grep

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Run Full Diagnostic Script
  2. Test Event Capture Flow Only When Approved
  3. Check Feature Flag Status
  4. Verify Admin API Access
  5. Package and Review

What it can do on your machine

Read from SKILL.md and the folder at commit 23ea8d4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Bash(grep:*)
    • Bash(curl:*)
    • Bash(tar:*)
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • npm
    • jq
    • node
    • python3
    • pip3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • us.posthog.com
    • us.i.posthog.com
    • eu.i.posthog.com

    Also links to:

    • posthog.com
    • status.posthog.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • NEXT_PUBLIC_POSTHOG_KEY
    • POSTHOG_PERSONAL_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Posthog Debug Bundle loads about 2k tokens when it runs, and up to ~2.2k if it reads all its reference files. Until then it costs about 71 tokens; SKILL.md has 289 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 23ea8d4, republished under its MIT licence (© jeremylongshore). 289 words, ~1,971 tokens.

Download SKILL.mdSave it as .claude/skills/posthog-debug-bundle/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
posthog-debug-bundle
description
Collect a redacted, reproducible PostHog diagnostic bundle without capturing secrets or raw customer data. Use when an integration failure needs escalation or handoff. Trigger with "PostHog debug bundle", "collect PostHog evidence", or "PostHog support ticket".
allowed-tools
Read, Bash(grep:*), Bash(curl:*), Bash(tar:*), Grep
compatibility
Designed for Claude Code
argument-hint
[project-path] [output-directory]
version
1.14.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, posthog, debugging

PostHog Debug Bundle

Overview

Collect diagnostic evidence for PostHog support tickets. Gathers SDK versions, API connectivity, feature flag status, event flow verification, and redacted configuration. All secrets are automatically redacted.

Prerequisites

  • PostHog SDK installed in project
  • Access to environment variables
  • curl and jq available

Instructions

Tool discipline

Use Read to inspect the relevant configuration and implementation before proposing changes. Use Grep to locate initialization, capture, flag, and credential boundaries.

Step 1: Run Full Diagnostic Script
bash
#!/bin/bash
set -euo pipefail

BUNDLE_DIR="posthog-debug-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BUNDLE_DIR"

echo "=== PostHog Debug Bundle ===" > "$BUNDLE_DIR/summary.txt"
echo "Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$BUNDLE_DIR/summary.txt"
echo "" >> "$BUNDLE_DIR/summary.txt"

# --- Environment ---
echo "--- Runtime Environment ---" >> "$BUNDLE_DIR/summary.txt"
echo "Node: $(node --version 2>/dev/null || echo 'not found')" >> "$BUNDLE_DIR/summary.txt"
echo "npm: $(npm --version 2>/dev/null || echo 'not found')" >> "$BUNDLE_DIR/summary.txt"
echo "Python: $(python3 --version 2>/dev/null || echo 'not found')" >> "$BUNDLE_DIR/summary.txt"
echo "OS: $(uname -srm)" >> "$BUNDLE_DIR/summary.txt"
echo "" >> "$BUNDLE_DIR/summary.txt"

# --- SDK Versions ---
echo "--- PostHog SDK Versions ---" >> "$BUNDLE_DIR/summary.txt"
npm list posthog-js posthog-node 2>/dev/null >> "$BUNDLE_DIR/summary.txt" || echo "No npm PostHog packages" >> "$BUNDLE_DIR/summary.txt"
pip3 show posthog 2>/dev/null | grep -E "Name|Version" >> "$BUNDLE_DIR/summary.txt" || true
echo "" >> "$BUNDLE_DIR/summary.txt"

# --- API Connectivity ---
echo "--- API Connectivity ---" >> "$BUNDLE_DIR/summary.txt"
echo -n "US Cloud ingest: " >> "$BUNDLE_DIR/summary.txt"
curl -s -o /dev/null -w "%{http_code} (%{time_total}s)" https://us.i.posthog.com/healthz >> "$BUNDLE_DIR/summary.txt" 2>&1
echo "" >> "$BUNDLE_DIR/summary.txt"
echo -n "EU Cloud ingest: " >> "$BUNDLE_DIR/summary.txt"
curl -s -o /dev/null -w "%{http_code} (%{time_total}s)" https://eu.i.posthog.com/healthz >> "$BUNDLE_DIR/summary.txt" 2>&1
echo "" >> "$BUNDLE_DIR/summary.txt"
echo -n "App API: " >> "$BUNDLE_DIR/summary.txt"
curl -s -o /dev/null -w "%{http_code} (%{time_total}s)" https://us.posthog.com/api/ >> "$BUNDLE_DIR/summary.txt" 2>&1
echo "" >> "$BUNDLE_DIR/summary.txt"

# --- Environment Variables (redacted) ---
echo "" >> "$BUNDLE_DIR/summary.txt"
echo "--- Environment Variables (redacted) ---" >> "$BUNDLE_DIR/summary.txt"
env | grep -i posthog | sed 's/=.*/=***REDACTED***/' >> "$BUNDLE_DIR/summary.txt" 2>/dev/null || echo "No POSTHOG env vars found" >> "$BUNDLE_DIR/summary.txt"
echo "" >> "$BUNDLE_DIR/summary.txt"

# --- Key Type Detection ---
echo "--- API Key Types ---" >> "$BUNDLE_DIR/summary.txt"
if [ -n "${NEXT_PUBLIC_POSTHOG_KEY:-}" ]; then
  echo "Project key prefix: $(echo "$NEXT_PUBLIC_POSTHOG_KEY" | head -c 4)_..." >> "$BUNDLE_DIR/summary.txt"
fi
if [ -n "${POSTHOG_PERSONAL_API_KEY:-}" ]; then
  echo "Personal key prefix: $(echo "$POSTHOG_PERSONAL_API_KEY" | head -c 4)_..." >> "$BUNDLE_DIR/summary.txt"
fi

echo "" >> "$BUNDLE_DIR/summary.txt"
echo "Bundle complete: $BUNDLE_DIR/" >> "$BUNDLE_DIR/summary.txt"
Step 2: Test Event Capture Flow Only When Approved
bash
set -euo pipefail
: "${POSTHOG_WRITE_PROBE_APPROVED:?Set only after the incident commander approves a synthetic write}"
test "$POSTHOG_WRITE_PROBE_APPROVED" = "yes"
: "${POSTHOG_PUBLIC_HOST:?Set the regional ingestion host for this project}"

# Send a named synthetic event and verify receipt. A 200 does not prove ingestion.
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "$POSTHOG_PUBLIC_HOST/i/v0/e/" \
  -H 'Content-Type: application/json' \
  -d "{
    \"api_key\": \"${NEXT_PUBLIC_POSTHOG_KEY}\",
    \"event\": \"debug_bundle_test\",
    \"distinct_id\": \"debug-$(date +%s)\",
    \"properties\": {\"test\": true}
  }")

HTTP_CODE=$(echo "$RESPONSE" | tail -1)
BODY=$(echo "$RESPONSE" | head -1)

echo "Capture test: HTTP $HTTP_CODE"
echo "Response: $BODY"

# Inspect the response for quota_limited and verify the named event plus ingestion warnings.
Step 3: Check Feature Flag Status
bash
set -euo pipefail
# Evaluate flags via the current public endpoint.
curl -s -X POST "$POSTHOG_PUBLIC_HOST/flags?v=2" \
  -H 'Content-Type: application/json' \
  -d "{
    \"api_key\": \"${NEXT_PUBLIC_POSTHOG_KEY}\",
    \"distinct_id\": \"debug-test\"
  }" | jq '{
    flags: .flags,
    errorsParsingFlags: .errorsParsingFlags
  }'
Step 4: Verify Admin API Access
bash
set -euo pipefail
# Test personal API key (if available)
if [ -n "${POSTHOG_PERSONAL_API_KEY:-}" ]; then
  curl -s "https://us.posthog.com/api/projects/" \
    -H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" | \
    jq '[.[] | {id, name, created_at}]' > "$BUNDLE_DIR/projects.json" 2>/dev/null || \
    echo "Personal API key failed" >> "$BUNDLE_DIR/summary.txt"
fi
Step 5: Package and Review
bash
set -euo pipefail
# Review for any accidentally included secrets
grep -rn "phc_\|phx_\|Bearer " "$BUNDLE_DIR/" | grep -v REDACTED | grep -v "prefix:" && \
  echo "WARNING: Potential secret found — review before sharing" || \
  echo "No secrets detected in bundle"

# Package
tar -czf "$BUNDLE_DIR.tar.gz" "$BUNDLE_DIR"
echo "Bundle created: $BUNDLE_DIR.tar.gz ($(du -h "$BUNDLE_DIR.tar.gz" | cut -f1))"

Checklist

ItemCollectedPurpose
Node/Python versionsYesSDK compatibility
PostHog SDK versionsYesVersion-specific bugs
API connectivityYesNetwork/firewall issues
Event capture testYesEnd-to-end verification
Feature flag statusYesFlag evaluation issues
Environment vars (redacted)YesConfiguration problems
Key type detectionYesWrong key type errors

Error Handling

IssueCauseSolution
All connectivity failsCorporate firewallCheck proxy settings, try VPN
Capture returns non-200Invalid API keyVerify phc_ key in project settings
/flags failsKey/host mismatchEnsure the project token matches the selected host region
Personal API 401Expired keyRegenerate in Settings > Personal API Keys

Output

  • posthog-debug-YYYYMMDD-HHMMSS.tar.gz archive containing:
    • summary.txt — Runtime, SDK versions, connectivity, redacted config
    • projects.json — Project list (if personal key available)
    • Test event capture and flag evaluation results

Examples

For delayed server events, record SDK versions, configured region, sanitized option names, connectivity status, queue lifecycle, and a bounded log excerpt. Before packaging, scan the bundle for project secrets, personal keys, authorization headers, emails, and event payloads.

Resources

See official PostHog references for current authority and verification boundaries.

Next Steps

For rate limit issues, see posthog-rate-limits.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/.curated/posthog-debug-bundle of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/official-docs.md

Open the folder on GitHubat commit 23ea8d4

Compare with similar skills

Posthog Debug Bundle next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Posthog Debug Bundle compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Posthog Debug Bundle this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2kAutomated safety check: PassMIT
Supporthaacked/dotfiles134—~2.9kAutomated safety check: PassNone
Triaging Web Analytics SupportPostHog/posthog40k—~1.6kAutomated safety check: PassCustom licence
Siftranknoperator/siftrank224—~2.9kAutomated safety check: PassMIT
Customer Support Agentmastra-ai/mastra29k—~2.2kAutomated safety check: PassCustom licence
Add Agent Adaptersafedep/gryph172—~679Automated safety check: PassApache-2.0

Similar skills

  • Support

    haacked/dotfiles

    Support hero workflow — start a ticket investigation with auto-organized notes, find existing notes, or generate the weekly highlights log.

    134 GitHub stars~2.9k tokensUpdated today
    Sales & SupportAuto-check passed
  • Official

    Triage web analytics support tickets end to end: enumerate open tickets from the in-app conversations product and their Zendesk mirrors, classify each into a diagnostic shape (frontend crash, "two…

    40k GitHub stars~1.6k tokensUpdated today
    Sales & SupportAuto-check passed
  • Siftrank

    noperator/siftrank

    Find needles in haystacks with SiftRank. An agent skill from noperator/siftrank.

    224 GitHub stars~2.9k tokensUpdated 18 days ago
    Sales & SupportAuto-check passed
  • Customer Support Agent

    mastra-ai/mastra

    Authoring playbook for building agents that triage and reply to customer messages — support tickets, email inquiries, chat questions, refund requests, or product issues.

    29k GitHub stars~2.2k tokensUpdated today
    Sales & SupportAuto-check passed
  • Add Agent Adapter

    safedep/gryph

    A skill your agent uses when adding support for a new AI coding agent to Gryph, or when changing how an existing agent adapter is wired.

    172 GitHub stars~679 tokensUpdated 3 days ago
    Sales & SupportAuto-check passed
  • Agent Support Matrix

    jazzyalex/agent-sessions

    Maintain Agent Sessions agent support matrix and JSON/JSONL parsing compatibility.

    893 GitHub stars~587 tokensUpdated today
    Sales & SupportAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Analyzing Text With NLP

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to perform natural language processing and text analysis using the nlp-text-analyzer plugin.

    2.8k GitHub starsUsed in 1 repo~819 tokens
    Auto-check passed
  • Building Neural Networks

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill allows AI assistant to construct and configure neural network architectures using the neural-network-builder plugin.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Detecting Data Anomalies

    jeremylongshore/tons-of-skills-marketplace

    Process identify anomalies and outliers in datasets using machine learning algorithms.

    2.8k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Explaining Machine Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill enables AI assistant to provide interpretability and explainability for machine learning models.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Optimizing Prompts

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed

Works with

Categories

Questions about Posthog Debug Bundle

What does Posthog Debug Bundle do?

Collect a redacted, reproducible PostHog diagnostic bundle without capturing secrets or raw customer data. Posthog Debug Bundle is an agent skill from jeremylongshore/tons-of-skills-marketplace. Collect a redacted, reproducible PostHog diagnostic bundle without capturing secrets or raw customer data.

When should I use Posthog Debug Bundle?

Posthog Debug Bundle fits situations like: an integration failure needs escalation; with PostHog debug bundle; collect PostHog evidence; postHog support ticket.

How do I install Posthog Debug Bundle in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-debug-bundle -a claude-code`. Or copy the skill folder (skills/.curated/posthog-debug-bundle in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/posthog-debug-bundle in your project. Claude Code loads it when a task matches its description.

How do I install Posthog Debug Bundle in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-debug-bundle -a codex`. Or copy the skill folder (skills/.curated/posthog-debug-bundle in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/posthog-debug-bundle in your project. Codex loads it when a task matches its description.

Can I use Posthog Debug Bundle in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill posthog-debug-bundle -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/posthog-debug-bundle, .gemini/skills/posthog-debug-bundle, .github/skills/posthog-debug-bundle and .opencode/skills/posthog-debug-bundle in your project.

What does Posthog Debug Bundle need to run?

Going by SKILL.md and its folder, Posthog Debug Bundle needs the command-line tools its instructions call (curl, npm, jq, node, python3 and pip3) and credentials named NEXT_PUBLIC_POSTHOG_KEY and POSTHOG_PERSONAL_API_KEY. Our summary lists: Python 3; A credential in NEXT_PUBLIC_POSTHOG_KEY; A credential in POSTHOG_PERSONAL_API_KEY. Its frontmatter pre-approves these tools: Read, Bash(grep:*), Bash(curl:*), Bash(tar:*), Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Posthog Debug Bundle access the network?

SKILL.md names 5 domains. In commands or code: us.posthog.com, us.i.posthog.com and eu.i.posthog.com; the agent is likely to contact these when it follows the instructions. As links in the text: posthog.com and status.posthog.com. This is read from the text; nothing was executed.

Is Posthog Debug Bundle safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Posthog Debug Bundle use?

Posthog Debug Bundle is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Posthog Debug Bundle use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 201 tokens, read only when the agent opens those files.

What are the alternatives to Posthog Debug Bundle?

Skills that share tags, products or a category with Posthog Debug Bundle: Support (haacked/dotfiles, 134 stars), Triaging Web Analytics Support (PostHog/posthog, 40k stars), Siftrank (noperator/siftrank, 224 stars) and Customer Support Agent (mastra-ai/mastra, 29k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Posthog Debug Bundle?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,821 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 8, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.