AgentSkillsCN

patronum

为 Effector 代码选择并应用 Patronum 运算符,辅以精简实用的 v2.x 示例。适用于在 Patronum 运算符之间做出选择、组合响应式状态流、用 Patronum 工具取代手动的 sample/combine 模板代码、解释运算符的签名与返回类型,或调整旧版 Patronum 的使用方式,使其更契合现代 v2 的简写语法与导入模式。

SKILL.md
--- frontmatter
name: patronum
description: Select and apply Patronum operators for Effector code with minimal, practical v2.x examples. Use when tasks involve choosing between Patronum operators, composing reactive state flows, replacing manual sample/combine boilerplate with Patronum utilities, explaining operator signatures and return types, or adapting legacy Patronum usage to modern v2 shorthand and import patterns.

Patronum Skill

Use this skill to solve Patronum usage questions quickly and consistently. Target Patronum v2.x by default.

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.

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.

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.

Output Template

Use this structure in answers:

  1. Use <operator>: one-line reason.
  2. Example: minimal code block.
  3. Caveats: version or overload notes.