always-current-datetime

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Always current date and time

始终获取当前日期和时间

Use one fresh local clock anchor for every direct user turn. Apply it through
starting-point
, resolve relative dates and times without changing the user's words, and persist the current acquisition time in the visible reply.
针对用户的每一次直接交互,获取一个全新的本地时钟锚点。通过
starting-point
应用该锚点,解析相对日期和时间但不修改用户的表述,并将当前获取时间保留在可见回复中。

Which commands does this skill accept?

该技能接受哪些命令?

Treat an ordinary direct user message as
refresh
. These control words exist for inspection and testing.
CommandResult
help
Show the trigger, clock fields, timezone order, visible prefixes, failure rule, and anchor state.
refresh
Acquire one fresh anchor for the current direct turn, bind it to
starting-point
, and apply the reply.
If a request matches neither command, use
refresh
. Do not ask the user to choose a command.
将普通的用户直接消息视为
refresh
命令。以下控制词用于检查和测试:
命令结果
help
显示触发条件、时钟字段、时区优先级、可见前缀、失败规则和锚点状态。
refresh
为当前直接交互获取一个全新锚点,绑定到
starting-point
并应用到回复中。
如果请求不匹配任何命令,则使用
refresh
命令。不要要求用户选择命令。

When does it run?

何时运行该技能?

Run before every reply to a direct user message, even when the message has no date or time words. A tool result, system event, or assistant continuation does not start a new clock acquisition. An exact mid-turn out-of-band user-message marker does.
在回复用户的每一条直接消息前运行,即使消息中没有日期或时间相关词汇。工具结果、系统事件或助手续接内容不会触发新的时钟获取。但中途出现的带外用户消息标记会触发。

What is the per-turn contract?

每轮交互的约定是什么?

Before interpreting or acting on the newest direct user message:
  1. Load
    starting-point
    through the host's skill-loading capability.
  2. Read this skill's concrete absolute directory from the host's load result.
  3. Set that directory as the process runner's working directory and run the bundled script exactly once.
  4. Parse the JSON and require every field in
    references/eval-contract.md
    .
  5. Add the anchor to the private
    starting-point
    map as
    as_of
    .
  6. Resolve temporal language before any date-sensitive or time-sensitive tool call.
  7. Write the visible date-time prefix in the actual assistant response so session history stores it.
Run on macOS or Linux with that working directory:
bash
python3 scripts/current_anchor.py
Run on Windows with that working directory:
powershell
python scripts/current_anchor.py
Use
python
or
py -3
only when it is the installed interpreter. Do not use a skill-directory shell variable or guess an installation path. If the load result does not supply a concrete skill directory, report
temporal-anchor-unavailable: skill directory missing
and stop date-dependent or time-dependent work. Never pass a fabricated timestamp. Reuse an anchor only when its process result occurs after the newest direct user message.
The portable script accepts
--timezone <IANA-zone>
, then checks
PROFILE_TIMEZONE
, then uses system-local time. An explicit argument represents a profile configuration supplied by the host and wins over the environment.
If the command fails, returns invalid JSON, or omits a required field, stop date-dependent or time-dependent work and report
temporal-anchor-unavailable:
followed by the short error. Do not guess, reuse an earlier date or time, or fall back to the conversation-start timestamp.
在解析或处理最新的用户直接消息前:
  1. 通过宿主的技能加载能力加载
    starting-point
  2. 从宿主的加载结果中读取该技能的具体绝对目录。
  3. 将该目录设置为进程运行器的工作目录,并精确运行一次捆绑脚本。
  4. 解析JSON并确保包含
    references/eval-contract.md
    中的所有字段。
  5. 将锚点作为
    as_of
    添加到私有
    starting-point
    映射中。
  6. 在任何对日期或时间敏感的工具调用前解析时间相关表述。
  7. 在实际助手响应中添加可见的日期时间前缀,以便会话历史存储该信息。
在macOS或Linux系统下,进入该工作目录运行:
bash
python3 scripts/current_anchor.py
在Windows系统下,进入该工作目录运行:
powershell
python scripts/current_anchor.py
仅当
python
py -3
是已安装的解释器时才使用它们。不要使用技能目录的shell变量或猜测安装路径。如果加载结果未提供具体的技能目录,报告
temporal-anchor-unavailable: skill directory missing
并停止所有依赖日期或时间的工作。绝不要使用伪造的时间戳。仅当锚点的进程结果晚于最新的用户直接消息时,才可复用该锚点。
可移植脚本接受
--timezone <IANA-zone>
参数,其次会检查
PROFILE_TIMEZONE
环境变量,最后使用系统本地时间。显式参数代表宿主提供的配置文件设置,优先级高于环境变量。
如果命令执行失败、返回无效JSON或缺少必填字段,停止所有依赖日期或时间的工作,并报告
temporal-anchor-unavailable:
后跟简短错误信息。不要猜测、复用之前的日期或时间,也不要回退到对话开始时的时间戳。

