com um clique
integration-django
PostHog integration for Django applications
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
PostHog integration for Django applications
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Use when driving the Agent on Demand REST API — creating agents, environments, or sessions; writing/maintaining `tests/e2e/`; adding new endpoints; or debugging 4xx responses. Covers auth, the route table, the `detail`-is-a-list quirk for 422, optimistic concurrency (`version`), agent-metadata-merge vs env_vars-full-replacement divergence, the session state machine (failed is terminal), session resources (GitHub repo clone), concurrent-session quota (429), SSE stream with stage events, and multi-turn session semantics. Canonical spec is `docs/openapi.yaml`.
Use when writing Python code that calls the Agent on Demand API via `aod-sdk` (package `aod` — `Client`/`AsyncClient`, `client.agents`/`environments`/`sessions`, `client.sessions.stream(...)`). Covers install, `AOD_API_URL`/`AOD_API_TOKEN` env fallbacks, typed pydantic models, sync-vs-async method parity, the `StreamEvent` SSE iterator (context manager + `.extra` dict), typed `AodHTTPError` subclasses (`ConflictError`/`ValidationError`/`RateLimitError.limit`/`active`), and the runtime-scoped `aod.pretty` formatters. Defers to the `agent-on-demand-api` skill for HTTP semantics, status codes, and state-machine edges.
Use when writing TypeScript or JavaScript that calls the Agent on Demand API via `@ravi-hq/aod-sdk` — `new Client({...})`, `client.agents`/`environments`/`sessions`, `client.sessions.stream(...)`. Covers install, `AOD_API_URL`/`AOD_API_TOKEN` env fallbacks (Node only), the single async client (no sync variant), the `StreamHandle` async iterable with `.close()`, `AbortSignal` cancellation, typed `AodHTTPError` subclasses (`ConflictError`/`ValidationError`/`RateLimitError.limit`/`active`), and Node-vs-browser differences. Defers to the `agent-on-demand-api` skill for HTTP semantics, status codes, and state-machine edges.
Use when working with Sprites (sprites.dev) — creating, managing, or executing commands on Linux microVMs via the sprites-py SDK or REST API. Covers the wrapper-script pattern, streaming exec, filesystem API, checkpoints, network policies, and the critical `env=` gotcha that breaks PATH. Trigger on edits to `sprites_exec.py`, `stream.py`, `runtimes.py`, adding new runtimes, or debugging Sprite connectivity/streaming/lifecycle issues.
Use when driving the Agent on Demand REST API — creating agents, environments, or sessions; writing/maintaining `tests/e2e/`; adding new endpoints; or debugging 4xx responses. Covers auth, the route table, the `detail`-is-a-list quirk for 422, optimistic concurrency (`version`), agent-metadata-merge vs env_vars-full-replacement divergence, the session state machine (failed is terminal), session resources (GitHub repo clone), concurrent-session quota (429), SSE stream with stage events, and multi-turn session semantics. Canonical spec is `docs/openapi.yaml`.
Use when writing Python code that calls the Agent on Demand API via `aod-sdk` (package `aod` — `Client`/`AsyncClient`, `client.agents`/`environments`/`sessions`, `client.sessions.stream(...)`). Covers install, `AOD_API_URL`/`AOD_API_TOKEN` env fallbacks, typed pydantic models, sync-vs-async method parity, the `StreamEvent` SSE iterator (context manager + `.extra` dict), typed `AodHTTPError` subclasses (`ConflictError`/`ValidationError`/`RateLimitError.limit`/`active`), and the runtime-scoped `aod.pretty` formatters. Defers to the `agent-on-demand-api` skill for HTTP semantics, status codes, and state-machine edges.
| name | integration-django |
| description | PostHog integration for Django applications |
| metadata | {"author":"PostHog","version":"1.12.0"} |
This skill helps you add PostHog analytics to Django applications.
Follow these steps in order to complete the integration:
basic-integration-1.0-begin.md - PostHog Setup - Begin ← Start herebasic-integration-1.1-edit.md - PostHog Setup - Editbasic-integration-1.2-revise.md - PostHog Setup - Revisebasic-integration-1.3-conclude.md - PostHog Setup - Conclusionreferences/EXAMPLE.md - Django example project codereferences/django.md - Django - docsreferences/identify-users.md - Identify users - docsreferences/basic-integration-1.0-begin.md - PostHog setup - beginreferences/basic-integration-1.1-edit.md - PostHog setup - editreferences/basic-integration-1.2-revise.md - PostHog setup - revisereferences/basic-integration-1.3-conclude.md - PostHog setup - conclusionThe example project shows the target implementation pattern. Consult the documentation for API details.
pip install posthog or pip install -r requirements.txt and do NOT use unquoted version specifiers like >= directly in shell commandsIdentify users during login and signup events. Refer to the example code and documentation for the correct identify pattern for this framework. If both frontend and backend code exist, pass the client-side session and distinct ID using X-POSTHOG-DISTINCT-ID and X-POSTHOG-SESSION-ID headers to maintain correlation.
Add PostHog error tracking to relevant files, particularly around critical user flows and API boundaries.