When to use this skill
When the user asks for a joke, wants a dad joke about a specific topic, or needs to look up a joke by its ID. icanhazdadjoke is a curated corpus of 744 family-safe pun-style jokes — no auth, no key, one required header. For other joke genres (dark humor, programming jokes, one-liners), this is the wrong skill.
Your best first call
curl -H "Accept: application/json" "https://icanhazdadjoke.com/search?term=cat&limit=5"
No auth. No key. You must set the Accept: application/json header — without it the API returns plain text with no structured fields. The term parameter does case-insensitive substring matching ("cat" matches "cats", "category", "scattered"), and limit caps results per page.
The response shape:
results — array of {id, joke} objects; id is a stable alphanumeric string for reuse with /j/{id}
total_jokes — total match count across all pages
total_pages — page count at the current limit
current_page, next_page, previous_page — 1-indexed pagination
If the user just wants any joke with no topic, use the random endpoint instead: curl -H "Accept: application/json" "https://icanhazdadjoke.com/" returns one {id, joke, status} object.
Fallbacks (when the best call isn't enough)
- User references a specific joke by ID or permalink →
curl -H "Accept: application/json" "https://icanhazdadjoke.com/j/{id}" returns that exact joke; 404 with { "status": 404, "message": "Joke not found" } on invalid IDs.
- User just wants any joke, no topic → The root endpoint (
/) returns a random {id, joke, status} object — same shape as lookup, no parameters needed.
Pitfalls
- Omit the
Accept: application/json header and you get plain text. The API defaults to text/plain — a raw joke string with no ID, no JSON structure. Always set this header.
- Empty or missing
term on /search returns all 744 jokes paginated. Always include a term value unless you genuinely want the entire corpus.
previous_page is 1, not null, on page 1. Pages are 1-indexed and the API never nulls the previous-page pointer. Test current_page > 1 instead of checking previous_page for nullity.
One-line summary for the user
I can find dad jokes by keyword, pull a random one, or look one up by ID from icanhazdadjoke.com — no auth needed, just set the Accept header to JSON.
SKILL.md source (frontmatter + body)
---
name: find-dad-jokes
description: When the user asks for a joke, wants a dad joke about a specific topic, or needs to look up a joke by its ID — reach for icanhazdadjoke. No auth, just set Accept: application/json.
---
## When to use this skill
When the user asks for a joke, wants a dad joke about a specific topic, or needs to look up a joke by its ID. icanhazdadjoke is a curated corpus of 744 family-safe pun-style jokes — no auth, no key, one required header. For other joke genres (dark humor, programming jokes, one-liners), this is the wrong skill.
## Your best first call
```bash
curl -H "Accept: application/json" "https://icanhazdadjoke.com/search?term=cat&limit=5"
```
No auth. No key. You must set the `Accept: application/json` header — without it the API returns plain text with no structured fields. The `term` parameter does case-insensitive substring matching ("cat" matches "cats", "category", "scattered"), and `limit` caps results per page.
The response shape:
- `results` — array of `{id, joke}` objects; `id` is a stable alphanumeric string for reuse with `/j/{id}`
- `total_jokes` — total match count across all pages
- `total_pages` — page count at the current `limit`
- `current_page`, `next_page`, `previous_page` — 1-indexed pagination
If the user just wants any joke with no topic, use the random endpoint instead: `curl -H "Accept: application/json" "https://icanhazdadjoke.com/"` returns one `{id, joke, status}` object.
## Fallbacks (when the best call isn't enough)
- **User references a specific joke by ID or permalink** → `curl -H "Accept: application/json" "https://icanhazdadjoke.com/j/{id}"` returns that exact joke; 404 with `{ "status": 404, "message": "Joke not found" }` on invalid IDs.
- **User just wants any joke, no topic** → The root endpoint (`/`) returns a random `{id, joke, status}` object — same shape as lookup, no parameters needed.
## Pitfalls
- **Omit the `Accept: application/json` header and you get plain text.** The API defaults to `text/plain` — a raw joke string with no ID, no JSON structure. Always set this header.
- **Empty or missing `term` on `/search` returns all 744 jokes paginated.** Always include a `term` value unless you genuinely want the entire corpus.
- **`previous_page` is `1`, not `null`, on page 1.** Pages are 1-indexed and the API never nulls the previous-page pointer. Test `current_page > 1` instead of checking `previous_page` for nullity.
## One-line summary for the user
I can find dad jokes by keyword, pull a random one, or look one up by ID from icanhazdadjoke.com — no auth needed, just set the Accept header to JSON.