# Create Cmd Args

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

- **Type:** Skill
- **Install:** `agentstack add skill-fayis672-slash-it-create-cmd-args`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [fayis672](https://agentstack.voostack.com/s/fayis672)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [fayis672](https://github.com/fayis672)
- **Source:** https://github.com/fayis672/slash-IT/tree/main/skills/create-cmd-args

## Install

```sh
agentstack add skill-fayis672-slash-it-create-cmd-args
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

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 `/` be saved?" -> **Global** or
     **Project**.
   - Global path:  `~/.claude/commands/`
   - Project path: `/.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:  `.
8. Show the user the parameterized prompt and how to call it (e.g. `/ utils.js python`).
9. Write the file to `/.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 `/` is now available.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [fayis672](https://github.com/fayis672)
- **Source:** [fayis672/slash-IT](https://github.com/fayis672/slash-IT)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-fayis672-slash-it-create-cmd-args
- Seller: https://agentstack.voostack.com/s/fayis672
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
