Ai shifu course creator

From LeoYeAI/openclaw-master-skills · View interactive version

Ai shifu course creator is an AI agent skill from the GitHub repository LeoYeAI/openclaw-master-skills. Convert raw course material into optimized, runnable MarkdownFlow teaching scripts and deploy them as live courses through a five-phase pipeline covering segmentation, orchestration, generation, optimization, and deployment.

How to use this skill

Skill file

Course Creator

Convert raw course material into runnable, optimized MarkdownFlow lesson scripts and deploy them as live AI-Shifu courses.

Execution Modes

Language Resolution Policy

See references/language-resolution.md for the full policy.

Resolve target language with this strict priority:

  1. explicit_output_language_request
  2. target_language_parameter
  3. session_language_preference
  4. prompt_language_detection
  5. source_material_dominant_language
  6. default_fallback_language (en-US)

Authoring Control Inputs

Use these optional controls across all phases:

See references/input-contract.md for recommended object shapes.

Output Boundary

Pipeline Overview

Phase 1: Segmentation → Phase 2: Orchestration → Phase 3: Generation → Phase 4: Optimization → Phase 5: Deployment

Usage Paths

Path A: End-to-End

Run all five phases from raw material to a live deployed course.

  1. Phase 1: Segment raw material into semantic units.
  2. Phase 2: Orchestrate lesson boundaries and generate scripts.
  3. Phase 3: Generate per-lesson MarkdownFlow scripts (called internally by Phase 2).
  4. Phase 4: Audit and optimize final scripts.
  5. Phase 5: Build, import, and publish to the AI-Shifu platform.

Path B: Author Only

Run Phase 1–4 to produce optimized MDF scripts without deploying. Sub-paths:

Path C: Deploy Only

Run Phase 5 alone to deploy pre-existing MDF files to the AI-Shifu platform.

Path D: Manage Existing

Use Phase 5 management commands (list, show, update, rename, reorder, delete, publish, archive) on courses already on the platform.


Phase 1: Segmentation

Turn messy course source material into a reliable intermediate structure for downstream lesson generation.

Workflow

  1. Remove filler language and duplicated phrasing without changing meaning.
  2. Mark immutable blocks: code, images, and tables.
  3. Segment by semantic continuity instead of headings alone.
  4. Propose lesson boundaries with one core question per lesson.
  5. Return source-linked structured segments.

Segment Schema

Each segment includes:

Transfer Signals

Capture these fields for downstream teaching quality:

Phase 1 Outputs

See references/segmentation-rules.md.

Phase 1 Validation


Phase 2: Orchestration

Convert raw course material into runnable lesson-level MarkdownFlow scripts by coordinating segmentation and generation.

Workflow

  1. Normalize source ordering and merge input material.
  2. Run Phase 1 for cleanup and semantic segmentation.
  3. Generate lesson-cut candidates with one core question each.
  4. Run Phase 3 for lesson-level MarkdownFlow scripts.
  5. Build course index and global variable table.
  6. Recompute only failed lessons through strict gating.

Mandatory Gates

All gates must pass:

Rerun Rules

Failure Handling

When source quality is weak:

Phase 2 Outputs

See references/output-contract.md and references/preservation-rules.md.

Phase 2 Validation


Phase 3: Generation

Generate runnable MarkdownFlow scripts for each lesson.

Teaching Pattern Baseline

Use these defaults unless lesson content requires a justified variation:

  1. Learner-facing language only.
  2. Variable collection is distributed, not front-loaded.
  3. Build evidence chain from observation to mechanism to conclusion.
  4. Use visual-first explanation for abstract concepts, then textual interpretation.
  5. Every collected variable must immediately affect downstream content.
  6. Include at least one deepening interaction (calibration, boundary check, or misconception correction).
  7. Include at least one reusable deliverable.
  8. Action steps must be immediately executable or explicitly staged for downstream lessons.
  9. Use carryover statements only if cross-lesson dependency is allowed.
  10. Avoid exposing internal authoring terms in learner-facing text.
  11. Keep interaction prompts concrete and answerable.
  12. *_viewpoint_check prompts must branch with distinct feedback paths.
  13. Repeated interaction patterns are allowed only when framed as staged comparison.

See references/teaching-patterns.md and references/cognitive-techniques.md.

Single-Lesson Generation Strategy

Required anchors:

  1. Opening objective plus visual cover.
  2. Evidence-chain explanation.
  3. At least one effective interaction with visible downstream effect.
  4. At least one reusable deliverable.
  5. Lesson close with summary or decision checkpoint.

Optional modules:

Variable Strategy

Visual-Text Coordination

Interaction Design

