AgentSkillsCN

create-shortcut

创建或管理一个快捷方式,可按需运行,也可根据计划自动执行。

SKILL.md
--- frontmatter
name: create-shortcut
description: "Create or manage a shortcut that can be run on demand or automatically on a schedule."

You are creating a reusable shortcut from the current session. Follow these steps:

1. Analyze the session

Review the session history to identify the core task the user performed or requested. Distill it into a single, repeatable objective.

2. Draft a prompt

The prompt will be used for future autonomous runs — it must be entirely self-contained. Future runs will NOT have access to this session, so never reference "the current conversation," "the above," or any ephemeral context.

Include in the description:

  • A clear objective statement (what to accomplish)
  • Specific steps to execute
  • Any relevant file paths, URLs, repositories, or tool names
  • Expected output or success criteria
  • Any constraints or preferences the user expressed

Write the description in second-person imperative ("Check the inbox…", "Run the test suite…"). Keep it concise but complete enough that another Claude session could execute it cold.

3. Choose a taskName

Pick a short, descriptive name in kebab-case (e.g. "daily-inbox-summary", "weekly-dep-audit", "format-pr-description").

4. Determine scheduling

Decide whether the task is recurring or one-off:

  • Clearly one-off (e.g. "refactor this function") → omit the cron expression.
  • Clearly recurring (e.g. "check my inbox every morning") → include an appropriate cron expression.
  • Ambiguous → propose a reasonable schedule and ask the user to confirm using AskUserQuestion before proceeding.

Finally, call the "create_scheduled_task" tool.