🔒 离线

v1.0.0

并发策略选择器 用于设计长时编辑的并发控制——当一次业务事务跨越多个系统事务时(例如用户打开记录、编辑……

0· 0·0 当前·0 累计
by @quochungto·This
下载技能包 项目主页
License
This
最后更新
2026/4/21
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
该技能是一个仅提供指令的设计助手,用于选择离线并发策略,其请求的范围和操作与此目的一致。
评估建议
This is an instruction-only de签名/审计 技能 that 应用ears coherent for selecting offline concurrency strategies. It does not 请求 secrets or 安装 code, so direct technical risk from 安装ation is low. However: (1) follow its DB 模式 or 迁移 examples only after code review and 备份s — creating lock tables or changing version columns affects production data; (2) if you allow the 代理 to make edits, restrict write 权限s and review all changes before committing; (3) do not provide any 凭证s or 环境 variables to the 技能; (4) tes...
详细分析 ▾
用途与能力
Name, description, and required 输入s (codebase or 系统 description) match the instructions: selecting between optimistic/pessimistic/coarse-grAIned/implicit locks for long-运行ning edits. There are no unrelated 环境 variables, binaries, or 凭证s 请求ed.
指令范围
技能.md focuses on reading the codebase and producing a concurrency decision record; it also includes concrete 模式 and 迁移 examples (SQL, lock table de签名) and 仓库-decorator patterns. This scope is 应用ropriate for a de签名/审计 技能 but those DB/模式 changes and 仓库 modifications are high-impact operations — the 技能 does not itself include code, so any 模式/应用 changes would come from an engineer following its recommendations. Review and test 迁移s/changes before 应用lying to production.
安装机制
No 安装 spec and no code files — instruction-only. This is the lowest-risk 安装 性能分析 (nothing fetched or written by the 技能 automatically).
凭证需求
该 skill 不请求任何环境变量、凭据或配置路径。说明中提到的仅包括读取应用代码和数据库 schema(属预期行为),不存在过度访问密钥或索取无关凭据的情况。
持久化与权限
always is false and the 技能 does not 请求 persistent 系统 presence. It requires typical 代理 工具s (Read, Grep, Edit, Write) 应用ropriate for analyzing and documenting a codebase. Note: because it can Edit/Write, you should limit 代理 权限s and review any edits before 应用lying.
安全有层次,运行前请审查代码。

License

This

请查看许可证条款了解详情。

运行时依赖

无特殊依赖

版本

latestv1.0.02026/4/21
无害

安装命令

点击复制
官方npx clawhub@latest install bookforge-offline-concurrency-strategy-selector
镜像加速npx clawhub@latest install bookforge-offline-concurrency-strategy-selector --registry https://cn.longxiaskill.com

技能文档

--- name: offline-concurrency-strategy-selector description: "用于设计跨多个系统事务的长时编辑并发控制:用户打开记录,编辑数分钟或数小时后再保存。在乐观锁(version 列,提交时碰撞检测)与悲观锁(记录签出,加载时冲突预防)之间选择,并决定是否加入 Coarse-Grained Lock(聚合根锁,支持多对象编辑)和 Implicit Lock(框架强制锁,防止空档)。覆盖:防丢更新、并发编辑碰撞检测、离线锁策略、长事务并发、version 列设计、锁表设计、锁超时策略、聚合锁、编辑并发、锁类型选择(exclusive-read / exclusive-write / read-write)。诊断误配:用户思考期间持有 DB 级锁、隐式锁空档、乐观/悲观在重叠数据混用、基于 timestamp 的版本陷阱。" version: 1.0.0 homepage: https://github.com/bookforge-ai/bookforge-skills/tree/main/books/patterns-of-enterprise-application-architecture/skills/offline-concurrency-strategy-selector metadata: {"openclaw":{"emoji":"🔒","homepage":"https://github.com/bookforge-ai/bookforge-skills"}} status: draft source-books:

  • id: patterns-of-enterprise-application-architecture
title: "Patterns of Enterprise Application Architecture" authors: - Martin Fowler - David Rice - Matthew Foemmel - Edward Hieatt - Robert Mee - Randy Stafford chapters: [5, 16] domain: enterprise-application-architecture tags:
  • concurrency
  • locking
  • transactions
  • design-patterns
  • data-integrity
  • offline-lock
  • optimistic-concurrency
  • pessimistic-concurrency
depends-on: [] execution: tier: 2 mode: hybrid inputs:
  • type: codebase
description: "企业级应用代码库(领域、持久化、Web 层)或系统及编辑流程描述"
  • type: user-description
description: "业务事务描述:用户编辑内容、时长、并发用户数、同记录编辑频率、丢弃进行中工作的代价" tools-required:
  • Read
  • Grep
  • Edit
  • Write
tools-optional:
  • Glob
mcps-required: [] environment: "至少存在一个多步编辑工作流的企业应用(一次请求打开记录,另一次请求保存)。关系数据库,使用 ORM 或手写持久层。技术栈无关:Java、C#、Python、TypeScript、Ruby 均可。" discovery: goal: "为每个编辑工作流选择正确的离线并发策略,并输出含基础设施规格的并发决策记录。" tasks: - "识别系统是否存在真正的离线并发(业务事务跨多个系统事务)" - "使用碰撞频率 × 重做代价框架选择乐观或悲观离线锁" - "在悲观锁内选择锁类型(exclusive-write、exclusive-read、read/write)" - "判断是否需 Coarse-Grained Lock 以支持聚合编辑" - "判断是否需 Implicit Lock 作为兜底" - "标记反模式:DB 级长锁、隐式锁空档、乐观/悲观混用、timestamp 版本" - "输出并发决策记录,含基础设施需求与 UX 规格" audience: roles: - software-architect - senior-backend-engineer - tech-lead experience: intermediate when_to_use: triggers: - "设计或审计任一用户先开记录、后保存的功能" - "出现‘丢更新’报告——某用户更改静默覆盖他人" - "为新实体选择乐观或悲观锁" - "给当前无并发控制的系统加锁" - "决定聚合根级锁还是单实体级锁" - "评估 SELECT FOR UPDATE 在长时用户流中的安全性" - "设计碰撞检测 UX(报错、合并界面、强制刷新)" prerequisites: [] not_for: - "单请求工作流,整个业务事务在一个系统事务内——请用数据库隔离级别" - "单请求内的线程级并发——请用 Java synchronized、Go mutex 等" - "分布式系统共识——请用 Raft、Paxos、saga 模式" - "只读查询并发——无写操作,无需并发控制" environment: codebase_required: false codebase_helpful: true works_offline: true quality: scores: with_skill: null baseline: null delta: null tested_at: null eval_count: null assertion_co

数据来源ClawHub ↗ · 中文优化:龙虾技能库