Official agent skill

Setup Web Tests

by PostHog in PostHog/posthog-foss

Set up Python test environment in Claude Code for web where flox is unavailable.

OfficialMITAuto-check: notesTesting & QA

Install Setup Web Tests

skills CLI
$ npx skills add PostHog/posthog-foss --skill setup-web-tests -a claude-code

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

GitHub CLI
$ gh skill install PostHog/posthog-foss setup-web-tests --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/PostHog/posthog-foss.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/setup-web-tests .claude/skills/setup-web-tests && 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
setup-web-tests
GitHub stars
721
Token cost
~1.2k tokens
SKILL.md length
341 words
Files
1
Skills in repo
213
Repo updated
First seen
Licence
MIT

At a glance

Set up Python test environment in Claude Code for web where flox is unavailable.

  • You need to run backend tests and uv sync fails due to Python version mismatch
  • SKILL.md covers Problem, Solution: Download Python from…, Docker Services and Environment Variables, plus 4 more sections
  • Calls curl, uv and apt-get; reaches api.github.com

What it does

Setup Web Tests is an agent skill from PostHog/posthog-foss, published by the product's own GitHub organization. Set up Python test environment in Claude Code for web where flox is unavailable. Use when you need to run backend tests and uv sync fails due to Python version mismatch.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA. It works with Python, PostHog, Docker and GitHub Actions. The repository describes itself as: PostHog FOSS is a read-only mirror of PostHog, with all proprietary code removed. NOTE: This repo is synced automatically from the main PostHog repo. Please raise any issues and… The licence is MIT.

When your agent uses it

  • You need to run backend tests and uv sync fails due to Python version mismatch

Example prompts

  • “/setup-web-tests”

Requirements

  • Python 3
  • Docker

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • uv
    • apt-get
    • python3
    • pytest
    • docker

    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:

    • api.github.com

    Also links to:

    • github.com

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

Setup Web Tests loads about 1.2k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 341 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~1.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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:78
    clickhouse-coordinator objectstorage" | sudo tee -a /etc/hosts
  • NoteMentions a .env fileSKILL.md:83
    e). You can also copy `.env.example` to `.env` for local development defaults.
  • NoteRuns commands with sudoSKILL.md:103
    sudo apt-get update
  • NoteRuns commands with sudoSKILL.md:104
    sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl

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 PostHog/posthog-foss at commit 2c48221, republished under its MIT licence (© PostHog). 341 words, ~1,195 tokens.

