AGENT SKILL

posthog-cheshire

Instrument and operate PostHog analytics for Cheshire Terminal (US cloud project 473072). Use when wiring posthog-js / posthog-node, cookieless privacy opt-in, wallet identify on SIWS, session replay, product events (wallet_connected, pump/dbc launches, agents, staking), or verifying capture to us.i.posthog.com.

License 许可
MIT
所属仓库
themusebook/skills
最近更新
2026-11-02
Stars
★ 0
Forks
1

01 前言 Front Matter

name
posthog-cheshire
license
MIT
version
1.1.0
metadata
{ "author": "cheshire-terminal", "version": "1.1.0", "homepage": "https://us.posthog.com/project/473072", "posthog_host": "https://us.i.posthog.com", "posthog_project_id": "473072" }
description
Instrument and operate PostHog analytics for Cheshire Terminal (US cloud project 473072). Use when wiring posthog-js / posthog-node, cookieless privacy opt-in, wallet identify on SIWS, session replay, product events (wallet_connected, pump/dbc launches, agents, staking), or verifying capture to us.i.posthog.com.
compatibility
POSTHOG_API_KEY / VITE_POSTHOG_KEY optional (browser has default project key); network to us.i.posthog.com

02 资源文件 3

03 SKILL.md 正文

PostHog for Cheshire Terminal

Project

Key Value
Cloud US https://us.i.posthog.com
Project ID 473072
Inbox https://us.posthog.com/project/473072/inbox
Replay Product Analytics → Session replay

Operating flow

  1. Respect privacy first — no capture until analytics opt-in
  2. Browser: client/src/lib/posthog.ts (cookieless memory persistence)
  3. Server: server/lib/posthog.ts (posthog-node)
  4. Identify wallet on connect and session restore
  5. Capture named product events only (see events reference)
  6. Verify in Network tab + PostHog Live events

Load details when needed:

Env

POSTHOG_API_KEY=phc_...          # server (posthog-node)
POSTHOG_HOST=https://us.i.posthog.com
VITE_POSTHOG_KEY=phc_...         # browser (optional; client has project default)
VITE_POSTHOG_HOST=https://us.i.posthog.com
VITE_POSTHOG_DISABLED=true       # hard kill switch for browser

Never commit raw keys; never log them.

Browser (posthog-js)

// client/src/lib/posthog.ts
posthog.init(key, {
  api_host: "https://us.i.posthog.com",
  defaults: "2026-05-30",
  person_profiles: "identified_only",
  capture_pageview: false,      // SPA pageviews via capturePageView()
  persistence: "memory",
  disable_persistence: true,
  opt_out_capturing_by_default: true,
  disable_session_recording: !allowReplay,
});

Helpers:

Helper When
initPostHog() App boot
identifyWallet(address) SIWS connect + session restore
capturePageView(path) SPA route change (if opted in)
captureEvent(name, props) Product events
resetPostHogIdentity() Logout / wallet disconnect
applyPrivacyToPostHog() Privacy prefs changed

Server (posthog-node)

server/lib/posthog.ts — singleton with exception autocapture. Capture from routes after successful mutations (pump, dbc, agents, staking, auth). Always pass distinctId as wallet or stable principal — never raw secrets.

Verify

  1. Opt into analytics in privacy UI
  2. Network → requests to us.i.posthog.com
  3. Wallet connect → person identified by address
  4. Session replay only if analytics and replay opted in
  5. Live events: wallet_connected, pageviews, product actions
bash skills-store/posthog-cheshire/scripts/check-posthog-env.sh

Rules

  • Cookieless by default — no tracking cookies
  • No capture without explicit analytics consent
  • Do not attach private keys, seed phrases, full API keys, or raw JWT secrets to events
  • Prefer wallet address as distinctId for holder identity
  • Keep event names snake_case and stable (see events reference)

04 同仓库更多 Skills

themusebook
themusebook/skills

youtube-clipper

YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别), 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。 使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video

★ 0
themusebook
themusebook/skills

viem-integration

Integrate EVM blockchains using viem. Use when user says "read blockchain data", "send transaction", "interact with smart contract", "connect to Ethereum", "use viem", "use wagmi", "wallet integration", "viem setup", or mentions blockchain/EVM development with TypeScript.

★ 0
themusebook
themusebook/skills

v4-security-foundations

Security-first Uniswap v4 hook development. Use when user mentions "v4 hooks", "hook security", "PoolManager", "beforeSwap", "afterSwap", or asks about V4 hook best practices, vulnerabilities, or audit requirements.

★ 0
themusebook
themusebook/skills

v4-sdk-integration

App-layer SDK guide for building swap and liquidity experiences directly with the Uniswap v4 SDK. Use when user asks about "v4 sdk", "uniswap v4", "v4 swap", "v4 liquidity", "PoolManager", "V4Planner", "StateView", "PositionManager", "pool state", "v4 position", "uniswap sdk", or when building swap/liquidity UX directly with SDKs rather than via the Trading API.

★ 0
themusebook
themusebook/skills

v4-hook-generator

Generate Uniswap v4 hook contracts via OpenZeppelin MCP. Use when building custom swap logic, async swaps, hook-owned liquidity, custom curves, dynamic fees, MEV protection, limit orders, or oracle hooks.

★ 0
themusebook
themusebook/skills

testing

For testing with Light Protocol programs and clients on localnet, devnet, and mainnet validation.

★ 0