wps-attendance
考勤打卡统计。把考勤机导出的打卡数据丢进来,自动统计每个人的 迟到、早退、缺勤、加班时长,生成月度考勤汇总表,异常考勤自动标红。 用于帮助HR处理考勤数据。当用户提到考勤、打卡、迟到、加班统计时触发。 Attendance tracker - generates summary reports from…
日历排班值班表。生成带法定节假日和调休标注的月度/年度日历表, 还能做三班倒/两班倒排班表和节假日值班安排,颜色区分不同班次一目了然。 用于帮助用户生成日历和排班表。当用户提到日历、排班、值班、节假日时触发。 Chinese calendar with holidays, shift scheduling, and duty rosters.
$ npx -y skills add Bwkyd/wps-skills --skill wps-cn-calendar --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/wps-cn-calendarContext preview
The summary Claude sees to decide when to auto-load this skill.
日历排班值班表。生成带法定节假日和调休标注的月度/年度日历表, 还能做三班倒/两班倒排班表和节假日值班安排,颜色区分不同班次一目了然。 用于帮助用户生成日历和排班表。当用户提到日历、排班、值班、节假日时触发。 Chinese calendar with holidays, shift scheduling, and duty rosters.
name: wps-cn-calendar
description: |
日历排班值班表。生成带法定节假日和调休标注的月度/年度日历表,
还能做三班倒/两班倒排班表和节假日值班安排,颜色区分不同班次一目了然。
用于帮助用户生成日历和排班表。当用户提到日历、排班、值班、节假日时触发。
Chinese calendar with holidays, shift scheduling, and duty rosters.
license: MIT
user-invocable: true
argument-hint: '[年月] [类型]'
allowed-tools: 'Read, Grep, Glob, Bash, Write, Edit'
metadata:
author: BWKYD
title: 日历排班表
description_zh: 生成带法定节假日的月度日历,支持排班表和值班表
tags:
- 日历
- 排班
- 节假日
- 值班
- WPS
version: 1.0.1
license: MIT生成含法定节假日+农历的日历表,以及排班/值班安排。
[1] 月度日历 → 含农历、节假日标注 [2] 年度日历 → 12个月一览表 [3] 排班表 → 三班倒/两班倒/弹性 [4] 值班表 → 节假日/周末值班安排
from openpyxl import Workbook
from openpyxl.styles import Font, Alignment, PatternFill, Border, Side
from datetime import datetime, timedelta
import calendar
import os
# 2026年法定节假日(示例,需要每年更新)
HOLIDAYS_2026 = {
'2026-01-01': '元旦',
'2026-01-29': '除夕', '2026-01-30': '春节', '2026-01-31': '春节',
'2026-02-01': '春节', '2026-02-02': '春节', '2026-02-03': '春节',
'2026-02-04': '春节',
'2026-04-05': '清明', '2026-04-06': '清明', '2026-04-07': '清明',
'2026-05-01': '劳动节', '2026-05-02': '劳动节', '2026-05-03': '劳动节',
'2026-05-04': '劳动节', '2026-05-05': '劳动节',
'2026-05-31': '端午', '2026-06-01': '端午', '2026-06-02': '端午',
'2026-10-01': '国庆', '2026-10-02': '国庆', '2026-10-03': '国庆',
'2026-10-04': '国庆', '2026-10-05': '国庆', '2026-10-06': '国庆',
'2026-10-07': '国庆',
}
# 调休上班日
WORKDAYS_2026 = {'2026-01-25', '2026-02-08', '2026-10-10'}
def create_monthly_calendar(year, month, output_path=None):
"""生成月度日历"""
wb = Workbook()
ws = wb.active
ws.title = f"{year}年{month}月"
# 样式
header_fill = PatternFill('solid', fgColor='2C3E50')
weekend_fill = PatternFill('solid', fgColor='FADBD8')
holiday_fill = PatternFill('solid', fgColor='F5B7B1')
today_fill = PatternFill('solid', fgColor='AED6F1')
header_font = Font(name='微软雅黑', size=12, bold=True, color='FFFFFF')
# 标题
ws.merge_cells('A1:G1')
ws['A1'] = f'{year}年{month}月'
ws['A1'].font = Font(name='微软雅黑', size=18, bold=True)
ws['A1'].alignment = Alignment(horizontal='center')
# 星期头
weekdays = ['一', '二', '三', '四', '五', '六', '日']
for col, wd in enumerate(weekdays, 1):
cell = ws.cell(row=2, column=col, value=f'星期{wd}')
cell.font = header_font
cell.fill = header_fill
cell.alignment = Alignment(horizontal='center')
ws.column_dimensions[chr(64+col)].width = 14
# 日期
cal = calendar.Calendar(firstweekday=0)
row = 3
for week in cal.monthdatescalendar(year, month):
for col, date in enumerate(week, 1):
if date.month != month:
continue
date_str = date.strftime('%Y-%m-%d')
cell = ws.cell(row=row, column=col)
cell.value = date.day
cell.font = Font(name='微软雅黑', size=14)
cell.alignment = Alignment(horizontal='center', vertical='center')
ws.row_dimensions[row].height = 50
# 节假日标注
if date_str in HOLIDAYS_2026:
cell.fill = holiday_fill
note_cell = ws.cell(row=row, column=col)
note_cell.value = f"{date.day}\n{HOLIDAYS_2026[date_str]}"
note_cell.font = Font(name='微软雅黑', size=10)
note_cell.alignment = Alignment(horizontal='center',
vertical='center',
wrap_text=True)
elif date.weekday() >= 5 and date_str not in WORKDAYS_2026:
cell.fill = weekend_fill
row += 1
if not output_path:
output_path = f'{year}年{month}月日历.xlsx'
wb.save(output_path)
return os.path.abspath(output_path)
def create_shift_schedule(year, month, staff_list, shift_pattern='三班倒',
output_path=None):
"""生成排班表"""
wb = Workbook()
ws = wb.active
ws.title = f"{month}月排班"
shifts = {
'三班倒': ['早', '中', '晚', '休'],
'两班倒': ['白', '夜', '休', '休'],
'做五休二': ['班', '班', '班', '班', '班', '休', '休'],
}
pattern = shifts.get(shift_pattern, shifts['三班倒'])
# 表头
header_fill = PatternFill('solid', fgColor='2C3E50')
header_font = Font(name='微软雅黑', size=9, bold=True, color='FFFFFF')
shift_colors = {
'早': PatternFill('solid', fgColor='AED6F1'),
'白': PatternFill('solid', fgColor='AED6F1'),
'班': PatternFill('solid', fgColor='AED6F1'),
'中': PatternFill('solid', fgColor='F9E79F'),
'晚': PatternFill('solid', fgColor='D7BDE2'),
'夜': PatternFill('solid', fgColor='D7BDE2'),
'休': PatternFill('solid', fgColor='ABEBC6'),
}
days_in_month = calendar.monthrange(year, month)[1]
ws.cell(row=1, column=1, value='姓名').font = header_font
ws.cell(row=1, column=1).fill = header_fill
for d in range(1, days_in_month + 1):
date = datetime(year, month, d)
cell = ws.cell(row=1, column=d+1, value=f'{d}\n{["一","二","三","四","五","六","日"][date.weekday()]}')
cell.font = Font(name='微软雅黑', size=8, color='FFFFFF')
cell.fill = header_fill
cell.alignment = Alignment(horizontal='center', wrap_text=True)
ws.column_dimensions[chr(65+d) if d < 26 else 'A'].width = 4
# 排班
for i, name in enumerate(staff_list):
ws.cell(row=i+2, column=1, value=name).font = Font(name='微软雅黑', size=10)
for d in range(1, days_in_month + 1):
shift_idx = (d - 1 + i) % len(pattern)
shift = pattern[shift_idx]
cell = ws.cell(row=i+2, column=d+1, value=shift)
cell.alignment = Alignment(horizo42 个 WPS Office 办公自动化 Claude Code Skills 集合 一句话指令,让 Claude 帮你自动生成 Word / Excel / PPT / PDF 文档。
Repo: Bwkyd/wps-skills
考勤打卡统计。把考勤机导出的打卡数据丢进来,自动统计每个人的 迟到、早退、缺勤、加班时长,生成月度考勤汇总表,异常考勤自动标红。 用于帮助HR处理考勤数据。当用户提到考勤、打卡、迟到、加班统计时触发。 Attendance tracker - generates summary reports from…
文档批量格式转换。把一个文件夹里的Word全转文本、Excel全导出CSV、 Markdown转Word,支持docx/txt/xlsx/csv/md等格式批量互转,一次搞定。 用于帮助用户批量转换文档格式。当用户提到批量转换、格式转换、导出时触发。 Batch converts documents between…
预算表一键生成。部门年度预算、项目预算、活动经费预算,选个模板填数字就行, 小计合计公式自动写好,还有预算vs实际对比和执行率自动计算。 用于帮助财务和行政制作预算表。当用户提到预算、费用表、经费时触发。 Budget spreadsheet generator with formulas and variance…
证书奖状批量生成。给一份名单,批量生成荣誉证书、结业证书、聘书、感谢信, 每人一份独立文件,年终评优、培训结业、表彰活动必备工具。 用于帮助用户批量生成证书。当用户提到证书、奖状、聘书时触发。 Batch certificate/award generator from a list of recipients.
数据图表一键生成。不知道数据该用什么图表?告诉我你的数据和目的, 自动推荐最佳图表类型并生成,柱状图折线图饼图散点图都支持,还帮你调配色。 用于帮助用户制作数据可视化图表。当用户提到图表、柱状图、折线图、饼图时触发。 Chart generator - recommends best chart type and…
表格自动变色。想让低于60分的自动变红?想加个进度条效果?想要红绿灯图标? 帮你设置条件格式,数据条、色阶、图标集、重复值高亮,还提供JSA宏代码。 用于帮助用户设置表格条件格式。当用户提到条件格式、自动变色、数据条、红绿灯时触发。 Conditional formatting expert - data bars,…