workday-follow-calc
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "workday-follow-calc" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-4e6d4669b15bb54f9f15b82ef7589f36bb93f2d307f2d4746def5bce9f7f9994. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/rmpa2026614 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
workday-follow-calc: Calculates follow-up dates or remaining workdays based on business days, can hook up holiday samples, and is intended for scenarios needing the follow-up date after N working days, business-day differences, or when referencing the workday-calc toolbox.
Introduction source: third_party · user_f1b049da · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Not specified in the source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: workday-follow-calc
slug: rmpa2026614
displayName: 工作日推算
version: 1.0.0
summary: 按工作日推算约定跟进日或剩余工作日,可挂接节假日样本。
license: MIT
description: 按工作日推算约定跟进日或剩余工作日,可挂接节假日样本。当用户需要 N 个工作日后的跟进日、工作日差,或提到工具箱 workday-calc 时使用。工作日推算
灵感:能力工具箱 workday-calc(轻量、本地推算)。
何时使用
- 从某日起加/减 N 个工作日得到约定跟进日。
- 计算两日之间剩余工作日(跟进 SLA 前置能力)。
- 需要跳过周末,并可挂接法定假/调休样本。
硬约束
- 工作日定义:默认周一~周五;周末不算;假日集合内日期不算;调休上班日算工作日。
- 输入合法日期:非法日期直接报错,勿静默落到 Invalid Date。
- 节假日来源:可内置小样本或对接
chinese-days类库;须标明「以国务院公布为准」。 - 与日历 Skill 区分:本 Skill 做推算;完整节假日查询可另用节假日 Skill。
- 交付:给出可运行 TS/JS;
addWorkdays/countWorkdays至少其一完整。
推荐实现要点
function isWeekend(d: Date) {
const w = d.getDay()
return w === 0 || w === 6
}
function ymd(d: Date) {
const y = d.getFullYear()
const m = String(d.getMonth() + 1).padStart(2, '0')
const day = String(d.getDate()).padStart(2, '0')
return `${y}-${m}-${day}`
}
export function addWorkdays(
start: Date,
n: number,
holidays = new Set<string>(),
workdaysOnWeekend = new Set<string>(), // 调休上班
) {
if (!Number.isFinite(n) || Math.trunc(n) !== n) throw new Error('n 须为整数')
const step = n >= 0 ? 1 : -1
let left = Math.abs(n)
const cur = new Date(start.getFullYear(), start.getMonth(), start.getDate())
while (left > 0) {
cur.setDate(cur.getDate() + step)
const key = ymd(cur)
const work =
workdaysOnWeekend.has(key) ||
(!isWeekend(cur) && !holidays.has(key))
if (work) left -= 1
}
return cur
}
Agent 执行步骤
- 实现
addWorkdays;可选countWorkdays(from, to)。 - 准备至少一年常见假日样本或说明如何注入。
- 自测:周五 +1 → 下周一;跨国庆样本。
- UI 文案注明样本局限。
附加
- 说明见 README.md
- 排错见 reference.md
- 模板见 templates/usage.md
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决工作日推算这一明确且高频的业务需求,实用价值高
- 适用于项目管理、SLA 跟进等广泛场景
Highlights
- 触发词精准完整,覆盖多种变体,边界清晰
Areas to improve
-
缺少端到端完整示例 Reported severity: Minor
文档提供了代码实现和步骤,但缺少一个完整的输入输出示例(如从某日期加 N 个工作日的具体结果)
Recommendation: 补充一个端到端的完整示例,展示输入、处理逻辑和输出结果
Highlights
- Phase/步骤清晰,有硬约束与推荐实现要点
- frontmatter 完整,代码示例规范
Areas to improve
-
节假日样本来源说明不足 Reported severity: Minor
文档提到可内置小样本或对接 chinese-days 类库,但未明确具体来源与更新机制
Recommendation: 明确节假日样本的具体来源(如内置哪些年份、如何更新)或提供对接外部数据源的详细说明
Highlights
- 工具逻辑完整,参数校验合理
- 覆盖周末与节假日判断,有调休处理机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.