@moon791017/neo-skills 1.1.27 → 1.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -30
- package/package.json +1 -1
- package/skills/neo-code-review/SKILL.md +27 -13
- package/skills/neo-code-review/evals/eval_queries.json +7 -2
- package/skills/neo-code-review/evals/evals.json +34 -0
- package/skills/neo-code-review/references/review-checklist.md +13 -3
- package/skills/neo-stop-slop/SKILL.md +86 -74
- package/skills/neo-stop-slop/evals/eval_queries.json +20 -0
- package/skills/neo-stop-slop/evals/evals.json +50 -9
- package/skills/neo-stop-slop/references/article-rewrite.md +37 -0
- package/skills/neo-stop-slop/references/dev-slop.md +37 -28
- package/skills/neo-stop-slop/references/examples.md +25 -25
- package/skills/neo-stop-slop/references/phrases-zh.md +27 -23
- package/skills/neo-stop-slop/references/structures.md +60 -45
- package/skills/neo-stop-slop/scripts/analyze-slop.js +66 -66
package/README.md
CHANGED
|
@@ -7,46 +7,46 @@
|
|
|
7
7
|
<img src="images/banner.png" alt="Neo Skills extension banner" width="100%">
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
|
-
**Neo Skills**
|
|
10
|
+
**Neo Skills** 提供可安裝的 AI Agent 技能模組。每個技能以 `SKILL.md` 定義,涵蓋語言、框架、DevOps、Code Review、需求釐清、Agent 治理與文字潤飾。支援 Agent Skills 的工具可以在需要時載入完整規則,不必把所有規則放進單一系統提示詞。
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
專案包含:
|
|
13
13
|
|
|
14
|
-
- `skills
|
|
15
|
-
- `bin/install-skills.js
|
|
16
|
-
- `bin/install-system-instructions.js
|
|
17
|
-
- `scripts/check-skills-syntax.py
|
|
14
|
+
- `skills/`:內建技能模組。
|
|
15
|
+
- `bin/install-skills.js`:將技能同步至 Antigravity CLI 的全域技能目錄。
|
|
16
|
+
- `bin/install-system-instructions.js`:將系統提示詞安裝至 Claude Code、Copilot CLI、Codex 或 Antigravity 的指導檔。
|
|
17
|
+
- `scripts/check-skills-syntax.py`:非互動式技能結構與語法驗證工具。
|
|
18
18
|
|
|
19
19
|
## 適合誰
|
|
20
20
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
21
|
+
- 希望 AI Agent 遵守專案規範的開發者。
|
|
22
|
+
- 希望將常用工作流程整理成可重複觸發技能的團隊。
|
|
23
23
|
- 使用 Antigravity CLI、Codex、Claude Code、Copilot CLI 或其他相容 Agent Skills 工具的人。
|
|
24
|
-
-
|
|
24
|
+
- 需要以知識庫、範本、腳本和驗證支援 AI 輔助開發的人。
|
|
25
25
|
|
|
26
26
|
## 核心設計
|
|
27
27
|
|
|
28
28
|
| 機制 | 說明 |
|
|
29
29
|
| :--- | :--- |
|
|
30
|
-
| 漸進式揭露 | Agent
|
|
31
|
-
| 觸發導向描述 | 每個 skill 的 `description`
|
|
30
|
+
| 漸進式揭露 | Agent 啟動時只讀取 `name` 與 `description`;需要技能時才載入完整 `SKILL.md` 與 references。 |
|
|
31
|
+
| 觸發導向描述 | 每個 skill 的 `description` 都標明使用時機,供 Agent 判斷何時載入。 |
|
|
32
32
|
| 外部知識庫 | 詳細規則放在 `references/` 或 `reference/`,避免主技能檔過長。 |
|
|
33
|
-
| 可重用資源 |
|
|
33
|
+
| 可重用資源 | `assets/`、`templates/` 與 `scripts/` 提供可直接使用的資源。 |
|
|
34
34
|
| 可驗證結構 | 使用 `scripts/check-skills-syntax.py` 檢查技能名稱、frontmatter 與基本規格。 |
|
|
35
35
|
|
|
36
36
|
## 內建技能
|
|
37
37
|
|
|
38
38
|
| 類別 | Skill | 使用時機 |
|
|
39
39
|
| :--- | :--- | :--- |
|
|
40
|
-
| Agent 治理 | `neo-harness` |
|
|
40
|
+
| Agent 治理 | `neo-harness` | 自動掃描專案環境,產生或更新專案專用的 AGENTS.md,並整合 Harness 評估、Workflow 與編排架構。 |
|
|
41
41
|
| 資訊安全 | `neo-iso-27001` | 依 ISO/IEC 27001 進行 ISMS 範圍、風險、證據、差距分析、稽核準備與改善計畫。 |
|
|
42
42
|
| 隱私管理 | `neo-iso-27701` | 依 ISO/IEC 27701 進行 PIMS、PII 角色、處理活動、隱私風險、證據與稽核準備。 |
|
|
43
43
|
| DevOps | `neo-azure-pipelines` | 建立、審查、除錯或現代化 Azure Pipelines YAML,尤其是 .NET build、Azure App Service 或 IIS 部署。 |
|
|
44
|
-
| 需求釐清 | `neo-clarification` |
|
|
45
|
-
| Code Review | `neo-code-review` |
|
|
46
|
-
| 系統架構 | `neo-clean-architecture` |
|
|
44
|
+
| 需求釐清 | `neo-clarification` | 將模糊、情緒化、片段式或截圖式需求整理成規格、驗收條件和待釐清問題。 |
|
|
45
|
+
| Code Review | `neo-code-review` | 檢查程式碼、PR/diff、bug 風險、安全性、效能與可維護性。 |
|
|
46
|
+
| 系統架構 | `neo-clean-architecture` | 依 Clean Architecture 原則設計、實作、審查或重構系統,劃分層級並移除特定技術依賴。 |
|
|
47
47
|
| C# | `neo-csharp` | 撰寫、審查、除錯或現代化 C#/.NET 程式碼,包含語言版本、NRT、records、pattern matching 與 async。 |
|
|
48
48
|
| C# | `neo-csharp-interface-generator` | 從 C# class 產生或更新 interface,並安全建立、追加或替換 interface block。 |
|
|
49
|
-
| .NET | `neo-dotnet` |
|
|
49
|
+
| .NET | `neo-dotnet` | 處理一般 .NET 問題;當子領域尚未確定時,先偵測 SDK/project shape,再導向合適技能。 |
|
|
50
50
|
| .NET | `neo-dotnet-minimal-apis` | 建置或審查 ASP.NET Core Minimal APIs、route groups、endpoint filters、typed results 或 OpenAPI metadata。 |
|
|
51
51
|
| .NET | `neo-dotnet-webapi` | 建置或審查 controller-based ASP.NET Core Web API、Problem Details、API versioning 與 DTO。 |
|
|
52
52
|
| .NET | `neo-dotnet-mvc` | 建置或審查 ASP.NET Core MVC、Razor views、ViewModels、Tag Helpers、View Components 與 SSR workflows。 |
|
|
@@ -61,25 +61,25 @@
|
|
|
61
61
|
| TypeScript | `neo-typescript` | 處理 TypeScript、tsconfig、strict mode、泛型、conditional/mapped/template literal types、ESM/CJS 與 runtime boundaries。 |
|
|
62
62
|
| Vue | `neo-vue` | 建置、除錯、重構或審查 Vue 3、SFC、Composition API、Pinia、Vue Router、Vite 與 Vue+TypeScript。 |
|
|
63
63
|
| Agent 架構 | `neo-sub-agent` | 設計、建立、審查或轉換 sub-agent、custom agent、worker/reviewer/planner agent 或 multi-agent workflow。 |
|
|
64
|
-
| 技能開發 | `generate-skill` | 建立、更新、審查或最佳化 Agent Skill
|
|
64
|
+
| 技能開發 | `generate-skill` | 建立、更新、審查或最佳化 Agent Skill,包括規格、觸發描述、延伸資源、評估資料和設計模式。 |
|
|
65
65
|
| 可觀測性 | `neo-opentelemetry` | 解釋 OpenTelemetry 概念、規劃或審查 Collector 架構與設定、處理維運排障、安全、零程式 instrumentation 及相容性遷移。 |
|
|
66
66
|
| queue | `neo-rabbitmq` | 以 RabbitMQ 4.3 為預設,提供語言中立的訊息拓撲、Broker 營運、監控排障與效能優化指引。 |
|
|
67
|
-
| 文字潤飾 | `neo-stop-slop` | 去除繁中或英文中的 AI
|
|
68
|
-
| PR 產出 | `neo-pr` | 詢問或自動偵測 Repository
|
|
67
|
+
| 文字潤飾 | `neo-stop-slop` | 去除繁中或英文中的 AI 腔、贅詞和公式化句式,適用於文件、註解、commit message 和 PR 說明。 |
|
|
68
|
+
| PR 產出 | `neo-pr` | 詢問或自動偵測 Repository 的來源與目標分支,擷取變更,產生重點式且自然的 PR Title 和 PR Description。 |
|
|
69
69
|
|
|
70
|
-
`generate-skill` 位於 `.agents/skills/`,可由 Agent Skills CLI
|
|
70
|
+
`generate-skill` 位於 `.agents/skills/`,可由 Agent Skills CLI 探索和安裝;其餘技能位於 `skills/`。
|
|
71
71
|
|
|
72
72
|
## 安裝
|
|
73
73
|
|
|
74
74
|
### Antigravity CLI 全域安裝
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
將 `skills/` 下的技能同步至 `~/.gemini/antigravity-cli/skills`:
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
79
|
npx -y @moon791017/neo-skills@latest
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
本地開發:
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
85
|
node bin/install-skills.js
|
|
@@ -87,13 +87,13 @@ node bin/install-skills.js
|
|
|
87
87
|
|
|
88
88
|
### Agent Skills CLI 安裝
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
在目前專案安裝全部技能:
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
93
|
npx skills add Benknightdark/neo-skills --skill --all -y
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
在全域安裝全部技能:
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
99
|
npx skills add Benknightdark/neo-skills --skill --all -g -y
|
|
@@ -101,13 +101,13 @@ npx skills add Benknightdark/neo-skills --skill --all -g -y
|
|
|
101
101
|
|
|
102
102
|
## 系統提示詞安裝
|
|
103
103
|
|
|
104
|
-
Agent Skills
|
|
104
|
+
Agent Skills 規格會同步技能目錄;`AGENTS.md`、`CLAUDE.md`、Copilot instructions 或 Antigravity `agents.md` 等指導檔需要另外安裝。
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
107
|
npx -p @moon791017/neo-skills install-system-instructions --instructions technical-co-founder
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
指定 Agent
|
|
110
|
+
指定 Agent 和專案路徑:
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
113
|
npx -p @moon791017/neo-skills install-system-instructions \
|
|
@@ -116,7 +116,7 @@ npx -p @moon791017/neo-skills install-system-instructions \
|
|
|
116
116
|
--project-path .
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
更新已安裝的提示詞:
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
122
|
npx -p @moon791017/neo-skills install-system-instructions \
|
|
@@ -139,10 +139,10 @@ npx -p @moon791017/neo-skills install-system-instructions \
|
|
|
139
139
|
|
|
140
140
|
| Key | 用途 |
|
|
141
141
|
| :--- | :--- |
|
|
142
|
-
| `technical-co-founder` | 讓 Agent
|
|
142
|
+
| `technical-co-founder` | 讓 Agent 依 Discovery、Planning、Building、Polish、Handoff 流程協助交付產品。 |
|
|
143
143
|
| `git-commit` | 要求 commit message 遵守 Conventional Commits 1.0.0,並使用使用者偏好的語言。 |
|
|
144
144
|
| `fact-check` | 要求 Agent 根據來源與證據回答,資料不足時明確說不能確定。 |
|
|
145
|
-
| `minimal-output` |
|
|
145
|
+
| `minimal-output` | 要求 Agent 在執行建置、部署、測試和格式化時使用最小輸出,保留 Context 空間。 |
|
|
146
146
|
|
|
147
147
|
## 常用情境
|
|
148
148
|
|
package/package.json
CHANGED
|
@@ -3,45 +3,56 @@ name: neo-code-review
|
|
|
3
3
|
description: >
|
|
4
4
|
Use this skill when the user asks to review or audit source code, a PR, diff, commit,
|
|
5
5
|
or recent changes for bugs, security, performance, tests, compatibility, or
|
|
6
|
-
maintainability
|
|
7
|
-
|
|
8
|
-
file and line evidence.
|
|
6
|
+
maintainability, duplicated code or logic across files, or hard-coded values. Also use
|
|
7
|
+
it after an AI agent finishes modifying code to inspect the current uncommitted working
|
|
8
|
+
tree before handoff and report actionable findings with file and line evidence.
|
|
9
9
|
compatibility: Requires Python 3.11+ and uv for the Git change helper.
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# Code Review
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Follow this read-only workflow. Report only actionable findings supported by evidence.
|
|
15
15
|
|
|
16
16
|
## Trigger On
|
|
17
17
|
|
|
18
18
|
- The user requests a code, PR, diff, commit, security, performance, test, or maintainability review.
|
|
19
|
+
- The user asks whether code or logic is duplicated across files, or whether hard-coded values should be centralized.
|
|
19
20
|
- An AI Agent finishes modifying code, tests, configuration, or scripts before handoff.
|
|
20
21
|
|
|
21
22
|
## Workflow
|
|
22
23
|
|
|
23
|
-
1. **
|
|
24
|
-
- Use the files or
|
|
25
|
-
- If no scope
|
|
24
|
+
1. **Define the review scope**
|
|
25
|
+
- Use the files or snippets supplied by the user as the primary scope.
|
|
26
|
+
- If the user provides no scope and the current directory is a Git repository, run:
|
|
26
27
|
```bash
|
|
27
28
|
uv run skills/neo-code-review/scripts/git-diff-reviewer.py --working-tree
|
|
28
29
|
```
|
|
29
30
|
- Use `--staged` for staged-only changes and `--commit <range>` for a commit range.
|
|
30
31
|
- Read surrounding code, related tests, and existing contracts. If no reviewable input exists, report it and stop.
|
|
32
|
+
- For a working-tree review, include the helper's tracked diff and each non-ignored untracked file as separate inputs.
|
|
31
33
|
|
|
32
|
-
2. **Load the rules**
|
|
34
|
+
2. **Load the review rules**
|
|
33
35
|
- Read [review-checklist.md](references/review-checklist.md) before evaluating code.
|
|
34
36
|
- Identify the actual language, framework, and affected behavior from the change. Do not infer unverified rules from filenames.
|
|
35
37
|
|
|
36
|
-
3. **
|
|
38
|
+
3. **Run the cross-file consistency scan**
|
|
39
|
+
- Build the comparison set from the review targets and relevant repository source and configuration files. Use `rg --files` and the repository's ignore rules. Exclude dependency, vendor, cache, generated, minified, build, and coverage output unless a file is explicitly in scope.
|
|
40
|
+
- Inventory changed or reviewed functions, classes, validation and authorization rules, state transitions, request or query construction, error handling, and distinctive literals such as URLs, routes, timeouts, retry counts, thresholds, regexes, feature flags, and error messages.
|
|
41
|
+
- Search the comparison set for exact and near-exact matches, then read each match in context. Ignore name and formatting differences when the behavior matches. Treat renamed or slightly rearranged copies as duplicates when their business rules, inputs, side effects, and failure behavior are materially the same.
|
|
42
|
+
- Report only meaningful duplication: copied implementation, duplicated business or validation logic, divergent security or state logic, or repeated non-trivial hard-coded configuration. Do not report a match based only on a common keyword, normal one-time literal, test fixture, snapshot, generated file, or vendor code.
|
|
43
|
+
- For every cross-file finding, cite both file paths and line numbers. Explain the concrete maintenance, divergence, security, or behavior risk and recommend a specific shared helper, constant, configuration source, or other single source of truth.
|
|
44
|
+
- If the user supplied only a snippet or specific files without repository context, state in `## Validation` that cross-file verification was unavailable. Never invent repository matches or line evidence.
|
|
45
|
+
|
|
46
|
+
4. **Analyze risk**
|
|
37
47
|
- Prioritize correctness, regressions, security, data consistency, resource lifetime, concurrency, and high-risk test gaps.
|
|
38
48
|
- `🔴 Critical Issues` contain only security vulnerabilities, data loss, incorrect behavior, authorization bypasses, or major regressions.
|
|
39
49
|
- `🟡 Suggestions` contain only actionable, non-blocking issues with a clear impact and remediation direction.
|
|
50
|
+
- Classify ordinary duplicated logic or hard-coded configuration as `🟡 Suggestions`. Classify hard-coded secrets or duplication that creates a demonstrable security or behavior defect as `🔴 Critical Issues`.
|
|
40
51
|
- Do not report preferences, unsupported speculation, or checklist items that were not triggered by evidence.
|
|
41
52
|
|
|
42
|
-
|
|
53
|
+
5. **Produce a concise report**
|
|
43
54
|
- Write in English and preserve file paths and line numbers, such as `src/user.ts:42`.
|
|
44
|
-
- Use this structure.
|
|
55
|
+
- Use this structure. Keep all severity sections and write `None` when a section has no findings:
|
|
45
56
|
|
|
46
57
|
```markdown
|
|
47
58
|
## 🔍 Review Summary
|
|
@@ -56,15 +67,18 @@ Use the Reviewer workflow. Keep the review read-only and report only evidence-ba
|
|
|
56
67
|
|
|
57
68
|
## 🟡 Suggestions
|
|
58
69
|
- **Location**: `path:line`
|
|
70
|
+
- **Type**: Duplicated logic, duplicated hard-coded value, or another applicable category.
|
|
71
|
+
- **Evidence**: The matching location and the relevant behavior or value in each file.
|
|
59
72
|
- **Recommendation**: Specific, non-blocking improvement.
|
|
60
73
|
|
|
61
74
|
## 🟢 Strengths
|
|
62
75
|
- List only strengths directly supported by the change.
|
|
63
76
|
|
|
64
77
|
## Validation
|
|
65
|
-
-
|
|
78
|
+
- State the cross-file comparison scope and any unavailable repository context.
|
|
79
|
+
- List executed tests, builds, and checks. Name any that were not run.
|
|
66
80
|
```
|
|
67
81
|
|
|
68
|
-
|
|
82
|
+
6. **Apply the delivery gate**
|
|
69
83
|
- If an automatic review finds `🔴 Critical Issues`, cannot establish the review scope, or cannot load the skill, do not declare completion or hand off.
|
|
70
84
|
- After fixing findings, rerun the required checks and review the changes again.
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
"Is this TypeScript code well designed? What should be improved?",
|
|
11
11
|
"Check this SQL query for performance problems, slow queries, or missing indexes",
|
|
12
12
|
"Run static code analysis and identify problems in this Go project",
|
|
13
|
-
"An AI Agent just finished modifying code. Review the uncommitted changes before handoff"
|
|
13
|
+
"An AI Agent just finished modifying code. Review the uncommitted changes before handoff",
|
|
14
|
+
"Review this pull request and check whether validation logic or hard-coded limits are duplicated in other source files",
|
|
15
|
+
"Audit the repository for copy-pasted business rules and repeated URLs, timeouts, or thresholds introduced by these changes",
|
|
16
|
+
"Check whether the same implementation appears in different files and whether repeated configuration should be centralized"
|
|
14
17
|
],
|
|
15
18
|
"should_not_trigger": [
|
|
16
19
|
"How do I install Git?",
|
|
@@ -23,6 +26,8 @@
|
|
|
23
26
|
"Translate this Python code into Rust",
|
|
24
27
|
"What is the principle behind SQL injection?",
|
|
25
28
|
"Generate today's development progress report",
|
|
26
|
-
"Run the current project's tests only; do not perform a code review"
|
|
29
|
+
"Run the current project's tests only; do not perform a code review",
|
|
30
|
+
"How should I extract duplicated code into a shared helper?",
|
|
31
|
+
"Write a script that detects repeated literals across a repository"
|
|
27
32
|
]
|
|
28
33
|
}
|
|
@@ -36,6 +36,40 @@
|
|
|
36
36
|
"If 🔴 Critical Issues are found, the status blocks delivery",
|
|
37
37
|
"The report invents no findings when no changes exist"
|
|
38
38
|
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": 4,
|
|
42
|
+
"prompt": "Review these changed TypeScript files for correctness and compare them with each other for duplicated logic and hard-coded values. File: src/orders/createOrder.ts\n```typescript\nconst MAX_ITEMS = 50;\n\nexport function validateCreateItems(items: Item[]): void {\n if (items.length > MAX_ITEMS) throw new Error('Too many items');\n for (const item of items) {\n if (item.quantity <= 0) throw new Error('Invalid quantity');\n }\n}\n```\nFile: src/orders/updateOrder.ts\n```typescript\nconst MAX_ITEMS = 50;\n\nexport function validateUpdateItems(items: Item[]): void {\n if (items.length > MAX_ITEMS) throw new Error('Too many items');\n for (const item of items) {\n if (item.quantity <= 0) throw new Error('Invalid quantity');\n }\n}\n```",
|
|
43
|
+
"expected_output": "A concise English review report that identifies the duplicated item-validation logic and repeated MAX_ITEMS hard-coded value in both files, cites both file locations, classifies the maintainability issue as a 🟡 Suggestion rather than a 🔴 Critical Issue, and recommends extracting shared validation and a single source of truth for the limit. It must not invent unrelated defects.",
|
|
44
|
+
"assertions": [
|
|
45
|
+
"The report contains both src/orders/createOrder.ts and src/orders/updateOrder.ts as evidence locations",
|
|
46
|
+
"The report identifies the duplicated validation behavior rather than only matching function names",
|
|
47
|
+
"The report identifies the repeated MAX_ITEMS value as hard-coded configuration duplication",
|
|
48
|
+
"The duplication findings appear under 🟡 Suggestions and do not block delivery",
|
|
49
|
+
"The report recommends a shared validator and centralized constant or configuration",
|
|
50
|
+
"The report contains no unsupported security, performance, or correctness findings"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": 5,
|
|
55
|
+
"prompt": "Review these two test files and check for meaningful cross-file duplication or hard-coded configuration. File: tests/orders.test.ts\n```typescript\nit('returns HTTP 200 for a valid order', async () => {\n expect(response.status).toBe(200);\n});\n```\nFile: tests/payments.test.ts\n```typescript\nit('returns HTTP 200 for a valid payment', async () => {\n expect(response.status).toBe(200);\n});\n```\nThese tests cover different endpoints and share only a normal HTTP status literal.",
|
|
56
|
+
"expected_output": "A concise English review report that performs or clearly scopes the cross-file check but reports no duplication finding. It must not treat a normal repeated test literal or separate endpoint fixture as meaningful hard-coded configuration, and it must not invent other issues.",
|
|
57
|
+
"assertions": [
|
|
58
|
+
"The report does not raise a duplicated-logic or hard-coded-configuration finding for the shared 200 test literal",
|
|
59
|
+
"The report does not claim the two endpoint tests implement the same business rule",
|
|
60
|
+
"The report explicitly states the cross-file scan scope or limitation",
|
|
61
|
+
"The report invents no unrelated findings"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": 6,
|
|
66
|
+
"prompt": "Review only this Python snippet and check whether the same code or hard-coded values appear in other files:\n```python\ndef is_active(user):\n return user.status == 'active'\n```\nNo repository or additional files are available.",
|
|
67
|
+
"expected_output": "A concise English review report that states the supplied snippet was reviewed but cross-file verification was unavailable because no repository context or additional files were provided. It must not invent duplicate locations or line evidence.",
|
|
68
|
+
"assertions": [
|
|
69
|
+
"The report states that cross-file verification could not be performed",
|
|
70
|
+
"The report does not invent another file path, duplicate match, or line number",
|
|
71
|
+
"The report still uses the required review sections and severity headings"
|
|
72
|
+
]
|
|
39
73
|
}
|
|
40
74
|
]
|
|
41
75
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Code Review Checklist
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use this checklist as the baseline for `neo-code-review`. Compare each change against these criteria and report findings under `Critical Issues` (🔴 must fix), `Suggestions` (🟡 non-blocking), or `Strengths` (🟢).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Report a finding only when the diff, surrounding code, tests, runtime behavior, or a stated requirement supports the risk. Do not turn every checklist item into a finding.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -122,8 +122,18 @@ Only list SOLID/design findings when the violation clearly increases defect risk
|
|
|
122
122
|
- Is a function, method, component, or query too long or deeply nested to review safely?
|
|
123
123
|
- Is cyclomatic complexity high enough to hide bugs or make tests brittle?
|
|
124
124
|
- [ ] **Modularity & Duplication**:
|
|
125
|
-
- Does the code avoid meaningful duplication
|
|
125
|
+
- Does the code avoid meaningful duplication and copy-pasted implementations across changed and relevant repository files?
|
|
126
|
+
- Are business, validation, authorization, state-transition, error-handling, or request/query rules implemented in more than one place?
|
|
127
|
+
- Are apparently different implementations materially equivalent after comparing inputs, conditions, side effects, and failure behavior?
|
|
126
128
|
- Is shared behavior placed at the right abstraction level without over-engineering?
|
|
129
|
+
- [ ] **Hard-coded Values & Single Source of Truth**:
|
|
130
|
+
- Are non-trivial URLs, routes, timeouts, retry counts, thresholds, regexes, feature flags, error messages, or other configuration values repeated across production files?
|
|
131
|
+
- Should a repeated value be moved to a shared constant, configuration source, or domain-level policy to prevent drift?
|
|
132
|
+
- Are hard-coded credentials, tokens, private keys, or other secrets treated as security findings rather than ordinary maintainability suggestions?
|
|
133
|
+
- Do not report common one-time literals, test fixtures, snapshots, generated files, vendor code, or matches based only on a shared keyword.
|
|
134
|
+
- [ ] **Cross-file Evidence**:
|
|
135
|
+
- Does every duplication finding cite both file paths and line numbers with enough surrounding context to verify the match?
|
|
136
|
+
- If repository context is unavailable, does the review state that cross-file verification could not be performed instead of inventing evidence?
|
|
127
137
|
- [ ] **Testability**:
|
|
128
138
|
- Is the code easy to unit test or integration test?
|
|
129
139
|
- Are dependencies injectable or isolatable where tests need control over time, I/O, network calls, randomness, or external systems?
|
|
@@ -3,143 +3,155 @@ name: neo-stop-slop
|
|
|
3
3
|
description: >
|
|
4
4
|
Use this skill when the user wants to polish, rewrite, shorten, or review prose so
|
|
5
5
|
it sounds natural rather than AI-generated. Trigger for Traditional Chinese or English
|
|
6
|
-
drafts,
|
|
7
|
-
|
|
6
|
+
drafts, rough notes, source material, articles, technical docs, code comments, commit
|
|
7
|
+
messages, PR descriptions, sales copy, or requests to remove AI tells, slop, fluff,
|
|
8
|
+
or formulaic phrasing.
|
|
8
9
|
license: MIT
|
|
9
10
|
compatibility: Requires Node.js (ESM) to run the analyze-slop.js script.
|
|
10
11
|
metadata:
|
|
11
12
|
author: Ben Knight Dark
|
|
12
|
-
version: "1.
|
|
13
|
+
version: "1.1.0"
|
|
13
14
|
patterns: reviewer, generator
|
|
14
15
|
---
|
|
15
16
|
|
|
16
17
|
# Neo Stop Slop
|
|
17
18
|
|
|
18
|
-
`neo-stop-slop`
|
|
19
|
+
`neo-stop-slop` is a writing skill for removing AI tells, filler, and formulaic verbosity from Chinese and English prose. It handles copy, technical drafts, code comments, Git commits, PR descriptions, and rough notes or source material that need to become clear, accurate articles.
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
It combines two core workflows: **Reviewer** for diagnosing text and **Generator** for rewriting it. Article Rewrite rules add source fidelity and Taiwan Traditional Chinese writing guidance where needed.
|
|
21
22
|
|
|
22
23
|
---
|
|
23
24
|
|
|
24
25
|
## Gotchas
|
|
25
26
|
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* **Over-shortening risk**: When rewriting, preserve all important technical details and facts. Removing AI tells means removing filler and decorative structure, not deleting substance.
|
|
28
|
+
* **Article Rewrite fact boundary**: When handling drafts, notes, articles, or source material, use only information supplied and supported by the user. Do not add external context, data, causality, motives, impact, or unverified conclusions. Preserve uncertainty, attribution, and contradictions. See `references/article-rewrite.md` for the complete rules.
|
|
29
|
+
* **Code syntax and comment markers**: When trimming code comments, do not break XML documentation structures such as C# `<summary>` and `<param>`, or JSDoc/TSDoc markers.
|
|
30
|
+
* **Analyzer execution**: Run `analyze-slop.js` non-interactively with `--file` or `--input`, optionally using `--format json`; never invoke a TTY prompt that could hang the agent.
|
|
29
31
|
|
|
30
32
|
---
|
|
31
33
|
|
|
32
34
|
## Workflow Checklist
|
|
33
35
|
|
|
34
36
|
Progress:
|
|
35
|
-
- [ ] **Step 1 — Perceive
|
|
36
|
-
- [ ] **Step 2 — Reason
|
|
37
|
-
- [ ] **Step 3 — Act: Review
|
|
38
|
-
- [ ] **Step 4 — Act: Rewrite
|
|
39
|
-
- [ ] **Step 5 — Verify
|
|
37
|
+
- [ ] **Step 1 — Perceive**: Identify the language, content context, and output goal. Route the request to `Review`, general `Rewrite`, or `Article Rewrite`.
|
|
38
|
+
- [ ] **Step 2 — Reason**: Load only the `references/` resources relevant to the context. Article Rewrite must load `article-rewrite.md`.
|
|
39
|
+
- [ ] **Step 3 — Act: Review**: Run `analyze-slop.js` only when the user asks for an AI-tell diagnosis.
|
|
40
|
+
- [ ] **Step 4 — Act: Rewrite**: Remove information-free filler, formulaic structures, and vague wording. In Article Rewrite mode, reorder the supplied information without deleting facts for brevity.
|
|
41
|
+
- [ ] **Step 5 — Verify**: Check style, source fidelity, output format, and technical markers according to the selected mode. Treat analyzer scores as diagnostic signals, not hard gates for every mode.
|
|
40
42
|
|
|
41
43
|
---
|
|
42
44
|
|
|
43
45
|
## Detailed Guidelines
|
|
44
46
|
|
|
45
|
-
### Step 1 — Perceive
|
|
46
|
-
|
|
47
|
-
1.
|
|
48
|
-
2.
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
*
|
|
47
|
+
### Step 1 — Perceive
|
|
48
|
+
Analyze the user's request and text carefully:
|
|
49
|
+
1. **Detect the language**: Determine whether the primary language is **Taiwan Traditional Chinese** or **English**.
|
|
50
|
+
2. **Classify the context**:
|
|
51
|
+
* *General copy or drafts*: Load `phrases-zh.md` or `phrases-en.md`, plus `structures.md`.
|
|
52
|
+
* *Developer text (comments, commits, or PRs)*: Load `dev-slop.md`.
|
|
53
|
+
* *Article Rewrite (rough notes, source material, news, or technical content)*: Load `article-rewrite.md` and prioritize source fidelity and natural narrative flow.
|
|
54
|
+
3. **Choose the mode**:
|
|
55
|
+
* If the user asks whether text contains AI tells or asks for a text review, use **Review mode**.
|
|
56
|
+
* If the user directly asks to rewrite text or remove AI tells, use **Rewrite mode**.
|
|
57
|
+
* If the user asks to organize drafts, notes, articles, or source material into a complete article, use **Article Rewrite mode**.
|
|
54
58
|
|
|
55
59
|
---
|
|
56
60
|
|
|
57
61
|
### Step 2 — Reason & Load References
|
|
58
|
-
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* **
|
|
62
|
+
Load the skill's focused reference material dynamically. Based on Step 1, load the applicable paths:
|
|
63
|
+
* **General English**: `references/phrases-en.md`
|
|
64
|
+
* **General Chinese**: `references/phrases-zh.md`
|
|
65
|
+
* **Formulaic structures**: `references/structures.md`
|
|
66
|
+
* **Developer-specific guidance**: `references/dev-slop.md`
|
|
67
|
+
* **Article Rewrite guidance**: `references/article-rewrite.md`
|
|
68
|
+
* **Before/after examples**: `references/examples.md`
|
|
64
69
|
|
|
65
70
|
---
|
|
66
71
|
|
|
67
|
-
### Step 3 — Act: Review
|
|
68
|
-
1.
|
|
69
|
-
2.
|
|
72
|
+
### Step 3 — Act: Review
|
|
73
|
+
1. Write the user's text to a temporary file or pass it directly as an argument to the analyzer.
|
|
74
|
+
2. Run `analyze-slop.js` non-interactively:
|
|
70
75
|
```bash
|
|
71
|
-
node skills/neo-stop-slop/scripts/analyze-slop.js --input "[
|
|
76
|
+
node skills/neo-stop-slop/scripts/analyze-slop.js --input "[user input text]" --format json
|
|
72
77
|
```
|
|
73
|
-
3.
|
|
74
|
-
* **Slop Density Score
|
|
75
|
-
* **Grade
|
|
76
|
-
* **Violations
|
|
77
|
-
4.
|
|
78
|
+
3. Parse the JSON output and extract:
|
|
79
|
+
* **Slop Density Score**
|
|
80
|
+
* **Grade**
|
|
81
|
+
* **Violations**
|
|
82
|
+
4. Use the Output Templates to present a slop diagnosis, including violation line numbers, categories, and concrete restructuring suggestions.
|
|
78
83
|
|
|
79
84
|
---
|
|
80
85
|
|
|
81
|
-
### Step 4 — Act: Rewrite
|
|
82
|
-
|
|
83
|
-
1.
|
|
84
|
-
2.
|
|
85
|
-
3.
|
|
86
|
-
4.
|
|
87
|
-
5.
|
|
88
|
-
6.
|
|
86
|
+
### Step 4 — Act: Rewrite
|
|
87
|
+
Follow these rules in general Rewrite mode; use `references/article-rewrite.md` instead for Article Rewrite:
|
|
88
|
+
1. **Cut fillers**: Remove openers such as 「值得注意的是」, 「不容忽視」, and "Here's the thing".
|
|
89
|
+
2. **Use active voice**: Give each sentence a concrete subject, such as a person or component, that performs the action. Avoid anthropomorphism such as "The code wants to...".
|
|
90
|
+
3. **Break formulaic setups**: Remove binary contrasts such as 「不是因為 X,而是因為 Y」 and rhetorical prompts such as 「試想一下:」.
|
|
91
|
+
4. **Be specific**: Replace vague claims such as 「大幅提升效能、解決痛點」 with concrete results, such as 「減少 80% 記憶體開銷」.
|
|
92
|
+
5. **Preserve substance**: Remove information-free filler and repetition without applying a fixed word-reduction target or sacrificing facts, conditions, limitations, or technical details.
|
|
93
|
+
6. **Apply developer conventions**: For code comments or Git commits, follow the concise-writing rules in `dev-slop.md`.
|
|
94
|
+
|
|
95
|
+
In Article Rewrite mode, first extract and reorder the supplied information, then output only the article body. Do not use the general Rewrite word-count target or report format.
|
|
89
96
|
|
|
90
97
|
---
|
|
91
98
|
|
|
92
|
-
### Step 5 — Verify
|
|
93
|
-
1.
|
|
99
|
+
### Step 5 — Verify
|
|
100
|
+
1. In general Rewrite mode, you may run the rewritten text through the analyzer again:
|
|
94
101
|
```bash
|
|
95
|
-
node skills/neo-stop-slop/scripts/analyze-slop.js --input "[
|
|
102
|
+
node skills/neo-stop-slop/scripts/analyze-slop.js --input "[rewritten text]" --format json
|
|
96
103
|
```
|
|
97
|
-
2.
|
|
98
|
-
3.
|
|
104
|
+
2. Compare `slopDensityScore` with the source as a style signal. Unless the user asks otherwise, do not treat `A+` or `< 0.5%` as a hard gate.
|
|
105
|
+
3. Do not use the analyzer to verify facts in Article Rewrite mode. Apply the fact and naturalness checks in `article-rewrite.md`, and output only the article body.
|
|
106
|
+
4. If a general Rewrite response includes a diagnostic summary, it may report word-count and slop-density changes, but must not delete substance to improve the score.
|
|
99
107
|
|
|
100
108
|
---
|
|
101
109
|
|
|
102
110
|
## Output Templates
|
|
103
111
|
|
|
104
|
-
### 1. Review
|
|
105
|
-
|
|
112
|
+
### 1. Review Report Template
|
|
113
|
+
When the user asks for a text review or diagnosis, format the response as follows:
|
|
106
114
|
|
|
107
115
|
```markdown
|
|
108
|
-
### 🔍 AI Slop
|
|
116
|
+
### 🔍 AI Slop Review
|
|
109
117
|
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* **Slop
|
|
113
|
-
*
|
|
118
|
+
* **Word count**: [total words]
|
|
119
|
+
* **AI tell count**: [violation count]
|
|
120
|
+
* **Slop density score**: **[score]%** ([violation count] matches per 100 words)
|
|
121
|
+
* **Grade**: **[grade]**
|
|
114
122
|
|
|
115
|
-
#### ⚠️
|
|
116
|
-
|
|
|
123
|
+
#### ⚠️ Violations and restructuring suggestions
|
|
124
|
+
| Line | Detected phrase | Category | Diagnosis and restructuring suggestion |
|
|
117
125
|
| :--- | :--- | :--- | :--- |
|
|
118
|
-
|
|
|
119
|
-
|
|
|
126
|
+
| Line X | "值得注意的是" | Throat-clearing opener | Delete the transition and state the following fact directly. |
|
|
127
|
+
| Line Y | "賦能生態系" | AI slop word | Replace it with 「提供技術支持」 or 「構建合作社群」. |
|
|
120
128
|
|
|
121
|
-
#### 📝
|
|
122
|
-
1. [
|
|
123
|
-
2. [
|
|
129
|
+
#### 📝 Summary of recommendations
|
|
130
|
+
1. [A concrete recommendation about the article's structure]
|
|
131
|
+
2. [A recommendation about adverbs or passive voice]
|
|
124
132
|
```
|
|
125
133
|
|
|
126
|
-
### 2. Rewrite
|
|
127
|
-
|
|
134
|
+
### 2. General Rewrite Result Template
|
|
135
|
+
When the user asks for a general rewrite, format the response as follows. Do not use this template for Article Rewrite:
|
|
128
136
|
|
|
129
137
|
```markdown
|
|
130
|
-
### ✨
|
|
138
|
+
### ✨ AI-Slop-Free Rewrite
|
|
131
139
|
|
|
132
|
-
*
|
|
133
|
-
* **Slop
|
|
140
|
+
* **Word-count change**: [original count] ➡️ **[rewritten count]** (include the reduction percentage only when useful)
|
|
141
|
+
* **Slop density**: [original density]% ➡️ **[rewritten density]%** (diagnostic only)
|
|
134
142
|
|
|
135
143
|
---
|
|
136
144
|
|
|
137
|
-
#### 📄
|
|
138
|
-
> [
|
|
145
|
+
#### 📄 Rewritten text
|
|
146
|
+
> [Insert the concise, natural rewrite here. Keep the formatting clean and avoid AI filler.]
|
|
139
147
|
|
|
140
148
|
---
|
|
141
149
|
|
|
142
|
-
#### 💡
|
|
143
|
-
1. **[
|
|
144
|
-
2. **[
|
|
150
|
+
#### 💡 Key restructuring notes
|
|
151
|
+
1. **[Restructuring point 1]**: Changed 「[before text]」 to 「[after text]」, removed 「[AI tell]」, and made the tone more [active/direct].
|
|
152
|
+
2. **[Restructuring point 2]**: Removed filler and replaced the vague 「[before wording]」 with the concrete fact 「[specific content]」.
|
|
145
153
|
```
|
|
154
|
+
|
|
155
|
+
### 3. Article Rewrite output
|
|
156
|
+
|
|
157
|
+
After applying `references/article-rewrite.md`, **output only the article body**. Do not add a title unless the user explicitly requests one or the source already has one. Do not output restructuring notes, analysis, fact lists, edit summaries, check results, or additional commentary.
|
|
@@ -15,6 +15,18 @@
|
|
|
15
15
|
"query": "Write a Git commit message for this fix, but make it very concise and natural, no AI tells",
|
|
16
16
|
"should_trigger": true
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
"query": "請把這些破碎筆記整理成一篇自然的台灣繁體中文文章,只使用我提供的資訊,不要補充背景",
|
|
20
|
+
"should_trigger": true
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"query": "將以下新聞素材重排成文章,保留不確定語氣與消息來源,不要輸出分析過程",
|
|
24
|
+
"should_trigger": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"query": "Rewrite this rough technology source into a clear article using only the supplied facts",
|
|
28
|
+
"should_trigger": true
|
|
29
|
+
},
|
|
18
30
|
{
|
|
19
31
|
"query": "如何用 Python 實作一個快速排序演算法?",
|
|
20
32
|
"should_trigger": false
|
|
@@ -26,5 +38,13 @@
|
|
|
26
38
|
{
|
|
27
39
|
"query": "這段程式碼有記憶體洩漏嗎?幫我做 Code Review",
|
|
28
40
|
"should_trigger": false
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"query": "請搜尋外部資料,補充這篇文章缺少的產業背景與市場反應",
|
|
44
|
+
"should_trigger": false
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"query": "幫我查證這篇文章的日期和數據是否正確",
|
|
48
|
+
"should_trigger": false
|
|
29
49
|
}
|
|
30
50
|
]
|