@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 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** 是一組給 AI Agent 使用的專家技能模組。它把語言、框架、DevOps、Code Review、需求釐清、Agent 治理與文字潤飾等工作流程包成可安裝的 `SKILL.md`,讓支援 Agent 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`:同步技能到 Antigravity CLI 全域技能目錄。
16
- - `bin/install-system-instructions.js`:把系統提示詞安裝到 Claude Code、Copilot CLI、Codex 或 Antigravity 的指導檔。
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
- - 想讓 AI Agent 穩定遵守專案規範的開發者。
22
- - 想把常用工作流程整理成可重複觸發技能的團隊。
21
+ - 希望 AI Agent 遵守專案規範的開發者。
22
+ - 希望將常用工作流程整理成可重複觸發技能的團隊。
23
23
  - 使用 Antigravity CLI、Codex、Claude Code、Copilot CLI 或其他相容 Agent Skills 工具的人。
24
- - 需要把 AI 輔助開發從「靠提示詞」提升到「有知識庫、範本、腳本、驗證」的人。
24
+ - 需要以知識庫、範本、腳本和驗證支援 AI 輔助開發的人。
25
25
 
26
26
  ## 核心設計
27
27
 
28
28
  | 機制 | 說明 |
29
29
  | :--- | :--- |
30
- | 漸進式揭露 | Agent 啟動時只讀 `name` 與 `description`;真正需要時才讀完整 `SKILL.md` 與 references。 |
31
- | 觸發導向描述 | 每個 skill 的 `description` 都說明「何時使用」,提升自動觸發準確度。 |
30
+ | 漸進式揭露 | Agent 啟動時只讀取 `name` 與 `description`;需要技能時才載入完整 `SKILL.md` 與 references。 |
31
+ | 觸發導向描述 | 每個 skill 的 `description` 都標明使用時機,供 Agent 判斷何時載入。 |
32
32
  | 外部知識庫 | 詳細規則放在 `references/` 或 `reference/`,避免主技能檔過長。 |
33
- | 可重用資源 | 透過 `assets/`、`templates/` 與 `scripts/` 提供可實踐的產出基礎。 |
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` | 掃描專案環境,自動產生或升級專屬且合規的 AGENTS.md 檔,整合 Harness 評估、閉環 Workflow 與編排架構。 |
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` | 進行程式碼審查、PR/diff review、bug 風險掃描、安全性、效能或可維護性檢查。 |
46
- | 系統架構 | `neo-clean-architecture` | 設計、實作、審查或重構符合 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` | 廣泛 .NET 問題或尚未確定子領域時,先偵測 SDK/project shape 並導向合適技能。 |
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 腔、贅詞、公式化句式,支援文件、註解、commit message 與 PR 說明。 |
68
- | PR 產出 | `neo-pr` | 詢問或自動偵測 Repository 來源與目標分支,擷取變更並產生重點式且去 AI 腔的 PR Title 與 PR Description。 |
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 探索與安裝;其餘技能位於 `skills/`。
70
+ `generate-skill` 位於 `.agents/skills/`,可由 Agent Skills CLI 探索和安裝;其餘技能位於 `skills/`。
71
71
 
72
72
  ## 安裝
73
73
 
74
74
  ### Antigravity CLI 全域安裝
75
75
 
