@moon791017/neo-skills 1.0.20 → 1.0.22

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/GEMINI.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Neo Skills Extension
2
2
 
3
- **Neo Skills** is a Gemini CLI extension that transforms the agent into a **Universal Expert Agent**. It utilizes the Model Context Protocol (MCP) to provide domain-specific expertise ("Skills") and automated execution protocols ("Commands"). While currently equipped with specialized **DevOps** modules (Azure Pipelines, Git), its architecture is designed to host skills from any domain.
3
+ **Neo Skills** is a Gemini CLI extension that transforms the agent into a **Universal Expert Agent**. It utilizes the Model Context Protocol (MCP) to provide domain-specific expertise ("Skills"). While currently equipped with specialized **DevOps** modules (Azure Pipelines, Git), its architecture is designed to host skills from any domain.
4
4
 
5
5
  ## Constraints
6
6
  - All MCP commands must be manually executed by the user and cannot be automated!
@@ -13,7 +13,7 @@ You must engage in "fact-check thinking" before answering. Unless explicitly pro
13
13
 
14
14
  This project serves as a "Cortex" for the Gemini agent, enabling it to:
15
15
  1. **Understand** complex contexts across various domains via structured knowledge bases (`SKILL.md`).
16
- 2. **Execute** precise workflows using pre-validated templates (`templates/`) and command definitions (`.toml`).
16
+ 2. **Execute** precise workflows using pre-validated templates (`templates/`) and skill definitions (`SKILL.md`).
17
17
  3. **Standardize** outputs to ensure consistency and reliability.
18
18
 
19
19
  ## 📂 System Architecture
@@ -23,7 +23,6 @@ The project is organized into three main layers:
23
23
  ### 1. The MCP Server (`src/server.ts`)
24
24
  The entry point of the extension. It runs an MCP server that:
25
25
  * Registers **Tools** (e.g., `fetch_web_content` for web scraping).
26
- * Registers **Prompts** (e.g., `neo:git_commit`) which are dynamic templates that inject context and instructions into the chat session.
27
26
 
28
27
  ### 2. The Knowledge Base (`skills/`)
29
28
  Each subdirectory represents a "Skill Module" containing expert knowledge.
@@ -32,12 +31,7 @@ Each subdirectory represents a "Skill Module" containing expert knowledge.
32
31
  * `templates/`: The "Hands". A library of reusable assets that the agent should use instead of writing code from scratch.
33
32
  * **Example:** `skills/neo-azure-pipelines/` contains logic for designing CI/CD pipelines and templates for .NET builds, IIS deployments, etc.
34
33
 
35
- ### 3. The Action Registry (`commands/`)
36
- Defines rigid, executable workflows triggered by the user.
37
- * **Format:** TOML files (e.g., `ci-dotnet.toml`, `git-commit.toml`).
38
- * **Purpose:** These files contain the "System Prompt" or "Instructions" that are fed to the agent when a specific task is requested. They explicitly link a user request to a specific Skill.
39
-
40
- ### 4. Security Layer (`src/hooks/`)
34
+ ### 3. Security Layer (`src/hooks/`)
41
35
  Mechanisms to ensure operational safety and data privacy.
42
36
  * **Secret Guard (`secret-guard.ts`)**: An interception hook that analyzes tool execution arguments in real-time. It blocks operations involving sensitive files (e.g., `.env`, private keys, credentials) to prevent accidental leakage.
43
37
 
@@ -88,23 +82,23 @@ When interacting with this codebase or using the extension, the agent follows th
88
82
 
89
83
  * **Web Scraper:** 從指定的 URL 獲取網頁 HTML 內容,支援 CSS 選擇器 (`fetch_web_content`)。
90
84
 
91
- * **Git Automation:** Automatically generate Conventional Commit messages in English and ask for confirmation before committing (`neo:git_commit`).
85
+ * **Git Automation:** 根據暫存區變更自動生成 Conventional Commits 訊息,經使用者確認後執行 commit。
92
86
 
93
- * **CI Protocols:** 自動配置 .NET 專案的 Azure Pipelines CI 建置流程 (`neo:ci-dotnet`)。
87
+ * **CI Protocols:** 自動配置 .NET 專案的 Azure Pipelines CI 建置流程。
94
88
 
95
- * **CD Protocols:** 為專案自動配置 Azure App Service (`neo:cd-app-service`) 與地端 IIS (`neo:cd-iis`) 的部署流程 (CD)。
89
+ * **CD Protocols:** 為專案自動配置 Azure App Service 與地端 IIS 的部署流程 (CD)。
96
90
 
97
- * **Requirement Clarification:** 系統化引導用戶釐清模糊需求,並將其轉化為結構化的規格文件 (`neo:clarification`)。
91
+ * **Requirement Clarification:** 系統化引導用戶釐清模糊需求,並將其轉化為結構化的規格文件。
98
92
 
99
- * **Code Explanation:** 分析原始碼或專案結構,提供技術解析與架構洞察 (`neo:explain`)。
93
+ * **Code Explanation:** 分析原始碼或專案結構,提供技術解析與架構洞察。
100
94
 
101
- * **Code Review:** 對當前變更或指定檔案進行全方位的程式碼審查 (`neo:code-review`)。
95
+ * **Code Review:** 對當前變更或指定檔案進行全方位的程式碼審查。
102
96
 
103
97
  * **C# 現代語法專家:** 跨版本 C# 專家 (10-14+),專注於現代化語法、強型別與高效能開發模式。
104
98
 
105
99
  * **.NET 開發專家群:** 包含核心環境路由,以及針對 Minimal APIs、Web API、MVC 與 EF Core 的深度技術指引與開發規範。
106
100
 
107
- * **C# Interface Generation:** 針對指定的 C# 類別生成對應的 Interface,並提供智慧覆蓋功能 (`neo:dotnet-gen-interface`)。
101
+ * **C# Interface Generation:** 針對指定的 C# 類別生成對應的 Interface,並提供智慧覆蓋功能。
108
102
 
109
103
  * **Python 3.10+ 現代開發專家:** 專注於 Python 3.10 至 3.14 的現代語法特性、型別安全與非同步開發。
110
104
 
package/README.md CHANGED
@@ -11,26 +11,26 @@
11
11
  本專案作為 AI Agent 的「大腦皮層 (Cortex)」,旨在打造一個**全能型 Agent 框架**,透過以下機制提升 AI 的專業度:
12
12
 
13
13
  1. **領域專精 (Skills)**:可擴充的專家知識庫 (`SKILL.md`)。目前已內建 DevOps 模組,未來將持續擴增更多領域。
14
- 2. **標準化執行 (Commands)**:提供預先驗證的自動化腳本與模板,確保產出的一致性與可靠性。
14
+ 2. **標準化範本 (Templates)**:提供預先驗證的自動化腳本與模板,確保產出的一致性與可靠性。
15
15
  3. **架構思維**:強制執行「感知 (Perceive) -> 推理 (Reason) -> 行動 (Act)」的決策迴圈,避免 AI 產生幻覺,確保解決方案的精準度。
16
16
 
17
17
  ## ✨ 目前內建技能 (Built-in Skills)
18
18
 
19
19
  ### 1. Azure Pipelines 架構師
20
20
  自動化設計與生成符合微軟最佳實踐的 CI/CD 流程。
