Skip to content

MCP Consumer Repository Shim

Use this prompt to generate exactly one repository-scoped Copilot instruction shim for an MCP consumer repository.

Supplied Inputs

  • apply_to_glob: {{apply_to_glob}}
  • primary_skill_resource: {{primary_skill_resource}}
  • shim_title: {{shim_title}}
  • companion_docs_page: {{companion_docs_page}}

Inputs

  • Required:
  • apply_to_glob
  • primary_skill_resource
  • Optional:
  • shim_title
  • companion_docs_page

Required References

Load only sections relevant to the requested shim:

  1. Thin shim pattern and scope guidance: Skill Usage Mechanics
  2. VS Code Copilot MCP resource behavior: Copilot MCP Mechanics
  3. Authoring workflow and validation checklist: Authoring Guide
  4. Instruction metadata expectations and examples: Copilot customization skill

Workflow

  1. Validate that apply_to_glob and primary_skill_resource are present.
  2. Validate that primary_skill_resource uses the skill://<skill-name>/SKILL.md form.
  3. If either value is missing or ambiguous, ask exactly one clarifying question before generating output.
  4. Generate one .instructions.md file content block only.
  5. Keep the shim concise and deterministic:
  6. include YAML frontmatter with name, description, and applyTo
  7. include a primary rule that uses the selected primary_skill_resource first
  8. include a bounded execution pattern (load primary doc, apply only relevant sections, keep edits minimal)
  9. Include VS Code/Copilot integration mechanics in the shim body:
  10. use MCP resource attachment
  11. inspect _manifest only when the task needs supporting material
  12. ask one clarifying question when confidence is low
  13. If companion_docs_page is provided, include it as a companion docs link line.
  14. Do not generate additional files, code changes, or batch shim packs.

Output Format

Return exactly:

  1. Suggested file path line under .github/instructions/.
  2. One fenced markdown block containing the full .instructions.md content.
  3. A brief note (max 3 lines) describing what the shim routes and why.

Output Template

Path: .github/instructions/<slug>.instructions.md

```md
---
name: <shim-title>
description: Route <scope> edits to the Personal MCP <skill-id> resource.
applyTo: '<apply_to_glob>'
---

When editing files matching <apply_to_glob>, use <primary_skill_resource> as the primary guidance source.

Execution pattern:

1. Load the primary skill document first.
2. Apply only sections relevant to the file being edited.
3. Keep edits minimal and aligned with repository conventions.
4. Prefer MCP resource attachment when available in the current chat surface.
5. Read the selected skill's `_manifest` only when supporting material is needed.
6. If confidence is low, ask one clarifying question before editing.

Companion docs page: <optional-relative-doc-link>
```