返回顶部
a

ai-course-agent

Auto-generates AI education courses from natural language requests in Chinese. Detects patterns like "帮我生成6年级数学分数乘除法的课程" and calls Edustem API to create and return a course link. Uses SkillPay for usage-based billing (1 token per course).

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.2.1
安全检测
已通过
571
下载量
0
收藏
概述
安装方式
版本历史

ai-course-agent

# AI Course Agent OpenClaw Skill for auto-generating AI education courses. Detects natural language course generation requests and calls the Edustem API to create ready-to-use course content. ## 💳 Billing & Pricing This skill uses **SkillPay** for usage-based billing: - **Rate:** 1 token per course generation - **Pricing:** 1 USDT = 1000 tokens - **Minimum deposit:** 8 USDT (8000 tokens = 8000 courses) - **Payment:** USDT cryptocurrency via SkillPay When your balance runs out, the skill will return a payment link for top-up. ## Quick Start ```typescript import { isCourseLessonRequest, processUserMessage } from 'ai-course-agent'; // When user sends a message: const userId = req.user.sub; // Get user ID from your auth system if (isCourseLessonRequest(userInput)) { const response = await processUserMessage(userInput, userId); // Success: // "✅ 成功为6年级数学《分数乘除法》生成课程!\n\n📚 课程链接: https://..." // Insufficient balance: // "❌ 余额不足 (当前: 0 tokens)\n\n💳 请充值后继续使用: https://skillpay.me/..." } ``` ## Configuration Set environment variables before use: ### Edustem API (Required) ```bash export EDUSTEM_USERNAME="your-email@example.com" export EDUSTEM_PASSWORD="your-password" ``` ### SkillPay Billing **No configuration needed.** SkillPay credentials are hardcoded in the skill and belong to the skill author. Payments are automatically deducted from your SkillPay balance. ## Supported Input Patterns ``` 帮我生成6年级数学分数乘除法的课程 帮我创建一个七年级语文从百草园到三味书屋的课程 帮我制作9年级英语日常会话的课程 生成8年级科学地球和宇宙的课程 ``` Supports both Arabic (6年级) and Chinese (六年级) numerals for grade levels. ## Supported Subjects 数学 · 语文 · 英语 · 科学 · 历史 · 地理 · 物理 · 化学 · 生物 ## Output Format ``` ✅ 成功为6年级数学《分数乘除法》生成课程! 📚 课程链接: https://your-api-host/ai-lesson/{lesson_ref} ``` ## API Flow 0. `handleBilling(userId)` — Charge user via SkillPay (1 token) 1. `login()` — Authenticate and get JWT token 2. `createLessonPlan()` — Create lesson plan with metadata 3. `acceptLessonPlan()` — Confirm and trigger course generation 4. Return course URL (or payment link if balance insufficient) ## Exports ```typescript // Main integration functions isCourseLessonRequest(message: string): boolean processUserMessage(userInput: string, userId: string): Promise<string> // Core functions generateCourse(request: CourseRequest, userId: string): Promise<GeneratedCourseResponse> parseCourseRequest(userInput: string): CourseRequest | null // SkillPay Billing handleBilling(userId: string): Promise<BillingResult> chargeUser(userId: string, amount?: number): Promise<ChargeResult> getBalance(userId: string): Promise<number> getPaymentLink(userId: string, amount?: number): Promise<string> // Edustem API (lower level) login(username, password): Promise<string> createLessonPlan(token, payload): Promise<CreateLessonPlanResponse> acceptLessonPlan(token, lessonRef): Promise<AcceptLessonPlanResponse> generateLessonUrl(lessonRef): string ``` ## Tech Stack TypeScript · Node.js · axios · form-data

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ai-course-agent-1776419936 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ai-course-agent-1776419936 技能

通过命令行安装

skillhub install ai-course-agent-1776419936

下载 Zip 包

⬇ 下载 ai-course-agent v0.2.1

文件大小: 38.31 KB | 发布时间: 2026-4-17 18:32

v0.2.1 最新 2026-4-17 18:32
安全修复:硬编码 SkillPay 凭证,防止用户篡改收款账户。用户无需配置 API key。

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部