/generate-run-commands
Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.
$ npx -y skills add microsoft/vscode --skill generate-run-commands --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/generate-run-commands
Context preview
The summary Claude sees to decide when to auto-load this skill.
Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.
SKILL.md
generate-run-commands.SKILL.mdname: generate-run-commands
description: Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.
<!-- Customize this skill and select save to override its behavior. Delete that copy to restore the built-in behavior. -->
Generate Run Commands
Help the user set up run commands for the current Agent Session workspace. Run commands appear in the session's Run button in the title bar.
Understanding the task schema
A run command is a `tasks.json` task with:
- `"inAgents": true` — required: makes the task appear in the Agents run button
- `"runOptions": { "runOn": "worktreeCreated" }` — optional: auto-runs the task whenever a new worktree is created (use for setup/install commands)
{
"tasks": [
{
"label": "Install dependencies",
"type": "shell",
"command": "npm install",
"inAgents": true,
"runOptions": { "runOn": "worktreeCreated" }
},
{
"label": "Start dev server",
"type": "shell",
"command": "npm run dev",
"inAgents": true
}
]
}Decision logic
**First, read the existing `.vscode/tasks.json`** to check for existing run commands (`inAgents: true` tasks).
**If run commands already exist:** treat this as a modify request — ask the user what they'd like to change (add, remove, or update a command).
**If no run commands exist:** try to infer the right commands from the workspace:
- Check `package.json`, `Makefile`, `pyproject.toml`, `Cargo.toml`, `go.mod`, `.nvmrc`, or other project files to understand the stack and common commands.
- If it's clear what the setup command is (e.g., `npm install`, `pip install -r requirements.txt`), add it with `"runOptions": { "runOn": "worktreeCreated" }` — no need to ask.
- If it's clear what the primary run/dev command is (e.g., `npm run dev`, `cargo run`), add it with just `"inAgents": true`.
- **Only ask the user** if the commands are ambiguous (e.g., multiple equally valid options, no recognizable project structure, or the project uses a non-standard setup).
Writing the file
Always write to `.vscode/tasks.json` in the workspace root. If the file already exists, merge — do not overwrite unrelated tasks.
After writing, briefly confirm what was added and how to trigger it from the Run button.
Read more
name: generate-run-commands description: Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.
<!-- Customize this skill and select save to override its behavior. Delete that copy to restore the built-in behavior. -->
Generate Run Commands
Help the user set up run commands for the current Agent Session workspace. Run commands appear in the session's Run button in the title bar.
Understanding the task schema
A run command is a `tasks.json` task with:
- `"inAgents": true` — required: makes the task appear in the Agents run button
- `"runOptions": { "runOn": "worktreeCreated" }` — optional: auto-runs the task whenever a new worktree is created (use for setup/install commands)
{
"tasks": [
{
"label": "Install dependencies",
"type": "shell",
"command": "npm install",
"inAgents": true,
"runOptions": { "runOn": "worktreeCreated" }
},
{
"label": "Start dev server",
"type": "shell",
"command": "npm run dev",
"inAgents": true
}
]
}Decision logic
**First, read the existing `.vscode/tasks.json`** to check for existing run commands (`inAgents: true` tasks).
**If run commands already exist:** treat this as a modify request — ask the user what they'd like to change (add, remove, or update a command).
**If no run commands exist:** try to infer the right commands from the workspace:
- Check `package.json`, `Makefile`, `pyproject.toml`, `Cargo.toml`, `go.mod`, `.nvmrc`, or other project files to understand the stack and common commands.
- If it's clear what the setup command is (e.g., `npm install`, `pip install -r requirements.txt`), add it with `"runOptions": { "runOn": "worktreeCreated" }` — no need to ask.
- If it's clear what the primary run/dev command is (e.g., `npm run dev`, `cargo run`), add it with just `"inAgents": true`.
- **Only ask the user** if the commands are ambiguous (e.g., multiple equally valid options, no recognizable project structure, or the project uses a non-standard setup).
Writing the file
Always write to `.vscode/tasks.json` in the workspace root. If the file already exists, merge — do not overwrite unrelated tasks.
After writing, briefly confirm what was added and how to trigger it from the Run button.
Repo: microsoft/vscode
Other skills on vscode.
- /agent-customization
**WORKFLOW SKILL** — Create, update, review, fix, or debug VS Code agent customization files (.instructions.md, .prompt.md, .agent.md, SKILL.md, copilot-instructions.md, AGENTS.md). USE FOR: saving coding preferences; troubleshooting why instructions/skills/agents are ignored or
Open skill - /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
Open skill - /create-agent
Create a custom agent (.agent.md) for a specific job.
Open skill - /create-hook
Create a hook (.json) to enforce policy or automate agent lifecycle events.
Open skill - /create-instructions
Create an instructions file (.instructions.md) for a project rule or convention.
Open skill - /create-prompt
Create a reusable prompt file (.prompt.md) for a common task.
Open skill

