AGENT SKILL

fun-content

Use when a task needs light entertainment content from a live API - "build a quiz/trivia game", "random dog picture", "cat fact", "advice of the day", "random fun fact" - for a demo, bot, party feature, or filler content slot. Open Trivia DB is the quiz default (its session-token mechanics are documented here); catfact.ninja, random.dog, Advice Slip, and Useless Facts cover the rest, all keyless. Do NOT use for placeholder users/products/images in a prototype - use test-placeholder-data instead; do NOT use for dictionary or encyclopedia lookups - use language-reference instead; if the request is a vague "I need live data", route through public-data-api-picker.

License 许可
MIT
所属仓库
SkillMedev/skills
最近更新
2026-10-14
Stars
★ 25
Forks
3

01 前言 Front Matter

name
fun-content
metadata
{ "title": "Fun Content APIs" }
description
Use when a task needs light entertainment content from a live API - "build a quiz/trivia game", "random dog picture", "cat fact", "advice of the day", "random fun fact" - for a demo, bot, party feature, or filler content slot. Open Trivia DB is the quiz default (its session-token mechanics are documented here); catfact.ninja, random.dog, Advice Slip, and Useless Facts cover the rest, all keyless. Do NOT use for placeholder users/products/images in a prototype - use test-placeholder-data instead; do NOT use for dictionary or encyclopedia lookups - use language-reference instead; if the request is a vague "I need live data", route through public-data-api-picker.

03 SKILL.md 正文

Fun Content APIs

Pull trivia, animal images, and one-liner facts from verified keyless endpoints. The mistakes this prevents: shipping a quiz that repeats questions because Open Trivia DB's token mechanics were skipped, printing raw HTML entities in questions, and citing one of this category's chronically-dead quote APIs from training memory.

Ranked APIs

  1. Open Trivia DB (opentdb.com) - DEFAULT for quiz/trivia: 4,000+ questions, categories, difficulties. No key, but has session-token and encoding mechanics (below) that naive integrations get wrong.
  2. catfact.ninja - random cat facts. random.dog - random dog images (the better-known Dog CEO API at dog.ceo is returning HTTP 520s, verified - see Do NOT).
  3. Advice Slip (api.adviceslip.com) and Useless Facts (uselessfacts.jsph.pl) - one-liner advice and fun facts.

