← Back to Skills Marketplace
jonathandeamer

Did You Know

by Jonathan Deamer · GitHub ↗ · v0.2.2 · MIT-0
cross-platform ✓ Security Clean
512
Downloads
1
Stars
3
Active Installs
5
Versions
Install in OpenClaw
/install did-you-know
Description
Fetches English Wikipedia's "Did you know?" (DYK) facts, caches them locally, and serves them one at a time. No API key required. Does not edit Wikipedia.
README (SKILL.md)

Did You Know

Wikipedia's Did You Know? section highlights well-sourced facts from recently created or expanded articles. It's curated and refreshed at least daily by volunteers.

Use this skill when the user asks for an interesting fact, wants daily trivia delivered automatically, or wants to customise which kinds of facts they see.

Agent: Do not show bash commands or technical details to the user unless they explicitly ask. Run all commands silently. The user experience is conversational — facts, questions, and natural follow-ups. Keep your tone direct and natural; avoid empty compliments like "Great taste!" or "Excellent choice!" when responding to preferences.

What users might want

If the user wants… Do this
A fact Serve one (see Serving a fact)
To customise which facts they see Walk through preferences (see Managing preferences)
Facts delivered automatically Help them set up a schedule (see Scheduling fact delivery)
The fact queue refreshed Follow the Refresh workflow

Is any setup required?

Facts work immediately — no setup needed. Just serve one.

Preferences are optional but recommended. If the user wants to tune which topics come up (more history, less science, etc.), you can set those up in a minute or two. Preferences need the refresh workflow running so that new facts get tagged before they're scored.

Scheduled refresh is only needed if preferences are active. Without preferences, the skill fetches and caches facts automatically as needed. With preferences, set up both a delivery schedule (to serve facts) and a refresh schedule (to tag new facts so preference scoring works).

If a user asks whether any setup is required, a good response is: "You can get facts right now — no setup needed. If you'd like to tune which topics come up, or get a fact delivered automatically each day, we can set either of those up in a few minutes. Want to?"

Serving a fact

Agent: run this silently — do not show the command.

python3 {baseDir}/scripts/dyk.py

Return the output to the user verbatim.

Fact served:

Did you know that heavy-metal guitarist Kiki Wong played drums for Taylor Swift before joining the Smashing Pumpkins?

https://en.wikipedia.org/wiki/Kiki_Wong

No facts remaining:

No more facts to share today; check back tomorrow!

Error:

Something went wrong with the fact-fetching; please try again later.

After serving a fact, check whether ~/.openclaw/dyk-prefs.json exists. If it does not exist, the user is new — follow up: "Would you like to tune which topics you see (more music, less science, etc.), or get a fact delivered automatically each day?" If the file exists, or if you already set up preferences or delivery earlier in this conversation, say nothing.

Managing preferences

Facts are scored and ranked using user preferences. Liked tags increase the score; disliked tags reduce it. Recency and variety bonuses apply automatically.

Have the conversation first

Before running any commands, understand what the user enjoys. If they've already told you (e.g. "I love dark historical stories but not sports"), map their words directly to tags — don't ask them to repeat themselves. Only ask follow-up questions if their intent is unclear. Two dimensions are available:

  • domain — topic area (e.g. history, science, music)
  • tone — style or mood (e.g. quirky, inspiring, dark)

Don't list every tag upfront — just ask what they like in natural terms and map their answers. For example: "I love dark historical stories" maps to domain: history (like), tone: dark (like).

When opening the preferences conversation, mention that you'll also set up automatic refresh alongside — this is what actually applies preferences to new facts as they arrive. Keep it light: something like "I'll also set up automatic refresh in the background so new facts get tagged and scored against your preferences." The user doesn't need to understand the mechanics, but they should know the full setup is happening.

Setting preferences

Once you know what they want:

  1. Check if the prefs file exists. If not, initialise it first (prefs.py init).
  2. Set each preference (prefs.py set).
  3. Summarise in plain language what's been set and how it will affect the facts they see.

If they want to see their current preferences at any point, run prefs.py list and present the results readably — not as raw output.

Agent: run preference commands silently — do not show them.

python3 {baseDir}/scripts/prefs.py init                     # Create prefs file with neutral defaults. Fails if already exists.
python3 {baseDir}/scripts/prefs.py list                     # Show all current preferences
python3 {baseDir}/scripts/prefs.py get domain science       # Get a single preference
python3 {baseDir}/scripts/prefs.py set domain science like  # Set a preference: like | neutral | dislike

Tags

domain: animals · economics_business · film · history · journalism · language_linguistics · literature · medicine_health · military_history · music · mythology_folklore · nature · performing_arts · places · religion · science · sports · technology · television · visual_art

