Files
prompts/docs/prompts/mcp-consumer-repo-shim/PROMPT.md
T
2026-06-22 08:50:26 -05:00

3.8 KiB

name, description, x-personal-mcp
name description x-personal-mcp
mcp-consumer-repo-shim Create one repository-specific thin shim instruction file that binds a file scope to a user-selected Personal MCP skill resource and enforces resource-first Copilot retrieval behavior.
id version tags capabilities arguments
mcp-consumer-repo-shim 1.0.0
copilot
mcp
instructions
shims
prompts
resource://prompts/mcp-consumer-repo-shim/document
apply_to_glob primary_skill_resource shim_title companion_docs_page
description required
File glob scope for the shim applyTo field, such as tests/** or **/*.md. true
description required
Primary skill resource URI, usually resource://skills/<skill-id>/document. true
description required
Human-readable name for the instruction shim frontmatter. false
description required
Optional relative docs link for human-facing companion guidance. false

MCP Consumer Repository Shim

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

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 behavior and fallback mechanics: 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. If either value is missing or ambiguous, ask exactly one clarifying question before generating output.
  3. Generate one .instructions.md file content block only.
  4. Keep the shim concise and deterministic:
    • include YAML frontmatter with name, description, and applyTo
    • include a primary rule that uses the selected primary_skill_resource first
    • include a bounded execution pattern (load primary doc, apply only relevant sections, keep edits minimal)
  5. Include VS Code/Copilot integration mechanics in the shim body:
    • prefer MCP resource attachment when available
    • if attachment is unavailable, use tool fallback order:
      1. list_resources
      2. read_resource
      3. search_patterns
      4. get_pattern_by_id
      5. get_skill_document_by_id
    • ask one clarifying question when confidence is low
  6. If companion_docs_page is provided, include it as a companion docs link line.
  7. 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. If MCP resource attachment is unavailable, use tool fallback in this order:
   1. list_resources
   2. read_resource
   3. search_patterns
   4. get_pattern_by_id
   5. get_skill_document_by_id
6. If confidence is low, ask one clarifying question before editing.

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