76
- 同步 `skills/` 下的技能到 `~/.gemini/antigravity-cli/skills`:
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 規格同步的是技能目錄;`AGENTS.md`、`CLAUDE.md`、Copilot instructions 或 Antigravity `agents.md` 這類指導檔需要另外安裝。
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 以 Discovery、Planning、Building、Polish、Handoff 流程協助打造可交付產品。 |
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` | 約束 Agent 在執行建置、部署、測試與格式化時採用最小化輸出參數,保護 Context 空間。 |
145
+ | `minimal-output` | 要求 Agent 在執行建置、部署、測試和格式化時使用最小輸出,保留 Context 空間。 |
146
146
 
147
147
  ## 常用情境
148
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moon791017/neo-skills",
3
- "version": "1.1.27",
3
+ "version": "1.1.29",
4
4
  "type": "module",
5
5
  "description": "Neo Skills: A Universal AI Agent Skills Extension",
6
6
  "homepage": "https://neo-blog-iota.vercel.app/",
@@ -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. Also use it after an AI agent finishes modifying code to inspect the
7
- current uncommitted working tree before handoff and report actionable findings with
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
- Use the Reviewer workflow. Keep the review read-only and report only evidence-backed, actionable findings.
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. **Collect the review scope**
24
- - Use the files or code snippets supplied by the user as the primary scope.
25
- - If no scope is supplied inside a Git repository, run:
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. **Analyze risk**
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
- 4. **Produce a concise report**
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. Write `None` when a section has no findings; do not omit the severity sections:
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
- - List executed tests, builds, or checks that were not run.
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
- 5. **Apply the delivery gate**
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
- This checklist is the review baseline for `neo-code-review`. During review, compare the code changes against these criteria and categorize findings by severity: Critical Issues (🔴 Must-fix), Suggestions (🟡 Clean Code/Performance), and Praise (🟢 High Quality).
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
- Only report a finding when the risk is supported by the diff, surrounding code, tests, runtime behavior, or a clearly stated requirement. Do not turn every checklist item into a finding.
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, copy-pasted business rules, and divergent validation logic?
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, technical docs, code comments, commit messages, PR descriptions, sales copy,
7
- and requests to remove AI tells, slop, fluff, or formulaic phrasing.
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.0.0"
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` 是一個專門設計用來消除中英文 AI 腔調(AI Tells)、贅詞及公式化囉唆結構的雙核技能。它能讓 AI 生成的文案、技術草稿、程式碼註解、Git Commit 及 PR 說明,轉換為極簡、乾淨且生動的自然語言。
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
- 本技能結合了 **Reviewer (文字診斷審查)** 與 **Generator (極簡重寫生成)** 兩大核心工作流。
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
- * **過度精簡風險**:在進行「Rewrite (重寫)」時,務必確保**沒有遺漏關鍵的技術細節或事實資訊**。去 AI 腔是指「清除贅詞與修飾架構」,而不是刪減實質內容。
27
- * **代碼語法與註解標記**:修剪「代碼註解」時,切勿破壞 XML 文件結構(如 C# 的 `<summary>`、`<param>`)或 JSDoc/TSDoc 的結構標記。
28
- * **檢測腳本執行**:使用 `analyze-slop.js` 時,一律採用**非互動模式**(傳入 `--file` 或 `--input`,配合 `--format json` 或不帶選項),避免任何 TTY 卡死。
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 (感知環境)**:辨識輸入文字的語言(繁中/英文)與場景(文案、註解、Git Commit 或 PR 說明),確認使用者需要 `Review`(診斷)還是 `Rewrite`(重寫)。
36
- - [ ] **Step 2 — Reason (制定策略)**:根據語言與場景,加載相對應的參考手冊(`references/` 資源檔)。
37
- - [ ] **Step 3 — Act: Review (執行診斷,若適用)**:執行內建的 `scripts/analyze-slop.js` 統計贅詞並計算 Slop 密度分數。
38
- - [ ] **Step 4 — Act: Rewrite (執行重寫,若適用)**:對照 `references/examples.md` 的轉換標準,將文字徹底重寫為極簡且充滿力量的直白文句。
39
- - [ ] **Step 5 — Verify (結果驗證)**:再次對重寫後的文字執行 `analyze-slop.js`,確保 Slop 密度降至 A+ 級(< 0.5%)。
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. **語言檢索**:辨識主要語言是 **繁體中文 (Taiwan)** 還是 **英文**。
48
- 2. **場景分類**:
49
- * *一般文案/草稿*:加載 `phrases-zh.md`/`phrases-en.md` 與 `structures.md`。
50
- * *開發者文字 (註解/Commit/PR)*:加載 `dev-slop.md`。
51
- 3. **模式選擇**:
52
- * 使用者問「這段文字有 AI 腔嗎?」或「幫我做文字審查」:進入 **Review 模式**。
53
- * 使用者直接說「幫我重寫這段話」或「把 AI 腔消掉」:進入 **Rewrite 模式**。
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
- 動態加載該技能目錄下的專用知識庫。請根據 Step 1 的感知結果載入以下相對應的路徑:
59
- * **英文通用**:`references/phrases-en.md`
60
- * **中文通用**:`references/phrases-zh.md`
61
- * **公式化結構**:`references/structures.md`
62
- * **開發者專項**:`references/dev-slop.md`
63
- * **Before/After 對照組**:`references/examples.md`
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. 在終端非互動執行 `analyze-slop.js`:
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 "[使用者輸入的文本內容]" --format json
76
+ node skills/neo-stop-slop/scripts/analyze-slop.js --input "[user input text]" --format json
72
77
  ```
73
- 3. 解析腳本產出的 JSON 數據,擷取:
74
- * **Slop Density Score (Slop 密度分數)**
75
- * **Grade (評估等級)**
76
- * **Violations (檢出的贅詞清單)**
77
- 4. 依據 Output Templates 呈現 Slop 診斷報告,列出違規行數、違規類型,並給出重構建议。
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
- 當需要重寫文本時,請遵循以下 6 條去 Slop 鋼鐵鐵律:
83
- 1. **消滅清喉嚨詞 (Cut fillers)**:徹底刪去「值得注意的是」、「不容忽視」、「Here's the thing」等起手式。
84
- 2. **用主動代替被動 (Active voice)**:確保每個句子都有具體的主語(如「人」或「具體組件」)在執行動作。避免擬人化 ("The code wants to...")。
85
- 3. **打碎公式化結構 (Break formulaic setups)**:去除「不是因為 X,而是因為 Y」這類刻意轉折的二元對立;刪除「試想一下:」等自我設問。
86
- 4. **用具體事實代替空泛形容詞 (Be specific)**:將「大幅提升效能、解決痛點」等空話,改寫為具體成效(例如「減少 80% 記憶體開銷」)。
87
- 5. **縮減字數至少 30%**:AI 腔的本質是稀釋資訊。優秀的文字會以最少字數傳達最大資訊量。
88
- 6. **適用開發者規則 (Apply Dev Conventions)**:若處理代碼註解或 Git Commit,嚴格套用 `dev-slop.md` 的精簡規則。
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 "[重寫後的文本]" --format json
102
+ node skills/neo-stop-slop/scripts/analyze-slop.js --input "[rewritten text]" --format json
96
103
  ```
97
- 2. 確認 `slopDensityScore` **小於 0.5%**(評估等級達到 **A+**)。
98
- 3. 向使用者呈交成果時,標明重寫前後的字數變化與 Slop 密度的巨大改善。
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
- * **檢出 AI Tells 數量**: [檢出數] 處
112
- * **Slop 密度分數**: **[密度Score]%** (每百字出現 [檢出數] 次)
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
- | 第 X 行 | "值得注意的是" | 廢話起手式 | 刪除此段過渡句,直接陳述後續事實。 |
119
- | 第 Y 行 | "賦能生態系" | AI 濫用詞 | 替換為「提供技術支持」或「構建合作社群」。 |
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
- ### ✨ 去 AI 腔重寫成果
138
+ ### ✨ AI-Slop-Free Rewrite
131
139
 
132
- * **字數變化**: [原始字數] 字 ➡️ **[重寫字數] 字 (縮減 [縮減比例]%)**
133
- * **Slop 密度**: [原始密度]% ➡️ **0.0% (等級 A+ ✨)**
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
- > [在此處寫入重寫後的極簡自然文本。保持排版清爽,避免任何 AI 贅字。]
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. **[重構點 1]**:將原始的「[Before 文字]」轉化為「[After 文字]」,去除了「[AI 腔]」並讓語氣更為[主動/直接]。
144
- 2. **[重構點 2]**:刪除贅言,以具體事實「[具體內容]」代替空洞的「[Before 詞彙]」。
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
  ]