npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@melonyrame/chaoxing-skill

v1.1.0

Published

超星(学习通)平台在线作业自动答题 skill(支持 Claude Code / Codex / OpenCode,内置 web-access)

Readme

超星平台自动答题 Skill

跨平台 AI 编程助手 skill(支持 Claude Code / OpenAI Codex / OpenCode),通过 CDP (Chrome DevTools Protocol) 操控浏览器,自动完成超星(学习通)平台上的在线作业。

支持单选题、多选题、填空题、判断题的自动读取、分析和答案填充。web-access 浏览器 CDP 操控能力已内置,无需单独安装。

⚠️ 支持范围

目前仅支持「作业」页面,暂不支持「考试」。

支持题型:

  • 单选题
  • 多选题
  • 填空题
  • 判断题

致谢与内置组件

本项目内置 web-access skill 提供的浏览器 CDP 操控能力。

  • 作者:一泽 Eze(https://github.com/eze-is)
  • 原始仓库:https://github.com/eze-is/web-access
  • 许可证:MIT
  • 内置位置skills/chaoxing/web-access/

本内置副本可能包含为适应 chaoxing skill 而做的本地修改,详见该目录下的 NOTICE.mdLICENSE。感谢原作者。

功能特性

  • 自动识别超星平台作业页面结构
  • 支持单选题(A/B/C/D 选项点击)
  • 支持多选题(多个选项逐个点击)
  • 支持判断题(对/错选项点击)
  • 支持填空题(通过 UEditor API body.innerText 纯文本填充,避免 HTML 转义问题)
  • 一次请求完成所有题目填充,高效快速
  • 兼容 Chrome 和 Edge 浏览器(均原生支持,无需额外脚本)
  • 支持 macOS、Linux、Windows 三大平台

运行环境支持

| 平台 | Chrome | Edge | |------|--------|------| | macOS | ✅ 原生支持 | ✅ 原生支持 | | Linux | ✅ 原生支持 | ✅ 原生支持 | | Windows (Git Bash / WSL) | ✅ 原生支持 | ✅ 原生支持 |

内置 web-access 原生同时支持 Chrome 和 Edge 的 DevToolsActivePort 路径。切换浏览器使用 --browser edge 参数,或在 config.env 中写入 WEB_ACCESS_BROWSER=edge

前置依赖

| 依赖 | 版本要求 | 说明 | |------|----------|------| | Node.js | 22+ | CDP Proxy 运行环境 | | Chrome 或 Edge | 最新版 | 需开启远程调试 | | Claude Code / Codex CLI / OpenCode | 最新版 | skill 运行平台(任选其一) |

web-access 已内置,不再需要作为外部依赖单独安装。

安装

方式一:npx(推荐)

npx @melonyrame/chaoxing-skill            # 自动检测已安装的平台并安装
npx @melonyrame/chaoxing-skill --all      # 安装到全部三个平台
npx @melonyrame/chaoxing-skill --claude   # 仅 Claude Code(还有 --codex / --opencode)

安装器会把 skill 拷贝(非符号链接)到各平台 skills 目录。npx 缓存是临时的,symlink 会失效,因此采用拷贝方式。升级时重复执行即可,会保留 web-access/config.env 浏览器偏好。npx 安装器本身需 Node 18+。

方式二:克隆安装

通用第一步:

git clone https://github.com/mel0nyrame/chaoxing-skill.git

/path/to/chaoxing-skill 替换为你实际克隆的目录。

Claude Code

方式 A:插件
claude plugin marketplace add /path/to/chaoxing-skill
claude plugin install chaoxing@chaoxing-skill
方式 B:技能目录
ln -s /path/to/chaoxing-skill/skills/chaoxing ~/.claude/skills/chaoxing

OpenAI Codex CLI

先在 ~/.codex/config.toml 中启用 skills:

[features]
skills = true

然后创建符号链接:

ln -s /path/to/chaoxing-skill/skills/chaoxing ~/.codex/skills/chaoxing

OpenCode

ln -s /path/to/chaoxing-skill/skills/chaoxing ~/.config/opencode/skills/chaoxing

OpenCode 也会自动发现 ~/.claude/skills/ 下的技能。若已为 Claude Code 安装,则无需重复。

Windows 说明

Windows 创建符号链接需要开发者模式。建议直接拷贝目录到对应平台的 skills 目录:

# 示例:Claude Code 技能目录
Copy-Item -Recurse -Path "C:\path\to\chaoxing-skill\skills\chaoxing" -Destination "$env:USERPROFILE\.claude\skills\chaoxing"

开启浏览器远程调试

Chrome

  1. 打开 Chrome
  2. 地址栏输入 chrome://inspect/#remote-debugging
  3. 勾选 "Allow remote debugging for this browser instance"
  4. 可能需要重启浏览器

Edge

  1. 打开 Edge
  2. 地址栏输入 edge://inspect/#remote-debugging
  3. 勾选 "Allow remote debugging for this browser instance"
  4. 可能需要重启浏览器

验证环境

执行内置检查脚本:

node "/path/to/chaoxing-skill/skills/chaoxing/web-access/scripts/check-deps.mjs"

期望输出:

node: ok
chrome: ok (port XXXX)
proxy: ready

使用方式

  1. 在浏览器中打开超星平台的作业页面(暂不支持考试)。
  2. 在 Claude Code / Codex CLI / OpenCode 中输入类似指令:
    • "帮我完成这个超星作业"
    • "填写当前页面的题目"
    • "自动答题"
  3. AI 助手会自动加载 chaoxing skill,读取题目、分析答案、并填入页面。
  4. 填充完成后,确认无误手动点击页面上的「提交」按钮

项目结构

chaoxing-skill/
├── .claude-plugin/
│   ├── plugin.json          # Claude Code 插件清单
│   └── marketplace.json     # Claude Code 插件市场清单
├── bin/
│   └── install.mjs          # npx 安装器入口
├── package.json             # npm 包清单
├── skills/chaoxing/
│   ├── SKILL.md             # skill 定义文件
│   ├── references/
│   │   └── web-access-setup.md   # 内置 web-access 环境配置指南
│   └── web-access/          # 内置 web-access 浏览器 CDP 能力(源自 eze-is/web-access)
│       ├── LICENSE
│       ├── NOTICE.md
│       ├── scripts/
│       │   ├── check-deps.mjs
│       │   └── cdp-proxy.mjs
│       └── ...
├── README.md                # 本文件
├── LICENSE                  # MIT License
└── .gitignore

支持的题型

| 题型 | 实现方式 | 说明 | |------|----------|------| | 单选题 | span[data="A/B/C/D"] → click .answerBg[role=radio] | 选 1 个正确选项 | | 多选题 | span[data="A/B/C/D"] → 逐个 click .answerBg[role=checkbox] | 选多个正确选项,分别点击 | | 判断题 | span[data="true/false"] → click .answerBg[role=radio] | 对 = true, 错 = false | | 填空题 | UE.instants["ueditorInstantN"].body.innerText | 通过 UEditor API 纯文本填充 |

常见问题

| 问题 | 原因 | 解决 | |------|------|------| | 填空题答案消失/截断 | setContent()<T> 当 HTML 标签过滤 | 使用 inst.body.innerText 代替 | | 判断题选项点不上 | data 值是 true/false 不是 A/B | 判断题用 span[data="true"] / span[data="false"] | | 部分题目没填上 | 懒加载导致 DOM 未渲染 | 填充前先滚动到底部,等 1-2 秒 | | UE is not defined | UEditor JS 未加载完 | 等 2-3 秒后重试 | | curl 连接 localhost:3456 失败 | CDP Proxy 未启动或端口不同 | 检查 CDP_PROXY_PORT 环境变量 | | textarea 内容对了但页面空白 | UEditor 未自动回写 | 设置 body.innerText 后编辑器在焦点变化时会自动同步 |

注意事项

  1. 不要使用 setContent():超星填空题使用 UEditor 富文本编辑器,setContent() 会将内容当 HTML 解析,导致尖括号(<T><> 等)被过滤。应使用 body.innerText 设置纯文本。
  2. 填空题不要使用转义字符:不要使用 \n\t\\ 等转义字符,应使用实际的换行符和制表符。
  3. 滚动加载:部分页面采用懒加载,填充前需滚动到底部确保所有题目 DOM 已渲染。
  4. 手动提交:skill 不会自动点击提交按钮,由用户自行核对后提交。
  5. 仅支持作业:目前仅支持「作业」页面,暂不支持「考试」
  6. 仅用于合法用途:请确保你对该课程有合法的访问权限。

贡献

欢迎提交 Issue 和 Pull Request。

License