create-command

A command that creates a new Cursor command file from a requested name and description. Cursor commands are reusable actions invoked inside the Cursor coding editor.

In plain words
What is it for?
Use /create-command to add a lowercase or kebab-case command under .cursor/commands/ after checking existing commands, project context, and the current Git branch.
Why use it?
It makes new commands follow the project's existing file structure, naming rules, workflow conventions, and local Cursor rules.

Command for Codex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/kaelsensei/magicaibuilder/create-command
Clone the repo
git clone --depth 1 https://github.com/KaelSensei/MagicAIBuilder

Made for: Codex.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,197 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01197
Opus 5 $0.00000 $0.00598
Sonnet 5 $0.00000 $0.00239
Haiku 4.5 $0.00000 $0.00120

Measured 2d ago against content hash 8494f5539fca, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

create-command scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/commands/create-command.md · 184 lines

How it starts

The opening of the file, as written. The whole thing — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Create Command – Generate New Cursor Commands

When /create-command <command-name> [description] is invoked, immediately execute the following steps to generate a new Cursor command file.


Step 1: Load Project Context

  1. Assume the project root as the working directory
  2. Load and respect all Cursor rules from .cursor/rules/*.mdc
  3. Read existing command files in .cursor/commands/ to understand the structure
  4. Identify the current Git branch and assume it is a feature branch, not main

Step 2: Parse Command Request

  1. Parse the command name provided after /create-command
  2. Extract optional description if provided
  3. Validate the command name:
    • Must be lowercase
    • Can use kebab-case for multi-word commands (e.g., test-integration)
    • Must not conflict with existing commands
  4. Determine the file path: .cursor/commands/<command-name>.md

Step 3: Analyze Existing Commands

  1. Read at least 2-3 existing command files (e.g., feature.md, fix.md, beautify.md)
  2. Extract the common structure and patterns:
    • Title format
    • Step structure
    • Required sections
    • Git workflow patterns
    • Rule references
  3. Note any command-specific variations

Step 4: Generate Command Template

Create the new command file with the following structure:

# [Command Name] Command – [Brief Description]

When `/[command] <description>` is invoked, immediately execute the following steps.

---

## Step 1: Load Project Context

1. Assume the project root as the working directory
2. Load and respect all Cursor rules from `.cursor/rules/*.mdc`
3. Read relevant documentation:
   - `README.md`
   - `PROGRESS.md`
   - Architecture or task documents relevant to the command
4. Identify the current Git branch and assume it is a **[type] branch**, not `main`

---

## Step 2: Understand the Task

1. Parse the description provided after `/[command]`
2. Determine:
   - What needs to be done
   - Which files/components are affected
   - What the expected outcome is
3. Locate the exact code paths involved
4. Do **not** assume — verify by reading the code first

---

## Step 3: [Command-Specific Implementation Steps]

[Customize these steps based on the command type. Examples:]

- For testing commands: Run tests, check coverage, update test files
- For deployment commands: Build, validate, deploy, verify
- For analysis commands: Analyze code, generate reports, identify issues

---

## Step 4: Validate

1. Reason through the execution path end-to-end
2. Ensure:
   - The task is completed correctly
   - No regressions were introduced
   - All project rules were followed
3. If applicable, verify outputs or results

---

## Step 5: Update Documentation (If Required)

If the command affects project structure or workflow:

1. Update `PROGRESS.md` if a new feature/workflow was added
2. Update `CHANGELOG.md` if applicable
3. Update `README.md` if usage instructions changed

---

## Step 6: Commit & Push (Required)

After the command file is created:

```bash
git add .cursor/commands/<command-name>.md
git commit -m "docs: add <command-name> command"
git push origin $(git branch --show-current)
```

Read the full file on GitHub · 184 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 184 lines · 0 tokens per session scan A 8494f5539fca

Subscribe to this mod's changes

create-command is a command published in the GitHub repository KaelSensei/MagicAIBuilder (2 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,197 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other commands, from other repositories