Download SKILL.mdSave it as .claude/skills/setup-web-tests/SKILL.md (or your agent's skills folder).
name
setup-web-tests
description
Set up Python test environment in Claude Code for web where flox is unavailable. Use when you need to run backend tests and `uv sync` fails due to Python version mismatch.

Claude Code for web — test setup

This document describes how to set up and run Python tests in a Claude Code for web environment, where flox is not available.

If you get stuck following these instructions, please bail out to the user and seek their guidance. Please suggest that they update this guide.

Problem

The project requires a specific Python version pinned in pyproject.toml (check requires-python), but:

  • Claude Code for web environments may have a different system Python version
  • uv python install <version> may fail if the version isn't yet indexed by uv
  • uv sync enforces the exact version constraint and will fail with the wrong Python version

Solution: Download Python from python-build-standalone

Download the exact version from python-build-standalone GitHub releases. The script below auto-detects the required version from pyproject.toml:

bash
# Auto-detect the required version from pyproject.toml
REQUIRED_VERSION=$(grep requires-python pyproject.toml | grep -oP '[\d.]+')
echo "Required Python: $REQUIRED_VERSION"

# Get the latest release tag from python-build-standalone
RELEASE_TAG=$(curl -sL "https://api.github.com/repos/astral-sh/python-build-standalone/releases/latest" | grep '"tag_name"' | cut -d'"' -f4)

# Find and download the matching build
DOWNLOAD_URL=$(curl -sL "https://api.github.com/repos/astral-sh/python-build-standalone/releases/latest" | \
  grep "browser_download_url" | grep "$REQUIRED_VERSION" | grep "x86_64-unknown-linux-gnu-install_only.tar.gz" | head -1 | cut -d'"' -f4)

mkdir -p /tmp/python-install && cd /tmp/python-install
curl -L -o python.tar.gz "$DOWNLOAD_URL"
tar -xzf python.tar.gz

# Verify
/tmp/python-install/python/bin/python3 --version

If the auto-detection doesn't find a URL (e.g., the version is too new), browse the releases page manually and look for a cpython-<version>+<tag>-x86_64-unknown-linux-gnu-install_only.tar.gz asset.

Install dependencies and run tests
bash
cd /home/user/posthog
uv sync --python /tmp/python-install/python/bin/python3
source .venv/bin/activate

# Run a specific test (if hogli is available)
hogli test path/to/test.py::TestClass::test_method -v

# Or use pytest directly
pytest path/to/test.py::TestClass::test_method -v

# Run all tests in a directory
hogli test posthog/hogql/test/ -v

Docker Services

Most tests require backend services running. If Docker is available, start them with:

bash
docker compose -f docker-compose.dev.yml up -d

See docker-compose.dev.yml for the full list of services and ports. Some test directories have specific service requirements documented in their own configuration files.

Hosts file setup

Tests expect certain hostnames to resolve to localhost:

bash
echo "127.0.0.1 kafka clickhouse clickhouse-coordinator objectstorage" | sudo tee -a /etc/hosts

Environment Variables

Tests require environment variables defined in .github/workflows/ci-backend.yml (see the env: section at the top of the file). You can also copy .env.example to .env for local development defaults.

Additional Setup

Frontend dist placeholders

Some tests require frontend build artifacts to exist (even if empty):

bash
mkdir -p frontend/dist
touch frontend/dist/index.html
touch frontend/dist/layout.html
touch frontend/dist/exporter.html
SAML dependencies (if needed)

For SAML-related functionality:

bash
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl

Pytest Configuration

The pytest.ini sets:

  • pythonpath = . common
  • DJANGO_SETTINGS_MODULE = posthog.settings
  • DEBUG=1, TEST=1

Default ignores: --ignore=posthog/user_scripts --ignore=services/llm-gateway --ignore=common/ingestion/acceptance_tests

Debugging Installation Issues

If you encounter issues with the test setup, refer to .github/workflows/ci-backend.yml for the authoritative CI configuration. This file shows:

  • Exact Python version used in CI
  • System dependencies installed
  • Environment variables set
  • Docker services configuration
  • Test execution commands

Limitations

  • Docker unavailable: Tests requiring services will fail without Docker
  • Network restrictions: Downloading Python requires GitHub access
  • Temporal tests: Require additional Temporal service setup

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

Files

Just SKILL.md in .agents/skills/setup-web-tests of PostHog/posthog-foss.

Open the folder on GitHubat commit 2c48221

Compare with similar skills

Setup Web Tests 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.

Setup Web Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Setup Web Tests this skillPostHog/posthog-foss721—~1.2kAutomated safety check: NotesMIT
Code PatternsAedelon/claude-code-blueprint120—~1.2kAutomated safety check: PassCustom licence
Houndarr CIav1155/houndarr292—~1.2kAutomated safety check: PassAGPL-3.0
DDNS Build and Release MaintenanceNewFuture/DDNS4.7k—~444Automated safety check: PassMIT
Migrate Workflow Ec2 To Osdcpytorch/test-infra113—~2kAutomated safety check: PassCustom licence
Devops Deploysickn33/agentic-awesome-skills47k2 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • Code Patterns

    Aedelon/claude-code-blueprint

    Reference patterns for REST APIs, pytest/vitest testing, Docker multi-stage builds, GitHub Actions CI/CD, PostgreSQL, TypeScript generics, Python async, and React Server Components.

    120 GitHub stars~1.2k tokensUpdated 7 mo ago
    DevOps & CloudAuto-check passed
  • Houndarr CI

    av1155/houndarr

    Houndarr's CI workflow reference and branch protection. An agent skill from av1155/houndarr.

    292 GitHub stars~1.2k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Maintains the DDNS project's GitHub Actions, Docker and Nuitka builds, packaging and release preparation without touching publishing credentials.

    4.7k GitHub stars~444 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Step-by-step playbook for migrating a pytorch/pytorch .github/workflows/.yml from EC2 to OSDC (ARC) runners — covers both dial-up and 100% opt-in patterns, with the inputs that must be plumbed…

    113 GitHub stars~2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Devops Deploy

    sickn33/agentic-awesome-skills

    DevOps e deploy de aplicacoes — Docker, CI/CD com GitHub Actions, AWS Lambda, SAM, Terraform, infraestrutura como codigo e monitoramento.

    47k GitHub starsUsed in 2 repos~1.9k tokens
    DevOps & CloudAuto-check passed
  • Uv

    harperreed/dotfiles

    uv workflows for Python — dependencies, virtualenvs, PEP 723 scripts, Python version management, CI, and Docker.

    334 GitHub stars~1.1k tokensUpdated 4 days ago
    DevOps & CloudAuto-check passed

More from PostHog/posthog-foss

All 213 skills in this repo
  • Authoring Log Alerts

    PostHog/posthog-foss

    Official

    Author useful, low-noise log alerts on services in a PostHog project.

    721 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Autoresolving PR Conflicts

    PostHog/posthog-foss

    Official

    Operating procedure for the conflict-autoresolver agent: sweep open PostHog/posthog PRs that conflict with master, resolve the trivial conflicts (generated artifacts deterministically, source…

    721 GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Help users debug PostHog Error Tracking stack-trace symbolication for any supported platform — JavaScript/TypeScript web, React Native (Hermes), Android (Proguard / R8), or iOS / macOS (dSYM).

    721 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Exploring Apm Traces

    PostHog/posthog-foss

    Official

    Investigates distributed application performance using PostHog APM (OpenTelemetry span) data via MCP.

    721 GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Exploring LLM Traces

    PostHog/posthog-foss

    Official

    Debug and inspect LLM/AI agent traces using PostHog's MCP tools.

    721 GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Investigate Metric

    PostHog/posthog-foss

    Official

    Diagnose why a product metric changed (dropped, spiked, or plateaued) by orchestrating breakdowns, actors, paths, lifecycle, retention, and annotations queries.

    721 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about Setup Web Tests

What does Setup Web Tests do?

Set up Python test environment in Claude Code for web where flox is unavailable. Setup Web Tests is an agent skill from PostHog/posthog-foss, published by the product's own GitHub organization. Set up Python test environment in Claude Code for web where flox is unavailable.

When should I use Setup Web Tests?

Setup Web Tests fits situations like: you need to run backend tests and uv sync fails due to Python version mismatch.

How do I install Setup Web Tests in Claude Code?

Run `npx skills add PostHog/posthog-foss --skill setup-web-tests -a claude-code`. Or copy the skill folder (.agents/skills/setup-web-tests in PostHog/posthog-foss) into .claude/skills/setup-web-tests in your project. Claude Code loads it when a task matches its description.

How do I install Setup Web Tests in Codex?

Run `npx skills add PostHog/posthog-foss --skill setup-web-tests -a codex`. Or copy the skill folder (.agents/skills/setup-web-tests in PostHog/posthog-foss) into .agents/skills/setup-web-tests in your project. Codex loads it when a task matches its description.

Can I use Setup Web Tests 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 PostHog/posthog-foss --skill setup-web-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/setup-web-tests, .gemini/skills/setup-web-tests, .github/skills/setup-web-tests and .opencode/skills/setup-web-tests in your project.

What does Setup Web Tests need to run?

Going by SKILL.md and its folder, Setup Web Tests needs the command-line tools its instructions call (curl, uv, apt-get, python3, pytest and docker). Our summary lists: Python 3; Docker.

Does Setup Web Tests access the network?

SKILL.md names 2 domains. In commands or code: api.github.com; the agent is likely to contact it when it follows the instructions. As links in the text: github.com. This is read from the text; nothing was executed.

Is Setup Web Tests safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo; mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Setup Web Tests use?

Setup Web Tests is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Setup Web Tests use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Setup Web Tests?

Skills that share tags, products or a category with Setup Web Tests: Code Patterns (Aedelon/claude-code-blueprint, 120 stars), Houndarr CI (av1155/houndarr, 292 stars), DDNS Build and Release Maintenance (NewFuture/DDNS, 4.7k stars) and Migrate Workflow Ec2 To Osdc (pytorch/test-infra, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Setup Web Tests?

PostHog (a GitHub organization, an official publisher) maintains it in PostHog/posthog-foss, which has 721 GitHub stars. The repository holds 213 skills in this directory. The repository was last updated on October 7, 2026.

Source: PostHog/posthog-foss on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.