Skip to content
Back to skills

Create Cmd Instruct

ASecurity

Reshape my PREVIOUS message using extra instructions, then save it as a slash command

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 6, 2026
ai-agentsapi

Works with

  • api

Security analysis

A100/100

Scanned September 6, 2026

npx -y skills add fayis672/slash-IT --skill create-cmd-instruct --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Create Cmd Instruct?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Create Cmd Instruct
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fayis672-create-cmd-instruct/badge)](https://www.skillsdirectory.com/skills/fayis672-create-cmd-instruct)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Reshape my PREVIOUS message using extra instructions, then save it as a slash command
argument-hint: <command-name> | <how to change it> [--global | --project]
disable-model-invocation: true
---

The user wants to take their **previous message** — the most recent user turn in this
conversation *before* this invocation — **modify it according to extra instructions they provide
here**, and save the result as a reusable custom slash command.

Raw arguments: `$ARGUMENTS`

The arguments contain a command **name** and **instructions** for how to change the prompt,
separated by a `|` pipe. An optional scope flag may appear in the name part. Example:
`/slash-it:create-cmd-instruct daily-report --project | output a markdown table and ask for the date`

Do this:

1. Split `$ARGUMENTS` on the first `|`.
   - Left side = the command name (and optional scope flag).
   - Right side = the user's instructions for reshaping the prompt.
   If there is no `|`, treat the first token as the name and the rest as instructions.
2. From the left side, extract the **name** and any **scope flag**:
   - `--global` / `-g` / `global` -> system-wide.  `--project` / `-p` / `project` -> this project.
3. If the name is empty, STOP and ask for it (required). If the instructions are empty, ask what
   changes the user wants.
4. **Determine where to save (scope):**
   - If a scope flag was given, use it.
   - Otherwise ASK with AskUserQuestion: "Where should `/<name>` be saved?" -> **Global** or
     **Project**.
   - Global path:  `~/.claude/commands/`
   - Project path: `<current working directory>/.claude/commands/` — create if missing; fall back
     to Global if not in a project and say so.
5. Normalize the name: lowercase, kebab-case, strip any leading `/` and `.md`.
6. Find the user's previous prompt (the message right before this call).
7. Produce a new prompt = the previous prompt **transformed according to the instructions**, plus
   light optimisation (clarity, structure, grammar) while honoring the original intent. Parameterize
   with `$ARGUMENTS`/`$1`/`$2` where it makes the command reusable.
8. Briefly show the user the resulting prompt so they can see what was saved.
9. Add YAML frontmatter with a one-line `description` and an `argument-hint` if parameters exist.
10. Write the file to `<chosen path>/<name>.md`.
11. If that file already exists, show its current contents and ask before overwriting.
12. Confirm: print the saved file path, the scope, and that `/<name>` is now available.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.