Install
$ agentstack add skill-sboghossian-mini-claude-for-legal-connector-posthog ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Connector — PostHog
What it does
PostHog is the product analytics and session-recording platform used by the legal-AI team. The PostHog connector enables the AI assistant to query analytics data programmatically — surfacing usage metrics, tracking feature adoption, identifying churn signals, and feeding behavioural data into the platform's customer-success and growth workflows.
This is an internal product-operations tool. It is not used for legal content generation — it is used to understand how users (lawyers and legal-ops teams) interact with the legal-AI product.
Setup / auth
Authentication uses a per-tenant PostHog API key:
- Project API Key: used for event ingestion (client-side tracking); do NOT use this key for server-side queries.
- Personal API Key: used for server-side data retrieval (Insights API, session recordings); this is what the connector uses.
- Stored in the platform's secrets manager per tenant.
- Rate limit: 240 requests/minute (standard PostHog Cloud plan).
The platform operates in a single PostHog project for HAQQ's own analytics. Tenants do not get their own PostHog projects — usage data is scoped at the user/organization level within the single project.
Capabilities
| Capability | API | Notes | |---|---|---| | Query trends (event counts over time) | Insights API | Feature usage, skill invocation counts | | Funnels (conversion analysis) | Insights API | Trial → paid conversion; onboarding completion | | Retention analysis | Insights API | Weekly/monthly active users by cohort | | Persons (individual user profiles) | Persons API | Usage history per user; PII — handle carefully | | Session recordings | Session Recordings API | Qualitative usage signals | | Feature flags (status) | Feature Flags API | Which features are enabled per user/group | | Cohort definition and query | Cohorts API | "Users who invoked NDA skill ≥3 times in 30 days" | | SQL queries (PostHog ClickHouse SQL) | Query API | Flexible ad-hoc analytics |
Key analytics use cases
Usage dashboards
Track daily/weekly/monthly active users, segmented by:
- Plan tier (free, starter, pro, business).
- Practice area (as captured in onboarding survey).
- Jurisdiction (where users identified their primary jurisdiction).
- Skill invocation frequency (which skills are used most).
This data informs the product roadmap and skill prioritization.
Churn risk detection
A user is flagged as churn risk when:
- No login event in the past 21 days (active subscription).
- Skill invocation count dropped >50% week-over-week.
- User raised a support complaint in the last 30 days without a resolution logged.
- Plan tier is Pro or Business (high-value users trigger lower threshold).
Churn risk scores feed into [[connector-hubspot-crm]] to trigger CS team follow-up workflows.
Feature adoption tracking
For each new skill or feature shipped:
- Define a "first use" event (e.g.,
skill_invokedwithskill_id = "draft-nda-bilateral"). - Track adoption rate: what % of active users have used it in the first 30 days.
- Segment by persona and plan tier.
Low adoption in a specific segment suggests a discovery or UX problem — surface to [[connector-linear]] as a product issue.
Conversion funnel
Key funnel for the business:
- Signup (account created).
- Onboarding complete (first skill invoked).
- Engaged (5+ skill invocations in first 7 days).
- Trial converted (Stripe subscription moved to paid).
- Retained (active at Day 30).
Funnel data is queried weekly and fed into the marketing team's growth reporting.
Session recording review
For qualitative product research, the PM can review session recordings of users interacting with specific flows (e.g., the NDA generator). PostHog masks PII in session recordings — ensure masking is configured correctly before recordings are reviewed by non-engineering staff.
Privacy and data handling
- No legal document content is tracked. PostHog receives event metadata (skill invoked, UI element clicked, session duration) — never the content of documents generated or reviewed.
- PII minimization. User email is stored in PostHog as a person property but should not appear in event properties. Use opaque user IDs in events.
- Session recording masking. All form inputs on pages that may contain client information must be masked in PostHog recording configuration.
- GDPR. PostHog data for EU users is subject to GDPR. The platform's privacy policy must disclose product analytics and provide an opt-out mechanism.
- KSA/UAE data residency. If applicable regulations require data residency in the region, evaluate PostHog EU vs US hosting or a self-hosted deployment.
Failure modes
| Failure | Cause | Resolution | |---|---|---| | 401 Unauthorized | API key incorrect or expired | Rotate key; update in secrets manager | | Insight query timeout | Complex query over large dataset | Narrow date range; use sampling; escalate to PostHog support | | Missing event data | Tracking event not firing (client-side bug) | Check browser console; review PostHog event list; file [[connector-linear]] bug | | Feature flag stale | Flag not re-evaluated after property change | Trigger flag refresh; check flag evaluation logs |
Related skills
- [[connector-hubspot-crm]]
- [[connector-stripe]]
- [[connector-linear]]
- [[connector-scheduled-tasks]]
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: sboghossian
- Source: sboghossian/mini-claude-for-legal
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.