How is the anchor bound to starting-point?

锚点如何绑定到starting-point?

Add this private structure without exposing the full outcome map:
text
as_of: captured_at, date, time, weekday, timezone, zone_abbreviation, utc_offset, source
Apply it to:
  • Outcome: Turn relative completion language into an exact date or date-time.
  • Proof: Separate current observations from evidence gathered earlier.
  • Constraints: Resolve deadlines, validity windows, and temporal bounds.
  • Starting path: Distinguish actions available now from later actions.
  • Unknowns: Keep ambiguous expressions unresolved until one concise question answers them.
添加以下私有结构,无需暴露完整结果映射:
text
as_of: captured_at, date, time, weekday, timezone, zone_abbreviation, utc_offset, source
将其应用于:
  • 结果:将相对完成时间转换为精确的日期或日期时间。
  • 验证:区分当前观察结果与之前收集的证据。
  • 约束:解析截止日期、有效窗口和时间范围。
  • 起始路径:区分当前可用操作与后续操作。
  • 歧义处理:保留模糊表述,直到一个简洁的问题能解决歧义。

How is temporal language interpreted?

如何解析时间相关表述?

  • Preserve the user's original words and authorship.
  • Expose the resolved absolute date or date-time when a relative expression affects meaning or action.
  • Keep past statements historical and future requests prospective.
  • Convert date-sensitive and time-sensitive tool arguments to absolute values and include the timezone when the tool supports it.
  • Treat
    next Friday
    and similar phrases as ambiguous when common conventions yield different dates. Show the candidate dates and ask one concise question.
  • Do not ask when the conversation already establishes the convention.
  • Reacquire after local midnight. Never infer rollover from elapsed conversation time.
  • 保留用户的原始表述和表述归属。
  • 当相对表述影响含义或操作时,展示解析后的绝对日期或日期时间。
  • 保留过去陈述的历史属性,未来请求的前瞻性属性。
  • 将对日期或时间敏感的工具参数转换为绝对值,若工具支持则包含时区信息。
  • 当常见惯例产生不同日期时,将“下周五”等类似短语视为歧义表述。展示候选日期并提出一个简洁的问题。
  • 若对话已明确约定,则无需询问。
  • 本地午夜过后重新获取锚点。绝不要从对话经过的时间推断日期切换。

What is visible in the reply?

回复中可见哪些内容?

On the first assistant reply for a local date, and again when the local date changes, begin with:
text
NOW: <weekday>, <full date> at <HH:MM:SS> | <zone abbreviation> | UTC<offset>
Begin every normal user-facing reply on that date with:
text
[YYYY-MM-DD HH:MM:SS <zone abbreviation>] <result or question>
Inspect retained assistant messages to decide whether the daily header already appeared. When context compaction makes that uncertain, prefer a repeated current header over a missing or stale header. Prefix an interactive clarification question inside its question text. Do not prefix tool calls or internal notes.
The literal templates also live in
assets/response-prefixes.txt
. When clock acquisition fails, use the failure marker instead of a dated prefix.
在本地日期的第一条助手回复中,以及本地日期变更后,回复开头需包含:
text
NOW: <星期几>, <完整日期> at <HH:MM:SS> | <时区缩写> | UTC<偏移量>
该日期内的每一条面向用户的常规回复开头需包含:
text
[YYYY-MM-DD HH:MM:SS <时区缩写>] <结果或问题>
检查保留的助手消息以判断每日头部是否已显示。当上下文压缩导致不确定时,优先重复当前头部,避免缺失或过期的头部。在交互式澄清问题的文本内添加前缀。不要为工具调用或内部注释添加前缀。
字面模板也存储在
assets/response-prefixes.txt
中。如果时钟获取失败,使用失败标记替代带日期的前缀。

How does resume work?

恢复功能如何工作?

