---
name: wise-skills-edit
description: >-
  Edit an existing wise plugin skill by delegating to Claude Code's
  skill-creator skill with the existing SKILL.md as the target and the
  wise plugin conventions as guardrails. Locates the skill under
  `plugins/wise/skills/`. Refuses the `wise` natural-language helper
  (editing it changes the plugin's discovery surface and must be done
  in a normal Claude Code session with full repo context). Only
  runnable from inside a checkout of the wise-claude marketplace
  repo. Invoked as `/wise-skills-edit` (bare alias) or
  `/wise:wise-skills-edit` (canonical). Use when the user says "edit a
  skill", "update a skill", "modify a skill", "change a skill", or
  types `/wise-skills-edit`.
argument-hint: "<skill-name>"
allowed-tools: Read, Skill, Bash(test:*), Bash(git:*), Bash(pwd:*), Bash(cat:*), Bash(grep:*), Bash(ls:*)
---

# /wise-skills-edit — modify an existing wise plugin skill

Before asking any user question, read and follow the
[question lifecycle](../../references/workflow-host-control.md#keep-asynchronous-questions-open).
Keep asynchronous prompts open until answered; this rule does not authorize
questions in autonomous or otherwise prompt-free procedures.

## Why this skill exists

Companion to `/wise-skills-create`. When an existing skill's
description, argument-hint, `allowed-tools`, or body needs to change,
this skill delegates to `skill-creator` with the existing SKILL.md
as the target and the same wise conventions in the briefing. The user
is walked through an edit wizard rather than having to hand-edit
the file.

Like `/wise-skills-create`, this is only runnable from inside a
checkout of the `wise-claude` marketplace repo.

The **`wise` natural-language helper** (`plugins/wise/skills/wise/SKILL.md`)
is refused — editing it changes the plugin's discovery surface and
must be done in a normal Claude Code session with full repo context,
not through this wizard.

## Arguments

Read `$ARGUMENTS`. The first whitespace-separated token is the
`<skill-name>`. When `$ARGUMENTS` is empty, stop with an error
pointing at the expected form (`/wise-skills-edit <skill-name>`).

- `skill-name` (string, required) — the directory name of the skill
  to edit under `plugins/wise/skills/`. Must not equal `wise` (the
  natural-language helper).

## Procedure

### 1. Parse the arguments

Read `$ARGUMENTS` directly. The first whitespace-separated token is
`skill-name`. Trim whitespace.

### 2. Semantic validation

Reject malformed values:

- Placeholder-looking strings: angle-bracketed (`<skill-name>`),
  shell variable (`$X`), curly-bracketed (`{x}`), literal `TODO` /
  `FIXME` / `...` / `?`.
- Not kebab-case: contains spaces, uppercase, leading/trailing
  dashes, or characters outside `[a-z0-9-]`.
- Literal value `wise` — refuse with the helper-protection message:

  ```
  /wise-skills-edit wise is not supported. The `wise` skill is the
  plugin's natural-language discovery helper; editing it through a
  wizard risks breaking user discovery.

  To modify the `wise` skill, open the marketplace repo in a regular
  Claude Code session and edit plugins/wise/skills/wise/SKILL.md
  directly.
  ```

On any other failure, emit a one-line error and stop:

```
"<value>" is not a valid skill name. Use kebab-case (lowercase
letters, digits, hyphens). Example:
  /wise-skills-edit wise-pr-create
```

### 3. Marketplace-repo guard

Same check as `/wise-skills-create` step 3. Find the git working-tree
root via `git rev-parse --show-toplevel`; verify the root's
`.claude-plugin/marketplace.json` declares
`"name": "wise-claude"`. On failure, refuse with:

```
/wise-skills-edit must be run from inside a checkout of
github.com/e1024kb/wise-claude. Current cwd is not a marketplace
repo (no .claude-plugin/marketplace.json with
name: wise-claude was found in any ancestor directory).

Clone the marketplace repo, cd into it, then re-run:
  git clone git@github.com:e1024kb/wise-claude.git
  cd wise-claude
  /wise-skills-edit <skill-name>
```

Let `REPO_ROOT` = the git toplevel and
`WISE_PLUGIN_ROOT` = `$REPO_ROOT/plugins/wise`.

### 4. Existence check

Confirm the skill exists in the wise plugin:

```bash
test -f "$WISE_PLUGIN_ROOT/skills/$skill_name/SKILL.md"
```

On hit, proceed to step 5.

On miss, refuse with a message listing the wise plugin's skills —
generated by iterating `ls "$WISE_PLUGIN_ROOT/skills/"` and excluding
`wise` (the natural-language helper); do NOT hard-code the roster, it
drifts:

```
Skill '<skill-name>' not found in the wise plugin.

Existing skills:

  <one bullet per directory under skills/, excluding `wise`>

If you meant to create a new skill, use /wise-skills-create <skill-name>
instead.
```

### 5. Invoke skill-creator with edit briefing

Call the skill-creator skill via the `Skill` tool, passing a
briefing that targets the existing SKILL.md for modification:

```
Skill({
  skill: "skill-creator:skill-creator",
  args: <BRIEFING below>
})
```

**Briefing template** (substitute the bracketed values):

```
Modify an existing skill in the wise plugin.

TARGET SKILL FILE:
  [WISE_PLUGIN_ROOT]/skills/[skill-name]/SKILL.md

Read the target file first to understand the skill's current shape
— its description, argument-hint (if any), allowed-tools, and body.
Then run the edit wizard.

CONVENTIONS THE SKILL MUST CONTINUE TO FOLLOW:
  - [REPO_ROOT]/CONTRIBUTING.md §2.1   (standalone + reference shapes)
  - [WISE_PLUGIN_ROOT]/CLAUDE.md       (plugin-specific invariants)
  - Reference standalone skills:
      [WISE_PLUGIN_ROOT]/skills/wise-commit-message/SKILL.md
      [WISE_PLUGIN_ROOT]/skills/wise-workflow-status/SKILL.md
  - Reference guidance skill:
      [WISE_PLUGIN_ROOT]/skills/wise-estimation/SKILL.md

Before this wizard asks any question, read and follow
[WISE_PLUGIN_ROOT]/references/workflow-host-control.md, section
"Keep asynchronous questions open". In the resulting SKILL.md body, include this
exact Markdown link before any user-question procedure:
[question lifecycle](../../references/workflow-host-control.md#keep-asynchronous-questions-open).
Preserve this link even for prompt-free skills; it does not authorize new prompts.
For a skill that can ask questions, include `Read` in any explicit `allowed-tools`
list so it can load the reference. Preserve existing no-prompt restrictions.

WIZARD — present the current state, then ask which aspects the user
wants to change. At minimum, offer these editing paths:

  (a) Description or argument-hint (help text visible in slash menu)
  (b) Body / procedure (add / remove / modify steps, reference
      content, guardrails)
  (c) allowed-tools (narrow the tool permissions)

For each change the user selects, walk them through step-by-step
confirmation. Show a preview diff before writing.

HARD GUARDRAILS the wizard must enforce:

  - Never add `command:` or `subcommand:` frontmatter fields. Those
    were v1 dispatcher-routing fields with no meaning in v2; adding
    them creates confusion without effect.
  - Never add an `arguments:` field. Like `command:` / `subcommand:`,
    it was a v1 dispatcher-routing field with no meaning in v2 — v2
    skills parse their own `$ARGUMENTS` raw string at the top of
    the procedure.
  - Never add `user-invocable: false`. Every skill in the v2 plugin
    is user-invocable — hiding a skill from the slash menu is what
    the retired dispatcher-action shape did, and there is no
    replacement.
  - Never set `disable-model-invocation: true` except on the `wise`
    helper itself (which this skill refuses to edit).
  - Do not rename the skill's DIRECTORY as part of an edit — that
    would be a new skill + old skill removal and should be two
    separate operations. Use /wise-skills-create for a rename
    followed by manual directory removal.

AFTER WRITING THE UPDATED FILE, tell the user to reload the wise
plugin. Show these commands verbatim as a copy-pasteable block:

    /plugin uninstall wise --keep-data
    /plugin install wise@wise-claude
    /reload-plugins
```

### 6. Relay skill-creator's output

`skill-creator` handles the wizard, the preview, and the file
write. Relay its output verbatim.

## Guardrails

- Do **not** write or edit files yourself. `skill-creator` owns
  the file I/O.
- Do **not** allow editing of `plugins/wise/skills/wise/SKILL.md` —
  the natural-language helper. Step 2 refuses `skill-name == "wise"`
  explicitly.
- Do **not** invoke any wise action skill.
- Do **not** proceed past step 3 if the marketplace-repo guard
  failed, and do **not** proceed past step 4 if the target skill
  does not exist.
- Do **not** attempt to reload the plugin for the user. Only print
  the reload instructions.
- Do **not** rename the skill's directory as part of the edit.
  Renaming is a two-step operation (new skill + delete old) best
  done manually in a regular Claude Code session.
