write-cursor-command

write-cursor-command is a skill for Cursor from Asheng008/unifiles-mcp. It costs 75 tokens per session (1,303 once invoked), scanned A, original, MIT.

A guide for writing reusable slash commands for Cursor, an AI coding editor. It creates Markdown command files in Cursor’s commands folder using the required naming and layout.

In plain words
What is it for?
Use it to create commands such as updating documentation, running tests, or carrying out another repeatable coding workflow.
Why use it?
It removes the need to remember Cursor’s command format, file location, and naming rules.

Skill for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions AGENTS.md.

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 skills/asheng008/unifiles-mcp/write-cursor-command
Any agent
npx skills add Asheng008/unifiles-mcp --skill write-cursor-command
Clone the repo
git clone --depth 1 https://github.com/Asheng008/unifiles-mcp

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for write-cursor-command

README.md
[![agentmods](https://agentmods.dev/badge/skills/asheng008/unifiles-mcp/write-cursor-command.svg)](https://agentmods.dev/skills/asheng008/unifiles-mcp/write-cursor-command)
Your own site
<a href="https://agentmods.dev/skills/asheng008/unifiles-mcp/write-cursor-command"><img src="https://agentmods.dev/badge/skills/asheng008/unifiles-mcp/write-cursor-command.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,303 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.1 $0.00075 $0.01303
Opus 5 $0.00037 $0.00651
Sonnet 5 $0.00015 $0.00261
Haiku 4.5 $0.00007 $0.00130

Measured 5d ago against content hash 41133d08ec7c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

write-cursor-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 5d 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.

.cursor/skills/write-cursor-command/SKILL.md · 115 lines

How it starts

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

编写 Cursor Command

根据用户描述的需求,编写符合 Cursor 官方格式的 slash command,并保存到 .cursor/commands/

Cursor Command 官方格式(必须遵守)

  • 文件格式纯 Markdown,禁止 YAML frontmatter(与 Rules/Skills 不同)。
  • 存放位置
    • 项目命令:.cursor/commands/(项目根目录下)
    • 全局命令:~/.cursor/commands/(用户主目录)
  • 文件名:使用 kebab-case,即小写字母与连字符,扩展名 .md。文件名即命令名,输入 /文件名 触发(如 update-readme.md/update-readme)。
  • 内容:用 Markdown 描述「当用户执行该命令时,AI 应该做什么」。用户输入 /命令名 后面的文字 会一并作为上下文传给模型。

参考:Cursor Docs - Commands

编写流程

1. 理解需求

  • 用户希望执行 /xxx 时完成什么?(例如:更新某文档、跑测试、生成某类代码)
  • 有无环境约束?(如 Windows/PowerShell、虚拟环境、编码)
  • 有无项目规范要引用?(如 AGENTS.md、.cursor/rules)

2. 确定命令名与路径

  • 根据用途起一个简短的 kebab-case 名称(如 update-readmerun-testsadd-mcp-tool)。
  • 默认写入项目:.cursor/commands/<命令名>.md。若用户明确要全局命令,则使用 ~/.cursor/commands/<命令名>.md

3. 撰写 Markdown 内容

按下面结构组织(可依需求增删小节):

  1. 标题(可选)
    一行 # 中文名 (English Name),便于识别。

  2. Overview
    2~3 句话说明:该命令做什么、在什么场景下用。

  3. 执行步骤 / Steps
    分步骤写清「AI 执行此命令时应做的具体动作」。

    • 若有先后顺序,用 1、2、3…
    • 若有子项,用缩进列表或 加粗 小标题。
  4. 环境约束(若需要)
    如 Shell(PowerShell)、编码(UTF-8)、Python 虚拟环境路径等。

  5. 注意事项 / 模板(若需要)
    固定格式、代码块模板、不要改动的部分等。

  6. Checklist
    - [ ] 列出执行完命令后应自检的项,便于用户或 AI 核对。

4. 保存与确认

  • 保存到 .cursor/commands/<命令名>.md
  • 确认:无 frontmatter、文件名 kebab-case、内容为纯 Markdown。

内容模板(可直接套用)

# 命令中文名 (Command Name)

## Overview
简要说明该命令的用途和适用场景(2~3 句)。

## 执行步骤

1. **第一步**
   - 子步骤或说明

2. **第二步**
   - 子步骤或说明

3. **第三步**
   - 子步骤或说明

## 注意事项(可选)
- 需要遵守的约定或不要改动的部分

## Checklist
- [ ] 检查项 1
- [ ] 检查项 2

本项目中已有命令可作参考

  • explain.md:解释/说明类命令(可按实际内容补充)。
  • lint-and-format.md:代码检查与格式化(ruff、black 等)。
  • publish-to-pypi.md:打包并发布到 TestPyPI 或正式 PyPI(前置检查、构建、twine 上传、错误处理)。
  • update-changelog.md:更新 CHANGELOG.md。
  • update-history.md:将当前对话中的用户指令追加到 HISTORY.md。
  • update-readme.md:按项目状态更新 README(版本、工具列表、结构、文档链接)。

写作时可参考其「目标/Overview + 步骤 + 环境约束 + 错误处理 + Checklist」的写法,保持风格一致。新增命令后建议同步更新本列表。

Read the full file on GitHub · 115 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. 5d ago First seen · 115 lines · 75 tokens per session scan A 41133d08ec7c

Subscribe to this mod's changes

write-cursor-command is a skill published in the GitHub repository Asheng008/unifiles-mcp (0 stars, last pushed 5mo ago), licensed MIT. It adds 75 tokens to every session and 1,303 once invoked, about $0.0004 per session on Opus 5. 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 skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens