bulk-data-export
Skill7 starsChanged 5 months agoMITView on GitHub
Fetch large lists from TikHub (posts, followers, search results, comments) with safe pagination, dedup, and export to CSV or JSON for downstream analysis. Use when the user wants "all posts", "export to CSV/JSON", "scrape N results", "a dataset of", or any large repeated-pull job.
- Reads credentials
In this repository18 other files it gives its agents.
- comments-analysisSkill
- competitor-analysisSkill
- creator-analyticsSkill
- douyinSkill
- hashtag-researchSkill
- instagramSkill
- social-listeningSkill
- social-media-downloaderSkill
- tikhub-endpoint-discoverySkill
- tikhub-mcpSkill
- tikhub-onboardingSkill
- tikhub-python-sdkSkill
- tikhub-rest-apiSkill
- tiktokSkill
- trend-researchSkill
- twitter-threadsSkill
- xiaohongshuSkill
- youtubeSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Use the platform's cursor (max_cursor / pagination_token / continuation_token / cursor / cursor+index) — see tikhub-rest-api and the …
- Distinctive: line 35
Add a short delay / concurrency cap ≤4 (QPS 10/sec).
- Very specific: line 40
JSON: write the deduped array to output.json.
- Distinctive: line 48
No duplicate ids in the output.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bulk Data Export
Paginate a list endpoint at scale, dedup, and write a clean dataset — safely and with a cost estimate up front.
Setup gate
[ -z "${TIKHUB_API_KEY:-}" ] && echo "Set TIKHUB_API_KEY first (see tikhub-onboarding)."Step 1 — Estimate cost FIRST (mandatory)
Bulk pulls are the biggest credit spender. Before fetching:
# pages = ceil(target_rows / page_size)
curl -s "https://api.tikhub.io/api/v1/tikhub/user/calculate_price?endpoint=<ENDPOINT_PATH>&request_per_day=<PAGES>" \
-H "Authorization: Bearer $TIKHUB_API_KEY"
curl -s "https://api.tikhub.io/api/v1/tikhub/user/get_user_daily_usage" -H "Authorization: Bearer $TIKHUB_API_KEY"State the estimated calls + cost and get the user's go-ahead before running.
Step 2 — Paginate safely
- Use the platform's cursor (
max_cursor/pagination_token/continuation_token/cursor/cursor+index) — seetikhub-rest-apiand the platform skill. - Loop until
has_moreis false or the user's target row count is reached (hard cap). - Add a short delay / concurrency cap ≤4 (QPS 10/sec). Retry transient 429/5xx with backoff.
- Dedup by stable id (e.g.
aweme_id/ post id) as you go.
Step 3 — Export
- JSON: write the deduped array to
output.json. - CSV: flatten the fields the user cares about (id, author, text, likes, comments, shares,
timestamp, url) into
output.csv. - Report row count, pages fetched, duplicates removed, and the file path.
Verification gate
- Row count ≈ requested (note if the source ran out early).
- No duplicate ids in the output.
- File written and non-empty; CSV header matches columns.
Red flags
- Skipping the cost estimate — never start a bulk pull without one.
- Ignoring the user's row cap /
has_more(infinite loop, credit burn). - Silent truncation — always report how many rows were actually fetched vs. requested.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

