home / skills / openclaw / skills / catfact

catfact skill

/skills/thesethrose/catfact

This skill provides random cat facts and breed info from catfact.ninja to entertain, educate, and enrich cat-related conversations.

npx playbooks add skill openclaw/skills --skill catfact

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
1.1 KB
---
name: Cat Fact
description: Random cat facts and breed information from catfact.ninja (free, no API key)
read_when:
  - Wanting random cat facts
  - Looking up cat breeds
  - Building fun bot responses
metadata: {"clawdbot":{"emoji":"🐱","requires":{"bins":["curl"]}}}
---

# Cat Fact

Random cat facts from catfact.ninja (no API key required).

## Usage

```bash
# Get a random cat fact
curl -s "https://catfact.ninja/fact"

# Get a random fact (short)
curl -s "https://catfact.ninja/fact?max_length=100"

# Get cat breeds
curl -s "https://catfact.ninja/breeds?limit=5"
```

## Programmatic (JSON)

```bash
curl -s "https://catfact.ninja/fact" | jq '.fact'
```

## One-liner examples

```bash
# Random fact
curl -s "https://catfact.ninja/fact" --header "Accept: application/json" | jq -r '.fact'

# Multiple facts
for i in {1..3}; do curl -s "https://catfact.ninja/fact" --header "Accept: application/json" | jq -r '.fact'; done
```

## API Endpoints

| Endpoint | Description |
|----------|-------------|
| `GET /fact` | Random cat fact |
| `GET /breeds` | List of cat breeds |

Docs: https://catfact.ninja

Overview

This skill provides instant random cat facts and breed information using the free catfact.ninja service. It requires no API key and returns concise JSON responses suitable for scripts, chatbots, or hobby projects. The skill is lightweight and ideal for adding fun or educational content to apps and automations.

How this skill works

The skill issues simple HTTP GET requests to catfact.ninja endpoints to fetch a random fact or a paginated list of breeds. Responses are returned as JSON with fields such as fact and breed names, which makes parsing trivial in shells, server code, or client apps. No authentication or setup is required — just call the endpoints and handle the JSON payload.

When to use it

  • Add entertaining or educational content to chatbots, Slack bots, or voice assistants.
  • Populate a dashboard or widget with rotating fun facts about cats.
  • Seed test data or demo content in development and staging environments.
  • Generate short social posts or notifications with random cat trivia.
  • Fetch breed lists for lightweight lookups or UI prototypes.

Best practices

  • Cache frequent responses briefly to reduce external calls and improve performance.
  • Respect rate limits by batching requests or limiting frequency in loops.
  • Validate and sanitize JSON fields before displaying in user interfaces.
  • Use query params (e.g., max_length) to control fact length for layout constraints.
  • Fallback gracefully to a local message if the external service is unreachable.

Example use cases

  • A chat widget that returns a random cat fact on user request.
  • A daily notification service that posts a short cat fact to a community channel.
  • A demo app that lists cat breeds for a quick UI showcase.
  • A script that prints multiple random facts for a livestream or presentation.
  • A unit-test helper that seeds random but realistic text content.

FAQ

Do I need an API key to use this skill?

No. The underlying catfact.ninja service does not require an API key for the basic endpoints.

How do I get shorter facts to fit UI limits?

Add the max_length query parameter (for example ?max_length=100) to the /fact endpoint to request shorter facts.