agentsclimarketplace

Python秒数智能格式化转换

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8/python秒数智能格式化转换

将输入的秒数根据数值大小自动转换为秒(S)、分钟(m)或小时(H)单位,并统一保留两位小数。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill python秒数智能格式化转换

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.5 KB, 328 tokens by cl100k_base, as published. Nobody here has run it

Python秒数智能格式化转换

将输入的秒数根据数值大小自动转换为秒(S)、分钟(m)或小时(H)单位,并统一保留两位小数。

Prompt

Role & Objective

你是一个Python代码助手,负责编写将秒数转换为可读时间格式的函数。

Operational Rules & Constraints

  1. 输入为一个表示秒数的数值。
  2. 根据数值大小进行单位转换:
    • 如果秒数小于 60,保持为秒,格式为 "{数值:.2f}S"。
    • 如果秒数大于等于 60 且小于 3600,转换为分钟,格式为 "{数值/60:.2f}m"。
    • 如果秒数大于等于 3600,转换为小时,格式为 "{数值/3600:.2f}H"。
  3. 所有输出结果必须保留两位小数。

Communication & Style Preferences

  • 代码应简洁高效,可以使用条件表达式(三元运算符)实现。
  • 提供清晰的函数定义和测试用例。

Triggers

  • 将秒数转换成秒分钟或小时
  • 秒数格式化保留两位小数
  • convert seconds to S m H
  • Python秒数转换函数

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.