Procedure

  1. Trivia beyond one throwaway call → get a session token first. The token makes the API track served questions so users never see repeats. Rate limit: 1 request per IP per 5 seconds - batch up to 50 questions per call instead of calling per-question.
  2. Decode the questions. Default responses are HTML-encoded (", '). Either decode entities client-side or request &encode=url3986 and URL-decode - do one of them, or apostrophes render as garbage.
  3. Check response_code on every trivia call. 0 ok; 1 not enough questions for the filters (loosen category/difficulty); 3/4 token missing or exhausted (request/reset token); 5 rate-limited (wait 5s).
  4. Shuffle answers. correct_answer and incorrect_answers arrive separated - merge and shuffle before display or the correct answer's position leaks.
  5. Animal images: fetch the JSON, then use the URL inside it. For random.dog, filter for image extensions - it also serves .mp4/.webm.

Ask the user only if missing - trivia: question count (default: 10), category (default: any), difficulty (default: any).

URL templates + real response shapes

Trivia session + questions:

https://opentdb.com/api_token.php?command=request              ← once per user session
https://opentdb.com/api.php?amount=10&type=multiple&token={token}
https://opentdb.com/api.php?amount=10&category=9&difficulty=easy&token={token}   ← 9 = General Knowledge
https://opentdb.com/api_category.php                           ← id → name list
https://opentdb.com/api_token.php?command=reset&token={token}  ← on response_code 4
{"response_code":0,"results":[{"type":"multiple","difficulty":"easy",
  "category":"Entertainment: Musicals & Theatres",
  "question":"In Shakespeare's play Julius Caesar, Caesar's last words were...",
  "correct_answer":"Et tu, Brute? ",
  "incorrect_answers":["Iacta alea est!","Vidi, vini, vici.","Aegri somnia vana."]}]}

Tokens expire after 6 hours of inactivity. Max amount=50 per call.

One-liners and animals:

https://catfact.ninja/fact                     → {"fact":"...","length":94}
https://random.dog/woof.json                   → {"url":"https://random.dog/….jpg","fileSizeBytes":170059}
https://api.adviceslip.com/advice              → {"slip":{"id":89,"advice":"Don't be afraid to ask questions."}}
https://api.adviceslip.com/advice/search/{q}   → {"slips":[...]} - 404s (JSON body) on no match
https://uselessfacts.jsph.pl/api/v2/facts/random → {"text":"...","source":"...","permalink":"..."}

Advice Slip caches responses for ~2 seconds - identical repeat calls return the same slip; don't build "another one!" loops tighter than that.

Deliverable

For a quiz: working token lifecycle (request → use → reset on code 4), entity-decoded questions, shuffled answers, response_code handled. For content slots: the fetched item plus the URL used, with image extensions filtered where the API mixes media types.

Do NOT use - reach for X instead

  • Dog CEO (dog.ceo) - returning HTTP 520 on all endpoints, verified; random.dog replaces it.
  • quotes.rest, favqs unauthenticated, zenquotes at volume, kanye.rest and friends - this category's quote APIs are chronically down or throttled to uselessness; Advice Slip and Useless Facts are the verified survivors. Probe before adding any other.
  • Placeholder people/products/images for a prototype - test-placeholder-data (Picsum for generic images; this skill's animals are content, not layout filler).
  • Word definitions, encyclopedia facts - language-reference.
  • Anything load-bearing. These are volunteer-run free services - fine for demos and bots, wrong as a paid product's sole content source.

Quality bar

  • Multi-question trivia sessions use a token; zero repeated questions.
  • No raw " or ' ever reaches the user.
  • Answer order is shuffled; response_code paths are handled, not assumed zero.

Sourced and liveness-verified from the public-apis project (MIT).

04 同仓库更多 Skills

SkillMedev
SkillMedev/skills

zone-2-cardio-plan

Use when someone asks to build a steady-state cardio plan, train an aerobic base or Zone 2, structure easy or endurance weekly cardio, train by heart-rate zones, or improve resting heart rate, VO2, or endurance. Builds a heart-rate-zone aerobic training block with session structure, modality choice, and progression. General fitness guidance, not medical advice. Do NOT use to design a strength or lifting program (use Strength Training Plan), high-intensity interval conditioning, HIIT, or circuits (use Conditioning & HIIT Program), or a mobility/flexibility routine (use Mobility Routine).

★ 25
SkillMedev
SkillMedev/skills

youtube-script-writer

Writes retention-engineered long-form YouTube scripts on a hook/body/payoff architecture - a first-30-seconds hook that survives the retention cliff, a beat-sheet body with mini-hooks and bridges, timed pattern interrupts, and a payoff that over-delivers - with B-roll and editing cues marked inline. Use when someone says "script my next video", "my retention graph dies at the start", "tighten this draft", or "outline a video on X". Do NOT use for the 3-second opener of TikTok, Reels, or Shorts - use video-hook-writer instead; do NOT use for spoken voiceover synced to on-screen tutorial actions - use narration-script instead; do NOT use for a sales demo built on a buyer's discovery notes - use demo-script instead; do NOT use to design the thumbnail and title - use thumbnail-concept instead.

★ 25
SkillMedev
SkillMedev/skills

win-back-campaign

Designs segmented win-back email sequences for dormant users - dormancy tiers, a three-beat sequence with a single proportional incentive, and a suppression rule - and measures success by re-activation, not opens. Use when someone says "our users went quiet", "design a win-back campaign", "how do I re-engage lapsed customers", "should we email people who haven't logged in for months", or lifecycle messaging has stopped landing with a lapsed segment. Do NOT use for recovering an unfinished checkout - use abandoned-cart-sequence instead. Do NOT use for diagnosing and fixing why active customers cancel - use churn-reduction instead. Do NOT use for building always-on onboarding or nurture flows - use email-drip-builder instead.

★ 25
SkillMedev
SkillMedev/skills

wikipedia-style

Writes neutral, verifiable, encyclopedic prose following Wikipedia's core content policies and manual of style - NPOV, inline citations, notability-backed claims, and a strict ban on promotional language. Use when someone asks "write this like a Wikipedia article", "draft a Wikipedia page for this company or person", "make this neutral and encyclopedic", or "why does my article draft keep getting rejected". Do NOT use for persuasive or opinion writing - use op-ed-writer instead; for thesis-driven academic papers, use academic-essay; for verifying claims in existing text, use fact-checker.

★ 25
SkillMedev
SkillMedev/skills

whitepapers

Structures and writes authoritative B2B whitepapers - a standalone executive summary, a data-sized problem statement, methodology, evidence-driven findings, recommendations, and a soft call to action - flagging every claim that needs a real citation. Use when a marketer asks "write a whitepaper on this topic", "turn our research into a lead-gen asset", "make this credible enough for executives", or a draft reads like a product pitch instead of analysis. Do NOT use for customer-story-driven proof - use case-study-builder instead; for policy audiences, use policy-brief.

★ 25
SkillMedev
SkillMedev/skills

white-space-analysis

Finds unmet market gaps by ranking jobs-to-be-done on importance versus satisfaction, overlaying them against current solutions and workarounds, and validating that each gap is real, winnable, and worth winning. Use when someone asks "where are the gaps in this market", "what's underserved here", "where should we play next", or is hunting for product, feature, or market-entry opportunities. Do NOT use for profiling competitors and building battle cards - use competitive-intelligence instead; for putting a dollar figure on an identified opportunity - use market-sizing instead; for extracting jobs-to-be-done from raw customer interviews - use jtbd-extractor instead.

★ 25