Edit plugin

From digital-stoic-org/agent-skills · View interactive version

Edit plugin is an AI agent skill from the GitHub repository digital-stoic-org/agent-skills. Automates agent-skills plugin version bumps and release metadata. Use when: adding/removing/updating skills or commands, bumping plugin version, preparing a release. Triggers: bump version, edit plugin, update plugin, release, version bump, new skill added, new command added.

How to use this skill

Skill file

Edit Plugin

Resolve → Detect → Version → Update → Review

⚠️ AskUserQuestion Guard

CRITICAL: After EVERY AskUserQuestion call, check if answers are empty/blank. Known Claude Code bug: outside Plan Mode, AskUserQuestion silently returns empty answers without showing UI.

If answers are empty: DO NOT proceed with assumptions. Instead:

  1. Output: "⚠️ Questions didn't display (known Claude Code bug outside Plan Mode)."
  2. Present the options as a numbered text list and ask user to reply with their choice number.
  3. WAIT for user reply before continuing.

0. Resolve Plugin

Determine PLUGIN_DIR (relative to repo root, e.g. dstoic, biz, gtd):

  1. From $ARGUMENTS: If first arg matches a dir with .claude-plugin/plugin.json → use it
  2. From cwd: Walk up from cwd, find nearest .claude-plugin/plugin.json → derive plugin name from parent dir
  3. Ambiguous/not found: AskUserQuestion listing discovered plugins (dirs containing .claude-plugin/plugin.json)

Read current version from ${PLUGIN_DIR}/.claude-plugin/plugin.json.

1. Detect Changes

${CLAUDE_PLUGIN_ROOT}/skills/edit-plugin/scripts/detect-changes.sh <repo-root> <plugin-dir>

If no changes detected, ask user what to include.

2. Version Bump

Auto-detect from changes:

User override via $ARGUMENTS (e.g., biz minor "Add ux-strategize").

${CLAUDE_PLUGIN_ROOT}/skills/edit-plugin/scripts/bump-version.sh <current-version> <patch|minor>

3. Update Version (all files)

Atomic — never partially update. Two tiers:

Required: ${PLUGIN_DIR}/.claude-plugin/plugin.json — always update.

Discovered: Grep repo root for old version string. Filter results:

Present discovered file list to user before updating. Use Edit tool: old version → new version.

See reference.md for version patterns.

4. Update Counts (if skills/commands added/removed)

Skip this step if no adds/removes in detected changes.

Grep repo for count patterns (N skills, N commands, N hooks) in files referencing ${PLUGIN_DIR}. Update only matching files. See reference.md for count patterns.

5. Review

Show summary: version change, changes list, files updated. WAIT for user confirmation before git ops.

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.