Backend Dev Guidelines
litefuse/litefuse
Comprehensive backend development guide for Litefuse's Next.js 14/tRPC/Express/TypeScript monorepo.
Profiles slow PostHog API endpoints when the main cost is in Postgres or Python.
$ npx skills add PostHog/posthog-foss --skill profiling-slow-api-endpoints -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PostHog/posthog-foss profiling-slow-api-endpoints --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/profiling-slow-api-endpoints .claude/skills/profiling-slow-api-endpoints && rm -rf skills-srcUse ~/.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/
Install the "profiling-slow-api-endpoints" agent skill from https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/profiling-slow-api-endpoints into .claude/skills/profiling-slow-api-endpoints/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "profiling-slow-api-endpoints", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/profiling-slow-api-endpointsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add PostHog/posthog-foss --skill profiling-slow-api-endpoints -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PostHog/posthog-foss profiling-slow-api-endpoints --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/profiling-slow-api-endpoints .agents/skills/profiling-slow-api-endpoints && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "profiling-slow-api-endpoints" agent skill from https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/profiling-slow-api-endpoints into .agents/skills/profiling-slow-api-endpoints/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "profiling-slow-api-endpoints", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PostHog/posthog-foss --skill profiling-slow-api-endpoints -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PostHog/posthog-foss profiling-slow-api-endpoints --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/profiling-slow-api-endpoints .cursor/skills/profiling-slow-api-endpoints && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "profiling-slow-api-endpoints" agent skill from https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/profiling-slow-api-endpoints into .cursor/skills/profiling-slow-api-endpoints/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "profiling-slow-api-endpoints", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/PostHog/posthog-foss.git --path .agents/skills/profiling-slow-api-endpoints--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add PostHog/posthog-foss --skill profiling-slow-api-endpoints -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PostHog/posthog-foss profiling-slow-api-endpoints --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/profiling-slow-api-endpoints .gemini/skills/profiling-slow-api-endpoints && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "profiling-slow-api-endpoints" agent skill from https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/profiling-slow-api-endpoints into .gemini/skills/profiling-slow-api-endpoints/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "profiling-slow-api-endpoints", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install PostHog/posthog-foss profiling-slow-api-endpointsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add PostHog/posthog-foss --skill profiling-slow-api-endpoints -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/profiling-slow-api-endpoints .github/skills/profiling-slow-api-endpoints && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "profiling-slow-api-endpoints" agent skill from https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/profiling-slow-api-endpoints into .github/skills/profiling-slow-api-endpoints/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "profiling-slow-api-endpoints", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PostHog/posthog-foss --skill profiling-slow-api-endpoints -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PostHog/posthog-foss profiling-slow-api-endpoints --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/posthog-foss.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/profiling-slow-api-endpoints .opencode/skills/profiling-slow-api-endpoints && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "profiling-slow-api-endpoints" agent skill from https://github.com/PostHog/posthog-foss/tree/master/.agents/skills/profiling-slow-api-endpoints into .opencode/skills/profiling-slow-api-endpoints/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "profiling-slow-api-endpoints", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
profiling-slow-api-endpointsProfiles slow PostHog API endpoints when the main cost is in Postgres or Python.
Profiling Slow API Endpoints is an agent skill from PostHog/posthog-foss, published by the product's own GitHub organization. Profiles slow PostHog API endpoints when the main cost is in Postgres or Python. Use when a screen, picker, or list is slow; a Django endpoint has high tail latency; a query plan changes with tenant size; or a proposed database fix needs production evidence. Covers APM traces, safe production EXPLAIN, representative measurements, implementation choices, tests, rollout, and post-deploy verification. For ClickHouse or HogQL latency, use optimizing-clickhouse-and-hogql-queries instead.
Its SKILL.md is about 1k 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 Databases, covering REST APIs, Data warehousing and Monitoring and alerting. It works with PostHog, ClickHouse, PostgreSQL and Django. 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.
Read from SKILL.md and the folder at commit 2c48221. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Profiling Slow API Endpoints loads about 1k tokens when it runs. Until then it costs about 130 tokens; SKILL.md has 537 words of instructions outside code blocks.
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.
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.
The full file from PostHog/posthog-foss at commit 2c48221, republished under its MIT licence (© PostHog). 537 words, ~1,022 tokens.
.claude/skills/profiling-slow-api-endpoints/SKILL.md (or your agent's skills folder).Use this skill when a PostHog API request spends most of its time in Postgres or Python.
For ClickHouse and HogQL, use
optimizing-clickhouse-and-hogql-queries.
Measure the same user action before and after the change. A faster query does not help if the action stays slow.
Record the page action, endpoint, request shape, affected users, request volume, and a latency percentile such as p95.
Read slow APM traces with posthog:query-apm-spans and the exploring-apm-traces skill.
The distribution shows how often requests are slow.
The traces show where they spend time.
cursor.execute spans point to Postgres.Follow the request to the function that creates the work. Do not optimize a view wrapper when another function owns the delay.
Get the SQL and parameters from a slow request. Keep its filters, ordering, and page size. Check for repeated queries, count queries, and work that does not block the response. A reduced query can use a different plan. Local data and statistics can also produce a different plan.
Use
querying-production-databases-via-metabase
to inspect the production read replica.
Start with EXPLAIN.
Use EXPLAIN (ANALYZE, BUFFERS) only when the exact SELECT is safe to run.
Inspect row estimates, indexes, join types, loops, filters, sorts, and buffer use.
Remove work that the response does not need before you change a query or add an index. Compare the original and candidate with the same parameters. Run each more than once, record the cache state, and verify equal results.
Measure the tenant-size distribution when plans can change with tenant size. Test both sides of a plan crossover before you select a threshold. One tenant is not enough evidence for a conditional plan.
Prefer one plan when it performs well across the measured range. If a size check or cache selects the plan:
Use a feature flag when behavior is uncertain or the change needs a staged rollout. Do not use a flag as a substitute for measurements.
Test public behavior at the lowest useful level. Add plan or SQL-shape tests only when the improvement depends on that shape. Test each plan and the failure path when the code selects between plans. Use a representative database for plan and timing comparisons because unit tests cannot prove latency.
After deployment, check the same latency measure, request volume, error rate, and database load. Compare recorded plan attributes when more than one plan exists. Remove the change if it does not improve the user action without a regression.
© PostHog, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/profiling-slow-api-endpoints of PostHog/posthog-foss.
Open the folder on GitHubat commit 2c48221
Profiling Slow API Endpoints 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Profiling Slow API Endpoints this skillPostHog/posthog-foss | 721 | — | ~1k | Automated safety check: Pass | MIT | |
| Backend Dev Guidelineslitefuse/litefuse | 100 | 1 repos | ~5.8k | Automated safety check: Pass | Custom licence | |
| Clickhouse Managed Postgres RcaClickHouse/agent-skills | 544 | — | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Dsqlawslabs/agent-plugins | 912 | — | ~6.9k | Automated safety check: Pass | Apache-2.0 | |
| Django Query Plan Readinghashgraph-online/awesome-codex-plugins | 1.2k | — | ~660 | Automated safety check: Pass | MIT | |
| Chdb SQLvemetric/vemetric | 394 | 1 repos | ~1.2k | Automated safety check: Pass | Apache-2.0 |
litefuse/litefuse
Comprehensive backend development guide for Litefuse's Next.js 14/tRPC/Express/TypeScript monorepo.
ClickHouse/agent-skills
MUST USE when investigating performance issues on a ClickHouse-managed Postgres instance.
awslabs/agent-plugins
Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed…
hashgraph-online/awesome-codex-plugins
Read and compare Django/PostgreSQL query execution plans using QuerySet.explain(), EXPLAIN, EXPLAIN ANALYZE, scan types, joins, estimates, actual timing, buffers, and row counts.
vemetric/vemetric
A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…
tempoxyz/tidx
Query indexed Tempo chain data via tidx HTTP API and CLI. An agent skill from tempoxyz/tidx.
PostHog/posthog-foss
Author useful, low-noise log alerts on services in a PostHog project.
PostHog/posthog-foss
Operating procedure for the conflict-autoresolver agent: sweep open PostHog/posthog PRs that conflict with master, resolve the trivial conflicts (generated artifacts deterministically, source…
PostHog/posthog-foss
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).
PostHog/posthog-foss
Investigates distributed application performance using PostHog APM (OpenTelemetry span) data via MCP.
PostHog/posthog-foss
Debug and inspect LLM/AI agent traces using PostHog's MCP tools.
PostHog/posthog-foss
Diagnose why a product metric changed (dropped, spiked, or plateaued) by orchestrating breakdowns, actors, paths, lifecycle, retention, and annotations queries.
Works with
Categories
Profiles slow PostHog API endpoints when the main cost is in Postgres or Python. Profiling Slow API Endpoints is an agent skill from PostHog/posthog-foss, published by the product's own GitHub organization. Profiles slow PostHog API endpoints when the main cost is in Postgres or Python.
Profiling Slow API Endpoints fits situations like: A Django endpoint has high tail latency; A query plan changes with tenant size; A proposed database fix needs production evidence.
Run `npx skills add PostHog/posthog-foss --skill profiling-slow-api-endpoints -a claude-code`. Or copy the skill folder (.agents/skills/profiling-slow-api-endpoints in PostHog/posthog-foss) into .claude/skills/profiling-slow-api-endpoints in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PostHog/posthog-foss --skill profiling-slow-api-endpoints -a codex`. Or copy the skill folder (.agents/skills/profiling-slow-api-endpoints in PostHog/posthog-foss) into .agents/skills/profiling-slow-api-endpoints in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PostHog/posthog-foss --skill profiling-slow-api-endpoints -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/profiling-slow-api-endpoints, .gemini/skills/profiling-slow-api-endpoints, .github/skills/profiling-slow-api-endpoints and .opencode/skills/profiling-slow-api-endpoints in your project.
SKILL.md names no scripts, command-line tools or credentials: Profiling Slow API Endpoints is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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.
Profiling Slow API Endpoints is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Profiling Slow API Endpoints: Backend Dev Guidelines (litefuse/litefuse, 100 stars), Clickhouse Managed Postgres Rca (ClickHouse/agent-skills, 544 stars), Dsql (awslabs/agent-plugins, 912 stars) and Django Query Plan Reading (hashgraph-online/awesome-codex-plugins, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.