
Downloading Batch Export Files
- 15 installs
- 70 repo stars
- Updated August 4, 2026
- posthog/ai-plugin
downloading-batch-export-files is a Claude Code skill in the AI & Agent Building category.
Key points
- downloading-batch-export-files
- AI & Agent Building
- AI-coding skill
Downloading Batch Export Files by the numbers
- 15 all-time installs (skills.sh)
- +4 installs in the week ending Jun 21, 2026 (Skillselion tracking)
- Ranked #11,165 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/posthog/ai-plugin --skill downloading-batch-export-filesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 15 |
|---|---|
| repo stars | ★ 70 |
| Last updated | August 4, 2026 |
| Repository | posthog/ai-plugin ↗ |
How do I helps with ai & agent building tasks during AI-assisted development.?
Helps with ai & agent building tasks during AI-assisted development.
Who is it for?
Best when you're working on ai & agent building and need structured help with downloading batch export files.
Skip if: Teams with no ai & agent building needs, or anyone wanting a generic chat assistant without this specific workflow.
When should I use this skill?
When you need to helps with ai & agent building tasks during AI-assisted development., or when downloading-batch-export-files is a claude code skill in the ai & agent building category.
What you get
Structured output aligned to downloading-batch-export-files: downloading-batch-export-files, AI & Agent Building.
Files
Downloading batch export files
Use this skill when a user wants a one-off downloadable export of PostHog data. The export is started and monitored through MCP, but the final file download uses the existing REST endpoint directly.
Available MCP tools
| Tool | Purpose |
|---|---|
posthog:file-download-batch-exports-create | Start an on-demand export and return the run ID |
posthog:file-download-batch-exports-retrieve | Poll the run status and return file IDs after completion |
Do not rely on a generated MCP tool for the /download/ endpoint. That endpoint is a redirecting file download endpoint, so raw HTTP/download handling is the right interface until MCP has explicit redirect support.
Workflow
1. Choose the export shape
Ask a short clarifying question if the user did not specify the required inputs:
model: one ofevents,persons, orsessionsdata_interval_startanddata_interval_end: ISO 8601 datetimes; the range must be at most one weekfile.format:ParquetorJSONLines; preferParquetfor compact analytics exports andJSONLinesfor line-oriented text processingfile.compression: optional, one ofzstd,gzip,brotli,lz4, orsnappy. IfJSONLineswas chosen as format, onlygzipandbrotliare supported.file.max_size_mb: optional maximum part size in MB; set this when the user wants multiple smaller files instead of a single (potentially large) file.
For events, include and exclude are optional event-name filters. Use them only when the user asks for specific events or wants to omit specific events.
2. Start the export
Call posthog:file-download-batch-exports-create with the selected shape. The response contains an id for the export run.
Example request:
{
"model": "events",
"file": {
"format": "JSONLines",
"compression": "gzip"
},
"include": ["$pageview"],
"data_interval_start": "2026-05-25T00:00:00Z",
"data_interval_end": "2026-05-26T00:00:00Z"
}3. Poll until completion
Call posthog:file-download-batch-exports-retrieve with the returned id.
Status handling:
| Status | Action |
|---|---|
Starting or Running | Wait briefly and poll again |
Completed | Read the files array and download each file |
Cancelled | Stop and report that the run was cancelled |
Failed, FailedRetryable, FailedBilling, Terminated, or TimedOut | Stop and report the error field |
When Completed, the files array contains file UUIDs. For single-file exports it usually contains one UUID. For split exports, download every UUID unless the user asked for a specific part.
4. Optionally, cancel a running export
If required by the user, a running export can be cancelled by calling posthog:file-download-batch-exports-cancel-create with the returned id.
An export that has already finished or has already failed may not be cancelled.
After cancelling an export, the id may not be used anymore and the export must start again from the beginning. However, you may still use the id to retrieve the export status (which will always be Cancelled).
5. Download files through REST
Use a direct authenticated HTTP request to the existing endpoint:
GET /api/projects/{project_id}/file_download_batch_exports/{run_id}/download/{part}/part can be either:
- a file UUID from the
filesarray returned byfile-download-batch-exports-retrieve - a zero-based file index, ordered by key
If there is only one file, this also works without part:
GET /api/projects/{project_id}/file_download_batch_exports/{run_id}/download/Let the HTTP client follow the redirect, or inspect the Location header if you need the temporary signed URL. Use the same PostHog authentication context as other API calls.
6. Save, do not print, file contents
Treat the result as a file download, not a chat response. Parquet is binary and must be written as bytes. JSONLines may still be large; save it to a file rather than pasting the contents unless the user explicitly asks for a tiny sample.
Use a filename that includes the model, run ID, and part identifier when possible, for example:
posthog-events-<run_id>-<part>.jsonl.gz
posthog-persons-<run_id>-<part>.parquetWatch-outs
- The maximum export interval is one week. Split longer user requests into separate export runs or ask which week to export.
- A run can briefly report
Runningafter completion while file records are being created. Poll again instead of failing immediately. - Download URLs are temporary. If a URL expires, call the REST download endpoint again for a fresh redirect.
- Do not send the signed URL to unrelated services unless the user explicitly asks; it grants temporary access to the exported file.
- If the user wants all parts of a split export, iterate over every UUID in
files; do not assume part0is enough. - Large batch exports may take a few minutes or even longer to complete. Suggest to the user that they can speed-up their download by including only certain events or narrowing the date range.
Related skills
FAQ
What does downloading-batch-export-files do?
downloading-batch-export-files is a Claude Code skill in the AI & Agent Building category.
When should I use downloading-batch-export-files?
When you need to helps with ai & agent building tasks during AI-assisted development., or when downloading-batch-export-files is a claude code skill in the ai & agent building category.
What are the main capabilities?
downloading-batch-export-files; AI & Agent Building; AI-coding skill.