@moon791017/neo-skills 1.0.35 → 1.0.36
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 +0 -2
- package/README.md +2 -4
- package/bin/_system-instructions.js +32 -0
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/skills/neo-git-commit/SKILL.md +0 -88
package/GEMINI.md
CHANGED
|
@@ -82,8 +82,6 @@ When interacting with this codebase or using the extension, the agent follows th
|
|
|
82
82
|
|
|
83
83
|
* **Web Scraper:** 從指定的 URL 獲取網頁 HTML 內容,支援 CSS 選擇器 (`fetch_web_content`)。
|
|
84
84
|
|
|
85
|
-
* **Git Automation:** 根據暫存區變更自動生成 Conventional Commits 訊息,經使用者確認後執行 commit。
|
|
86
|
-
|
|
87
85
|
* **CI Protocols:** 自動配置 .NET 專案的 Azure Pipelines CI 建置流程。
|
|
88
86
|
|
|
89
87
|
* **CD Protocols:** 為專案自動配置 Azure App Service 與地端 IIS 的部署流程 (CD)。
|
package/README.md
CHANGED
|
@@ -27,10 +27,7 @@
|
|
|
27
27
|
* **Azure App Service**:部署至Azure App Service。
|
|
28
28
|
* **IIS On-Premises**:部署至地端 IIS 伺服器,包含備份與復原機制。
|
|
29
29
|
|
|
30
|
-
### 2.
|
|
31
|
-
* **Smart Commit**:根據 `git diff` 暫存區內容,自動生成符合 Conventional Commits 規範的提交訊息。
|
|
32
|
-
|
|
33
|
-
### 3. Code Review 專家
|
|
30
|
+
### 2. Code Review 專家
|
|
34
31
|
* **智能審查**:針對程式碼變更進行多面向 (正確性、安全性、效能、可讀性) 的深度審查。
|
|
35
32
|
|
|
36
33
|
### 4. 程式碼解釋助手
|
|
@@ -185,6 +182,7 @@ install-system-instructions --instructions <key> [--ai-agent <name>] [--project-
|
|
|
185
182
|
| Key | 名稱 | 說明 |
|
|
186
183
|
| :--- | :--- | :--- |
|
|
187
184
|
| `technical-co-founder` | Technical Co-Founder | 讓 AI 扮演技術共同創辦人,以 Discovery → Planning → Building → Polish → Handoff 五階段框架,協助您從零打造可上線的真實產品。 |
|
|
185
|
+
| `git-commit` | Git Commit Message Generator | 分析暫存區變更,自動生成符合 Conventional Commits 規範的提交訊息,經確認後執行。 |
|
|
188
186
|
|
|
189
187
|
**範例:**
|
|
190
188
|
|
|
@@ -46,6 +46,34 @@ Rules:
|
|
|
46
46
|
• This is real. Not a mockup. Not a prototype. A working product.
|
|
47
47
|
• Keep me in control and in the loop at all times`;
|
|
48
48
|
|
|
49
|
+
export const gitCommitInstructions = `
|
|
50
|
+
## Git Commit Guidelines
|
|
51
|
+
|
|
52
|
+
All commit messages must strictly adopt Conventional Commits 1.0.0 (CC 1.0.0).
|
|
53
|
+
|
|
54
|
+
- Format: \`<type>[optional scope][!]: <description>\`.
|
|
55
|
+
- \`type\` must be a lowercase noun; prioritize using \`feat\`, \`fix\`, \`docs\`, \`test\`, \`refactor\`, \`build\`, \`ci\`, \`chore\`.
|
|
56
|
+
- \`feat\` indicates a new feature, corresponding to SemVer minor; \`fix\` indicates a bug fix, corresponding to SemVer patch.
|
|
57
|
+
- \`scope\` is optional, use a lowercase short noun, e.g., \`docs\`, \`scanner\`, \`npm\`, \`ci\`.
|
|
58
|
+
- \`description\` is required, write in the imperative mood, present tense, in English, and do not end with a period.
|
|
59
|
+
- Major breaking changes must have a \`!\` added after the type/scope, or use \`BREAKING CHANGE: <description>\` in the footer; this kind of commit corresponds to SemVer major.
|
|
60
|
+
- Body is optional, must be separated from the header by a blank line, used to explain motivation, background, and behavioral differences, without restating the diff.
|
|
61
|
+
- Footer is optional, must be separated from the body by a blank line; issue references use \`Refs: #123\` or \`Closes: #123\`.
|
|
62
|
+
- Multi-line commit messages must use actual newline characters to separate header, body, and footer; do not write the literal string \`\\n\` into the commit message or git log.
|
|
63
|
+
- Each commit focuses on a single logical change; do not mix unrelated modifications in the same commit.
|
|
64
|
+
- Before committing, ensure you do not include unrequested or existing unrelated changes.
|
|
65
|
+
|
|
66
|
+
Examples:
|
|
67
|
+
|
|
68
|
+
\`\`\`text
|
|
69
|
+
docs(readme): add localized documentation links
|
|
70
|
+
|
|
71
|
+
feat(scanner)!: change default risk threshold
|
|
72
|
+
|
|
73
|
+
BREAKING CHANGE: scans now fail CI when findings are at or above the threshold
|
|
74
|
+
\`\`\`
|
|
75
|
+
`;
|
|
76
|
+
|
|
49
77
|
/**
|
|
50
78
|
* 系統提示詞 Registry — 以 kebab-case 作為 key,供 CLI 選擇安裝。
|
|
51
79
|
*
|
|
@@ -58,4 +86,8 @@ export const INSTRUCTIONS = {
|
|
|
58
86
|
name: 'Technical Co-Founder',
|
|
59
87
|
content: technicalCoFounderInstructions,
|
|
60
88
|
},
|
|
89
|
+
'git-commit': {
|
|
90
|
+
name: 'Git Commit Message Generator',
|
|
91
|
+
content: gitCommitInstructions,
|
|
92
|
+
},
|
|
61
93
|
};
|
package/gemini-extension.json
CHANGED
package/package.json
CHANGED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: neo-git-commit
|
|
3
|
-
description: Analyzes staged changes, generates a high-quality Conventional Commits message in Traditional Chinese, and executes the commit only after user confirmation.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Git Commit Message Generator
|
|
8
|
-
|
|
9
|
-
## CRITICAL SAFETY PROTOCOL
|
|
10
|
-
|
|
11
|
-
- **Absolute prohibition**: Never execute `git commit` in the same turn you generate the commit message.
|
|
12
|
-
- **Wait for confirmation**: Output the proposed message, then stop immediately and ask the user to confirm.
|
|
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.
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## Perceive
|
|
19
|
-
|
|
20
|
-
1. Run `git add .` to stage all changes.
|
|
21
|
-
2. Run `git diff --staged` to retrieve the full staged diff.
|
|
22
|
-
3. If the staging area is empty, inform the user "No staged changes found." and stop.
|
|
23
|
-
|
|
24
|
-
## Reason
|
|
25
|
-
|
|
26
|
-
Analyze the diff to determine the core intent of the changes:
|
|
27
|
-
|
|
28
|
-
1. **Full scan**: Identify added, deleted, and modified files.
|
|
29
|
-
2. **Find correlations**: Determine whether the changes serve a single goal (e.g., adding a Model and updating a Service indicates a feature implementation).
|
|
30
|
-
3. **Filter noise**: Ignore pure formatting adjustments (whitespace, line endings) and focus on logical changes.
|
|
31
|
-
4. **Define type**: Choose the most accurate Conventional Commits type based on the primary purpose of the changes.
|
|
32
|
-
|
|
33
|
-
## Act
|
|
34
|
-
|
|
35
|
-
### Step 1: Generate the commit message
|
|
36
|
-
|
|
37
|
-
Output strictly in the following format:
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
<type>(<scope>): <subject>
|
|
41
|
-
|
|
42
|
-
<body>
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
**Type** — choose the most appropriate one:
|
|
46
|
-
|
|
47
|
-
| Type | When to use |
|
|
48
|
-
|------|-------------|
|
|
49
|
-
| `feat` | New feature |
|
|
50
|
-
| `fix` | Bug fix |
|
|
51
|
-
| `docs` | Documentation changes only |
|
|
52
|
-
| `style` | Formatting, no logic change |
|
|
53
|
-
| `refactor` | Refactoring, not a feature or fix |
|
|
54
|
-
| `perf` | Performance improvement |
|
|
55
|
-
| `test` | Adding or modifying tests |
|
|
56
|
-
| `build` | Build system or dependency changes |
|
|
57
|
-
| `ci` | CI/CD configuration changes |
|
|
58
|
-
| `chore` | Other maintenance tasks |
|
|
59
|
-
| `revert` | Reverting a previous commit |
|
|
60
|
-
|
|
61
|
-
**Quality rules**:
|
|
62
|
-
|
|
63
|
-
- **Subject**: Max 50 characters, imperative mood (e.g., "新增...", "修復...", "移除...").
|
|
64
|
-
- **Body**:
|
|
65
|
-
- Use bullet points (`-`) for complex changes to explain each detail.
|
|
66
|
-
- May be omitted for simple documentation or minor fixes.
|
|
67
|
-
- For new files, describe their purpose.
|
|
68
|
-
- **Language**: Both Subject and Body must be written in **Traditional Chinese (Taiwan)**.
|
|
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.
|
|
71
|
-
|
|
72
|
-
### Step 2: Ask for confirmation
|
|
73
|
-
|
|
74
|
-
Output the generated commit message inside a code block, then **stop immediately** and ask:
|
|
75
|
-
|
|
76
|
-
> 請問是否要執行此 commit?(輸入「是」或「yes」確認)
|
|
77
|
-
|
|
78
|
-
### Step 3: Execute (only after user confirms)
|
|
79
|
-
|
|
80
|
-
Run:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
git commit -m "<subject>" -m "<body>"
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Do not append any extra trailer/footer metadata unless the user explicitly requests it.
|
|
87
|
-
|
|
88
|
-
After execution, run `git log --oneline -1` and display the result to confirm the commit was created successfully.
|