Skip to content

guoweile2004-netizen/chaoxing-auto-answer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

📚 超星学习通自动答题 Skill

License: MIT Platform: Claude Code Playwright MCP GitHub Repo

一个用于 Claude Code 的 Skill,自动化完成 超星学习通(Chaoxing)平台的章节测验、随堂练习、作业和考试。通过 Playwright MCP 操控浏览器,模拟真实用户操作,突破反自动化检测

🎯 核心能力:自动答题 → 提交 → 检测分数 → 自动重做刷满分 → 寻找下一个未完成测验


✨ 特性

  • 🤖 全自动流程:读题 → 答题 → 提交 → 检查分数 → 重做刷满分,一气呵成
  • 🔍 自动寻题:扫描整个课程章节,自动找到所有未完成的测验/作业
  • 🔄 自动重做:提交后自动检测正确答案,若未满分则重新作答直到满分
  • 🛡️ 反检测突破:使用 page.mouse.click() 绕过超星的反自动化拦截
  • 🧠 AI 答题:利用 Claude 的 AI 能力理解题目并给出正确答案
  • 📋 多题型支持:单选、多选、判断、填空全覆盖
  • 🎯 Frame 穿透:精确定位超星复杂的 iframe 嵌套结构

📦 安装

前置要求

  1. Claude Code(最新版)
  2. Playwright MCP 插件

安装步骤

# 1. 安装 Playwright MCP 插件
claude plugins install playwright-mcp

# 2. 将 skill 文件复制到 Claude Code skills 目录
cp skills/chaoxing-auto-answer/SKILL.md ~/.claude/skills/chaoxing-auto-answer/

# 3. 重启 Claude Code 或使用 /chaoxing-auto-answer 触发

🚀 使用方式

方式一:自动寻找并答题

帮我完成学习通课程的所有章节测验
https://mooc1.chaoxing.com/mooc-ans/mooc2/course?courseId=XXXXX

方式二:指定答题页面

帮我做这份章节测试
https://mooc1.chaoxing.com/XXXXX

方式三:触发 Skill

/chaoxing-auto-answer

Skill 会自动:

  1. 进入课程页,扫描所有章节
  2. 识别并列出所有未完成的测验/作业
  3. 逐一进入答题页
  4. 读取题目 → AI 分析 → 点击作答
  5. 提交并检查分数
  6. 未满分则自动重做
  7. 满分后自动进入下一份测验

🧩 工作流程

graph TD
    A[进入课程页] --> B{有具体答题 URL?}
    B -->|否| C[扫描章节列表]
    C --> D[展开所有章节]
    D --> E[识别未完成测验]
    E --> F[列出待做清单]
    F --> G[逐一进入答题]
    B -->|是| G
    G --> H[读取题目和选项]
    H --> I[AI 分析并作答]
    I --> J[提交测验]
    J --> K[检测分数]
    K --> L{满分?}
    L -->|否| M{有正确答案?}
    M -->|是| N[记录答案 → 重做]
    N --> I
    M -->|否| O[告知用户]
    L -->|是| P[✅ 完成]
    P --> Q{还有未做?}
    Q -->|是| G
    Q -->|否| R[🎉 全部完成]
Loading

🛡️ 反检测原理

超星平台对 element.click()dispatchEvent 等 JS 点击方式有检测。本 Skill 的关键突破:

// ❌ 被检测拦截
await frame.locator('selector').click();
await page.evaluate(() => document.querySelector('...').click());

// ✅ 唯一可靠方式:通过 Playwright 的 mouse.click() 模拟物理鼠标
const box = await target.boundingBox();
await page.mouse.click(box.x + box.width / 2, box.y + box.height / 2);

📂 项目结构

chaoxing-auto-answer/
├── README.md              # 项目说明
├── LICENSE                # MIT 许可证
└── skills/
    └── chaoxing-auto-answer/
        └── SKILL.md       # Claude Code Skill 定义文件

⚠️ 免责声明

本项目仅供学习和研究使用。使用者应遵守超星学习通平台的使用条款和相关法律法规。开发者不对任何滥用行为负责。

  • ✅ 用于:学习自动化技术、研究反检测机制、个人学习辅助
  • ❌ 禁止:商业用途、代刷服务、违反学校规定

📄 许可证

MIT License - 详见 LICENSE 文件。


📚 Chaoxing Auto Answer Skill for Claude Code

A Claude Code Skill that automates completing quizzes, assignments, and exams on the Chaoxing (超星) online learning platform. Uses Playwright MCP to drive a real browser and bypasses Chaoxing's anti-automation detection.

Features

  • Full Automation: Read → Answer → Submit → Check Score → Redo for perfect score
  • Auto Discovery: Scans entire course chapters to find unfinished quizzes
  • Auto Redo: Detects correct answers after submission, redoes for 100%
  • Anti-Detection: Bypasses Chaoxing's automation countermeasures
  • AI-Powered: Uses Claude's intelligence to understand and answer questions
  • Multi-Type: Single choice, multiple choice, true/false, fill-in-the-blank

Quick Start

claude plugins install playwright-mcp
cp skills/chaoxing-auto-answer/SKILL.md ~/.claude/skills/chaoxing-auto-answer/

Then in Claude Code:

帮我在学习通完成章节测验
https://mooc1.chaoxing.com/mooc-ans/mooc2/course?courseId=XXXXX

How It Works

The skill navigates Chaoxing's complex iframe structure, reads quiz content via browser snapshots, uses Claude to analyze questions and determine answers, then clicks options using page.mouse.click() — the only reliable method that bypasses Chaoxing's anti-bot detection (which blocks element.click() and dispatchEvent).

License

MIT License - see LICENSE.

About

🤖 超星学习通自动答题 Claude Code Skill — 突破反自动化检测,AI智能作答,自动重做刷满分 | Auto-answer Chaoxing quizzes

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors