home / skills / shunsukehayashi / miyabi / ccg

ccg skill

/.claude/skills/ccg

This skill helps you generate complete online courses with automated structure, scripts, TTS, slides, and assets via Gemini API.

npx playbooks add skill shunsukehayashi/miyabi --skill ccg

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

Files (1)
SKILL.md
2.2 KB
---
name: ccg
description: AI Course Content Generator - Generate complete online courses with Gemini API. Triggers on "create course", "generate lesson", "course content", "ccg", "/ccg".
allowed-tools: Bash, Read, Write, Edit, Grep, Glob, WebFetch, WebSearch
---

# AI Course Content Generator (CCG)

**Version**: 1.0.0
**Location**: `/Users/shunsukehayashi/dev/ai-course-content-generator-v2`

---

## Triggers

| Trigger | Examples |
|---------|----------|
| Course creation | "create course", "generate course", "/ccg" |
| Development | "ccg dev", "start course generator" |
| Build | "ccg build", "build course app" |

---

## Quick Commands

```bash
# Development
cd /Users/shunsukehayashi/dev/ai-course-content-generator-v2 && npm run dev

# Production build
cd /Users/shunsukehayashi/dev/ai-course-content-generator-v2 && npm run build

# Electron dev
cd /Users/shunsukehayashi/dev/ai-course-content-generator-v2 && npm run electron:dev

# Electron build
cd /Users/shunsukehayashi/dev/ai-course-content-generator-v2 && npm run electron:build
```

---

## Key Capabilities

1. **Course Structure Generation** - JSON curriculum generation
2. **Lesson Script Generation** - Customizable narration scripts
3. **Text-to-Speech** - Gemini TTS audio generation
4. **Slide Generation** - Graphic recording style
5. **Video Rendering** - WebCodecs API MP4 creation
6. **Bulk Export** - ZIP download of all assets

---

## Architecture

```
Vision Panel → Structure → Content Pipeline → Export
     ↓              ↓              ↓            ↓
 Image/PDF/URL  JSON Structure  Slides/Audio  MP3/MP4/ZIP
```

---

## Key Files

| File | Purpose |
|------|---------|
| `services/geminiService.ts` | Gemini API calls + retry logic |
| `templates/prompts.ts` | Zod schemas + prompt builders |
| `utils/audioUtils.ts` | PCM→MP3 encoding (lamejs) |
| `utils/videoUtils.ts` | MP4 muxing (WebCodecs) |
| `types.ts` | Course structure interfaces |
| `constants.ts` | Defaults + TTS voice options |

---

## Gemini Models

- **Primary**: `gemini-3-flash-preview` (with thinking)
- **Backup**: `gemini-2.5-flash` (quota fallback)
- **TTS**: `gemini-2.5-flash-preview-tts`
- **Image**: `gemini-3-pro-image-preview`

---

## Environment

- `GEMINI_API_KEY` required in `.env`

Overview

This skill generates end-to-end online course content using the Gemini API. It assembles structured curricula, lesson scripts, TTS audio, slides, and rendered video assets so you can publish complete courses quickly. Triggers include natural commands like "create course", "generate lesson", "course content", "ccg", and the slash command "/ccg".

How this skill works

The skill accepts a course brief and produces a JSON curriculum that defines modules, lessons, learning objectives, and assets. It calls Gemini models for content generation and TTS, uses image and slide generators for visuals, and encodes audio and MP4 video for each lesson. Outputs are packaged for bulk export (ZIP) so you can download or integrate the course into LMS or CMS systems.

When to use it

  • You need a full course scaffold from outline to downloadable assets.
  • You want narrated lesson scripts and synthesized audio without recording voiceover.
  • You need slide visuals or graphic-recording style images for lessons.
  • You want a repeatable pipeline for batch-generating many lessons or courses.
  • You need quick prototypes of course content to test learning flows.

Best practices

  • Start with a clear, concise course brief: audience, duration, and target outcomes.
  • Iterate on generated JSON structure before producing final media to control scope.
  • Choose appropriate Gemini TTS voice and preview short clips before full generation.
  • Break large courses into batches to avoid quota or runtime issues with API calls.
  • Keep an API key in a secure environment variable and monitor quota usage.

Example use cases

  • Create a 6-week beginner Python course with lesson scripts, slides, and MP4 lessons.
  • Generate microlearning modules for employee onboarding with voiceover audio.
  • Produce a rapid prototype of a paid course to validate demand before full production.
  • Bulk-export 50 short tutorials as ZIP packages for an LMS import.
  • Convert existing lecture notes into narrated video lessons with synchronized slides.

FAQ

What Gemini models does this use?

Primary generation uses Gemini flash models with a TTS-specific model for audio and an image model for visuals. Fallback models are used for quota resilience.

How do I provide my API key?

Set your Gemini API key in an environment variable before starting the generator; keep it out of source control.