tone: dark · dramatic · inspiring · poignant · provocative · quirky · straight · surprising · whimsical

After setting preferences

Once preferences are saved, run the Refresh workflow immediately — existing cached hooks are all untagged, so preferences can't score anything until they've been tagged. Don't wait for the scheduled cron; do it now, inline. Then set up the refresh schedule so future facts get tagged automatically as they arrive. Say something like: "I'll tag your existing facts now so preferences apply straight away, and set up automatic refresh in the background for new ones."

Also offer scheduled delivery if they haven't already set it up.

Scheduling fact delivery

When the user wants to receive facts automatically, prompt a cadence conversation before setting anything up:

  • How often would they like a fact? Once a day is a nice ritual — over breakfast, on the commute, at the end of the day. A few times spread throughout the day also works.
  • Bear in mind: the more frequently facts are served, the further into lower-preference territory the queue will go.

Once they've chosen, set up an OpenClaw cron job for delivery. Use --session isolated and --announce so the output is delivered back to the user's chat. Do not use OS-level crontab — it has no delivery context and output will go nowhere.

Agent: before running this command, determine the current channel platform and chat ID from your session context. Use them for --channel and --to. Run the command silently — do not show it.

openclaw cron add \
  --name "DYK delivery" \
  --cron "\x3Cschedule>" \
  --session isolated \
  --message "Share a Did You Know fact" \
  --announce \
  --channel \x3Cplatform> \
  --to \x3Cplatform>:\x3Cid>

Replace \x3Cschedule> with a 5-field cron expression matching the user's chosen cadence (e.g. 57 7 * * * for ~8am). Avoid exact :00 minutes — nudge a few minutes either side. Replace \x3Cplatform> and \x3Cid> with the current channel's platform and chat ID (e.g. --channel telegram --to telegram:1234567890).

If preferences are active (or the user wants to set them up), also set up automated refresh — without it, new facts won't be tagged and preference scoring won't apply to them. Say something like: "I'll also set things up so your queue stays fresh and matched to your preferences." Then follow Setting up automated refresh below.

If preferences are not active and the user hasn't expressed interest in them, you can skip the refresh setup — the skill handles basic cache refresh automatically.

Setting up automated refresh

Wikipedia's DYK template is updated by volunteers at approximately 00:00 UTC and again around 12:00 UTC. Schedule the refresh to run shortly after each of those times so new facts are fetched and tagged promptly. Use --session isolated and --no-deliver — this job is invisible to the user and should not post anything to chat.

Agent: run this silently — do not show the command.

openclaw cron add \
  --name "DYK refresh" \
  --cron "7 0,12 * * *" \
  --session isolated \
  --message "Refresh the DYK cache and tag new hooks" \
  --no-deliver

The cron agent will follow the Refresh workflow each time it fires.

Refresh workflow

When asked to refresh the DYK facts cache and tag new hooks:

  1. Run: python3 {baseDir}/scripts/fetch_hooks.py

    This fetches the latest hooks and stores them in ~/.openclaw/dyk-facts.json with "tags": null for new entries.

    If it exits non-zero, stop and report the error. Do not continue.

  2. Read ~/.openclaw/dyk-facts.json and find all hooks where "tags" is null.

    If there are none, stop — nothing to tag.

  3. Assign tags for all untagged hooks at once — do not loop across multiple turns or tool calls. For each hook, assign tags using:

    • Tagging guide: {baseDir}/references/tagging-guide.md
    • Vocabulary: {baseDir}/references/tags.csv

    Output requirements:

    • Use only tag values defined in tags.csv
    • If tagging confidence is low, set "low_confidence": true.
    • Write valid JSON only — no comments or explanations
    • Collect results into a single JSON array
    • Write the array to a temporary file such as /tmp/dyk-tags.json
    # Example array written to /tmp/dyk-tags.json
    [
      {"url": "https://en.wikipedia.org/wiki/Kiki_Wong",
       "domain": ["music"], "tone": "surprising", "low_confidence": false}
    ]
    
  4. Run: python3 {baseDir}/scripts/write_tags.py --json-file /tmp/dyk-tags.json

    If it exits non-zero, report the error.

  5. Do not message the user unless there is an error.

For the full command reference, see {baseDir}/references/commands.md.

