Skip to content

Commit 6ebbcaf

Browse files
committed
Migrate commands to Agent Skills standard
1 parent 0489371 commit 6ebbcaf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+7702
-27
lines changed

.cursor/rules/answer-questions-first.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Before using any code editing tools, scan the user's message for `?` characters
1212

1313
If questions are detected:
1414

15-
1. Read `~/.cursor/commands/q.md` and follow its workflow to answer every question.
16-
2. **Workflow context**: If a command or skill was invoked earlier in this conversation, note which one. When a question or critique references agent behavior from that execution, load the command/skill definition before answering and evaluate whether the command should have governed that behavior. If it should have but didn't, that's a workflow gap — treat it as the primary concern per `fix-workflow-first.mdc`.
15+
1. Read `~/.cursor/skills/q/SKILL.md` and follow its workflow to answer every question.
16+
2. **Workflow context**: If a skill was invoked earlier in this conversation, note which one. When a question or critique references agent behavior from that execution, load the skill definition before answering and evaluate whether the skill should have governed that behavior. If it should have but didn't, that's a workflow gap — treat it as the primary concern per `fix-workflow-first.mdc`.
1717
3. Do **not** edit files, create files, or run mutating commands until the user responds.
1818
4. Only proceed with implementation after the user permits it in a follow-up message.
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
description: When a workflow issue is identified in a command or skill, fix the command/skill definition first before fixing the downstream misbehavior.
2+
description: When a workflow issue is identified in a skill, fix the skill definition first before fixing the downstream misbehavior.
33
alwaysApply: false
44
---
55

66
<goal>Ensure workflow definitions are fixed at the source before any workarounds are applied.</goal>
77

88
<rules description="Non-negotiable constraints.">
9-
<rule id="absolute-priority">Fixing the command/skill takes **absolute priority** over all other actions — including workarounds, continuing the original task, or applying temporary fixes.</rule>
10-
<rule id="no-workarounds-first">Do NOT apply workarounds or manual fixes before proposing the command/skill update. The correct sequence is: identify gap → propose fix → get approval → apply fix → then resume original task.</rule>
11-
<rule id="use-author">Always use `/author` to fix commands and skills. It contains current best practices and the mandatory revision checklist.</rule>
9+
<rule id="absolute-priority">Fixing the skill takes **absolute priority** over all other actions — including workarounds, continuing the original task, or applying temporary fixes.</rule>
10+
<rule id="no-workarounds-first">Do NOT apply workarounds or manual fixes before proposing the skill update. The correct sequence is: identify gap → propose fix → get approval → apply fix → then resume original task.</rule>
11+
<rule id="use-author">Always use `/author` to fix skills. It contains current best practices and the mandatory revision checklist.</rule>
1212
</rules>
1313

1414
<sequence name="When a workflow gap is discovered">
1515
1. **Stop immediately** — do not continue the current task or apply any workaround.
16-
2. **Identify the root cause** in the command (`.cursor/commands/*.md`) or skill (`.cursor/skills/*/SKILL.md`) definition.
16+
2. **Identify the root cause** in the skill (`.cursor/skills/*/SKILL.md`) definition.
1717
3. **Propose the fix** to the user and wait for approval before proceeding.
18-
4. **Fix the command/skill** using `/author` after approval.
19-
5. **Resume the original task** only after the command/skill is updated.
18+
4. **Fix the skill** using `/author` after approval.
19+
5. **Resume the original task** only after the skill is updated.
2020
</sequence>
2121

22-
<scope>This applies to all workflow issues — missed steps, incorrect output, wrong tool usage, shell failures, formatting problems, etc. The command/skill is the source of truth; patching around it creates drift.</scope>
22+
<scope>This applies to all workflow issues — missed steps, incorrect output, wrong tool usage, shell failures, formatting problems, etc. The skill is the source of truth; patching around it creates drift.</scope>

.cursor/rules/no-format-lint.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ alwaysApply: true
66
# No Manual Formatting or Lint Fixing
77

88
- Do NOT run `yarn lint`, `yarn fix`, `yarn verify`, or any lint/format shell commands unless explicitly asked.
9-
- Do NOT manually fix formatting issues (whitespace, quotes, semicolons, trailing commas, line length). "Auto Format on Agent Finish" handles this.
9+
- Do NOT manually fix formatting issues (whitespace, quotes, semicolons, trailing commas, line length). The `lint-commit.sh` script runs `eslint --fix` (including Prettier) before each commit.
1010
- Only use `ReadLints` to check for logical or type errors, not formatting. If the only lint errors are formatting-related, ignore them.
1111
- Focus tokens on correctness and logic, not style.

.cursor/rules/workflow-halt-on-error.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Scan the user's message for `/word` tokens. A token is a **command invocation**
2525
- `/word` is NOT inside a file path, URL, or code block
2626

2727
When detected:
28-
1. Read `~/.cursor/commands/<word>.md` and follow it immediately.
29-
2. If the file does not exist, inform the user: "Command `/<word>` not found in `~/.cursor/commands/`."
28+
1. Read `~/.cursor/skills/<word>/SKILL.md` and follow it immediately.
29+
2. If the file does not exist, inform the user: "Skill `/<word>` not found in `~/.cursor/skills/`."
3030

3131
**Ignore `/`** in: file paths (`/Users/...`, `~/...`), URLs (`https://...`), mid-word (`and/or`), backticks/code blocks.
3232

.cursor/scripts/port-to-opencode.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Single self-contained script (bash + inline node). No Python dependency.
44
#
55
# Usage:
6-
# port-to-opencode.sh # Convert all rules, commands, skills
6+
# port-to-opencode.sh # Convert all rules and skills
77
# port-to-opencode.sh --dry-run # Show what would be done
88
# port-to-opencode.sh --validate # Validate existing JSON mirrors
99
# port-to-opencode.sh file1.mdc file2.md # Convert specific files
@@ -160,10 +160,6 @@ function processFile(filePath) {
160160
outputDir = pathMod.join(OPENCODE_DIR, "rules")
161161
outputBase = pathMod.basename(filePath, ".mdc")
162162
converter = convertMdcToJson
163-
} else if (filePath.includes("/commands/") && filePath.endsWith(".md")) {
164-
outputDir = pathMod.join(OPENCODE_DIR, "commands")
165-
outputBase = pathMod.basename(filePath, ".md")
166-
converter = convertCommandToJson
167163
} else if (filePath.includes("/skills/") && pathMod.basename(filePath) === "SKILL.md") {
168164
outputDir = pathMod.join(OPENCODE_DIR, "skills", pathMod.basename(pathMod.dirname(filePath)))
169165
outputBase = "SKILL"
@@ -218,7 +214,6 @@ const files = inputFiles.length > 0
218214
? inputFiles.map(f => f.startsWith("~") ? f.replace("~", os.homedir()) : f)
219215
: [
220216
...walkDir(pathMod.join(CURSOR_DIR, "rules"), (fp, n) => n.endsWith(".mdc")),
221-
...walkDir(pathMod.join(CURSOR_DIR, "commands"), (fp, n) => n.endsWith(".md")),
222217
...walkDir(pathMod.join(CURSOR_DIR, "skills"), (fp, n) => n === "SKILL.md")
223218
]
224219

0 commit comments

Comments
 (0)