Agent SkillsasJEI/vscode › generate-run-commands

generate-run-commands

GitHub

协助用户为当前会话设置或修改运行命令,这些命令将显示在 Run 按钮中。通过读取 tasks.json 判断是新增还是修改,若无现有命令则自动推断项目配置生成安装或启动指令,否则询问用户意图并更新文件。

src/vs/sessions/skills/generate-run-commands/SKILL.md asJEI/vscode

触发场景

用户希望添加新的运行命令到会话 用户需要修改现有的运行命令

安装

npx skills add asJEI/vscode --skill generate-run-commands -g -y
更多选项

非标准路径

npx skills add https://github.com/asJEI/vscode/tree/main/src/vs/sessions/skills/generate-run-commands -g -y

不安装直接使用

npx skills use asJEI/vscode@generate-run-commands

指定 Agent (Claude Code)

npx skills add asJEI/vscode --skill generate-run-commands -a claude-code -g -y

安装 repo 全部 skill

npx skills add asJEI/vscode --all -g -y

预览 repo 内 skill

npx skills add asJEI/vscode --list

SKILL.md

Frontmatter
{
    "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."
}

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.

版本历史

  • ce4db66 当前 2026-07-19 08:58

同 Skill 集合

.agents/skills/launch/SKILL.md
.github/skills/accessibility/SKILL.md
.github/skills/add-policy/SKILL.md
.github/skills/agent-host-e2e-tests/SKILL.md
.github/skills/agent-host-logs/SKILL.md
.github/skills/author-contributions/SKILL.md
.github/skills/auto-perf-optimize/SKILL.md
.github/skills/azure-pipelines/SKILL.md
.github/skills/chat-customizations-editor/SKILL.md
.github/skills/chat-perf/SKILL.md
.github/skills/code-oss-logs/SKILL.md
.github/skills/component-fixtures/SKILL.md
.github/skills/cpu-profile-analysis/SKILL.md
.github/skills/design-philosophy/SKILL.md
.github/skills/fix-ci-failures/SKILL.md
.github/skills/fix-errors/SKILL.md
.github/skills/heap-snapshot-analysis/SKILL.md
.github/skills/hygiene/SKILL.md
.github/skills/integrated-browser/SKILL.md
.github/skills/integration-tests/SKILL.md
.github/skills/memory-leak-audit/SKILL.md
.github/skills/otel/SKILL.md
.github/skills/sessions/SKILL.md
.github/skills/smoke-tests/SKILL.md
.github/skills/symbolicate-crash-dump/SKILL.md
.github/skills/tool-rename-deprecation/SKILL.md
.github/skills/unit-tests/SKILL.md
.github/skills/update-screenshots/SKILL.md
.github/skills/ux-css-layout/SKILL.md
.github/skills/ux-theming/SKILL.md
.github/skills/vscode-dev-workbench/SKILL.md
extensions/copilot/.agents/skills/anthropic-sdk-upgrader/SKILL.md
extensions/copilot/.agents/skills/launch/SKILL.md
src/vs/sessions/skills/act-on-feedback/SKILL.md
src/vs/sessions/skills/code-review/SKILL.md
src/vs/sessions/skills/commit/SKILL.md
src/vs/sessions/skills/create-draft-pr/SKILL.md
src/vs/sessions/skills/create-pr/SKILL.md
src/vs/sessions/skills/fix-ci/SKILL.md
src/vs/sessions/skills/merge/SKILL.md
src/vs/sessions/skills/sync-upstream/SKILL.md
src/vs/sessions/skills/sync/SKILL.md
src/vs/sessions/skills/troubleshoot/SKILL.md
src/vs/sessions/skills/update-pr/SKILL.md
src/vs/sessions/skills/update-skills/SKILL.md
extensions/copilot/.agents/skills/github-copilot-upgrader/SKILL.md

元信息

文件数
0
版本
ce4db66
Hash
3a783d08
收录时间
2026-07-19 08:58

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-22 02:48
浙ICP备14020137号-1 $访客地图$