Phase 3 Outputs

Return per lesson:

See references/lesson-template.md.

Phase 3 Validation


Phase 4: Optimization

Audit and improve existing MarkdownFlow teaching prompts. This phase is not for writing from scratch.

When to Use

Core Method

  1. Start with a low-friction entry point (cover visual + one light interaction).
  2. Ensure interactions change downstream logic.
  3. Keep structure content-driven, not template-driven.
  4. Build evidence chain: observation/history -> mechanism/data -> conclusion.
  5. Use visuals for abstract structure and text for mechanism + boundaries.
  6. Add viewpoint calibration with branching feedback.
  7. Include concrete correction actions for major misconceptions.
  8. Keep deliverables executable and reusable.
  9. Stabilize syntax and variable usage.

See references/optimization-methodology.md.

High-Standard Constraints

Optimization Workflow

  1. Define scope (single lesson vs full course).
  2. Build coverage matrix: source points -> script coverage.
  3. Label issue classes:
  1. Apply smallest safe edits first.
  2. Run checklist validation before final output.
  3. Re-check visual-text pairing for every core concept.
  4. Re-check variable lifecycle (collection, reference timing, reuse).
  5. Re-check semantic duplication in interaction prompts.
  6. Re-check viewpoint branching and downstream action coupling.

See references/review-checklist.md.

Required Output Style

Common Failure Patterns

Phase 4 Validation


Phase 5: Deployment

Deploy optimized MDF lesson scripts to the AI-Shifu platform as live courses.

Prerequisites

Authentication

See references/cli-reference.md for the full login flow.

When no valid token is available, guide the user through the login process:

  1. Ask the user to choose their region (China mainland / non-China-mainland).
  2. For China mainland: use the SMS login flow via shifu-cli.py login.
  3. For non-China-mainland: instruct the user to log in manually and set SHIFU_TOKEN in {skillDir}/.env.

Always use CLI commands. Never make raw HTTP/API calls directly.

Course Directory

MDF lesson scripts must be organized in a course directory before deployment. See references/course-directory-spec.md for the full specification.

When continuing from Phase 4 (Path A), write optimized scripts into the course directory structure automatically.

CLI Quick Reference

Core deployment commands:

build --course-dir ./course-a/                          # Build shifu-import.json (offline)
import --new --json-file ./course-a/shifu-import.json   # Import as new course
publish <shifu_bid>                                      # Make course live
show <shifu_bid>                                         # Verify course structure

See references/cli-reference.md for the complete command reference and references/import-json-format.md for the JSON schema.

Deployment Workflow

From pipeline (Path A continuation):

  1. Write Phase 4 outputs into the course directory (lessons/, README.md, system-prompt.md, optional structure.json).
  2. Run build --course-dir <dir> to generate shifu-import.json.
  3. Run import --new --json-file <dir>/shifu-import.json to create the course.
  4. Run publish <shifu_bid> to make it live.
  5. Verify via platform URL.

Standalone deployment (Path C):

  1. Ensure course directory is ready with MDF files.
  2. Run build, import, publish as above.

Common Management

Use these commands for ongoing course operations (Path D):

list                                                   # List all courses
show <shifu_bid>                                       # Show course outline
update-meta <shifu_bid> --name "..." --description "..."
update-lesson <shifu_bid> <outline_bid> --mdf-file updated.md
rename-lesson <shifu_bid> <outline_bid> --name "New Name"
reorder <shifu_bid> --order bid1,bid2,bid3
delete-lesson <shifu_bid> <outline_bid>
publish <shifu_bid>
archive <shifu_bid>

Verification

After any deployment or management operation, verify the result:

  1. Admin console: https://app.ai-shifu.cn/shifu/<shifu_bid> (cn) or https://app.ai-shifu.com/shifu/<shifu_bid> (global)
  2. Preview: https://app.ai-shifu.cn/c/<shifu_bid>?preview=true
  3. Check each lesson's MDF content, variable collection, and interaction logic.

Phase 5 Validation


MarkdownFlow Syntax (Required)

See references/markdownflow-spec.md for the quick reference.

  1. Variables:
  1. Interactions:
  1. Segments:
  1. Deterministic output:

```md

!===

Line 1

Line 2

!===

```

  1. Authoring principle:

Shared Constraints

Preservation Rules

See references/preservation-rules.md.

Must preserve:

Can normalize:

Variable Rules

Interaction Rules

Validation Checkpoints

Phase 1 (Segmentation)

Phase 2 (Orchestration)

Phase 3 (Generation)

Phase 4 (Optimization)

Phase 5 (Deployment)

Report Template

See references/report-template.md.

Examples

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.