技术文档32k · #9158
gws-classroom
它能做什么
这个工具可以帮你管理 Google Classroom 中的班级、学生名单和作业。你可以创建、查看、更新或删除班级和邀请。
适用场景
- ✓为一门课程创建新班级时。
- ✓查看某个班级的学生名单时。
- ✓接受加入班级的邀请时。
技能链接
https://github.com/googleworkspace/cli/blob/main/skills/gws-classroom/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/googleworkspace/cli/blob/main/skills/gws-classroom/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add googleworkspace/cli --skill gws-classroom
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/gws-classroom/SKILL.md -o SKILL.md
可以这样问 AI
“创建一门名为“Introduction to Programming”的课程,授课教师是 john.doe@school.com。”
每周 5 个新技能,1 分钟读完。
工作原理
该工具会连接 Google Classroom 来执行操作。你需要指定要管理的班级或邀请,以及要执行的操作,例如创建、查看或删除。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
classroom (v1)
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
gws classroom <resource> <method> [flags]
API Resources
courses
create— Creates a course. The user specified inownerIdis the owner of the created course and added as a teacher. A non-admin requesting user can only create a course with themselves as the owner. Domain admins can create courses owned by any user within their domain. This method returns the following error codes: *PERMISSION_DENIEDif the requesting user is not permitted to create courses or for access errors. *NOT_FOUNDif the primary teacher is not a valid user.delete— Deletes a course. This method returns the following error codes: *PERMISSION_DENIEDif the requesting user is not permitted to delete the requested course or for access errors. *NOT_FOUNDif no course exists with the requested ID.get— Returns a course. This method returns the following error codes: *PERMISSION_DENIEDif the requesting user is not permitted to access the requested course or for access errors. *NOT_FOUNDif no course exists with the requested ID.getGradingPeriodSettings— Returns the grading period settings in a course. This method returns the following error codes: *PERMISSION_DENIEDif the requesting user isn't permitted to access the grading period settings in the requested course or for access errors. *NOT_FOUNDif the requested course does not exist.list— Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. Returned courses are ordered by creation time, with the most recently created coming first. This method returns the following error codes: *PERMISSION_DENIEDfor access errors. *INVALID_ARGUMENTif the query argument is malformed. *NOT_FOUNDif any users specified in the query arguments do not exist.patch— Updates one or more fields in a course. This method returns the following error codes: *PERMISSION_DENIEDif the requesting user is not permitted to modify the requested course or for access errors. *NOT_FOUNDif no course exists with the requested ID. *INVALID_ARGUMENTif invalid fields are specified in the update mask or if no update mask is supplied.update— Updates a course. This method returns the following error codes: *PERMISSION_DENIEDif the requesting user is not permitted to modify the requested course or for access errors. *NOT_FOUNDif no course exists with the requested ID. *FAILED_PRECONDITIONfor the following request errors: * CourseNotModifiable * CourseTitleCannotContainUrlupdateGradingPeriodSettings— Updates grading period settings of a course. Individual grading periods can be added, removed, or modified using this method. The requesting user and course owner must be eligible to modify Grading Periods. For details, see licensing requirements.aliases— Operations on the 'aliases' resourceannouncements— Operations on the 'announcements' resourcecourseWork— Operations on the 'courseWork' resourcecourseWorkMaterials— Operations on the 'courseWorkMaterials' resourceposts— Operations on the 'posts' resourcestudentGroups— Operations on the 'studentGroups' resourcestudents— Operations on the 'students' resourceteachers— Operations on the 'teachers' resourcetopics— Operations on the 'topics' resource
invitations
accept— Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. Only the invited user may accept an invitation. This method returns the following error codes: *PERMISSION_DENIEDif the requesting user is not permitted to accept the requested invitation or for access errors.
…
常见问题
我如何创建班级?
你可以在 'courses' 部分使用 'create' 命令,并指定班级名称和教师。
我如何查看我所有的班级?
在 'courses' 部分使用 'list' 命令,即可列出你有权访问的班级。
我可以接受加入班级的邀请吗?
可以。在 'invitations' 部分使用 'accept' 命令,即可接受你收到的邀请。
详情
热度
- GitHub 星标
- 32k
- 排名
- #9158
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/6
评论
- …