patronum

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Patronum Skill

Patronum 技能

Use this skill to solve Patronum usage questions quickly and consistently. Target Patronum v2.x by default.
使用本技能可快速、一致地解决Patronum的使用问题。默认针对Patronum v2.x版本。

Workflow

工作流程

  1. Classify request:
  • operator-choice
    : choose one or several operators for a task.
  • api-explain
    : explain signature, overloads, and return value.
  • compose
    : combine multiple operators into one flow.
  • debug
    : use
    debug
    and scope-aware debugging notes.
  • migration
    : map legacy forms to modern usage.
  1. Load references progressively:
  • Start with
    references/operator-matrix.md
    .
  • Add
    references/recipes.md
    for task-to-solution mapping.
  • Add
    references/pitfalls.md
    for caveats and anti-patterns.
  • Add
    references/migration-notes.md
    when legacy forms appear.
  1. Build answer contract:
  • Start with decision: selected operator(s) and why.
  • Provide minimal practical snippet.
  • Add caveats (imports, overload differences, behavior traps).
  • For uncertain versions, explicitly state v2 assumption and show migration note.
  1. 对请求进行分类:
  • operator-choice
    :为任务选择一个或多个操作符。
  • api-explain
    :解释签名、重载及返回值。
  • compose
    :将多个操作符组合为一个流。
  • debug
    :使用
    debug
    及作用域相关的调试说明。
  • migration
    :将旧版用法映射为现代用法。
  1. 逐步加载参考资料:
  • references/operator-matrix.md
    开始。
  • 若需任务到解决方案的映射,添加
    references/recipes.md
  • 若需注意事项和反模式,添加
    references/pitfalls.md
  • 当出现旧版用法时,添加
    references/migration-notes.md
  1. 构建回答框架:
  • 开头给出决策:选中的操作符及原因。
  • 提供简洁实用的代码片段。
  • 添加注意事项(导入方式、重载差异、行为陷阱)。
  • 若版本不确定,明确说明基于v2的假设并给出迁移说明。

Defaults

默认规则

  • Prefer Patronum v2.x shorthand where available.
  • Prefer concise examples with explicit imports.
  • Keep examples deterministic and composable with Effector primitives.
  • Prefer
    patronum/<operator-kebab-name>
    imports when clarity matters.
  • 优先使用Patronum v2.x可用的简写形式。
  • 优先使用带有显式导入的简洁示例。
  • 示例需具备确定性,且可与Effector原语组合使用。
  • 当需要清晰性时,优先使用
    patronum/<operator-kebab-name>
    的导入方式。

Guardrails

约束规则

  • Do not suggest outdated signatures as default.
  • Do not invent operators outside the official list.
  • Do not hide behavior differences between overloads.
  • Do not skip edge cases for
    pending
    ,
    condition
    ,
    interval
    ,
    time
    , and
    debug
    .
  • 不要将过时的签名作为默认建议。
  • 不要发明官方列表之外的操作符。
  • 不要隐藏不同重载间的行为差异。
  • 不要忽略
    pending
    condition
    interval
    time
    debug
    的边缘情况。

Output Template

输出模板

Use this structure in answers:
  1. Use <operator>
    : one-line reason.
  2. Example
    : minimal code block.
  3. Caveats
    : version or overload notes.
回答时使用以下结构:
  1. 使用<操作符>
    :一行说明理由。
  2. 示例
    :简洁的代码块。
  3. 注意事项
    :版本或重载相关说明。