From f963a8f3881969db72d9eb1dd6646d34699834a6 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Thu, 19 Mar 2026 14:22:56 -0500 Subject: [PATCH 1/2] refactor: convert json-pretty format skill to a command Move from skills/ to commands/ so it shows as /json-pretty:format in the autocomplete menu with the plugin name prefix. Move the script to scripts/ to match command-based plugin conventions. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../{skills/format/SKILL.md => commands/format.md} | 8 ++++---- .../json-pretty/{skills/format => scripts}/json-pretty.py | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename plugins/json-pretty/{skills/format/SKILL.md => commands/format.md} (85%) rename plugins/json-pretty/{skills/format => scripts}/json-pretty.py (100%) diff --git a/plugins/json-pretty/skills/format/SKILL.md b/plugins/json-pretty/commands/format.md similarity index 85% rename from plugins/json-pretty/skills/format/SKILL.md rename to plugins/json-pretty/commands/format.md index 3affc05..89a5f9f 100644 --- a/plugins/json-pretty/skills/format/SKILL.md +++ b/plugins/json-pretty/commands/format.md @@ -1,6 +1,6 @@ --- -name: format -description: Format, validate, or minify JSON without external online services +description: "Format, validate, or minify JSON without external online services" +allowed-tools: Bash --- ## When to Use @@ -15,9 +15,9 @@ Use when the user asks to: ## Tool Location -`~/.claude/skills/json-pretty/json-pretty.py` +`${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py` -Symlinked to `~/.local/bin/json-pretty` for PATH access. +Also symlinked to `~/.local/bin/json-pretty` for PATH access. ## Usage diff --git a/plugins/json-pretty/skills/format/json-pretty.py b/plugins/json-pretty/scripts/json-pretty.py similarity index 100% rename from plugins/json-pretty/skills/format/json-pretty.py rename to plugins/json-pretty/scripts/json-pretty.py From 9a227204fd76aa1ede92e56020f96736adf38108 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Thu, 19 Mar 2026 14:23:40 -0500 Subject: [PATCH 2/2] fix: remove symlink reference, use CLAUDE_PLUGIN_ROOT paths directly The symlink to ~/.local/bin is no longer needed since the command can reference the script via ${CLAUDE_PLUGIN_ROOT}/scripts/. Co-Authored-By: Claude Opus 4.6 (1M context) --- plugins/json-pretty/commands/format.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/plugins/json-pretty/commands/format.md b/plugins/json-pretty/commands/format.md index 89a5f9f..193b558 100644 --- a/plugins/json-pretty/commands/format.md +++ b/plugins/json-pretty/commands/format.md @@ -17,25 +17,23 @@ Use when the user asks to: `${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py` -Also symlinked to `~/.local/bin/json-pretty` for PATH access. - ## Usage ```bash # From file -json-pretty input.json +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py input.json # From stdin/pipe -cat data.json | json-pretty -echo '{"foo":"bar"}' | json-pretty +cat data.json | python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py +echo '{"foo":"bar"}' | python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py # Save to file -json-pretty input.json -o output.json +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py input.json -o output.json # Options -json-pretty input.json --indent 4 # Custom indentation -json-pretty input.json --sort-keys # Sort object keys -json-pretty input.json --compact # Minify instead of prettify +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py input.json --indent 4 # Custom indentation +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py input.json --sort-keys # Sort object keys +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py input.json --compact # Minify instead of prettify ``` ## Options @@ -49,17 +47,17 @@ json-pretty input.json --compact # Minify instead of prettify **Prettify inline JSON:** ```bash -echo '{"name":"cal","items":[1,2,3]}' | json-pretty +echo '{"name":"cal","items":[1,2,3]}' | python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py ``` **Format a file:** ```bash -json-pretty messy.json -o clean.json +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py messy.json -o clean.json ``` **Sort keys and use 4-space indent:** ```bash -json-pretty data.json --indent 4 --sort-keys +python3 ${CLAUDE_PLUGIN_ROOT}/scripts/json-pretty.py data.json --indent 4 --sort-keys ``` ## Privacy Note