patterns
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePattern Identification
模式识别
Observe signals → classify patterns → validate with evidence → document findings.
观察信号 → 分类模式 → 用证据验证 → 记录发现。
Steps
步骤
- Collect signals from conversation, code, or data
- Classify pattern type (workflow, orchestration, heuristic, anti-pattern)
- Validate against evidence threshold (3+ instances, multiple contexts)
- Document pattern with constraints and examples
- If implementation needed, delegate by loading the skill
outfitter:codify
<when_to_use>
- Recognizing recurring themes in work or data
- Codifying best practices from experience
- Extracting workflows from repeated success
- Identifying anti-patterns from repeated failures
- Building decision frameworks from observations
NOT for: single occurrences, unvalidated hunches, premature abstraction
</when_to_use>
<signal_identification>
Watch for these signal categories:
| Category | Watch For | Indicates |
|---|---|---|
| Success | Completion, positive feedback, repetition, efficiency | Pattern worth codifying |
| Frustration | Backtracking, clarification loops, rework, confusion | Anti-pattern to document |
| Workflow | Sequence consistency, decision points, quality gates | Process pattern |
| Orchestration | Multi-component coordination, state management, routing | Coordination pattern |
See signal-types.md for detailed taxonomy.
</signal_identification>
<pattern_classification>
Four primary pattern types:
| Type | Characteristics | Use When |
|---|---|---|
| Workflow | Sequential stages, clear transitions, quality gates | Process has ordered steps |
| Orchestration | Coordinates components, manages state, routes work | Multiple actors involved |
| Heuristic | Condition → action mapping, context-sensitive | Repeated decisions |
| Anti-Pattern | Common mistake, causes rework, has better alternative | Preventing failures |
See pattern-types.md for templates and examples.
</pattern_classification>
<evidence_thresholds>
- 从对话、代码或数据中收集信号
- 分类模式类型(工作流、编排、启发式、反模式)
- 根据证据阈值验证(3个及以上实例、多场景)
- 记录包含约束条件和示例的模式
- 如需实现,通过加载skill进行委托
outfitter:codify
<when_to_use>
- 识别工作或数据中重复出现的主题
- 将经验中的最佳实践代码化
- 从重复的成功案例中提取工作流
- 从重复的失败案例中识别反模式
- 从观察结果构建决策框架
不适用场景:单次出现的情况、未验证的直觉、过早抽象
</when_to_use>
<signal_identification>
关注以下信号类别:
| 类别 | 关注要点 | 表明 |
|---|---|---|
| 成功 | 完成、正面反馈、重复、效率 | 值得代码化的模式 |
| 挫败 | 回溯、澄清循环、返工、困惑 | 需要记录的反模式 |
| 工作流 | 序列一致性、决策点、质量门 | 流程模式 |
| 编排 | 多组件协调、状态管理、路由 | 协调模式 |
更多详细分类请查看signal-types.md。
</signal_identification>
<pattern_classification>
四种主要模式类型:
| 类型 | 特征 | 适用场景 |
|---|---|---|
| 工作流 | 连续阶段、清晰过渡、质量门 | 流程包含有序步骤时 |
| 编排 | 协调组件、管理状态、分配工作 | 涉及多个参与者时 |
| 启发式 | 条件→动作映射、上下文敏感 | 重复决策时 |
| 反模式 | 常见错误、导致返工、有更优替代方案 | 预防失败时 |
更多模板和示例请查看pattern-types.md。
</pattern_classification>
<evidence_thresholds>
Codification Criteria
代码化标准
Don't codify after first occurrence. Require:
- 3+ instances — minimum repetition to establish pattern
- Multiple contexts — works across different scenarios
- Clear boundaries — know when to apply vs not apply
- Measurable benefit — improves outcome compared to ad-hoc approach
不要在首次出现后就进行代码化。需满足:
- 3个及以上实例 — 建立模式所需的最低重复次数
- 多场景 — 在不同场景下均有效
- 清晰边界 — 明确适用与不适用的情况
- 可衡量收益 — 相比临时方法能提升结果
Quality Indicators
质量指标
| Strong Pattern | Weak Pattern |
|---|---|
| Consistent structure | Varies each use |
| Transferable to others | Requires specific expertise |
| Handles edge cases | Breaks on deviation |
| Saves time/effort | Overhead exceeds value |
</evidence_thresholds>
<progressive_formalization>
Observation (1-2 instances):
- Note for future reference
- "This worked well, watch for recurrence"
Hypothesis (3+ instances):
- Draft informal guideline
- Test consciously in next case
Codification (validated pattern):
- Create formal documentation
- Include examples and constraints
Refinement (ongoing):
- Update based on usage
- Add edge cases
</progressive_formalization>
<workflow>
Loop: Observe → Classify → Validate → Document
- Collect signals — note successes, failures, recurring behaviors
- Classify pattern type — workflow, orchestration, heuristic, anti-pattern
- Check evidence threshold — 3+ instances? Multiple contexts?
- Extract quality criteria — what makes it work?
- Document pattern — name, when, what, why
- Test deliberately — apply consciously, track variance
- Refine — adjust based on feedback
ALWAYS:
- Require 3+ instances before codifying
- Validate across multiple contexts
- Document both when to use AND when not to
- Include concrete examples
- Track pattern effectiveness over time
NEVER:
- Codify after single occurrence
- Abstract without evidence
- Ignore context-sensitivity
- Skip validation step
- Assume transferability without testing
- signal-types.md — detailed signal taxonomy
- pattern-types.md — pattern templates and examples
Identification vs Implementation:
- This skill () identifies and documents patterns
patterns - skill implements patterns as Claude Code components (skills, commands, hooks, agents)
codify
Use to answer "what patterns exist?" Use to answer "how do I turn this into a reusable component?"
</references>patternscodify| 强模式 | 弱模式 |
|---|---|
| 结构一致 | 每次使用都不同 |
| 可转移给他人 | 需要特定专业知识 |
| 能处理边缘情况 | 出现偏差就失效 |
| 节省时间/精力 | 开销超过价值 |
</evidence_thresholds>
<progressive_formalization>
观察(1-2个实例):
- 记录以备未来参考
- "这个方法效果不错,留意是否会重复出现"
假设(3个及以上实例):
- 起草非正式指南
- 在下次案例中有意识地测试
代码化(已验证的模式):
- 创建正式文档
- 包含示例和约束条件
优化(持续进行):
- 根据使用情况更新
- 添加边缘情况
</progressive_formalization>
<workflow>
循环:观察 → 分类 → 验证 → 记录
- 收集信号 — 记录成功、失败、重复出现的行为
- 分类模式类型 — 工作流、编排、启发式、反模式
- 检查证据阈值 — 3个及以上实例?多场景?
- 提取质量标准 — 是什么让它有效?
- 记录模式 — 名称、适用场景、内容、原因
- 刻意测试 — 有意识地应用,跟踪差异
- 优化 — 根据反馈调整
始终:
- 代码化前需3个及以上实例
- 跨多场景验证
- 同时记录适用与不适用场景
- 包含具体示例
- 随时间跟踪模式有效性
绝不:
- 单次出现后就代码化
- 无证据就抽象
- 忽略上下文敏感性
- 跳过验证步骤
- 未经测试就假设可转移
- signal-types.md — 详细的信号分类
- pattern-types.md — 模式模板和示例
识别 vs 实现:
- 本Skill()用于识别和记录模式
patterns - skill用于将模式实现为Claude Code组件(skills、命令、钩子、agents)
codify
使用来回答"存在哪些模式?",使用来回答"如何将其转化为可复用组件?"
</references>patternscodify