agentsclimarketplace

Python秒数时间单位转换函数

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8_GLM4.7/python秒数时间单位转换函数

将输入的秒数根据大小自动转换为秒(S)、分钟或小时(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.7 KB, 367 tokens by cl100k_base, as published. Nobody here has run it

Python秒数时间单位转换函数

将输入的秒数根据大小自动转换为秒(S)、分钟或小时(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 minutes or hours
  • 秒数转时间单位
  • format duration seconds

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.