Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

integration-sveltekit

Skill by PostHog

PostHog integration for SvelteKit adds PostHog analytics to SvelteKit applications. It is for developers who want to follow a guided, step-by-step setup.

  • Score 68
  • 80 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install integration-sveltekit

Built from the published package, never by AI.

git clone --depth 1 https://github.com/PostHog/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/posthog/integration/skills/sveltekit ~/.claude/skills/integration-sveltekit

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install integration-sveltekit in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

PostHog integration for SvelteKit is an agent skill that helps an AI assistant add PostHog analytics to a SvelteKit application. It runs a four-step workflow: begin, edit, revise and conclude. The skill also points to reference files, including an example SvelteKit project, Svelte documentation and identify-users documentation.

The skill sets clear rules. PostHog keys must come from environment variables and never be hardcoded. New code is added alongside existing code without replacing or restructuring it, and should follow the example project. It also covers setting paths.relative to false in svelte.config.js, identifying users at login and signup, passing session and distinct ID headers when frontend and backend code both exist, and adding error tracking around critical flows and API boundaries. It is aimed at developers adding PostHog to SvelteKit apps.

Written from the project's SKILL.md and checked against it.

What it can do

  • PostHog setup workflowGuides the assistant through four ordered steps: begin, edit, revise and conclude.
  • Svelte documentation lookupUses Svelte MCP server tools list-sections and get-documentation to check Svelte docs.
  • Component validationRuns svelte-autofixer on new or modified .svelte files before finishing.
  • User identificationIdentifies users during login and signup events using the example pattern.
  • Error trackingAdds PostHog error tracking to relevant files, especially critical flows and API boundaries.
  • Session correlationPasses X-POSTHOG-DISTINCT-ID and X-POSTHOG-SESSION-ID headers between frontend and backend.

What you need

  • A SvelteKit application
  • PostHog project keys stored as environment variables
  • Svelte MCP server for documentation and validation tools

Try asking

  • Add PostHog analytics to my SvelteKit app
  • Identify users on login and signup with PostHog
  • Add PostHog error tracking to my API routes

Good to know

  • New or modified .svelte files must pass svelte-autofixer before the work is finished.
  • paths.relative must be set to false in svelte.config.js for session replay with SSR.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/posthog/integration/skills/sveltekit/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md2 KB
  • references/EXAMPLE.md18 KB
  • references/basic-integration-1.0-begin.md2 KB
  • references/basic-integration-1.1-edit.md2 KB
  • references/basic-integration-1.2-revise.md937 B
Show all 8 files
  • references/basic-integration-1.3-conclude.md2 KB
  • references/identify-users.md8 KB
  • references/svelte.md7 KB

Alternatives to integration-sveltekit

All alternatives →
kaggle-cliKaggle
94

Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.

AAA Skill 7.7k
bigquery-bigframesgoogle
94

Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.

AAA Skill 25k
data-loadingmicrosoft
94

Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.

AAA Skill 18k
data-manager-api-setupgoogle
94

Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.

AAA Skill 25k
managed-airflow-dag-authoringgoogle
94

Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.

AAA Skill 25k
data-feedsdavila7
94

Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.

AAA Skill 34k

Compare with kaggle-cli, bigquery-bigframes or data-loading

integration-sveltekit: common questions

Does this skill replace my existing SvelteKit code?

No. The source says to add PostHog code alongside existing integrations and not replace or restructure existing code.

Where should PostHog keys be stored?

The source says to always use environment variables for PostHog keys and never hardcode them.

Why does the skill ask to set paths.relative to false?

The source says it is required for PostHog session replay to work correctly with SSR and is easy to miss.

How do I install integration-sveltekit?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is integration-sveltekit free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is integration-sveltekit safe to use?

It scores 68 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to integration-sveltekit?

Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.

integration-sveltekit Install

Add to stack

Loading.