AGENT SKILL

policy-and-managed-settings

Use whenever adding, modifying, or reviewing any Copilot, agent, LLM, AI, tool, permission, sandbox, MCP, model, telemetry, feature-gate, setting, configuration, or enterprise control—especially anything an organization or administrator may need to manage. Start here to decide whether it belongs in runtime managed settings, a typed SDK contract, VS Code configuration policy, extension policy, or a split implementation. Run on every new Copilot/agent/LLM control and ANY change that adds a `policy:` field.

License 许可
MIT
所属仓库
microsoft/vscode
最近更新
2026-11-11
Stars
★ 20w
Forks
4.4w

01 前言 Front Matter

name
policy-and-managed-settings
description
Use whenever adding, modifying, or reviewing any Copilot, agent, LLM, AI, tool, permission, sandbox, MCP, model, telemetry, feature-gate, setting, configuration, or enterprise control—especially anything an organization or administrator may need to manage. Start here to decide whether it belongs in runtime managed settings, a typed SDK contract, VS Code configuration policy, extension policy, or a split implementation. Run on every new Copilot/agent/LLM control and ANY change that adds a `policy:` field.

02 资源文件 7

03 SKILL.md 正文

Enterprise Policy and Managed Settings

Route a control by where the governed behavior is implemented, not by who requested it. Most Copilot agent controls belong in the runtime, not VS Code.

Governed behavior Destination Guide
Copilot runtime: tools, shell, files, URLs, MCP, plugins, subagents, permissions, sandbox, runtime model/telemetry Runtime managed setting (SDK type only if the host owns the value) sdk-runtime-policy.md
VS Code editor/workbench VS Code configuration policy: vscode-policy.md
Extension-contributed setting extensionConfigurationPolicy in vscode-distro extension-policy.md
Independent runtime and editor behavior Split: runtime setting for agent behavior, VS Code policy for editor behavior only both of the above
Existing permission policy introduced before 1.133 Bounded migration only legacy-permission-policy.md

Supporting references:

Rules

  • Runtime enforcement is authoritative. Do not duplicate runtime parsing, matching, or security decisions in VS Code, and never substitute editor UI suppression for runtime enforcement.
  • New Copilot controls go directly in the shared managed-settings schema/SDK contract. Do not add a VS Code setting to mirror or bridge one.
  • Closed to new properties (existing entries stay for compatibility): GitHub token/account IPolicyData fields consumed by AccountPolicyService, the legacy VS Code setting bridge, and pre-1.133 permission translation.
  • Split controls: add the runtime capability first and keep existing editor behavior until it ships. Keep both projections semantically aligned; keep permission authorization separate from sandbox containment; make create/resume/removal/peer/subagent/cloud behavior explicit.
  • Every VS Code or extension policy change needs an agentHostPolicySupport entry and pnpm run export-policy-data. Never hand-edit build/lib/policies/policyData.jsonc.
  • Never log raw enterprise rules/values or add telemetry containing them.
  • Trust source and tests over these docs. Document decisions and invariants; link to source instead of copying it.

Policy-disabled UI

Prefer an option that stays visible but disabled, with the briefcase managed-policy indicator, a localized reason, and an accessible next step, over silently hiding it (design guidance). Use policy provenance to distinguish prohibition from unsupported, feature-gated, or pending states. Presentation never changes authorization: a disabled option must not re-enter the runtime's allowed set or bypass create/resume/write validation. Test policy refresh/removal, keyboard and pointer activation, and stale menus; preserve AI-hiding behavior.

04 同仓库更多 Skills

microsoft
microsoft/vscode

sweeper-query

Answer natural-language questions about the VS Code Sweeper's published issue index (index-<name>.json for microsoft/vscode and the enrolled family repos) — which issues are agent-ready to implement or plan, what the sweeper proposed for an assignee or area, whether the sweeper knows a report as a duplicate, the highest-value open bugs in a lane — and, for one issue, the review's full record (evidence with file citations, fix brief, proposed comment). Use ONLY when the request explicitly names the sweeper — "sweeper", "vscodesweeper", "sweeper-query", a sweeper verdict, record, brief or index, an agent-ready issue — or asks what "the sweeper" found, proposed or knows. Do NOT use for general questions about issues, duplicates, priorities or ranking that do not mention the sweeper. Read-only; discovery only.

★ 20w
microsoft
microsoft/vscode

update-skills

Create or update repository skills and instructions when major learnings are discovered during a session. Use when the user says "learn!", when a significant pattern or pitfall is identified, or when reusable domain knowledge should be captured for future sessions.

★ 20w
microsoft
microsoft/vscode

update-pr

Update the pull request for the current session. Use when the user wants to push new changes to an existing PR.

★ 20w
microsoft
microsoft/vscode

sync

Sync the current session branch with its upstream branch, or publish the current session branch to a remote. Use when the user asks to sync a branch, pull latest changes, rebase onto upstream, push current branch, publish branch, or set upstream.

★ 20w
microsoft
microsoft/vscode

sync-upstream

Update a stale session branch by rebasing onto the latest origin. Use when the upstream has moved significantly and the session needs to catch up, resolving conflicts by preserving upstream changes and adapting session work to fit.

★ 20w
microsoft
microsoft/vscode

merge

Merge changes from the topic branch to the merge base branch. Use when the user wants to merge their session's work back to the base branch.

★ 20w