Usage Guidance
This skill appears coherent and limited to fetching DYK hooks from Wikipedia and storing them under ~/.openclaw. Before installing, consider: (1) the agent will run bundled python scripts (serve, fetch, prefs, write_tags); those will create/read ~/.openclaw/dyk-facts.json and ~/.openclaw/dyk-prefs.json — inspect those files if you want visibility into cached facts and preferences. (2) The SKILL.md instructs the agent to hide executed commands from the user; if you prefer transparency, ask the agent to show the commands or inspect the repository source instead. (3) If you enable automatic scheduling/delivery, confirm what mechanism the agent will use (cron, system scheduler, or the platform scheduler) — creating scheduled tasks may have broader effects. If you want extra caution, run the scripts manually or in a restricted environment to verify behavior before allowing automated scheduling.
Capability Analysis
Type: OpenClaw Skill Name: did-you-know Version: 0.2.2 The 'did-you-know' skill is a well-documented and functionally transparent tool for fetching and managing Wikipedia facts. The Python scripts (dyk.py, fetch_hooks.py, helpers.py) use standard libraries to interact with the official Wikipedia API and maintain local JSON caches in the user's home directory. While SKILL.md contains instructions for the agent to run commands silently and manage cron jobs, these actions are strictly aligned with the stated purpose of providing a conversational UI and automated fact delivery. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found.
Capability Assessment
Purpose & Capability
Name/description align with the included scripts and data. The skill needs python3 (declared) and reads/writes only to ~/.openclaw (dyk-facts.json and dyk-prefs.json). It fetches only the Wikipedia API endpoint (w/api.php) — appropriate for the stated purpose.
Instruction Scope
SKILL.md tells the agent to run the bundled python scripts (dyk.py/serve_hook.py, fetch_hooks.py, prefs.py, write_tags.py) and to check ~/.openclaw/dyk-prefs.json. This is within scope. Two points to note: (1) the instructions explicitly say to hide the bash commands from users and 'run all commands silently' — a UX choice but it reduces transparency (the commands the agent runs are visible in the skill bundle, but the agent is told not to show them). (2) The docs discuss setting up background schedules (automatic refresh/delivery); scheduling would require the agent to create cron/system tasks or use the platform's scheduler — that step is not fully specified and could require elevated capabilities if performed automatically. Neither point indicates maliciousness, but both are worth the user's attention.
Install Mechanism
No install spec; code is bundled and executed with python3 already on PATH. No external or unknown download URLs are used. This is lower-risk than remote installers.
Credentials
The skill requests no environment variables or credentials. It only reads/writes local files under the user's home (~/.openclaw) and calls Wikipedia's public API — proportional to its functionality.
Persistence & Privilege
always:false and no special platform-wide privileges requested. The skill persists data only under ~/.openclaw (its own cache and prefs). It does not modify other skills or system configs in the provided code.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install did-you-know
  3. After installation, invoke the skill by name or use /did-you-know
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.2.2
- Removed the _meta.json file from the project. - No other changes to functionality or user experience.
v0.2.1
did-you-know 0.2.1 - Added _meta.json file for improved metadata handling and distribution. - No changes to user-facing features or skill behavior.
v0.2.0
Version 0.2.0 introduces enhanced configurability and automated scheduling. - Added options to customise fact preferences by domain and tone. - Implemented scripts to manage user preferences and fact tagging. - Introduced support for scheduled fact delivery and automated refresh using OpenClaw cron jobs. - Expanded documentation with user-focused setup, preference, and scheduling guides. - Added new supporting files (tag lists, tagging guides, helper scripts) for modular operation and improved user experience.
v0.1.1
- Bug fixes and reliability improvements. - Fixes deduplication so previously seen facts are never repeated across sessions. - Fixes fact text rendering for bold-italic markup, HTML entities, and non-breaking spaces. - Fixes cache writes to be atomic, preventing corruption on failure. - Adds API call throttling to avoid hammering Wikipedia on repeated invocations.
v0.1.0
- Initial release of the "did-you-know" skill. - Fetches English Wikipedia’s "Did you know?" facts. - No API key required. - Facts are cached locally and served one at a time. - Includes clear responses for no new facts and error cases. - Does not modify Wikipedia content.
Metadata
Slug did-you-know
Version 0.2.2
License MIT-0
All-time Installs 3
Active Installs 3
Total Versions 5
Frequently Asked Questions

What is Did You Know?

Fetches English Wikipedia's "Did you know?" (DYK) facts, caches them locally, and serves them one at a time. No API key required. Does not edit Wikipedia. It is an AI Agent Skill for Claude Code / OpenClaw, with 512 downloads so far.

How do I install Did You Know?

Run "/install did-you-know" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Did You Know free?

Yes, Did You Know is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Did You Know support?

Did You Know is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Did You Know?

It is built and maintained by Jonathan Deamer (@jonathandeamer); the current version is v0.2.2.

💬 Comments