← Back to Skills Marketplace
yujintang

瑜伽学员管理

by 大仁庄小余 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
44
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install yoga-manage-skill
Description
瑜伽老师专用学员课时管理系统。使用SQLite本地存储学员信息、课程套餐(包年/包课时)和课时扣除日志,每次扣课后自动发送邮件记录。
README (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           # 邮箱配置(自动创建)
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install yoga-manage-skill
  3. After installation, invoke the skill by name or use /yoga-manage-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug yoga-manage-skill
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 瑜伽学员管理?

瑜伽老师专用学员课时管理系统。使用SQLite本地存储学员信息、课程套餐(包年/包课时)和课时扣除日志,每次扣课后自动发送邮件记录。 It is an AI Agent Skill for Claude Code / OpenClaw, with 44 downloads so far.

How do I install 瑜伽学员管理?

Run "/install yoga-manage-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 瑜伽学员管理 free?

Yes, 瑜伽学员管理 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 瑜伽学员管理 support?

瑜伽学员管理 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 瑜伽学员管理?

It is built and maintained by 大仁庄小余 (@yujintang); the current version is v1.0.0.

💬 Comments