Skip to content
Back to skills

Brownfield Spec Mining

ASecurity

从现有代码提取行为规格:不变量、边界、测试锚点与缺口

  • 39 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 12, 2026
ai-agents

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add oschina/mothx --skill brownfield-spec-mining --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Brownfield Spec Mining?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Brownfield Spec Mining
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/oschina-brownfield-spec-mining/badge)](https://www.skillsdirectory.com/skills/oschina-brownfield-spec-mining)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: brownfield-spec-mining
description: 从现有代码提取行为规格:不变量、边界、测试锚点与缺口
---

# Brownfield 规格挖掘

## 何时使用

在改造遗留系统、补规格、做回归保护或准备迁移时使用。

## 检查清单

### 行为

- 从入口追踪到副作用,记录实际可观察行为;
- 区分主路径、错误路径、后台/异步路径;
- 每条规格描述行为,不描述实现细节。

### 不变量与边界

- 标注前置条件、后置条件、不变量与错误行为;
- 记录空值、边界、并发、重试与幂等语义;
- 区分已实现行为、预期行为与历史遗留行为。

### 测试锚点

- 每条规格关联现有测试或明确标注缺口;
- 没有锚点的规格标记为待补测试;
- 不把设计意图当既成行为。

### 文档

- 规格扁平、可枚举、可检索;
- 与代码/测试不一致处显式列出;
- 保留未确认项与需要产品/架构决策的问题。

## 输出格式

- 行为规格清单;
- 不变量与边界条件;
- 测试锚点与缺口;
- 与现状不一致项。

## 反模式

- 从代码注释推断行为而不看实现;
- 写无法验证的规格;
- 忽略错误与异步路径。

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.