21
- * **CI 自動化 (`neo:ci-dotnet`)**:針對 .NET 專案生成建置管線,整合單元測試與構件發佈。
21
+ * **CI 自動化**:針對 .NET 專案生成建置管線,整合單元測試與構件發佈。
22
22
  * **CD 自動化**:
23
- * **Azure App Service (`neo:cd-app-service`)**:部署至Azure App Service。
24
- * **IIS On-Premises (`neo:cd-iis`)**:部署至地端 IIS 伺服器,包含備份與復原機制。
23
+ * **Azure App Service**:部署至Azure App Service。
24
+ * **IIS On-Premises**:部署至地端 IIS 伺服器,包含備份與復原機制。
25
25
 
26
26
  ### 2. 智慧 Git 助手
27
- * **Smart Commit (`neo:git_commit`)**:根據 `git diff` 暫存區內容,自動生成符合 Conventional Commits 規範的提交訊息。
27
+ * **Smart Commit**:根據 `git diff` 暫存區內容,自動生成符合 Conventional Commits 規範的提交訊息。
28
28
 
29
29
  ### 3. Code Review 專家
30
- * **智能審查 (`neo:code-review`)**:針對程式碼變更進行多面向 (正確性、安全性、效能、可讀性) 的深度審查。
30
+ * **智能審查**:針對程式碼變更進行多面向 (正確性、安全性、效能、可讀性) 的深度審查。
31
31
 
32
32
  ### 4. 程式碼解釋助手
33
- * **技術解析 (`neo:explain`)**:深入分析原始碼或專案結構,提供高階用途摘要、邏輯流程分解以及核心元件說明。
33
+ * **技術解析**:深入分析原始碼或專案結構,提供高階用途摘要、邏輯流程分解以及核心元件說明。
34
34
 
35
35
  ### 5. .NET / C# 開發專家
36
36
  * **C# 現代語法專家 (`skills/neo-csharp`)**:跨版本 C# 專家 (10-14+),專注於現代化語法、強型別與高效能開發模式。
@@ -39,7 +39,7 @@
39
39
  * **.NET Web API 專家 (`skills/neo-dotnet-webapi`)**:提供控制器模式下的架構設計、Problem Details 與異常處理指引。
40
40
  * **.NET MVC 專家 (`skills/neo-dotnet-mvc`)**:處理伺服器端渲染 (SSR)、視圖模型與標籤協助程式的最佳實踐。
41
41
  * **EF Core 專家 (`skills/neo-dotnet-ef-core`)**:專注於資料庫建模、移轉管理與 Linq 查詢優化。
42
- * **Interface 生成器 (`neo:dotnet-gen-interface`)**:針對 C# Class 自動生成符合規範的 Interface,並支援智慧檔案覆蓋功能。
42
+ * **Interface 生成器**:針對 C# Class 自動生成符合規範的 Interface,並支援智慧檔案覆蓋功能。
43
43
 
44
44
  ### 6. Python 開發與環境管理專家
45
45
  * **Python 3.10+ 專家 (`skills/neo-python`)**:專注於 Python 3.10 至 3.14 的現代語法特性、型別安全與非同步開發。
@@ -50,7 +50,7 @@
50
50
  * **SwiftUI 專家 (`skills/neo-swift-ui`)**:支援 iOS 16.0+ 與 Swift 5.0+ 的現代開發模式,專注於 NavigationStack、Observation 框架、資料流架構及高效能視圖設計。
51
51
 
52
52
  ### 8. 需求釐清助手
53
- * **需求釐清 (`neo:clarification`)**:系統化引導用戶釐清模糊需求,並將其轉化為結構化的規格文件(背景、功能、約束、驗收標準)。
53
+ * **需求釐清**:系統化引導用戶釐清模糊需求,並將其轉化為結構化的規格文件(背景、功能、約束、驗收標準)。
54
54
 
55
55
  ### 9. 安全守衛 (Security Guard)
56
56
  * **主動防護 (`secret-guard.ts`)**:作為 CLI 的中介軟體 (Hook),自動攔截並掃描所有工具執行的參數。若偵測到敏感資訊(如環境設定檔、私鑰、雲端憑證等)將強制阻擋執行,防止機密外洩。
@@ -61,69 +61,145 @@
61
61
 
62
62
  | 層次 | 目錄 | 描述 |
63
63
  | :--- | :--- | :--- |
64
- | **Server** | `src/server.ts` | 擴充套件的進入點,負責註冊 Tool 與 Prompt,處理與 AI Agent CLI 的通訊。 |
64
+ | **Server** | `src/server.ts` | 擴充套件的進入點,負責註冊 Tool,處理與 AI Agent CLI 的通訊。 |
65
65
  | **Knowledge Base** | `skills/` | **"大腦"**。包含各領域知識 (`SKILL.md`) 與可重用的模板 (`templates/`)。 |
66
- | **Action Registry** | `commands/` | **"指令集"**。定義了使用者可呼叫的具體指令 (TOML 格式),將請求映射至特定的 Skill。 |
67
66
  | **Security Layer** | `src/hooks/` | **"安全守衛"**。攔截並掃描工具執行參數,防止敏感資訊外洩。 |
68
67
 
69
68
  ## 📦 安裝與使用
70
69
 
71
- 本套件支援多種 AI Agent 環境。請依據您的 CLI 工具執行對應指令:
70
+ ### 支援的 AI Agent
72
71
 
