2 Commits

Author SHA1 Message Date
Steph Ango caf3e98cd2 Plugin: Add a Gemini CLI extension built as a release archive
Gemini CLI only reads skills from a root skills/ folder, and a symlink
there breaks because it copies the clone with fs.cp, which points the
link at a temp folder it then deletes. The manifest lives in
plugins/obsidian/ instead, and a workflow attaches an archive with real
copies of the skills to each published release, where Gemini installs
from.
2026-11-16 12:53:24 -08:00
Steph Ango 398127736b 1.2.0 2026-11-11 08:12:33 -08:00
6 changed files with 68 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
name: Gemini release archive
on:
release:
types: [published]
permissions:
contents: write
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}
- name: Check the manifest version matches the tag
env:
TAG: ${{ github.event.release.tag_name }}
run: |
version="$(jq -r .version plugins/obsidian/gemini-extension.json)"
if [[ "$version" != "${TAG#v}" ]]; then
echo "gemini-extension.json is $version but the release tag is $TAG" >&2
exit 1
fi
- run: ./scripts/package-gemini.sh dist/obsidian-gemini.tar.gz
- name: Attach the archive to the release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$TAG" dist/obsidian-gemini.tar.gz --clobber
+1
View File
@@ -0,0 +1 @@
dist/
+8
View File
@@ -46,6 +46,12 @@ To use ssh instead, if you have a GitHub SSH key set up:
npx skills add git@github.com:obsidianmd/obsidian-skills.git npx skills add git@github.com:obsidianmd/obsidian-skills.git
``` ```
### Gemini CLI
```sh
gemini extensions install https://github.com/obsidianmd/obsidian-skills
```
### Manually ### Manually
#### Claude Code #### Claude Code
@@ -78,6 +84,8 @@ Update the plugin version in every manifest with:
The script also accepts `major`, `minor`, or an explicit version like `1.1.0`. The script also accepts `major`, `minor`, or an explicit version like `1.1.0`.
Gemini CLI installs from the latest GitHub release, so publish a release for each version, tagged with the version number. The `Gemini release archive` workflow then attaches `obsidian-gemini.tar.gz`, which has real copies of the skills. Don't attach other files to a release, because Gemini CLI only picks a file when there's exactly one; otherwise it falls back to the source archive, which has no Gemini manifest. To build the archive locally, run `./scripts/package-gemini.sh`.
## Skills ## Skills
| Skill | Description | | Skill | Description |
+5
View File
@@ -0,0 +1,5 @@
{
"name": "obsidian",
"version": "1.2.0",
"description": "Work with local Obsidian vaults using the Obsidian CLI and skills for Markdown, Bases, Canvas, Sync and Publish, web extraction, and templates."
}
+1
View File
@@ -12,6 +12,7 @@ files=(
"plugins/obsidian/plugin.json" "plugins/obsidian/plugin.json"
"plugins/obsidian/.claude-plugin/plugin.json" "plugins/obsidian/.claude-plugin/plugin.json"
"plugins/obsidian/.cursor-plugin/plugin.json" "plugins/obsidian/.cursor-plugin/plugin.json"
"plugins/obsidian/gemini-extension.json"
".claude-plugin/marketplace.json" ".claude-plugin/marketplace.json"
) )
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
out="${1:-dist/obsidian-gemini.tar.gz}"
plugin="plugins/obsidian"
stage="$(mktemp -d)"
trap 'rm -rf "$stage"' EXIT
cp "$plugin/gemini-extension.json" "$plugin/LICENSE" "$stage/"
# Gemini copies an installed extension with fs.cp, which breaks symlinks, so the archive needs real files.
cp -RL "$plugin/skills" "$stage/skills"
mkdir -p "$(dirname "$out")"
tar -czf "$out" -C "$stage" gemini-extension.json LICENSE skills
echo "Wrote $out"