Skip to content
Content
Skill

/edu-role-play

Create interactive AI role-play training activities as self-contained HTML. Use when the user asks to generate a role-play, persona practice, sales simulation, customer conversation drill, compliance scenario, or any learner-vs-AI-character training exercise.

From plugin
skills-for-course-creators
121 skill
Install
$ npx -y skills add minicoursegenerator/skills-for-course-creators --skill edu-role-play --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/edu-role-play

Context preview

The summary Claude sees to decide when to auto-load this skill.

Create interactive AI role-play training activities as self-contained HTML. Use when the user asks to generate a role-play, persona practice, sales simulation, customer conversation drill, compliance scenario, or any learner-vs-AI-character training exercise.

SKILL.md

edu-role-play.SKILL.md
name: edu-role-play
description: Create interactive AI role-play training activities as self-contained HTML. Use when the user asks to generate a role-play, persona practice, sales simulation, customer conversation drill, compliance scenario, or any learner-vs-AI-character training exercise.
allowed-tools: Read Write Edit Bash(edu-role-play *) Bash(node *) Bash(npx *)

edu-role-play

Generate a single HTML file that learners open to practice a conversation with an AI persona. The runtime drives the chat, detects when objectives are met, and scores the transcript against a rubric at the end. You author the composition; the CLI lints and bundles it.

1. Approach

When the user asks for a role-play, your job is to produce a composition HTML that exercises a specific, observable skill. Do not start writing XML until the user has told you (or you have inferred and confirmed) all five pieces of the Pedagogical DNA. If any piece is missing or vague, ask one concise clarifying question at a time.

The shape of every composition:

  • One **persona** with goals, constraints, and speech patterns
  • One **scenario** that places the learner in role
  • 2–4 **observable objectives**
  • A **rubric** that scores each objective with a positive-integer weight (sum 1–20)
  • **Termination** conditions (always a turn cap; manual-end by default)

2. Pedagogical DNA Gate (hard requirement)

Before generating any composition, confirm all five:

1. **Learner role** — who is practicing, and what skill are they building? 2. **Observable objectives** — what concrete actions should the learner take? (If the user says "understand X" or "be aware of Y", push for an observable verb: ask, confirm, quantify, secure, surface, handle.) 3. **Success criteria** — what does a good answer on each objective look like? 4. **Rubric dimensions** — how is each objective weighted relative to the others? 5. **Persona goals + constraints** — what does the AI character want and what can't they budge on?

If the user is vague, ask the smallest next question. Do not invent content that changes the pedagogical intent.

2.5. Plan confirmation (before generating)

Once you have all five pieces of the Pedagogical DNA, **do not start writing XML yet**. First, summarize the plan back to the user in 4–6 short lines and ask for explicit approval. Use this exact shape:

Plan:
- Conversation: <one line on what the role-play is about>
- Learner role: <who the user is practicing as>
- Persona: <name + role of the AI character they'll talk to>
- Objectives: <comma-separated short list>
- Difficulty / tone: <if known>
- Language: <code from §3.5, inferred from how the user is talking to you>

Want me to generate this, or change anything first?

Only proceed to generate the composition HTML after the user confirms ("yes", "go", "looks good", etc.). If they request changes, update the plan, re-print it, and ask again. Do not skip this step even when the DNA was provided up-front in a single message — confirmation is the gate.

2.6. Persona avatar

Set an `avatar` attribute on `<edu-persona>` from this fixed list. The CLI inlines the matching portrait into the bundled HTML at build time. Pick the closest match — do not invent new IDs.

  • `middle-aged-man-friendly` — approachable, salt-and-pepper, business casual
  • `middle-aged-man-frustrated` — serious / tense expression, good for upset customers or hard stakeholders
  • `middle-aged-woman-professional` — confident, business attire
  • `young-woman-professional` — late-20s, polished
  • `young-man-thoughtful` — late-20s, neutral / considered expression
  • `older-woman-warm` — 60s+, warm and smiling

Choose primarily on demographic fit (age, gender), then tone match. If none fit, omit the attribute and the runtime falls back to a generic silhouette.

3. Composition structure

Wrap the composition in the standard HTML shell below. The `<style>` block and the "not bundled yet" `<div data-erp-fallback>` are **required** — they turn the raw source into a self-explaining page when a user opens it directly in a browser. The runtime wipes the `<edu-role-play>` contents on mount, so these have no effect on the bundled output.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>my-roleplay</title>
    <style>
      edu-role-play > :not([data-erp-fallback]) { display: none; }
      [data-erp-fallback].notice { display: block; font-family: system-ui, sans-serif; max-width: 560px; margin: 60px auto; padding: 24px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fafafa; line-height: 1.5; }
      [data-erp-fallback] h2 { margin: 0 0 8px 0; font-size: 18px; }
      [data-erp-fallback] pre { background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; padding: 10px 12px; font-family: ui-monospace, monospace; font-size: 13px; }
    </style>
  </head>
  <body>
<edu-role-play id="my-roleplay" runtime-version="0.1.0" locale="en">
  <div class="notice" data-erp-fallback>
    <h2>This role-play isn't bundled yet</h2>
    <p>Open a terminal in this folder and run:</p>
    <pre><code>npx edu-role-play start my-roleplay.erp</code></pre>
  </div>
  <edu-persona name="Sarah Chen" role="VP of Operations">
    <background>15 years in logistics. Burned by a CRM migration in 2023.</background>
    <goals>Cut vendor count by 30% before Q4 board review.</goals>
    <constraints>Budget locked until Q3. Won't sign without a peer reference.</constraints>
    <speech-patterns>Direct. Asks for specifics. Interrupts vague claims.</speech-patterns>
  </edu-persona>

  <edu-scenario>
    You are an account executive pitching Acme CRM to Sarah. You have 15 minutes to
    uncover a pain point, quantify its impact, and secure a follow-up meeting.
  </edu-scenario>

  <edu-objective id="discover-pain">Surface at least one current operational pain point Sarah owns.</edu-objective>
  <edu-objective id="quantify-impact">Get Sarah to share a number (dollars, hours, or headcount)
Read more
Ships withskills-for-course-creators

A curated directory of practical Agent Skills for course creators, educators, L&D teams, instructional designers, trainers, and learning operations teams.

Get the whole plugin
Stats
13
Stars
3
Forks
Active
Maintenance
HTML
Language
MIT
License
19d ago
Last commit
4mo ago
Created

Repo: minicoursegenerator/skills-for-course-creators