73
- ### Gemini CLI
72
+ | Agent | CLI 工具 | 技能目錄 | 指導檔 |
73
+ | :--- | :--- | :--- | :--- |
74
+ | **Gemini** | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | 透過擴充套件自動載入 | `GEMINI.md` |
75
+ | **Claude** | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `.claude/skills/` | `CLAUDE.md` |
76
+ | **Copilot** | [GitHub Copilot CLI](https://docs.github.com/en/copilot) | `.copilot/skills/`(全域)<br>`.github/skills/`(專案) | `.copilot/copilot-instructions.md`(全域)<br>`.github/copilot-instructions.md`(專案) |
77
+ | **Codex** | [OpenAI Codex CLI](https://github.com/openai/codex) | `.codex/skills/` | `AGENTS.md` |
78
+
79
+ Neo Skills 提供兩個 CLI 工具,分別用於安裝**技能模組**與**系統提示詞**:
80
+
81
+ | 工具 | 用途 | 安裝目標 |
82
+ | :--- | :--- | :--- |
83
+ | `install-skills` | 將技能模組(`skills/`)複製到 Agent 的技能目錄 | 資料夾(如 `.claude/skills`) |
84
+ | `install-system-instructions` | 將系統提示詞寫入 Agent 的指導檔 | 單一檔案(如 `CLAUDE.md`) |
85
+
86
+ > 兩個工具皆支援 `--ai-agent` 與 `--project-path` 參數,邏輯一致。
87
+
88
+ ---
89
+
90
+ ### 一、Gemini CLI(擴充套件模式)
91
+
92
+ Gemini CLI 透過擴充套件機制直接安裝,**不需要**以下的 npx 指令:
74
93
 
75
94
  ```bash
76
95
  gemini extension install https://github.com/Benknightdark/neo-skills --auto-update
77
96
  ```
78
97
 
79
- ### 安裝指定 AI Agent 技能
98
+ ---
80
99
 
81
- 使用 `--ai-agent` 指定要安裝的 agent(可用值:`claude`、`copilot`、`codex`):
100
+ ### 二、安裝技能模組 (`install-skills`)
101
+
102
+ 將 `skills/` 目錄下的所有技能模組複製到目標 AI Agent 的技能資料夾。
103
+
104
+ **語法:**
82
105
 
83
- ```bash
84
- npx -p @moon791017/neo-skills install-skills --ai-agent claude
85
- npx -p @moon791017/neo-skills install-skills --ai-agent copilot
86
- npx -p @moon791017/neo-skills install-skills --ai-agent codex
87
106
  ```
107
+ install-skills [--ai-agent <name>] [--project-path <path>]
108
+ ```
109
+
110
+ **參數:**
88
111
 
89
- ### 安裝至指定專案
112
+ | 參數 | 必填 | 說明 |
113
+ | :--- | :---: | :--- |
114
+ | `--ai-agent <name>` | 否 | 指定目標 Agent(`claude` / `copilot` / `codex`)。省略時安裝全部。 |
115
+ | `--project-path <path>` | 否 | 指定專案根目錄。省略時安裝至 `$HOME` 全域路徑。 |
90
116
 
91
- 搭配 `--project-path` 可將技能安裝至指定專案目錄(技能子目錄會自動附加):
117
+ **安裝路徑對照:**
118
+
119
+ | Agent | 全域路徑 | 專案路徑 |
120
+ | :--- | :--- | :--- |
121
+ | Claude | `~/.claude/skills/` | `<project>/.claude/skills/` |
122
+ | Copilot | `~/.copilot/skills/` | `<project>/.github/skills/` |
123
+ | Codex | `~/.codex/skills/` | `<project>/.codex/skills/` |
124
+
125
+ **範例:**
92
126
 
93
127
  ```bash
94
- # 安裝至 /my/project/.claude/skills
95
- npx -p @moon791017/neo-skills install-skills --ai-agent claude --project-path /my/project
128
+ # 安裝指定 Agent 至全域
129
+ npx -p @moon791017/neo-skills install-skills --ai-agent claude -y
96
130
 
97
- # 安裝至 /my/project/.github/skills
98
- npx -p @moon791017/neo-skills install-skills --ai-agent copilot --project-path /my/project
131
+ # 安裝指定 Agent 至專案
132
+ npx -p @moon791017/neo-skills install-skills --ai-agent copilot --project-path /my/project -y
99
133
 
100
- # 安裝至 /my/project/.codex/skills
101
- npx -p @moon791017/neo-skills install-skills --ai-agent codex --project-path /my/project
134
+ # 一次安裝全部 Agent
135
+ npx -p @moon791017/neo-skills install-skills -y
102
136
  ```
103
137
 
104
- 若未指定 `--project-path`,則安裝至全域路徑(`~/.claude/skills`、`~/.copilot/skills`、`~/.codex/skills`)。
138
+ ---
139
+
140
+ ### 三、安裝系統提示詞 (`install-system-instructions`)
105
141
 
106
- ### 安裝全部 AI Agent 技能
142
+ 將預定義的系統提示詞寫入 AI Agent 的指導檔。若指導檔已存在,會附加至最下方;若不存在,則自動建立。
107
143
 
108
- 不帶 `--ai-agent` 即可一次安裝全部:
144
+ **語法:**
145
+
146
+ ```
147
+ install-system-instructions --ai-agent <name> --instructions <key> [--project-path <path>]
148
+ ```
149
+
150
+ **參數:**
151
+
152
+ | 參數 | 必填 | 說明 |
153
+ | :--- | :---: | :--- |
154
+ | `--ai-agent <name>` | ✅ | 指定目標 Agent(`claude` / `copilot` / `codex`)。 |
155
+ | `--instructions <key>` | ✅ | 指定要安裝的系統提示詞(見下方種類表)。 |
156
+ | `--project-path <path>` | 否 | 指定專案根目錄。省略時安裝至 `$HOME` 全域路徑。 |
157
+
158
+ **指導檔路徑對照:**
159
+
160
+ | Agent | 全域路徑 | 專案路徑 |
161
+ | :--- | :--- | :--- |
162
+ | Claude | `~/.claude/CLAUDE.md` | `<project>/CLAUDE.md` |
163
+ | Copilot | `~/.copilot/copilot-instructions.md` | `<project>/.github/copilot-instructions.md` |
164
+ | Codex | `~/.codex/AGENTS.md` | `<project>/AGENTS.md` |
165
+
166
+ **可用的系統提示詞種類:**
167
+
168
+ | Key | 名稱 | 說明 |
169
+ | :--- | :--- | :--- |
170
+ | `technical-co-founder` | Technical Co-Founder | 讓 AI 扮演技術共同創辦人,以 Discovery → Planning → Building → Polish → Handoff 五階段框架,協助您從零打造可上線的真實產品。 |
171
+
172
+ **範例:**
109
173
 
110
174
  ```bash
111
- npx -p @moon791017/neo-skills install-skills
175
+ # 安裝至專案的 CLAUDE.md
176
+ npx -p @moon791017/neo-skills install-system-instructions \
177
+ --ai-agent claude --instructions technical-co-founder --project-path /my/project -y
178
+
179
+ # 安裝至專案的 .github/copilot-instructions.md
180
+ npx -p @moon791017/neo-skills install-system-instructions \
181
+ --ai-agent copilot --instructions technical-co-founder --project-path /my/project -y
182
+
183
+ # 安裝至全域 (~/.claude/CLAUDE.md)
184
+ npx -p @moon791017/neo-skills install-system-instructions \
185
+ --ai-agent claude --instructions technical-co-founder -y
112
186
  ```
113
187
 
188
+ > **💡** 重複執行相同指令不會重複寫入,系統會自動偵測並跳過已安裝的提示詞。
189
+
114
190
  ## 💡 常用指令範例
115
191
 
116
192
  您可以直接對 AI 代理下達以下指令或在對話中描述需求:
117
193
 
118
- | 需求場景 | 推薦指令 / 咒語範例 |
194
+ | 需求場景 | 推薦咒語範例 |
119
195
  | :--- | :--- |
120
- | **生成 Commit Message** | `幫我 commit 變更` 或 `/neo:git-commit` |
121
- | **設定 .NET CI Pipeline** | `幫這個專案設定 CI 流程` 或 `/neo:ci-dotnet` |
122
- | **部署至 IIS** | `部署到 IIS,站台名稱為 MySite` 或 `/neo:cd-iis` |
123
- | **需求釐清與規格化** | `我想做一個電商網站` 或 `/neo:clarification` |
124
- | **全方位程式碼審查** | `幫我 code review 剛才的修改` 或 `/neo:code-review` |
125
- | **生成 C# Interface** | `幫我針對這個 class 產生介面` 或 `/neo:dotnet-gen-interface` |
126
- | **技術解析與架構洞察** | `分析這個專案的架構` 或 `/neo:explain` |
196
+ | **生成 Commit Message** | `幫我 commit 變更` |
197
+ | **設定 .NET CI Pipeline** | `幫這個專案設定 CI 流程` |
198
+ | **部署至 IIS** | `部署到 IIS,站台名稱為 MySite` |
199
+ | **需求釐清與規格化** | `我想做一個電商網站` |
200
+ | **全方位程式碼審查** | `幫我 code review 剛才的修改` |
201
+ | **生成 C# Interface** | `幫我針對這個 class 產生介面` |
202
+ | **技術解析與架構洞察** | `分析這個專案的架構` |
127
203
 
128
204
  ## 🛠 開發指南
129
205
 
@@ -0,0 +1,58 @@
1
+ export const technicalCoFounderInstructions = `Role:
2
+ You are now my Technical Co-Founder. Your job is to help me build a real product I can use, share, or launch. Handle all the building, but keep me in the loop and in control.
3
+ My Idea:
4
+ [Describe your product idea — what it does, who it's for, what problem it solves. Explain it like you'd tell a friend.]
5
+ How serious I am:
6
+ [Just exploring / I want to use this myself / I want to share it with others / I want to launch it publicly]
7
+ Project Framework:
8
+ 1. Phase 1: Discovery
9
+ • Ask questions to understand what I actually need (not just what I said)
10
+ • Challenge my assumptions if something doesn't make sense
11
+ • Help me separate "must have now" from "add later"
12
+ • Tell me if my idea is too big and suggest a smarter starting point
13
+ 2. Phase 2: Planning
14
+ • Propose exactly what we'll build in version 1
15
+ • Explain the technical approach in plain language
16
+ • Estimate complexity (simple, medium, ambitious)
17
+ • Identify anything I'll need (accounts, services, decisions)
18
+ • Show a rough outline of the finished product
19
+ 3. Phase 3: Building
20
+ • Build in stages I can see and react to
21
+ • Explain what you're doing as you go (I want to learn)
22
+ • Test everything before moving on
23
+ • Stop and check in at key decision points
24
+ • If you hit a problem, tell me the options instead of just picking one
25
+ 4. Phase 4: Polish
26
+ • Make it look professional, not like a hackathon project
27
+ • Handle edge cases and errors gracefully
28
+ • Make sure it's fast and works on different devices if relevant
29
+ • Add small details that make it feel "finished"
30
+ 5. Phase 5: Handoff
31
+ • Deploy it if I want it online
32
+ • Give clear instructions for how to use it, maintain it, and make changes
33
+ • Document everything so I'm not dependent on this conversation
34
+ • Tell me what I could add or improve in version 2
35
+ 6. How to Work with Me
36
+ • Treat me as the product owner. I make the decisions, you make them happen.
37
+ • Don't overwhelm me with technical jargon. Translate everything.
38
+ • Push back if I'm overcomplicating or going down a bad path.
39
+ • Be honest about limitations. I'd rather adjust expectations than be disappointed.
40
+ • Move fast, but not so fast that I can't follow what's happening.
41
+ Rules:
42
+ • I don't just want it to work—I want it to be something I'm proud to show people
43
+ • This is real. Not a mockup. Not a prototype. A working product.
44
+ • Keep me in control and in the loop at all times`;
45
+
46
+ /**
47
+ * 系統提示詞 Registry — 以 kebab-case 作為 key,供 CLI 選擇安裝。
48
+ *
49
+ * 新增提示詞時:
50
+ * 1. 在上方新增 named export(內容字串)
51
+ * 2. 在此 registry 加入對應 entry
52
+ */
53
+ export const INSTRUCTIONS = {
54
+ 'technical-co-founder': {
55
+ name: 'Technical Co-Founder',
56
+ content: technicalCoFounderInstructions,
57
+ },
58
+ };
package/bin/_utils.js CHANGED
@@ -25,17 +25,29 @@ export const AGENTS = {
25
25
  claude: {
26
26
  name: 'Claude',
27
27
  homePath: '.claude/skills',
28
+ instructionFile: {
29
+ homePath: '.claude/CLAUDE.md',
30
+ projectPath: 'CLAUDE.md',
31
+ },
28
32
  hint: '請確保您的 Claude Desktop 或相關插件已指向此目錄。',
29
33
  },
30
34
  copilot: {
31
35
  name: 'Copilot',
32
36
  homePath: '.copilot/skills',
33
37
  projectPath: '.github/skills',
38
+ instructionFile: {
39
+ homePath: '.copilot/copilot-instructions.md',
40
+ projectPath: '.github/copilot-instructions.md',
41
+ },
34
42
  hint: '請確保您的 GitHub Copilot CLI 已指向此目錄。',
35
43
  },
36
44
  codex: {
37
45
  name: 'Codex',
38
46
  homePath: '.codex/skills',
47
+ instructionFile: {
48
+ homePath: '.codex/AGENTS.md',
49
+ projectPath: 'AGENTS.md',
50
+ },
39
51
  hint: '請確保您的 Codex CLI 已指向此目錄。',
40
52
  },
41
53
  };
@@ -0,0 +1,152 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Neo Skills — 系統提示詞安裝程式
4
+ *
5
+ * 用法:
6
+ * install-system-instructions --ai-agent claude --instructions technical-co-founder
7
+ * install-system-instructions --ai-agent copilot --instructions technical-co-founder --project-path .
8
+ *
9
+ * 參數:
10
+ * --ai-agent <name> 指定目標 AI Agent(可用值見 _utils.js 的 AGENTS)。必填。
11
+ * --instructions <key> 指定要安裝的系統提示詞(可用值見 _system-instructions.js 的 INSTRUCTIONS)。必填。
12
+ * --project-path <path> 指定專案根目錄作為安裝基底(取代 $HOME)。省略時安裝至全域路徑。
13
+ */
14
+ import { readFile, writeFile, mkdir, access } from 'node:fs/promises';
15
+ import { join, resolve, dirname } from 'node:path';
16
+ import { homedir } from 'node:os';
17
+
18
+ import { AGENTS } from './_utils.js';
19
+ import { INSTRUCTIONS } from './_system-instructions.js';
20
+
21
+ /**
22
+ * 從 process.argv 解析指定 flag 的值。
23
+ * @param {string} flag
24
+ * @returns {string | undefined}
25
+ */
26
+ function parseArg(flag) {
27
+ const idx = process.argv.indexOf(flag);
28
+ if (idx === -1 || idx + 1 >= process.argv.length) return undefined;
29
+ return process.argv[idx + 1];
30
+ }
31
+
32
+ /**
33
+ * 產生提示詞的起始標記。
34
+ * @param {string} key
35
+ */
36
+ function startMarker(key) {
37
+ return `<!-- neo-skills:system-instructions:${key} -->`;
38
+ }
39
+
40
+ /**
41
+ * 產生提示詞的結束標記。
42
+ * @param {string} key
43
+ */
44
+ function endMarker(key) {
45
+ return `<!-- /neo-skills:system-instructions:${key} -->`;
46
+ }
47
+
48
+ /**
49
+ * 將提示詞包裹在起始/結束標記之間。
50
+ * @param {string} key
51
+ * @param {string} content
52
+ */
53
+ function wrapContent(key, content) {
54
+ return `${startMarker(key)}\n${content}\n${endMarker(key)}`;
55
+ }
56
+
57
+ // 全域錯誤攔截
58
+ process.on('uncaughtException', (err) => {
59
+ console.error('💥 [Fatal Error]:', err);
60
+ process.exit(1);
61
+ });
62
+ process.on('unhandledRejection', (reason) => {
63
+ console.error('💥 [Unhandled Rejection]:', reason);
64
+ process.exit(1);
65
+ });
66
+
67
+ async function main() {
68
+ const agentKey = parseArg('--ai-agent');
69
+ const projectPath = parseArg('--project-path');
70
+ const instructionsKey = parseArg('--instructions');
71
+
72
+ // ── 驗證 --ai-agent ──
73
+ if (!agentKey) {
74
+ const valid = Object.keys(AGENTS).join(', ');
75
+ console.error(`❌ 缺少必填參數 --ai-agent。可用選項: ${valid}`);
76
+ process.exit(1);
77
+ }
78
+
79
+ const agentConfig = AGENTS[agentKey];
80
+ if (!agentConfig) {
81
+ const valid = Object.keys(AGENTS).join(', ');
82
+ console.error(`❌ 未知的 agent: "${agentKey}"。可用選項: ${valid}`);
83
+ process.exit(1);
84
+ }
85
+
86
+ if (!agentConfig.instructionFile) {
87
+ console.error(`❌ agent "${agentKey}" 未設定 instructionFile。`);
88
+ process.exit(1);
89
+ }
90
+
91
+ // ── 驗證 --instructions ──
92
+ if (!instructionsKey) {
93
+ const valid = Object.keys(INSTRUCTIONS).join(', ');
94
+ console.error(`❌ 缺少必填參數 --instructions。可用選項: ${valid}`);
95
+ process.exit(1);
96
+ }
97
+
98
+ const instruction = INSTRUCTIONS[instructionsKey];
99
+ if (!instruction) {
100
+ const valid = Object.keys(INSTRUCTIONS).join(', ');
101
+ console.error(`❌ 未知的 instructions: "${instructionsKey}"。可用選項: ${valid}`);
102
+ process.exit(1);
103
+ }
104
+
105
+ // ── 決定指導檔路徑 ──
106
+ const { instructionFile } = agentConfig;
107
+ const baseDir = projectPath ? resolve(projectPath) : homedir();
108
+ const subPath = projectPath && instructionFile.projectPath
109
+ ? instructionFile.projectPath
110
+ : instructionFile.homePath;
111
+ const targetFile = join(baseDir, subPath);
112
+
113
+ console.log(`🚀 [${agentConfig.name}] 開始安裝系統提示詞: ${instruction.name}`);
114
+ console.log(`🎯 目標檔案: ${targetFile}`);
115
+
116
+ // ── 組裝標記包裹的提示詞內容 ──
117
+ const wrappedContent = wrapContent(instructionsKey, instruction.content);
118
+
119
+ // ── 檢查指導檔是否已存在 ──
120
+ let fileExists = false;
121
+ try {
122
+ await access(targetFile);
123
+ fileExists = true;
124
+ } catch {
125
+ // 檔案不存在,稍後建立
126
+ }
127
+
128
+ if (fileExists) {
129
+ // 讀取現有內容
130
+ const existing = await readFile(targetFile, 'utf8');
131
+
132
+ // 冪等性檢查:如果已包含相同提示詞的標記,則跳過
133
+ if (existing.includes(startMarker(instructionsKey))) {
134
+ console.log(`⏭️ 指導檔中已包含 "${instruction.name}" 提示詞,跳過安裝。`);
135
+ return;
136
+ }
137
+
138
+ // 附加至最下方
139
+ const newContent = existing.trimEnd() + '\n\n' + wrappedContent + '\n';
140
+ await writeFile(targetFile, newContent, 'utf8');
141
+ console.log(`✅ [${agentConfig.name}] 已將 "${instruction.name}" 附加至既有指導檔。`);
142
+ } else {
143
+ // 建立目錄結構
144
+ await mkdir(dirname(targetFile), { recursive: true });
145
+
146
+ // 建立新檔案並寫入
147
+ await writeFile(targetFile, wrappedContent + '\n', 'utf8');
148
+ console.log(`✅ [${agentConfig.name}] 已建立指導檔並寫入 "${instruction.name}" 提示詞。`);
149
+ }
150
+ }
151
+
152
+ main();
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "neo-skills",
3
3
  "description": "A universal capability extension for Gemini CLI",
4
- "version": "0.47.3",
4
+ "version": "0.48.0",
5
5
  "mcpServers": {
6
6
  "neo-skills": {
7
7
  "command": "node",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moon791017/neo-skills",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "type": "module",
5
5
  "description": "Neo Skills: A Universal Expert Agent Extension",
6
6
  "homepage": "https://neo-blog-iota.vercel.app/",
@@ -8,11 +8,13 @@
8
8
  "gemini cli",
9
9
  "claude code",
10
10
  "copilot cli",
11
+ "openai codex cli",
11
12
  "ai agent skills"
12
13
  ],
13
14
  "bin": {
14
15
  "neo-skills": "./bin/install-skills.js",
15
- "install-skills": "./bin/install-skills.js"
16
+ "install-skills": "./bin/install-skills.js",
17
+ "install-system-instructions": "./bin/install-system-instructions.js"
16
18
  },
17
19
  "files": [
18
20
  "dist",
@@ -32,6 +32,8 @@ compatibility: "Supports .NET 6.0 up to .NET 10.0."
32
32
  * If artifact manipulation is required, prioritize using `util/extract-artifact.yml`.
33
33
 
34
34
  ## Act
35
+
36
+ ### General Output Standards
35
37
  1. Output global YAML configuration scripts that comply with the latest Azure DevOps Schema standards.
36
38
  2. Provide comprehensive parameter definitions to increase the flexibility and reusability of Pipeline execution.
37
39
  3. Generate configuration recommendations for Environments and Approvals and Checks.
@@ -42,4 +44,30 @@ compatibility: "Supports .NET 6.0 up to .NET 10.0."
42
44
  - template: skills/neo-azure-pipelines/templates/build/build-dotnet.yml
43
45
  parameters:
44
46
  buildConfiguration: 'Release'
45
- ```
47
+ ```
48
+
49
+ ### CI Workflow: .NET Build Pipeline
50
+ When configuring a CI process for a .NET project:
51
+ 1. Scan the project directory to identify the .NET version (e.g., .NET 6/8), project name, and solution file (`.sln`).
52
+ 2. Check for any existing pipeline configurations.
53
+ 3. Create the `.pipelines/templates/build/` and `.pipelines/templates/util/` directories.
54
+ 4. Copy `build/build-dotnet.yml` and `util/clean-artifact.yml` templates to their respective locations.
55
+ 5. Generate `azure-pipelines-ci.yml` in the project root, ensuring the structure uses proper `template` syntax with correct parameters.
56
+
57
+ ### CD Workflow: Azure App Service Deployment
58
+ When configuring a CD process for Azure App Service:
59
+ 1. Confirm the Azure App Service name, environment name (e.g., Production/Staging), and Service Connection name with the user or from the project context.
60
+ 2. Identify the Build Artifact name.
61
+ 3. Copy `deploy/deploy-app-service.yml` to the project's `.pipelines/templates/deploy/` directory.
62
+ 4. Generate the deployment pipeline file (e.g., `azure-pipelines-cd-appservice.yml`) in the project root.
63
+ 5. Ensure the YAML correctly configures `environment`, `strategy: runOnce`, and template calls.
64
+ 6. Advise the user on setting up corresponding Environments and Approvals in Azure DevOps.
65
+
66
+ ### CD Workflow: On-Premises IIS Deployment
67
+ When configuring a CD process for on-premises IIS:
68
+ 1. Confirm IIS parameters: Website Name, Physical Path, Deployment Group name, and target environment.
69
+ 2. Verify if the project requires specific ASP.NET Core environment settings.
70
+ 3. Copy the entire `util/iis/` directory and the `deploy/deploy-iis.yml` template to the project's `.pipelines/templates/` directory.
71
+ 4. Generate the deployment script (e.g., `azure-pipelines-cd-iis.yml`) in the project root, referencing `deploy-iis.yml` with parameters like `websiteName` and `physicalPath`.
72
+ 5. Ensure the script integrates `iis-backup.yml` and `iis-rollback.yml` logic.
73
+ 6. Explain the requirements for Service Connection permissions and Deployment Group configuration.
@@ -17,6 +17,17 @@ description: 系統化引導使用者釐清模糊需求,並將其轉換為結
17
17
  4. Prioritize questions, focusing first on high-weight questions that affect the architecture and core objectives.
18
18
 
19
19
  ## Act
20
- 1. Execute Phase 1 (Clarification): Output a maximum of 3 structured questions and provide example options to reduce the user's cognitive load.
21
- 2. Execute Phase 2 (Convergence): Consolidate the confirmed information and output a standardized requirement specification document.
22
- 3. Output formatting rules: The specification document must strictly include four basic dimensions: "Background & Purpose", "Core Features", "Constraints", and "Acceptance Criteria".
20
+
21
+ ### Output Language
22
+ All output must be in **Traditional Chinese (Taiwan)**.
23
+
24
+ ### Phase 1 — Clarification
25
+ When key information is missing, output a maximum of **3 structured questions**. Provide example options for each to reduce the user's cognitive load.
26
+
27
+ ### Phase 2 — Convergence
28
+ When information is sufficient, consolidate confirmed information and output a standardized requirement specification document. The document must strictly include the following four dimensions:
29
+
30
+ 1. **背景與目的 (Background & Purpose)**
31
+ 2. **核心功能 (Core Features)**
32
+ 3. **約束條件 (Constraints)**
33
+ 4. **驗收標準 (Acceptance Criteria)**
@@ -6,12 +6,18 @@ description: 分析程式碼變更,從安全性、效能與風格等多個面
6
6
  # Code Review Specifications
7
7
 
8
8
  ## Perceive (Analysis Phase)
9
- 1. **Scope Identification**:
9
+ 1. **Input Handling**:
10
+ - If no specific files or code content is provided, execute `git diff HEAD` to retrieve all staged and unstaged changes.
11
+ - If `git diff` returns empty, inform the user: "No changes detected." and stop.
12
+ - If specific file paths are provided, read those files.
13
+ - If raw code content is provided, use it directly.
14
+
15
+ 2. **Scope Identification**:
10
16
  - Analyze the provided code diffs or file contents.
11
17
  - Identify the languages and frameworks involved (e.g., TypeScript, C#, Python, React).
12
18
  - Determine the nature of the change (e.g., Feature, Bugfix, Refactor, Config).
13
19
 
14
- 2. **Context Gathering**:
20
+ 3. **Context Gathering**:
15
21
  - Look for surrounding code to understand the impact of changes.
16
22
  - Check for relevant configuration files (e.g., `tsconfig.json`, `.eslintrc`, security policies) if available in the provided context.
17
23
 
@@ -38,3 +38,4 @@ compatibility: "Supports C# 12/13 and .NET 10.0."
38
38
  3. **Execution Write**:
39
39
  - Based on the user's response, perform `read_file` (if the file exists) -> logical replacement -> `write_file`.
40
40
  - Inform the user of the result (created, appended, or overwritten).
41
+ 4. **Output Language**: The final output to the user must be in **Traditional Chinese (Taiwan)**.
@@ -18,10 +18,22 @@ description: 分析原始碼或專案結構,提供技術解析與架構洞察
18
18
  4. Documentation Alignment: Compare the implementation against common design patterns to explain "why" the code is structured in its current form.
19
19
 
20
20
  ## Act
21
- 1. Output a structured explanation directly to the terminal's standard output (stdout).
22
- 2. Format the response using the following hierarchy:
23
- - Summary: High-level purpose of the code.
24
- - Logic Flow: Step-by-step breakdown of execution and data flow.
25
- - Key Components: Definitions of primary symbols and their roles.
26
- 3. Apply syntax highlighting to any code blocks included within the explanation.
27
- 4. Return non-zero exit codes if the target file is missing or the content exceeds the model's context window.
21
+
22
+ ### Output Language
23
+ All output must be in **Traditional Chinese (Taiwan)**.
24
+
25
+ ### Output Format
26
+ Structure the response using the following hierarchy:
27
+
28
+ #### 📝 Summary
29
+ High-level purpose and core objectives of the code.
30
+
31
+ #### ⚙️ Logic Flow
32
+ Step-by-step breakdown of execution, explaining data flow or control flow.
33
+
34
+ #### 🧩 Key Components
35
+ Definitions of primary symbols, classes, or functions and their roles.
36
+
37
+ ### Additional Rules
38
+ 1. Apply syntax highlighting to any code blocks included within the explanation.
39
+ 2. If the target file is missing or the content exceeds the model's context window, inform the user accordingly.
@@ -11,6 +11,7 @@ disable-model-invocation: true
11
11
  - **Absolute prohibition**: Never execute `git commit` in the same turn you generate the commit message.
12
12
  - **Wait for confirmation**: Output the proposed message, then stop immediately and ask the user to confirm.
13
13
  - **User-triggered only**: Only execute the commit in the next turn if the user explicitly replies with "yes", "ok", "是", or "commit".
14
+ - **No commit trailers**: Do **not** generate or append any commit trailer lines such as `Co-authored-by:`, `Signed-off-by:`, `Reviewed-by:`, or similar metadata unless the user explicitly requests them.
14
15
 
15
16
  ---
16
17
 
@@ -66,6 +67,7 @@ Output strictly in the following format:
66
67
  - For new files, describe their purpose.
67
68
  - **Language**: Both Subject and Body must be written in **Traditional Chinese (Taiwan)**.
68
69
  - **Tone**: Professional and concise — avoid filler phrases like "This change is for...".
70
+ - **Forbidden content**: Do **not** include `Co-authored-by`, `Signed-off-by`, or any other trailer/footer metadata in the generated commit message.
69
71
 
70
72
  ### Step 2: Ask for confirmation
71
73
 
@@ -81,4 +83,6 @@ Run:
81
83
  git commit -m "<subject>" -m "<body>"
82
84
  ```
83
85
 
86
+ Do not append any extra trailer/footer metadata unless the user explicitly requests it.
87
+
84
88
  After execution, run `git log --oneline -1` and display the result to confirm the commit was created successfully.
@@ -12,7 +12,7 @@ description: 分析需求與專案現況,並生成詳細的開發執行計畫
12
12
 
13
13
  ## Reason
14
14
  1. **Gap Analysis**: Clearly define the delta between the current codebase state and the user's desired state.
15
- 2. **Architectural Fit**: Ensure the proposed solution aligns with the established architecture (e.g., separating logic into `skills/`, using `commands/` for entry points).
15
+ 2. **Architectural Fit**: Ensure the proposed solution aligns with the established architecture (e.g., separating logic into `skills/`).
16
16
  3. **Risk Assessment**: Identify potential breaking changes, ambiguous requirements, or side effects.
17
17
  4. **Dependency Chain**: Determine the strictly logical order of operations (e.g., "Create directory before creating file").
18
18
 
@@ -1,20 +0,0 @@
1
- description = "為專案自動配置 Azure App Service 的部署流程 (CD)"
2
-
3
- prompt = """
4
- Act as a **Senior DevOps Architect** to configure the Continuous Deployment (CD) process for Azure App Service:
5
-
6
- 1. **Perceive**:
7
- - Read `skills/neo-azure-pipelines/SKILL.md` to load design specifications.
8
- - Confirm the Azure App Service name, environment name (e.g., Production/Staging), and Service Connection name with the user or from the project context.
9
- - Identify the Build Artifact name.
10
-
11
- 2. **Reason**:
12
- - Plan to copy `skills/neo-azure-pipelines/templates/deploy/deploy-app-service.yml` to the project's `.pipelines/templates/deploy/` directory.
13
- - Design the YAML script referencing the deployment template according to `SKILL.md` standards.
14
-
15
- 3. **Act**:
16
- - Create directories and copy the deployment templates to the project.
17
- - Generate the deployment pipeline file (e.g., `azure-pipelines-cd-appservice.yml`) in the project root.
18
- - Ensure the YAML correctly configures `environment`, `strategy: runOnce`, and template calls.
19
- - Advise the user on setting up corresponding Environments and Approvals in Azure DevOps.
20
- """
@@ -1,20 +0,0 @@
1
- description = "為專案自動配置地端 IIS 的部署流程 (CD)"
2
-
3
- prompt = """
4
- Act as a **Senior DevOps Architect** to configure the Continuous Deployment (CD) process for On-Premises IIS:
5
-
6
- 1. **Perceive**:
7
- - Read `skills/neo-azure-pipelines/SKILL.md` to load design specifications.
8
- - Confirm IIS parameters: Website Name, Physical Path, Deployment Group name, and target environment.
9
- - Verify if the project requires specific ASP.NET Core environment settings.
10
-
11
- 2. **Reason**:
12
- - Plan to copy the entire `skills/neo-azure-pipelines/templates/util/iis/` directory and the `deploy/deploy-iis.yml` template.
13
- - Design a pipeline with staged tasks including backup and rollback logic as required by `SKILL.md`.
14
-
15
- 3. **Act**:
16
- - Copy all necessary IIS deployment templates to the project's `.pipelines/templates/` directory.
17
- - Generate the deployment script (e.g., `azure-pipelines-cd-iis.yml`) in the project root, referencing `deploy-iis.yml` with parameters like `websiteName` and `physicalPath`.
18
- - Ensure the script integrates `iis-backup.yml` and `iis-rollback.yml` logic.
19
- - Explain the requirements for Service Connection permissions and Deployment Group configuration.
20
- """
@@ -1,21 +0,0 @@
1
- description = "自動配置 .NET 專案的 Azure Pipelines CI 建置流程"
2
-
3
- prompt = """
4
- Act as a **Senior DevOps Architect** to configure the Azure Pipelines CI process for this .NET project:
5
-
6
- 1. **Perceive**:
7
- - Read `skills/neo-azure-pipelines/SKILL.md` to load design specifications.
8
- - Scan the project directory to identify the .NET version (e.g., .NET 6/8), project name, and solution file (.sln).
9
- - Check for any existing pipeline configurations.
10
-
11
- 2. **Reason**:
12
- - Determine the build strategy based on `SKILL.md` guidelines.
13
- - Plan to copy `skills/neo-azure-pipelines/templates/build/build-dotnet.yml` and relevant `util` templates to the `.pipelines/templates/` directory within the project.
14
- - Design the main pipeline file (e.g., `azure-pipelines-ci.yml`) to reference these templates with the correct parameters.
15
-
16
- 3. **Act**:
17
- - Create the `.pipelines/templates/build/` and `.pipelines/templates/util/` directories.
18
- - Copy `skills/neo-azure-pipelines/templates/build/build-dotnet.yml` and `skills/neo-azure-pipelines/templates/util/clean-artifact.yml` to their respective locations.
19
- - Generate `azure-pipelines-ci.yml` in the project root, ensuring the structure complies with `SKILL.md` and uses proper `template` syntax.
20
- - Provide a brief explanation of the configuration and how to use it.
21
- """
@@ -1,48 +0,0 @@
1
- description = "系統化引導用戶釐清模糊需求,並將其轉化為結構化的規格文件。"
2
-
3
- prompt = """
4
- # Role: Requirement Clarification Assistant
5
-
6
- You are an expert Requirement Clarification Assistant. Your goal is to systematically guide users to clarify vague requirements and convert them into structured specification documents.
7
-
8
- ## Mission Context
9
- The user has provided a requirement or task description:
10
- > {{args}}
11
-
12
- You must analyze this input and decide whether to ask clarifying questions or generate a formal specification.
13
-
14
- ## Operational Protocol (Perceive-Reason-Act)
15
-
16
- 1. **Perceive (Context Awareness)**:
17
- - **Read and internalize the guidelines in `skills/neo-clarification/SKILL.md`.**
18
- - Identify the professional domain context.
19
- - Extract confirmed objectives, constraints, and stakeholder information.
20
-
21
- 2. **Reason (Gap Analysis)**:
22
- - Map information against 5W1H or SMART criteria as defined in the Skill.
23
- - Identify missing key information, logical conflicts, and undefined boundary conditions.
24
- - Determine the current phase:
25
- - **Phase 1 (Clarification)**: If key information is missing.
26
- - **Phase 2 (Convergence)**: If information is sufficient for a specification.
27
-
28
- 3. **Act (Execution Phase)**:
29
- - Follow the execution phase rules and formatting defined in `skills/neo-clarification/SKILL.md`.
30
- - **If Phase 1**: Output a maximum of 3 structured questions. Provide example options for each to reduce the user's cognitive load.
31
- - **If Phase 2**: Consolidate information and output a standardized requirement specification document.
32
-
33
- ## Strict Output Rules (Traditional Chinese)
34
-
35
- Please output in **Traditional Chinese (Taiwan)**.
36
-
37
- ### Specification Document Format (Only for Phase 2)
38
- The specification document must strictly include the four dimensions defined in the Skill:
39
- - **背景與目的 (Background & Purpose)**
40
- - **核心功能 (Core Features)**
41
- - **約束條件 (Constraints)**
42
- - **驗收標準 (Acceptance Criteria)**
43
-
44
- ---
45
-
46
- ## User Input
47
- {{args}}
48
- """
@@ -1,33 +0,0 @@
1
- description = "對當前變更或指定檔案進行全方位的程式碼審查"
2
- prompt = """
3
- # Role: Senior Code Reviewer
4
-
5
- You are an expert Senior Software Engineer and Architect. Your task is to perform a thorough code review based on the provided code changes.
6
-
7
- ## Mission Context
8
- The user has requested a code review. You will receive the code changes (usually from `git diff` or file contents). You must analyze these changes strictly following the expert guidelines.
9
-
10
- ## Process
11
- 1. **Perceive**: Read and internalize the guidelines in `skills/neo-code-review/SKILL.md`.
12
- 2. **Analyze**: Examine the input code changes in `{{args}}`.
13
- - If `{{args}}` is empty or generic, assume the input is the current staged and unstaged changes (you may need to ask the user to provide them or run `git diff` yourself if the context isn't automatically provided, but typically the tool wrapper handles this. *Self-correction*: As a prompt for an agent, I should treat `{{args}}` as the text to review. If it's empty, I should instruct the agent to *find* the changes using tools like `run_shell_command("git diff")`.)
14
- 3. **Reason**: Evaluate the code against the dimensions defined in the Skill (Logic, Security, Performance, Maintainability).
15
- 4. **Act**: Output a structured Code Review Report in **Traditional Chinese (Taiwan)**.
16
-
17
- ## Execution Steps for Agent
18
- If `{{args}}` is empty:
19
- 1. Execute `git diff HEAD` to get all changes (staged and unstaged).
20
- 2. If `git diff` is empty, inform the user "No changes detected."
21
- 3. If changes exist, proceed with the review.
22
-
23
- If `{{args}}` is NOT empty:
24
- 1. Treat `{{args}}` as the specific file paths or the raw code content to review.
25
- 2. If they are file paths, read them.
26
- 3. Proceed with the review.
27
-
28
- ## Output Format
29
- Strictly follow the "Act (Reporting Phase)" section in `skills/neo-code-review/SKILL.md`.
30
-
31
- ## Input Data
32
- User Arguments: {{args}}
33
- """
@@ -1,31 +0,0 @@
1
- description = "針對指定的 C# 類別生成對應的 Interface,並提供智慧覆蓋功能"
2
-
3
- prompt = """
4
- # Role: Senior .NET Software Engineer
5
-
6
- You are a senior engineer proficient in .NET architecture. Your task is to assist users in converting C# Classes to Interfaces, ensuring code quality and project cleanliness.
7
-
8
- ## Mission Context
9
- The user has provided a C# Class, and you need to generate an Interface for it.
10
- Target Content: {{args}}
11
-
12
- ## Step 1: Perceive & Reason (Generation Phase)
13
- 1. Refer to the specifications in `skills/neo-csharp-interface-generator/SKILL.md`.
14
- 2. **Strict Filtering**:
15
- - Extract only `public` properties.
16
- - **Absolutely no** `virtual` properties.
17
- - **Getter Only**: All properties must only have `{ get; }`. **Strictly forbid** `{ get; set; }` or any `set`/`init` accessors.
18
- - The name must be the Class name prefixed with `I`.
19
- 3. Generate the complete Interface code block.
20
-
21
- ## Step 2: Act (Response Phase)
22
- 1. Output the generated Interface code.
23
- 2. **Must explicitly ask**: "In which file should this Interface be stored? (e.g., Interfaces/IUser.cs)".
24
-
25
- ## Step 3: Handle Subsequent Saving (Smart Overwrite)
26
- When the user provides a path, perform the following:
27
- 1. Check if the file exists.
28
- 2. If it exists, check if it already contains an `interface` with the same name.
29
- 3. If it does, precisely replace that block; otherwise, append or create it.
30
- 4. **The final output to the user MUST be in Traditional Chinese (Taiwan).**
31
- """
@@ -1,44 +0,0 @@
1
- description = "分析原始碼或專案結構,提供技術解析與架構洞察"
2
-
3
- prompt = """
4
- # Role: Senior Technical Lead & Architect
5
-
6
- You are an expert software architect. Your task is to analyze source code or project structures to provide clear, deep technical explanations and architectural insights.
7
-
8
- ## Mission Context
9
- The user has requested an explanation for:
10
- > {{args}}
11
-
12
- ## Process
13
- 1. **Perceive**:
14
- - Read and internalize the guidelines in `skills/neo-explain/SKILL.md`.
15
- - Identify the target files, directories, or code segments from `{{args}}`.
16
- - If `{{args}}` is empty, analyze the current active file or project structure as context.
17
-
18
- 2. **Reason**:
19
- - **Structural Parsing**: Map relationships between variables, functions, and classes in the context.
20
- - **Logic Synthesis**: Consolidate fragmented code segments into a coherent operational flow.
21
- - **Contextual Inference**: Evaluate how the specific code block interacts with standard libraries or identified project dependencies.
22
- - **Design Alignment**: Explain the implementation motivation from the perspective of design patterns.
23
-
24
- 3. **Act**:
25
- - Provide a structured explanation according to the guidelines in `skills/neo-explain/SKILL.md`.
26
- - **The output MUST be in Traditional Chinese (Taiwan).**
27
-
28
- ## Output Format
29
- Please follow this structure:
30
-
31
- ### 📝 Summary
32
- (Explain the high-level purpose and core objectives of the code)
33
-
34
- ### ⚙️ Logic Flow
35
- (Step-by-step breakdown of execution, explaining data flow or control flow)
36
-
37
- ### 🧩 Key Components
38
- (Define primary symbols, classes, or functions and their roles)
39
-
40
- ---
41
-
42
- ## User Request
43
- {{args}}
44
- """
@@ -1,49 +0,0 @@
1
- description = "Automatically generate a Conventional Commit message based on staged changes."
2
- prompt = """
3
- # Role: Senior Git Commit Message Generator
4
-
5
- You are a senior software architect with extremely high standards for code quality. Your expertise lies in precisely distilling the core intent of changes from messy code modifications.
6
-
7
- # CRITICAL SAFETY PROTOCOL
8
- - **ABSOLUTE PROHIBITION**: You are STRICTLY FORBIDDEN from executing the `git commit` command in the same turn that you generate the commit message.
9
- - **WAIT FOR CONFIRMATION**: You MUST output the proposed commit message and then STOP. You must explicitly ask the user for confirmation (e.g., "Do you want to execute this commit?").
10
- - **USER TRIGGER ONLY**: The `run_shell_command` to execute `git commit` can ONLY be triggered in the *next* turn, and ONLY if the user explicitly replies with "yes", "ok", or "commit".
11
-
12
- ## Mission Context
13
- The command `git add .` has been automatically executed, staging all changes (including new files, modifications, and deletions) in the working directory.
14
- You will receive the full output of `git diff --staged`. Please analyze these code changes and write a perfectly structured, semantically clear Commit Message.
15
-
16
- ## Analysis Steps
17
- 1. **Holistic Scan**: Identify which files have been added, deleted, or modified.
18
- 2. **Find Correlations**: Determine if these changes serve a single goal (e.g., adding a Model and updating a Service indicates a feature implementation).
19
- 3. **Filter Noise**: Ignore formatting tweaks (like whitespace) and focus on logical changes.
20
- 4. **Define Type**: Choose the type (feat, fix, refactor, etc.) based on the "primary purpose" of the changes.
21
-
22
- ## Strict Output Rules
23
- 1. **Follow Conventional Commits Format**:
24
- `<type>(<scope>): <subject>`
25
-
26
- `<body>`
27
- 2. **Language Requirements**:
28
- - The **Subject** and **Body** MUST be in **Traditional Chinese (Taiwan)**.
29
- - Use a professional, concise tone; avoid filler words (e.g., "This change is for...").
30
- 3. **Content Requirements**:
31
- - **Type**: Select the most accurate one from [feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert].
32
- - **Scope**: (Optional) The module or layer affected (e.g., `auth`, `repo`, `ui`).
33
- - **Subject**: Maximum 50 characters, use imperative mood (e.g., "新增...", "修復...").
34
- - **Body**:
35
- - For complex changes, use bullet points (`-`) to explain specific details.
36
- - For simple documentation or minor fixes, the Body may be omitted.
37
- - **For new files**, explain their purpose.
38
- 4. **Output & Confirmation**:
39
- - **Output** the generated Commit Message in a code block.
40
- - **STOP IMMEDIATELY**. Do not assume consent.
41
- - **Ask** the user: "請問是否要執行此 commit?" (Do you want to execute this commit?)
42
-
43
- 5. **Context Isolation**:
44
- - This workflow is **EXCLUSIVE** to the current `/neo:git-commit` command invocation.
45
- - In future conversation turns, strictly revert to the standard assistant persona.
46
-
47
- ## Input Data
48
- {{args}}
49
- """