Skip to content
Back to skills

Create Cmd Args

ASecurity

Turn my PREVIOUS message into a PARAMETERIZED slash command with $ARGUMENTS slots

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 6, 2026
ai-agentspython

Security analysis

A100/100

Scanned September 6, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Create Cmd Args?

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

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

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: Turn my PREVIOUS message into a PARAMETERIZED slash command with $ARGUMENTS slots
argument-hint: <command-name> [--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 — and save it as a reusable custom slash command that is
**parameterized**, so the variable parts become arguments.

Raw arguments: `$ARGUMENTS`

Do this:

1. Parse `$ARGUMENTS` into a **name** and an optional **scope flag**:
   - `--global` / `-g` / `global` -> system-wide.
   - `--project` / `-p` / `project` -> current project.
   - Everything else is the command name.
2. If no name is given, STOP and ask for one. A name is required.
3. **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.
4. Normalize the name: lowercase, kebab-case, strip any leading `/` and `.md`.
5. Find the user's previous prompt (the message right before this call).
6. Identify the parts of the prompt that are **specific values likely to change each run** — a
   filename, a topic, a function/variable name, a language, a count, etc. Replace them with
   placeholders:
   - One variable  -> `$ARGUMENTS`.
   - Multiple variables -> `$1`, `$2`, `$3` in the order they should be passed.
   Keep the fixed instructions intact.
7. Add YAML frontmatter with a one-line `description` and an `argument-hint` listing the
   placeholders in order, e.g. `argument-hint: <filename> <language>`.
8. Show the user the parameterized prompt and how to call it (e.g. `/<name> utils.js python`).
9. Write the file to `<chosen path>/<name>.md`.
10. If that file already exists, show its current contents and ask before overwriting.
11. 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.