After resume or context compaction, reacquire the clock before using any retained date or time. If this skill body is unavailable from retained context, reload it before acting. Stored date-time prefixes prove prior turns only.
恢复或上下文压缩后,在使用任何保留的日期或时间前重新获取时钟。如果从保留的上下文中无法获取该技能主体,需先重新加载再执行操作。存储的日期时间前缀仅能证明之前的交互轮次。

Which worked example should you read?

应该参考哪些示例?

  • Read
    examples/help-command.md
    for a complete
    help
    response.
  • Read
    examples/fresh-direct-turn.md
    for one real UTC diagnostic,
    as_of
    binding, and both visible prefixes.
  • Read
    examples/invalid-timezone.md
    for exit
    2
    , empty stdout, the failure marker, and recovery.
  • 查看
    examples/help-command.md
    获取完整的
    help
    响应示例。
  • 查看
    examples/fresh-direct-turn.md
    获取真实的UTC诊断、
    as_of
    绑定以及两种可见前缀的示例。
  • 查看
    examples/invalid-timezone.md
    获取退出码
    2
    、空标准输出、失败标记和恢复流程的示例。

Progressive disclosure

渐进式披露

Read
references/eval-contract.md
and
evals/cases.json
before testing or changing this skill. Read
references/generation-contract.md
when changing the package structure or checking native-to-port lineage. Load
scripts/tests/
before changing script behavior and run those tests before implementation changes. Load the rest of
evals/
only when measuring activation, behavior, enrollment, or timing. Do not load these files on ordinary turns.
在测试或修改该技能前,查看
references/eval-contract.md
evals/cases.json
。修改包结构或检查原生到可移植的继承关系时,查看
references/generation-contract.md
。修改脚本行为前加载
scripts/tests/
中的内容,并在实现变更前运行这些测试。仅在测量激活、行为、注册或计时时加载
evals/
中的其余内容。常规交互轮次中不要加载这些文件。

Gotchas

注意事项

  • Do not skip the clock because the direct message has no date or time words.
  • Do not treat tool output, a system event, or assistant continuation as a new direct user message.
  • Do not call the clock after final reasoning or call it twice in one direct turn.
  • Do not rewrite the user's temporal words after resolving them.
  • Do not present older evidence as current proof.
  • Do not silently choose one meaning for an ambiguous weekday phrase.
  • Do not prefix tool calls or internal notes.
  • Do not silently fall back after an invalid configured timezone.
  • Do not put an unresolved skill-directory variable in the clock command.
  • Do not claim prior-contract parity when either route misses a case.
  • 不要因为直接消息中没有日期或时间词汇就跳过时钟获取。
  • 不要将工具输出、系统事件或助手续接内容视为新的用户直接消息。
  • 不要在最终推理后调用时钟,也不要在单次直接交互中调用两次时钟。
  • 解析后不要重写用户的时间相关表述。
  • 不要将旧证据作为当前验证依据。
  • 不要默默为歧义的星期短语选择一种含义。
  • 不要为工具调用或内部注释添加前缀。
  • 配置的时区无效时不要默默回退。
  • 不要在时钟命令中使用未解析的技能目录变量。
  • 当任一流程遗漏案例时,不要声称与之前的约定一致。

Limitations

局限性

The script cannot infer the user's intended timezone from prose. The host must supply an explicit IANA timezone through
--timezone
or
PROFILE_TIMEZONE
when system-local time is not the intended context. The skill can resolve dates and times and prepare absolute tool arguments, but a separate capability owns any real reminder, calendar, or deployment action.
脚本无法从文本中推断用户的目标时区。当系统本地时间不是目标上下文时,宿主必须通过
--timezone
PROFILE_TIMEZONE
提供明确的IANA时区。该技能可以解析日期和时间并准备绝对工具参数,但任何实际的提醒、日历或部署操作由单独的能力负责。

When is the turn ready?

何时交互轮次准备就绪?

The turn is ready only when the skill was loaded, one fresh clock call produced every required field after the newest direct message,
as_of
is bound to the private
starting-point
map, temporal language is resolved before date-sensitive or time-sensitive actions, and the actual user-facing response contains the required current date-time prefix. Any stale, missing, duplicate, or failed anchor leaves temporal work blocked.
仅当技能已加载、在最新用户直接消息后获取的全新时钟返回了所有必填字段、
as_of
已绑定到私有
starting-point
映射、在对日期或时间敏感的操作前已解析时间相关表述,且实际面向用户的响应包含所需的当前日期时间前缀时,交互轮次才准备就绪。任何过期、缺失、重复或失败的锚点都会导致时间相关工作受阻。