# Concurrency Review

> 审计代码的并发安全性。扫描新增/修改的代码，对照 docs/architecture/concurrency_safety.md §2 共享状态注册表与 §6 危险操作清单，结合 docs/architecture/ai_dev_guide.md §10.1 grep 锚 rule-id 索引（R-CONC-*）机械执行。命中标 🟡 待复核（信号级），最终判定权在人工 reviewer。

- **Type:** Skill
- **Install:** `agentstack add skill-zuoyebang-aiweave-concurrency-review`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [zuoyebang](https://agentstack.voostack.com/s/zuoyebang)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [zuoyebang](https://github.com/zuoyebang)
- **Source:** https://github.com/zuoyebang/aiweave/tree/main/templates/skills/concurrency-review

## Install

```sh
agentstack add skill-zuoyebang-aiweave-concurrency-review
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

审计代码的并发安全性。范围：`$ARGUMENTS`（空则审计 git diff main..HEAD）。

> 公共步骤模板见 [skills-spec/01_skill_authoring_guide.md](path) §A-§E。本 Skill 不生成代码，故第 5 步测试同步不适用。
>
> **本 Skill 是 新增的审计类 Skill**。"代码 ↔ 约束"一致性审计，与 `doc-sync-check`（代码 ↔ 文档一致性）互补不替代。

## 第 0 步：🚫 模块 + 启用状态检查

1. 读 `BUILD_STATUS.md` §0 —— 命中 🚫 模块的文件**跳过**审计（不报问题）
2. 读 `INDEX.md` §0 AIWeave 采纳进度 —— 如 `docs-spec/20_concurrency_safety` 标 ⬜ 未启用 → **跳过本 Skill**，提示"本工程未启用 20，跳过 concurrency-review"

## 第 1 步：读取约束源

读以下文件（按顺序）：

1. `docs/architecture/concurrency_safety.md` —— §2 共享状态注册表 + §3 锁策略 + §4 channel 清单 + §6 危险操作清单
2. `docs/architecture/ai_dev_guide.md` §10.1 —— grep 锚 rule-id 索引（R-CONC-*）
3. `docs/BUILD_STATUS.md` §11 —— 约束清单状态轨道（确认哪些 rule-id 启用）

## 第 2 步：扫描代码范围

按 `$ARGUMENTS` 确定扫描范围：

- 空：`git diff main..HEAD --name-only` 取新增/修改的 .go 文件
- 文件路径：直接以该路径为范围
- service 模块：`service/{module}/**/*.go`

## 第 3 步：10 项 grep 锚检查

> grep 锚定位为"信号级"非"判定级"。所有命中标 🟡 待复核；最终判定由人工 reviewer 决定是否阻断合并。

### 检查 R-CONC-LOCK-IO：锁内做网络 IO

```
grep 模式：'\.Lock\(\)[\s\S]{0,500}?(http\.|Mysql|Redis|tlog\.)'
误报排除：
  - RLock 中读小对象
  - 同步只读类操作（如 Redis GET 单次  🧩 **AIWeave 骨架 · 作者 XuRuibo**  · Apache-2.0 · 模板文件，复制到工程后按业务语义填充

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [zuoyebang](https://github.com/zuoyebang)
- **Source:** [zuoyebang/aiweave](https://github.com/zuoyebang/aiweave)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-zuoyebang-aiweave-concurrency-review
- Seller: https://agentstack.voostack.com/s/zuoyebang
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
