diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json new file mode 100644 index 0000000..c33b24e --- /dev/null +++ b/.agents/plugins/marketplace.json @@ -0,0 +1,20 @@ +{ + "name": "obsidian-skills", + "interface": { + "displayName": "Obsidian Skills" + }, + "plugins": [ + { + "name": "obsidian", + "source": { + "source": "local", + "path": "./plugins/obsidian" + }, + "policy": { + "installation": "AVAILABLE", + "authentication": "ON_INSTALL" + }, + "category": "Productivity" + } + ] +} diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index dedd0e5..02a68da 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -8,7 +8,7 @@ "plugins": [ { "name": "obsidian", - "source": "./", + "source": "./plugins/obsidian", "description": "Claude Skills for Obsidian", "version": "1.1.0" } diff --git a/README.md b/README.md index 74a0ceb..a9b6288 100644 --- a/README.md +++ b/README.md @@ -4,24 +4,41 @@ These skills follow the [Agent Skills specification](https://agentskills.io/spec ## Installation -### Marketplace +### Claude Code marketplace +From terminal: + +```sh +claude plugin marketplace add kepano/obsidian-skills +claude plugin install obsidian@obsidian-skills ``` + +From within a Claude Code session: + +```sh /plugin marketplace add kepano/obsidian-skills /plugin install obsidian@obsidian-skills ``` To get new skills later, run `claude plugin update obsidian@obsidian-skills`. +### Codex marketplace + +```sh +codex plugin marketplace add kepano/obsidian-skills +``` + +Then install Obsidian from the plugin directory in Codex or the ChatGPT desktop app. + ### npx skills -``` +```sh npx skills add git@github.com:kepano/obsidian-skills.git ``` Instead of ssh, if you prefer to use https: -``` +```sh npx skills add https://github.com/kepano/obsidian-skills ``` @@ -33,7 +50,7 @@ Add the contents of this repo to a `/.claude` folder in the root of your Obsidia #### Codex -Copy the `skills/` directory into your Codex skills path (typically `~/.codex/skills`). See the [Agent Skills specification](https://agentskills.io/specification) for the standard skill format. +Copy the `plugins/obsidian/skills/` directory into your Codex skills path (typically `~/.agents/skills`). See the [Agent Skills specification](https://agentskills.io/specification) for the standard skill format. #### OpenCode @@ -47,13 +64,23 @@ Do not copy only the inner `skills/` folder — clone the full repo so the direc OpenCode auto-discovers all `SKILL.md` files under `~/.opencode/skills/`. No changes to `opencode.json` or any config file are needed. Skills become available after restarting OpenCode. +## Release maintenance + +Update the plugin version across Claude and Codex metadata with: + +```sh +./scripts/bump-version.sh patch +``` + +The script also accepts `major`, `minor`, or an explicit version like `1.1.0`. + ## Skills -| Skill | Description | -| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [obsidian-markdown](skills/obsidian-markdown) | Create and edit [Obsidian Flavored Markdown](https://help.obsidian.md/obsidian-flavored-markdown) (`.md`) with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax | -| [obsidian-bases](skills/obsidian-bases) | Create and edit [Obsidian Bases](https://help.obsidian.md/bases/syntax) (`.base`) with views, filters, formulas, and summaries | -| [json-canvas](skills/json-canvas) | Create and edit [JSON Canvas](https://jsoncanvas.org/) files (`.canvas`) with nodes, edges, groups, and connections | -| [obsidian-cli](skills/obsidian-cli) | Interact with Obsidian vaults via the [Obsidian CLI](https://help.obsidian.md/cli) including plugin and theme development | -| [defuddle](skills/defuddle) | Extract clean markdown from web pages using [Defuddle](https://github.com/kepano/defuddle), removing clutter to save tokens | -| [knap](skills/knap) | Render Markdown templates from JSON or CSV data using [Knap](https://github.com/obsidianmd/knap), including batch file generation | +| Skill | Description | +| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [obsidian-markdown](plugins/obsidian/skills/obsidian-markdown) | Create and edit [Obsidian Flavored Markdown](https://help.obsidian.md/obsidian-flavored-markdown) (`.md`) with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax | +| [obsidian-bases](plugins/obsidian/skills/obsidian-bases) | Create and edit [Obsidian Bases](https://help.obsidian.md/bases/syntax) (`.base`) with views, filters, formulas, and summaries | +| [json-canvas](plugins/obsidian/skills/json-canvas) | Create and edit [JSON Canvas](https://jsoncanvas.org/) files (`.canvas`) with nodes, edges, groups, and connections | +| [obsidian-cli](plugins/obsidian/skills/obsidian-cli) | Interact with Obsidian vaults via the [Obsidian CLI](https://help.obsidian.md/cli) including plugin and theme development | +| [defuddle](plugins/obsidian/skills/defuddle) | Extract clean markdown from web pages using [Defuddle](https://github.com/kepano/defuddle), removing clutter to save tokens | +| [knap](plugins/obsidian/skills/knap) | Render Markdown templates from JSON or CSV data using [Knap](https://github.com/obsidianmd/knap), including batch file generation | diff --git a/.claude-plugin/plugin.json b/plugins/obsidian/.claude-plugin/plugin.json similarity index 100% rename from .claude-plugin/plugin.json rename to plugins/obsidian/.claude-plugin/plugin.json diff --git a/plugins/obsidian/.codex-plugin/plugin.json b/plugins/obsidian/.codex-plugin/plugin.json new file mode 100644 index 0000000..882599d --- /dev/null +++ b/plugins/obsidian/.codex-plugin/plugin.json @@ -0,0 +1,30 @@ +{ + "name": "obsidian", + "version": "1.0.3", + "description": "Create and edit Obsidian vault files including Markdown, Bases, and Canvas.", + "author": { + "name": "Steph Ango", + "url": "https://stephango.com/" + }, + "homepage": "https://github.com/kepano/obsidian-skills", + "repository": "https://github.com/kepano/obsidian-skills", + "license": "MIT", + "keywords": ["obsidian", "markdown", "bases", "canvas", "pkm", "notes"], + "skills": "./skills/", + "interface": { + "displayName": "Obsidian", + "shortDescription": "Skills for working with Obsidian vaults", + "longDescription": "Create and edit Obsidian Markdown, Bases, and Canvas files, interact with vaults through the Obsidian CLI, and extract clean Markdown from web pages.", + "developerName": "kepano", + "category": "Productivity", + "capabilities": ["Write", "Review", "Automation"], + "defaultPrompt": [ + "Create an Obsidian note with valid properties and wikilinks.", + "Build an Obsidian Base for these notes.", + "Inspect and update this Obsidian vault." + ], + "brandColor": "#7852EE", + "composerIcon": "./assets/obsidian-logo-gradient.svg", + "logo": "./assets/obsidian-logo-gradient.svg" + } +} diff --git a/plugins/obsidian/assets/obsidian-logo-gradient.svg b/plugins/obsidian/assets/obsidian-logo-gradient.svg new file mode 100644 index 0000000..a594038 --- /dev/null +++ b/plugins/obsidian/assets/obsidian-logo-gradient.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/skills/defuddle/SKILL.md b/plugins/obsidian/skills/defuddle/SKILL.md similarity index 100% rename from skills/defuddle/SKILL.md rename to plugins/obsidian/skills/defuddle/SKILL.md diff --git a/skills/json-canvas/SKILL.md b/plugins/obsidian/skills/json-canvas/SKILL.md similarity index 100% rename from skills/json-canvas/SKILL.md rename to plugins/obsidian/skills/json-canvas/SKILL.md diff --git a/skills/json-canvas/references/EXAMPLES.md b/plugins/obsidian/skills/json-canvas/references/EXAMPLES.md similarity index 100% rename from skills/json-canvas/references/EXAMPLES.md rename to plugins/obsidian/skills/json-canvas/references/EXAMPLES.md diff --git a/skills/knap/SKILL.md b/plugins/obsidian/skills/knap/SKILL.md similarity index 100% rename from skills/knap/SKILL.md rename to plugins/obsidian/skills/knap/SKILL.md diff --git a/skills/obsidian-bases/SKILL.md b/plugins/obsidian/skills/obsidian-bases/SKILL.md similarity index 100% rename from skills/obsidian-bases/SKILL.md rename to plugins/obsidian/skills/obsidian-bases/SKILL.md diff --git a/skills/obsidian-bases/references/FUNCTIONS_REFERENCE.md b/plugins/obsidian/skills/obsidian-bases/references/FUNCTIONS_REFERENCE.md similarity index 100% rename from skills/obsidian-bases/references/FUNCTIONS_REFERENCE.md rename to plugins/obsidian/skills/obsidian-bases/references/FUNCTIONS_REFERENCE.md diff --git a/skills/obsidian-cli/SKILL.md b/plugins/obsidian/skills/obsidian-cli/SKILL.md similarity index 100% rename from skills/obsidian-cli/SKILL.md rename to plugins/obsidian/skills/obsidian-cli/SKILL.md diff --git a/skills/obsidian-markdown/SKILL.md b/plugins/obsidian/skills/obsidian-markdown/SKILL.md similarity index 100% rename from skills/obsidian-markdown/SKILL.md rename to plugins/obsidian/skills/obsidian-markdown/SKILL.md diff --git a/skills/obsidian-markdown/references/CALLOUTS.md b/plugins/obsidian/skills/obsidian-markdown/references/CALLOUTS.md similarity index 100% rename from skills/obsidian-markdown/references/CALLOUTS.md rename to plugins/obsidian/skills/obsidian-markdown/references/CALLOUTS.md diff --git a/skills/obsidian-markdown/references/EMBEDS.md b/plugins/obsidian/skills/obsidian-markdown/references/EMBEDS.md similarity index 100% rename from skills/obsidian-markdown/references/EMBEDS.md rename to plugins/obsidian/skills/obsidian-markdown/references/EMBEDS.md diff --git a/skills/obsidian-markdown/references/PROPERTIES.md b/plugins/obsidian/skills/obsidian-markdown/references/PROPERTIES.md similarity index 100% rename from skills/obsidian-markdown/references/PROPERTIES.md rename to plugins/obsidian/skills/obsidian-markdown/references/PROPERTIES.md diff --git a/scripts/bump.sh b/scripts/bump.sh new file mode 100755 index 0000000..48da39e --- /dev/null +++ b/scripts/bump.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [[ $# -ne 1 ]]; then + echo "Usage: $0 " >&2 + exit 1 +fi + +files=( + "plugins/obsidian/.claude-plugin/plugin.json" + "plugins/obsidian/.codex-plugin/plugin.json" + ".claude-plugin/marketplace.json" +) + +current_version="$(sed -nE 's/^[[:space:]]*"version": "([0-9]+\.[0-9]+\.[0-9]+)".*/\1/p' "${files[0]}" | head -n 1)" +IFS=. read -r major minor patch <<< "$current_version" + +case "$1" in + major) new_version="$((major + 1)).0.0" ;; + minor) new_version="$major.$((minor + 1)).0" ;; + patch) new_version="$major.$minor.$((patch + 1))" ;; + [0-9]*.[0-9]*.[0-9]*) new_version="$1" ;; + *) + echo "Usage: $0 " >&2 + exit 1 + ;; +esac + +for file in "${files[@]}"; do + perl -0pi -e "s/\"version\": \"[0-9]+\\.[0-9]+\\.[0-9]+\"/\"version\": \"$new_version\"/" "$file" +done + +echo "Updated version: $current_version -> $new_version"