@biggora/claude-plugins 1.2.0 → 1.2.2
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 +11 -4
- package/package.json +1 -1
- package/registry/registry.json +319 -244
- package/specs/coding.md +24 -0
- package/specs/pod.md +2 -0
- package/src/skills/captcha/README.md +221 -0
- package/src/skills/captcha/SKILL.md +355 -0
- package/src/skills/captcha/references/captcha-types.md +254 -0
- package/src/skills/captcha/references/services.md +172 -0
- package/src/skills/captcha/references/stealth.md +238 -0
- package/src/skills/captcha/scripts/solve_captcha.py +323 -0
- package/src/skills/captcha/scripts/solve_image_grid.py +350 -0
- package/src/skills/google-merchant-api/SKILL.md +581 -0
- package/src/skills/google-merchant-api/references/accounts.md +247 -0
- package/src/skills/google-merchant-api/references/content-api-legacy.md +216 -0
- package/src/skills/google-merchant-api/references/datasources.md +233 -0
- package/src/skills/google-merchant-api/references/inventories.md +201 -0
- package/src/skills/google-merchant-api/references/migration.md +267 -0
- package/src/skills/google-merchant-api/references/products.md +316 -0
- package/src/skills/google-merchant-api/references/promotions.md +201 -0
- package/src/skills/google-merchant-api/references/reports.md +240 -0
- package/src/skills/lv-aggregators-api/SKILL.md +113 -0
- package/src/skills/lv-aggregators-api/references/integration-guide.md +368 -0
- package/src/skills/lv-aggregators-api/references/kurpirkt.md +103 -0
- package/src/skills/lv-aggregators-api/references/salidzini.md +122 -0
- package/src/skills/tailwindcss-best-practices/SKILL.md +180 -0
- package/src/skills/tailwindcss-best-practices/references/best-practices-utility-patterns.md +87 -0
- package/src/skills/tailwindcss-best-practices/references/core-installation.md +109 -0
- package/src/skills/tailwindcss-best-practices/references/core-preflight.md +200 -0
- package/src/skills/tailwindcss-best-practices/references/core-responsive.md +163 -0
- package/src/skills/tailwindcss-best-practices/references/core-source-detection.md +114 -0
- package/src/skills/tailwindcss-best-practices/references/core-theme.md +108 -0
- package/src/skills/tailwindcss-best-practices/references/core-utility-classes.md +59 -0
- package/src/skills/tailwindcss-best-practices/references/core-variants.md +204 -0
- package/src/skills/tailwindcss-best-practices/references/effects-form-controls.md +76 -0
- package/src/skills/tailwindcss-best-practices/references/effects-mask.md +91 -0
- package/src/skills/tailwindcss-best-practices/references/effects-scroll-snap.md +59 -0
- package/src/skills/tailwindcss-best-practices/references/effects-text-shadow.md +78 -0
- package/src/skills/tailwindcss-best-practices/references/effects-transition-animation.md +80 -0
- package/src/skills/tailwindcss-best-practices/references/effects-visibility-interactivity.md +82 -0
- package/src/skills/tailwindcss-best-practices/references/features-content-detection.md +175 -0
- package/src/skills/tailwindcss-best-practices/references/features-custom-styles.md +203 -0
- package/src/skills/tailwindcss-best-practices/references/features-dark-mode.md +137 -0
- package/src/skills/tailwindcss-best-practices/references/features-functions-directives.md +241 -0
- package/src/skills/tailwindcss-best-practices/references/features-upgrade.md +160 -0
- package/src/skills/tailwindcss-best-practices/references/layout-aspect-ratio.md +39 -0
- package/src/skills/tailwindcss-best-practices/references/layout-columns.md +80 -0
- package/src/skills/tailwindcss-best-practices/references/layout-display.md +110 -0
- package/src/skills/tailwindcss-best-practices/references/layout-flexbox.md +112 -0
- package/src/skills/tailwindcss-best-practices/references/layout-grid.md +87 -0
- package/src/skills/tailwindcss-best-practices/references/layout-height.md +97 -0
- package/src/skills/tailwindcss-best-practices/references/layout-inset.md +103 -0
- package/src/skills/tailwindcss-best-practices/references/layout-logical-properties.md +92 -0
- package/src/skills/tailwindcss-best-practices/references/layout-margin.md +126 -0
- package/src/skills/tailwindcss-best-practices/references/layout-min-max-sizing.md +63 -0
- package/src/skills/tailwindcss-best-practices/references/layout-object-fit-position.md +64 -0
- package/src/skills/tailwindcss-best-practices/references/layout-overflow.md +57 -0
- package/src/skills/tailwindcss-best-practices/references/layout-padding.md +77 -0
- package/src/skills/tailwindcss-best-practices/references/layout-position.md +85 -0
- package/src/skills/tailwindcss-best-practices/references/layout-tables.md +67 -0
- package/src/skills/tailwindcss-best-practices/references/layout-width.md +102 -0
- package/src/skills/tailwindcss-best-practices/references/transform-base.md +68 -0
- package/src/skills/tailwindcss-best-practices/references/transform-rotate.md +70 -0
- package/src/skills/tailwindcss-best-practices/references/transform-scale.md +83 -0
- package/src/skills/tailwindcss-best-practices/references/transform-skew.md +62 -0
- package/src/skills/tailwindcss-best-practices/references/transform-translate.md +77 -0
- package/src/skills/tailwindcss-best-practices/references/typography-font-text.md +142 -0
- package/src/skills/tailwindcss-best-practices/references/typography-list-style.md +65 -0
- package/src/skills/tailwindcss-best-practices/references/typography-text-align.md +60 -0
- package/src/skills/tailwindcss-best-practices/references/visual-background.md +76 -0
- package/src/skills/tailwindcss-best-practices/references/visual-border.md +108 -0
- package/src/skills/tailwindcss-best-practices/references/visual-effects.md +111 -0
- package/src/skills/tailwindcss-best-practices/references/visual-svg.md +82 -0
- package/src/skills/test-mobile-app/SKILL.md +11 -6
- package/src/skills/test-mobile-app/scripts/analyze_apk.py +15 -4
- package/src/skills/test-mobile-app/scripts/check_environment.py +5 -5
- package/src/skills/test-mobile-app/scripts/run_tests.py +1 -1
- package/src/skills/test-web-ui/SKILL.md +264 -84
- package/src/skills/test-web-ui/scripts/discover.py +25 -12
- package/src/skills/test-web-ui/scripts/run_tests.py +3 -2
- package/src/skills/vite-best-practices/SKILL.md +115 -0
- package/src/skills/vite-best-practices/references/build-and-ssr.md +255 -0
- package/src/skills/vite-best-practices/references/core-config.md +231 -0
- package/src/skills/vite-best-practices/references/core-features.md +222 -0
- package/src/skills/vite-best-practices/references/core-plugin-api.md +294 -0
- package/src/skills/vite-best-practices/references/environment-api.md +108 -0
- package/src/skills/vite-best-practices/references/rolldown-migration.md +242 -0
- package/codex-cli-workspace/iteration-1/benchmark.json +0 -122
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/eval_metadata.json +0 -13
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/with_skill/grading.json +0 -52
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/with_skill/outputs/response.md +0 -163
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/with_skill/timing.json +0 -5
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/without_skill/grading.json +0 -58
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/without_skill/outputs/response.md +0 -151
- package/codex-cli-workspace/iteration-1/eval-1-ci-integration/without_skill/timing.json +0 -5
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/eval_metadata.json +0 -13
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/with_skill/grading.json +0 -52
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/with_skill/outputs/response.md +0 -86
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/with_skill/timing.json +0 -5
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/without_skill/grading.json +0 -58
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/without_skill/outputs/response.md +0 -164
- package/codex-cli-workspace/iteration-1/eval-2-mcp-server-config/without_skill/timing.json +0 -5
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/eval_metadata.json +0 -13
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/with_skill/grading.json +0 -52
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/with_skill/outputs/response.md +0 -130
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/with_skill/timing.json +0 -5
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/without_skill/grading.json +0 -64
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/without_skill/outputs/response.md +0 -209
- package/codex-cli-workspace/iteration-1/eval-3-profiles-troubleshooting/without_skill/timing.json +0 -5
- package/codex-cli-workspace/iteration-1/review.html +0 -1325
- package/gemini-cli-workspace/iteration-1/benchmark.json +0 -86
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/eval_metadata.json +0 -37
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/with_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/with_skill/outputs/response.md +0 -401
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/with_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/without_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/without_skill/outputs/response.md +0 -405
- package/gemini-cli-workspace/iteration-1/eval-1-cicd-setup/without_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/eval_metadata.json +0 -37
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/with_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/with_skill/outputs/response.md +0 -212
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/with_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/without_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/without_skill/outputs/response.md +0 -427
- package/gemini-cli-workspace/iteration-1/eval-2-mcp-server-config/without_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/eval_metadata.json +0 -32
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/with_skill/grading.json +0 -32
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/with_skill/outputs/response.md +0 -171
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/with_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/without_skill/grading.json +0 -32
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/without_skill/outputs/response.md +0 -199
- package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/without_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-1/review.html +0 -1325
- package/gemini-cli-workspace/iteration-2/benchmark.json +0 -173
- package/gemini-cli-workspace/iteration-2/benchmark.md +0 -28
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/eval_metadata.json +0 -37
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/with_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/with_skill/outputs/response.md +0 -195
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/with_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/without_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/without_skill/outputs/response.md +0 -377
- package/gemini-cli-workspace/iteration-2/eval-1-cicd-setup/without_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/eval_metadata.json +0 -37
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/with_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/with_skill/outputs/response.md +0 -127
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/with_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/without_skill/grading.json +0 -37
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/without_skill/outputs/response.md +0 -164
- package/gemini-cli-workspace/iteration-2/eval-2-mcp-server-config/without_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/eval_metadata.json +0 -32
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/with_skill/grading.json +0 -32
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/with_skill/outputs/response.md +0 -91
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/with_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/without_skill/grading.json +0 -32
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/without_skill/outputs/response.md +0 -112
- package/gemini-cli-workspace/iteration-2/eval-3-custom-slash-command/without_skill/timing.json +0 -5
- package/gemini-cli-workspace/iteration-2/eval-viewer.html +0 -1325
- package/screen-recording-workspace/evals.json +0 -41
- package/screen-recording-workspace/iteration-1/benchmark.json +0 -102
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/eval_metadata.json +0 -31
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/with_skill/grading.json +0 -11
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/with_skill/outputs/demo.mp4 +0 -0
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/with_skill/timing.json +0 -5
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/without_skill/grading.json +0 -11
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/without_skill/outputs/demo.mp4 +0 -0
- package/screen-recording-workspace/iteration-1/eval-0-fullscreen/without_skill/timing.json +0 -5
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/eval_metadata.json +0 -31
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/with_skill/grading.json +0 -11
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/with_skill/outputs/region_capture.mp4 +0 -0
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/with_skill/timing.json +0 -5
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/without_skill/grading.json +0 -11
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/without_skill/outputs/region_capture.mp4 +0 -0
- package/screen-recording-workspace/iteration-1/eval-1-region-audio/without_skill/timing.json +0 -5
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/eval_metadata.json +0 -31
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/with_skill/grading.json +0 -11
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/with_skill/outputs/fallback_recording.mp4 +0 -0
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/with_skill/timing.json +0 -5
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/without_skill/grading.json +0 -11
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/without_skill/outputs/fallback_recording.mp4 +0 -0
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/without_skill/outputs/record_screen.py +0 -67
- package/screen-recording-workspace/iteration-1/eval-2-python-fallback/without_skill/timing.json +0 -5
- package/screen-recording-workspace/iteration-1/review.html +0 -1325
- package/src/skills/codex-cli/evals/evals.json +0 -47
- package/src/skills/gemini-cli/evals/evals.json +0 -46
- package/src/skills/tm-search/evals/evals.json +0 -23
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"eval_id": 3,
|
|
3
|
-
"eval_name": "custom-slash-command",
|
|
4
|
-
"prompt": "How do I create a custom slash command in gemini cli that runs git diff --cached and asks the AI to write a commit message? I want it available in all my projects.",
|
|
5
|
-
"assertions": [
|
|
6
|
-
{
|
|
7
|
-
"id": "correct-file-location",
|
|
8
|
-
"text": "Points to ~/.gemini/commands/ for global user-scoped commands",
|
|
9
|
-
"type": "content_check"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"id": "toml-format",
|
|
13
|
-
"text": "Shows .toml file format with prompt field",
|
|
14
|
-
"type": "content_check"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"id": "shell-execution-syntax",
|
|
18
|
-
"text": "Uses !{git diff --cached} shell execution syntax in the prompt",
|
|
19
|
-
"type": "content_check"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"id": "mentions-headless-limitation",
|
|
23
|
-
"text": "Warns that custom slash commands don't work in headless/non-interactive mode",
|
|
24
|
-
"type": "content_check"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"id": "complete-working-example",
|
|
28
|
-
"text": "Provides a complete, copy-pasteable .toml file example",
|
|
29
|
-
"type": "content_check"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/with_skill/grading.json
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"eval_id": 3,
|
|
3
|
-
"eval_name": "custom-slash-command",
|
|
4
|
-
"configuration": "with_skill",
|
|
5
|
-
"expectations": [
|
|
6
|
-
{
|
|
7
|
-
"text": "Points to ~/.gemini/commands/ for global user-scoped commands",
|
|
8
|
-
"passed": true,
|
|
9
|
-
"evidence": "Correctly points to `~/.gemini/commands/commit.toml` for global scope"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"text": "Shows .toml file format with prompt field",
|
|
13
|
-
"passed": true,
|
|
14
|
-
"evidence": "Full .toml example with description and prompt fields"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"text": "Uses !{git diff --cached} shell execution syntax in the prompt",
|
|
18
|
-
"passed": true,
|
|
19
|
-
"evidence": "Correctly uses `!{git diff --cached}` in the prompt field"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"text": "Warns that custom slash commands don't work in headless/non-interactive mode",
|
|
23
|
-
"passed": true,
|
|
24
|
-
"evidence": "Explicitly warns: 'custom slash commands currently do not work in headless mode (`-p` flag)' and provides shell script alternative"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"text": "Provides a complete, copy-pasteable .toml file example",
|
|
28
|
-
"passed": true,
|
|
29
|
-
"evidence": "Multiple complete .toml examples including basic, namespaced, and with-arguments variants"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/with_skill/outputs/response.md
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
# Creating a Global Custom Slash Command for AI Commit Messages in Gemini CLI
|
|
2
|
-
|
|
3
|
-
You can create a custom slash command by writing a `.toml` file in the global commands directory. Since you want it available in all your projects, place it under `~/.gemini/commands/`.
|
|
4
|
-
|
|
5
|
-
## Step 1: Create the Commands Directory
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
mkdir -p ~/.gemini/commands
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Step 2: Create the Slash Command TOML File
|
|
12
|
-
|
|
13
|
-
Create the file `~/.gemini/commands/commit.toml`:
|
|
14
|
-
|
|
15
|
-
```toml
|
|
16
|
-
description = "Generate a commit message from staged changes"
|
|
17
|
-
prompt = """
|
|
18
|
-
Write a concise conventional commit message for the following staged changes.
|
|
19
|
-
|
|
20
|
-
Use the format: <type>(<scope>): <description>
|
|
21
|
-
|
|
22
|
-
Where type is one of: feat, fix, docs, style, refactor, test, chore
|
|
23
|
-
|
|
24
|
-
Only output the commit message itself, nothing else.
|
|
25
|
-
|
|
26
|
-
Staged diff:
|
|
27
|
-
!{git diff --cached}
|
|
28
|
-
"""
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### How This Works
|
|
32
|
-
|
|
33
|
-
- The `prompt` field defines the instruction sent to Gemini when the command is invoked.
|
|
34
|
-
- `!{git diff --cached}` is a **shell execution block** -- Gemini CLI runs the shell command inside `!{...}` and inlines its output into the prompt before sending it to the model.
|
|
35
|
-
- `description` is optional but shows up when you run `/help` in an interactive session.
|
|
36
|
-
|
|
37
|
-
## Step 3: Use the Command
|
|
38
|
-
|
|
39
|
-
Start Gemini CLI in any project that has staged git changes:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
cd your-project
|
|
43
|
-
git add -A # or stage specific files
|
|
44
|
-
gemini
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Then in the interactive session, type:
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
/commit
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Gemini will execute `git diff --cached`, include the diff in the prompt, and return a conventional commit message.
|
|
54
|
-
|
|
55
|
-
## Namespaced Alternative
|
|
56
|
-
|
|
57
|
-
If you prefer a namespaced command like `/git:commit`, use a subdirectory:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
mkdir -p ~/.gemini/commands/git
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Create `~/.gemini/commands/git/commit.toml`:
|
|
64
|
-
|
|
65
|
-
```toml
|
|
66
|
-
description = "Generate a commit message from staged changes"
|
|
67
|
-
prompt = """
|
|
68
|
-
Write a concise conventional commit message for the following staged changes.
|
|
69
|
-
|
|
70
|
-
Use the format: <type>(<scope>): <description>
|
|
71
|
-
|
|
72
|
-
Where type is one of: feat, fix, docs, style, refactor, test, chore
|
|
73
|
-
|
|
74
|
-
Only output the commit message itself, nothing else.
|
|
75
|
-
|
|
76
|
-
Staged diff:
|
|
77
|
-
!{git diff --cached}
|
|
78
|
-
"""
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Then invoke it with:
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
/git:commit
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Using It with Arguments
|
|
88
|
-
|
|
89
|
-
You can also make the command accept arguments with `{{args}}` to allow the user to pass additional context:
|
|
90
|
-
|
|
91
|
-
```toml
|
|
92
|
-
description = "Generate a commit message from staged changes with optional context"
|
|
93
|
-
prompt = """
|
|
94
|
-
Write a concise conventional commit message for the following staged changes.
|
|
95
|
-
|
|
96
|
-
Use the format: <type>(<scope>): <description>
|
|
97
|
-
|
|
98
|
-
Where type is one of: feat, fix, docs, style, refactor, test, chore
|
|
99
|
-
|
|
100
|
-
Additional context from the user: {{args}}
|
|
101
|
-
|
|
102
|
-
Only output the commit message itself, nothing else.
|
|
103
|
-
|
|
104
|
-
Staged diff:
|
|
105
|
-
!{git diff --cached}
|
|
106
|
-
"""
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
This lets you provide extra hints:
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
/commit focus on the auth refactoring
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Fully Automated Shell Script (Bonus)
|
|
116
|
-
|
|
117
|
-
If you want to go beyond interactive mode and automate the entire commit flow from your shell, you can create a shell script. Note that custom slash commands currently do **not** work in headless mode (`-p` flag), so for automation you need to embed the prompt directly:
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
#!/bin/bash
|
|
121
|
-
# Save as ~/bin/ai-commit or anywhere on your PATH
|
|
122
|
-
|
|
123
|
-
DIFF=$(git diff --cached)
|
|
124
|
-
|
|
125
|
-
if [ -z "$DIFF" ]; then
|
|
126
|
-
echo "Error: Nothing staged. Run 'git add' first."
|
|
127
|
-
exit 1
|
|
128
|
-
fi
|
|
129
|
-
|
|
130
|
-
MSG=$(echo "$DIFF" | gemini -p "Write a concise conventional commit message (type(scope): description format, max 72 chars). Only output the message, nothing else." --output-format json | jq -r '.response')
|
|
131
|
-
|
|
132
|
-
if [ -z "$MSG" ]; then
|
|
133
|
-
echo "Error: Failed to generate commit message."
|
|
134
|
-
exit 1
|
|
135
|
-
fi
|
|
136
|
-
|
|
137
|
-
echo "Proposed commit message:"
|
|
138
|
-
echo " $MSG"
|
|
139
|
-
echo ""
|
|
140
|
-
read -p "Commit with this message? [y/N] " confirm
|
|
141
|
-
|
|
142
|
-
if [[ "$confirm" =~ ^[Yy]$ ]]; then
|
|
143
|
-
git commit -m "$MSG"
|
|
144
|
-
echo "Committed."
|
|
145
|
-
else
|
|
146
|
-
echo "Aborted."
|
|
147
|
-
fi
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Make it executable:
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
chmod +x ~/bin/ai-commit
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
Then use it from any project:
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
git add -A
|
|
160
|
-
ai-commit
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
## Summary of File Locations
|
|
164
|
-
|
|
165
|
-
| Path | Scope | Invocation |
|
|
166
|
-
|---|---|---|
|
|
167
|
-
| `~/.gemini/commands/commit.toml` | Global (all projects) | `/commit` |
|
|
168
|
-
| `~/.gemini/commands/git/commit.toml` | Global, namespaced | `/git:commit` |
|
|
169
|
-
| `<project>/.gemini/commands/commit.toml` | Project only | `/commit` |
|
|
170
|
-
|
|
171
|
-
The global location (`~/.gemini/commands/`) is what makes the command available across all your projects without any per-project setup.
|
package/gemini-cli-workspace/iteration-1/eval-3-custom-slash-command/without_skill/grading.json
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"eval_id": 3,
|
|
3
|
-
"eval_name": "custom-slash-command",
|
|
4
|
-
"configuration": "without_skill",
|
|
5
|
-
"expectations": [
|
|
6
|
-
{
|
|
7
|
-
"text": "Points to ~/.gemini/commands/ for global user-scoped commands",
|
|
8
|
-
"passed": false,
|
|
9
|
-
"evidence": "Points to `~/.gemini/extensions/commit-message/` instead. Does not know about the commands/ directory or .toml approach."
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"text": "Shows .toml file format with prompt field",
|
|
13
|
-
"passed": false,
|
|
14
|
-
"evidence": "Uses gemini_extension.json manifest with commands array instead of .toml format"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"text": "Uses !{git diff --cached} shell execution syntax in the prompt",
|
|
18
|
-
"passed": false,
|
|
19
|
-
"evidence": "Creates a separate shell script to execute git diff. Does not know about the !{...} inline shell execution syntax."
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"text": "Warns that custom slash commands don't work in headless/non-interactive mode",
|
|
23
|
-
"passed": false,
|
|
24
|
-
"evidence": "No mention of headless mode limitation for slash commands"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"text": "Provides a complete, copy-pasteable .toml file example",
|
|
28
|
-
"passed": false,
|
|
29
|
-
"evidence": "Provides a complete extension example, but it uses the wrong mechanism entirely (extensions vs custom commands)"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
# Creating a Custom Slash Command in Gemini CLI for Commit Messages
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Gemini CLI supports custom slash commands through its extensions system. To make a command available across all your projects, you place it in the global configuration directory at `~/.gemini/extensions/`. Extensions are defined using `gemini_extension.json` manifest files that describe the command and its behavior.
|
|
6
|
-
|
|
7
|
-
## Step-by-Step Setup
|
|
8
|
-
|
|
9
|
-
### 1. Create the Global Extensions Directory
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
mkdir -p ~/.gemini/extensions/commit-message
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### 2. Create the Shell Script
|
|
16
|
-
|
|
17
|
-
Create `~/.gemini/extensions/commit-message/generate-commit-msg.sh`:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
#!/bin/bash
|
|
21
|
-
# generate-commit-msg.sh
|
|
22
|
-
# Gets the staged diff and outputs it for the AI to process
|
|
23
|
-
|
|
24
|
-
DIFF=$(git diff --cached)
|
|
25
|
-
|
|
26
|
-
if [ -z "$DIFF" ]; then
|
|
27
|
-
echo "ERROR: No staged changes found. Stage your changes with 'git add' first."
|
|
28
|
-
exit 1
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
echo "Here is the staged git diff:"
|
|
32
|
-
echo ""
|
|
33
|
-
echo '```diff'
|
|
34
|
-
echo "$DIFF"
|
|
35
|
-
echo '```'
|
|
36
|
-
echo ""
|
|
37
|
-
echo "Please write a concise, conventional commit message for these changes."
|
|
38
|
-
echo "Follow the Conventional Commits format: type(scope): description"
|
|
39
|
-
echo ""
|
|
40
|
-
echo "Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore"
|
|
41
|
-
echo ""
|
|
42
|
-
echo "Provide:"
|
|
43
|
-
echo "1. A single-line subject (max 72 chars)"
|
|
44
|
-
echo "2. A blank line"
|
|
45
|
-
echo "3. An optional body explaining the 'why' behind the changes"
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Make it executable:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
chmod +x ~/.gemini/extensions/commit-message/generate-commit-msg.sh
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### 3. Create the Extension Manifest
|
|
55
|
-
|
|
56
|
-
Create `~/.gemini/extensions/commit-message/gemini_extension.json`:
|
|
57
|
-
|
|
58
|
-
```json
|
|
59
|
-
{
|
|
60
|
-
"name": "commit-message",
|
|
61
|
-
"description": "Generate a commit message from staged changes using git diff --cached",
|
|
62
|
-
"version": "1.0.0",
|
|
63
|
-
"commands": [
|
|
64
|
-
{
|
|
65
|
-
"name": "commit-msg",
|
|
66
|
-
"description": "Analyze staged git changes and generate a conventional commit message",
|
|
67
|
-
"action": {
|
|
68
|
-
"type": "shell",
|
|
69
|
-
"command": "~/.gemini/extensions/commit-message/generate-commit-msg.sh"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### 4. Usage
|
|
77
|
-
|
|
78
|
-
Once configured, open Gemini CLI in any project and type:
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
/commit-msg
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
The command will:
|
|
85
|
-
1. Run `git diff --cached` to capture your staged changes
|
|
86
|
-
2. Pass the diff output into the conversation context
|
|
87
|
-
3. Ask Gemini to generate a conventional commit message based on the diff
|
|
88
|
-
|
|
89
|
-
## Alternative Approach: Using GEMINI.md with a Prompt-Based Workflow
|
|
90
|
-
|
|
91
|
-
If extensions are not behaving as expected in your version of Gemini CLI, you can achieve a similar result using a global `GEMINI.md` instruction file combined with a simple shell alias.
|
|
92
|
-
|
|
93
|
-
### 1. Create a Global GEMINI.md
|
|
94
|
-
|
|
95
|
-
Create or edit `~/.gemini/GEMINI.md`:
|
|
96
|
-
|
|
97
|
-
```markdown
|
|
98
|
-
# Custom Commands
|
|
99
|
-
|
|
100
|
-
## Commit Message Generation
|
|
101
|
-
|
|
102
|
-
When I say "generate commit message" or provide a git diff, follow these rules:
|
|
103
|
-
|
|
104
|
-
1. Analyze the diff carefully
|
|
105
|
-
2. Write a commit message in Conventional Commits format
|
|
106
|
-
3. Use the format: type(scope): short description
|
|
107
|
-
4. Include a body if the changes are complex
|
|
108
|
-
5. Keep the subject line under 72 characters
|
|
109
|
-
6. Use imperative mood ("add feature" not "added feature")
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### 2. Create a Shell Helper Script
|
|
113
|
-
|
|
114
|
-
Add to your `~/.bashrc` or `~/.zshrc`:
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
# Gemini CLI commit message helper
|
|
118
|
-
gcm() {
|
|
119
|
-
local diff
|
|
120
|
-
diff=$(git diff --cached)
|
|
121
|
-
|
|
122
|
-
if [ -z "$diff" ]; then
|
|
123
|
-
echo "No staged changes. Use 'git add' to stage files first."
|
|
124
|
-
return 1
|
|
125
|
-
fi
|
|
126
|
-
|
|
127
|
-
echo "Staged diff:"
|
|
128
|
-
echo '```diff'
|
|
129
|
-
echo "$diff"
|
|
130
|
-
echo '```'
|
|
131
|
-
echo ""
|
|
132
|
-
echo "Generate a conventional commit message for the above changes."
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Then in Gemini CLI, you can run:
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
@run gcm
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Or pipe the output directly:
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
# From your regular terminal, pipe into gemini
|
|
146
|
-
gcm | gemini
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
## Alternative Approach: Inline Tool Use
|
|
150
|
-
|
|
151
|
-
Gemini CLI allows you to invoke shell commands inline. You can simply type within a Gemini CLI session:
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
Please run `git diff --cached` and write me a commit message based on the output.
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
Since Gemini CLI has the ability to execute shell commands (with your approval), it will run the diff, read the output, and generate a commit message. This requires no configuration at all, but it is a manual process each time rather than a single slash command.
|
|
158
|
-
|
|
159
|
-
## Applying the Generated Commit Message
|
|
160
|
-
|
|
161
|
-
Once Gemini generates a commit message you like, you can apply it directly:
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
git commit -m "feat(auth): add OAuth2 token refresh logic
|
|
165
|
-
|
|
166
|
-
Implement automatic token refresh when access tokens expire.
|
|
167
|
-
Uses refresh token rotation for improved security."
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
Or ask Gemini CLI to run the commit for you:
|
|
171
|
-
|
|
172
|
-
```
|
|
173
|
-
Please commit with that message.
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
## Directory Structure Summary
|
|
177
|
-
|
|
178
|
-
```
|
|
179
|
-
~/.gemini/
|
|
180
|
-
GEMINI.md # Global instructions (optional)
|
|
181
|
-
extensions/
|
|
182
|
-
commit-message/
|
|
183
|
-
gemini_extension.json # Extension manifest
|
|
184
|
-
generate-commit-msg.sh # Shell script for the command
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## Tips
|
|
188
|
-
|
|
189
|
-
- **Scope control**: Placing extensions in `~/.gemini/extensions/` makes them global. For project-specific commands, place them in `.gemini/extensions/` within the project root.
|
|
190
|
-
- **Customizing the prompt**: Edit the echo statements at the end of `generate-commit-msg.sh` to adjust the instructions given to the AI (e.g., require a specific commit style, add ticket number references, etc.).
|
|
191
|
-
- **Large diffs**: If the staged diff is very large, consider truncating it or summarizing file-level changes to stay within context limits. You can modify the script to include `--stat` output alongside a truncated diff.
|
|
192
|
-
- **Security**: The shell script only reads data (via `git diff --cached`). It does not modify your repository or make commits on its own.
|
|
193
|
-
|
|
194
|
-
## Troubleshooting
|
|
195
|
-
|
|
196
|
-
- **"Command not found"**: Make sure the shell script is executable (`chmod +x`) and the path in `gemini_extension.json` is correct.
|
|
197
|
-
- **"No staged changes"**: Run `git add <files>` before invoking the command.
|
|
198
|
-
- **Extension not loading**: Verify the JSON manifest is valid (`cat ~/.gemini/extensions/commit-message/gemini_extension.json | python3 -m json.tool`) and restart Gemini CLI.
|
|
199
|
-
- **Path issues on Windows**: Use forward slashes or the `%USERPROFILE%` equivalent in paths. The extensions directory would be at `%USERPROFILE%\.gemini\extensions\`.
|