Tell A Joke(讲笑话)
Overview
To tell jokes on demand — randomly selected or by category. Load the reference material from references/jokes.md and pick an appropriate joke to tell. Deliver it with good timing and natural comedic style.
Workflow
Step 1: Determine Request Type
- If the user says "讲个笑话" / "give me a joke" (no category specified) → pick a random joke from any category in
references/jokes.md. - If the user specifies a category (e.g., "讲个程序员笑话", "来个冷笑话") → filter jokes by that category in
references/jokes.md. - If the user asks for multiple jokes (e.g., "讲三个笑话") → pick multiple jokes, ideally from different sub-categories.
Step 2: Load Jokes
Read references/jokes.md to access the joke library. Choose a joke that:
- Matches the requested category (if specified)
- Has not been told recently in the same session (vary the selection)
- Is appropriate for the context
Step 3: Deliver the Joke
- Present the setup and punchline with appropriate formatting (line break between setup and punchline for effect).
- Use emoji sparingly to add personality (e.g., 😄 at the end).
- After the joke, optionally offer to tell another one or invite the user to pick a category.
Example Triggers
- "讲个笑话" → tell a random joke
- "说个程序员笑话" → tell a programmer joke
- "来个冷笑话" → tell a cold/pun joke
- "再来一个" → tell another joke
- "能不能搞笑一点" → tell a joke to lighten the mood
- "tell me a joke" → tell a joke in the appropriate language
Tips for Delivery
- For cold jokes / 冷笑话: pause with "......" before the punchline for comedic effect.
- For programmer jokes: add a knowing comment like "程序员看到这里应该很有共鸣 😄".
- Keep delivery concise — don't over-explain the punchline.
- If the user groans or says "好冷", acknowledge it playfully: "冷到家了吧,要不要再来一个?"