
Generate Run Commands
OfficialFreeAutomate task setup for your development environment.
Free · Opens the source repo
What Generate Run Commands does
Generate Run Commands is a skill designed to streamline the setup of run commands in your development environment, specifically within the context of an Agent Session workspace. It simplifies the process of configuring tasks that can be executed directly from the Run button in the title bar of your workspace. This is particularly useful for developers who frequently set up new projects or work with multiple repositories, as it reduces the manual effort required to create or modify run commands.
The skill operates by first checking the existing .vscode/tasks.json file for any predefined run commands. If commands are already present, it prompts the user to specify any modifications they wish to make. In the absence of existing commands, the skill intelligently infers the necessary setup and run commands by analyzing common project files such as package.json, Makefile, or pyproject.toml. This means that for standard setups, the skill can automatically add commands like npm install or pip install -r requirements.txt without user input, thereby enhancing efficiency.
Once the appropriate commands are determined, the skill writes to the .vscode/tasks.json file, merging new tasks with any existing ones to avoid overwriting unrelated configurations. After successfully writing the commands, it provides a brief confirmation to the user about what was added and how to trigger these tasks from the Run button. This functionality is aimed at developers who want to quickly set up their development environments without having to manually configure task files each time.
Overall, Generate Run Commands is an essential tool for developers looking to automate their workflow and ensure that their run commands are always up to date with the current project structure.
When to use it
Use this skill when starting new projects or when you need to modify existing run commands in your workspace.
When not to use it
This skill may not be suitable for projects with highly customized or non-standard setups that require specific task configurations.
What you can build with it
Setting Up a New Project
When starting a new project, use this skill to automatically generate necessary run commands based on your project's configuration files.
Modifying Existing Commands
If you have existing run commands that need updates, this skill allows you to easily modify them without manually editing the tasks.json file.
Streamlining Development Workflows
Integrate this skill into your workflow to ensure that your development environment is always ready with the correct run commands.
How to install Generate Run Commands
View source1. Install with the skills CLI
npx skills add microsoft/vscode/generate-run-commands --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by microsoftGenerate 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.
Frequently asked questions about Generate Run Commands
Similar skills
Turborepo
Optimized build system for JavaScript/TypeScript monorepos.
Azure Pipelines Validation
Streamline your Azure DevOps pipeline changes locally.
Azure Developer CLI
Streamline your Azure project workflows with best practices.
Azure Container Registry CLI
Manage Azure Container Registry resources with ease.
Aspire
Build and orchestrate polyglot distributed applications seamlessly.
Vercel CLI
Manage and deploy Vercel projects from the command line.
