mcpField
L
lens-pro

lens-pro

github.com/venhdev开发1124 次安装今天更新
代码仓库

关于 lens-pro

lens-pro 是一项使用计算机科学和系统工程概念分析工程系统的技能,会同时讨论收益、成本、故障模式与运行边界。

主要功能

  1. 01采用正式工程概念
  2. 02核算资源与运维成本
  3. 03检查运行时故障模式
  4. 04识别退化路径和边界条件
  5. 05分析范围限于当前问题

适用场景

  1. 01审查架构设计
  2. 02评估系统运行时行为
  3. 03识别故障情形与权衡

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/venhdev/skills --skill lens-pro

安装后在 Claude Code 中输入/lens-pro确认已加载。

详细介绍

lens-pro — 专业工程解构引擎

运行不变量

  • 机械精确性:严格使用形式化的计算机科学与系统工程原语(状态机、内存模型、并发锁、I/O 边界)来定义机制;禁止使用口语化比喻、幼稚的简化或含糊其辞的抽象。
  • 反对银弹(成本核算):在说明每项收益时,同时量化其机械成本(内存占用、p99 延迟、同步开销、运维复杂性);禁止将任何模式描述为零成本或普遍最优。
  • 失败优先的加固:揭示具体的运行时故障模式、降级路径和边界条件;禁止只解释理想路径。
  • 上下文隔离:严格在当前问题的范围内提供分析,不偏离正在进行的会话任务,也不改变项目范围。

标准输出契约

# Lens [Pro]: <Target Concept / Pattern / Mechanism>

## 1. Architectural Role & Invariant Contract
- **System Classification**: <e.g., Concurrency Primitive | Consensus Protocol | Persistence Pattern | Network Flow Control>
- **Guaranteed Invariant**: <Non-negotiable contract or invariant enforced, e.g., Linearizability, At-least-once delivery, Strict Concurrency Bound>
- **Formal Definition**: <Single-sentence, precise operational definition without colloquialisms or analogies>

## 2. Runtime Mechanics & Execution Path
1. **Ingest & Allocation**: <Resource allocation, queueing strategy, or input dispatch mechanism>
2. **State & Concurrency Boundary**: <State transition, concurrency synchronization (locks, barriers, atomics), or memory mutation>
3. **Settlement & Reclamation**: <State commit, I/O flush, error boundary propagation, or resource reclamation>

## 3. Trade-offs & Adoption
*(Use paired vectors, comparison matrix, or Mermaid diagram [flowchart, sequenceDiagram, stateDiagram, xychart] when state transitions or data flow topologies clarify non-obvious trade-offs)*

- **Gain**: <Primary performance, reliability, or scaling advantage achieved>
- **Cost / Sacrifice**: <Direct engineering cost: p99 latency jitter, memory overhead, concurrency contention, or operational complexity>
- **Adopt When**: <Specific operational scale, concurrency threshold, or technical constraint requiring this pattern>
- **Avoid When**: <Simpler baseline suffices; premature optimization trap>

## 4. Production Failure Modes & Mitigations *(omit for stateless/pure-functional patterns)*
- **<Failure Mode 1, e.g., Cascading Retry Storm / Connection Starvation>**: <Exact failure mechanism under stress> ── **Mitigation**: <Direct architectural safeguard>
- **<Failure Mode 2, e.g., Head-of-Line Blocking / Silent Memory Drift>**: <Exact failure mechanism under stress> ── **Mitigation**: <Direct architectural safeguard>

评论

支持 Markdown