← 返回 Skills 市场
yujintang

瑜伽学员管理

作者 大仁庄小余 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
44
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install yoga-manage-skill
功能描述
瑜伽老师专用学员课时管理系统。使用SQLite本地存储学员信息、课程套餐(包年/包课时)和课时扣除日志,每次扣课后自动发送邮件记录。
使用说明 (SKILL.md)

瑜伽学员课时管理系统

这是一个为瑜伽老师设计的轻量级学员管理工具,使用 SQLite 本地数据库存储,支持:

  • 学员基本信息管理(姓名、电话、微信、备注)
  • 多种课程类型:线上课 / 线下课
  • 两种套餐模式:包年 / 包课时
  • 包课时课程自动扣除课时并记录日志
  • 每次扣除后自动发送邮件记录给自己
  • 手动发送完整学员报表

首次配置

安装后必须先配置邮箱,否则无法发送课时记录邮件。

使用交互式配置:

from config import prompt_email_config
prompt_email_config()

或手动配置:

from config import set_email_config
set_email_config(
    smtp_server="smtp.qq.com",
    smtp_port=587,
    email="[email protected]",
    password="your_auth_code",
    use_ssl=True
)

常用邮箱SMTP设置参考:

  • Gmail: smtp.gmail.com, 端口 587(需开启应用专用密码)
  • QQ邮箱: smtp.qq.com, 端口 587(需使用授权码而非登录密码)
  • 163邮箱: smtp.163.com, 端口 25
  • Outlook: smtp.office365.com, 端口 587

命令行使用

运行主程序:

python main.py

首次运行会提示配置邮箱。之后进入交互式菜单:

  1. 添加学员
  2. 查看所有学员
  3. 查看学员详情
  4. 修改学员信息
  5. 删除学员
  6. 添加课程
  7. 扣除课时
  8. 增加课时
  9. 查看扣除记录
  10. 发送完整报表
  11. 配置邮箱
  12. 退出

Python API 使用

from manager import YogaManager

manager = YogaManager()

# 添加学员
sid = manager.add_student("张三", phone="13800138000", wechat="zhangsan123")

# 添加包课时课程(线下课,50课时)
cid = manager.add_course(
    student_id=sid,
    course_type="offline",   # 或 "online"
    package_type="hourly",   # 或 "yearly"
    total_hours=50,
    remaining_hours=50,
    price=5000.00
)

# 扣除课时(每次上完课调用)
result = manager.deduct_hours(course_id=cid, hours=1, notes="哈他瑜伽基础课")
# 扣除成功后会自动发送邮件记录

# 添加包年课程
manager.add_course(
    student_id=sid,
    course_type="online",
    package_type="yearly",
    start_date="2026-01-01",
    end_date="2026-12-31",
    price=8000.00
)

# 查看学员详情
manager.show_student(sid)

# 发送完整报表
manager.send_full_report()

数据库结构

SQLite 数据库文件:yoga_students.db

students 表 - 学员基本信息

字段 类型 说明
id INTEGER 主键
name TEXT 姓名
phone TEXT 电话
wechat TEXT 微信
notes TEXT 备注
created_at TEXT 创建时间

student_courses 表 - 学员课程信息

字段 类型 说明
id INTEGER 主键
student_id INTEGER 学员ID(外键)
course_type TEXT online/offline
package_type TEXT yearly/hourly
total_hours INTEGER 总课时(包课时)
remaining_hours INTEGER 剩余课时(包课时)
start_date TEXT 开始日期(包年)
end_date TEXT 结束日期(包年)
price REAL 价格

deduction_logs 表 - 课时扣除日志

字段 类型 说明
id INTEGER 主键
student_id INTEGER 学员ID
course_id INTEGER 课程ID
deducted_hours INTEGER 扣除课时数
remaining_before INTEGER 扣除前剩余
remaining_after INTEGER 扣除后剩余
class_date TEXT 上课日期
notes TEXT 备注
created_at TEXT 记录时间

文件结构

yoga_student_manager/
├── SKILL.md              # 本说明文件
├── main.py               # 命令行入口
├── manager.py            # 核心管理类
├── database.py           # 数据库模型
├── email_sender.py       # 邮件发送模块
├── config.py             # 配置管理
├── yoga_students.db      # SQLite数据库(自动创建)
└── config.json           # 邮箱配置(自动创建)
安全使用建议
Before installing, be comfortable with storing student data and an SMTP app password in the skill folder. Use an app-specific email code, protect config.json and yoga_students.db, verify where reports are emailed, and prefer a complete trusted source package.
功能分析
Type: OpenClaw Skill Name: yoga-manage-skill Version: 1.0.0 The skill is a legitimate management system for yoga student records and course tracking. It uses SQLite for local data storage and SMTP for sending session logs and reports to the user's own email. The code follows good security practices, such as using parameterized SQL queries and field whitelisting in `database.py` to prevent SQL injection. No evidence of data exfiltration, malicious execution, or prompt injection was found; the email functionality is transparently designed for user self-notification.
能力评估
Purpose & Capability
The local SQLite database and email reporting match the stated purpose, but they involve student contact/course/payment data and mailbox access.
Instruction Scope
The CLI/API workflows are user-directed, and automatic email after deducting hours is disclosed; users should still understand that reports are sent whenever that action is performed.
Install Mechanism
There is no install-time script or package installation, but one provided source artifact is truncated, so review confidence is limited for the unseen tail of that file.
Credentials
SMTP credentials and outbound email are proportionate to the feature set, though the registry requirements do not declare a primary credential or capability tags.
Persistence & Privilege
The skill persistently creates a local student database and config file, including saved email credentials.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install yoga-manage-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /yoga-manage-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of yoga-student-manager. - Provides a command-line and Python API tool for yoga teachers to manage students, courses, and lesson deduction logs. - Stores all data locally in SQLite, supporting both hourly and yearly package types. - Automatically sends email records after each lesson deduction; complete reports can be emailed on demand. - Requires SMTP email configuration for sending notifications and reports. - Clear database schema and modular code structure included for easy setup and use.
元数据
Slug yoga-manage-skill
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

瑜伽学员管理 是什么?

瑜伽老师专用学员课时管理系统。使用SQLite本地存储学员信息、课程套餐(包年/包课时)和课时扣除日志,每次扣课后自动发送邮件记录。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 44 次。

如何安装 瑜伽学员管理?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install yoga-manage-skill」即可一键安装,无需额外配置。

瑜伽学员管理 是免费的吗?

是的,瑜伽学员管理 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

瑜伽学员管理 支持哪些平台?

瑜伽学员管理 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 瑜伽学员管理?

由 大仁庄小余(@yujintang)开发并维护,当前版本 v1.0.0。

💬 留言讨论