Skip to content
Back to skills

Create Cmd

ASecurity

Save my PREVIOUS message verbatim as a reusable slash command (name required)

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

Security analysis

A100/100

Scanned September 6, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Create Cmd?

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

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

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: Save my PREVIOUS message verbatim as a reusable slash command (name required)
argument-hint: <command-name> [--global | --project]
disable-model-invocation: true
---

The user wants to save their **previous message** — the most recent user turn in this
conversation *before* this invocation — as a reusable custom slash command, **unchanged**.

Raw arguments: `$ARGUMENTS`

Do this:

1. Parse `$ARGUMENTS` into a **name** and an optional **scope flag**:
   - `--global` / `-g` / the word `global` -> save system-wide.
   - `--project` / `-p` / the word `project` -> save to the current project.
   - Everything else is the command name.
2. If no name is given, STOP and ask for one, e.g. `/slash-it:create-cmd fix-bug`. A name is required.
3. **Determine where to save (scope):**
   - If a scope flag was given, use it.
   - Otherwise, ASK the user with AskUserQuestion: "Where should `/<name>` be saved?" with
     options **Global (all projects)** and **Project (this repo only)**.
   - Global path:  `~/.claude/commands/`  (the user's home `.claude/commands` directory)
   - Project path: `<current working directory>/.claude/commands/` — create this folder if it
     doesn't exist. If there is no project / not in a repo, fall back to Global and say so.
4. Normalize the name: lowercase, kebab-case, strip any leading `/` and the `.md` extension.
5. Find the user's previous prompt (the message right before this call). Use its text **verbatim**
   as the command body. Do NOT rewrite, optimise, or summarize it.
6. Add YAML frontmatter with a one-line `description` derived from the prompt.
7. Write the file to `<chosen path>/<name>.md`.
8. If that file already exists, show its current contents and ask before overwriting.
9. Confirm: print the saved file path, the scope (global/project), and that `/<name>` is now
   available (reopen the `/` menu for it to appear).

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.