﻿# VS Code instructions and prompt files: defaults versus a runnable task

Use instructions for scoped recurring guidance and prompt files for invoked tasks; verify discovery against the selected harness rather than the editor name alone.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/learn-vscode-instructions-prompt-files/
Language: en

VS Code custom instructions and prompt files serve different roles. Instructions provide recurring guidance with a scope and activation mechanism; prompt files package a task that the user invokes. Mixing those roles can make every request carry irrelevant procedures or make a reusable task appear to be a universal project rule. Current behavior also depends on the selected agent harness.

## A standing convention differs from a task

Use the existing validation library is a project convention that can apply across many edits. Prepare a release checklist is a particular task with its own inputs and deliverable. Keeping both in one always-applied instruction can distract unrelated work. Identify whether the text describes how ordinary work should be done or asks for a specific outcome now. That simple distinction helps choose the customization mechanism before worrying about syntax or folder location.

Primary reference: [VS Code: Use Custom Instructions](https://code.visualstudio.com/docs/agent-customization/custom-instructions).

## Scope determines when guidance is relevant

An instruction can apply project-wide, to matching files, or when a task description makes it relevant. Narrow scope reduces conflicting or unnecessary guidance. A frontend convention should not accidentally dictate a database migration's procedure. Check the documented activation metadata and actual selected files. A rule that never activates is a discovery problem; a rule that activates everywhere may be a scope problem even when its wording is individually sensible.

Primary reference: [VS Code: How Copilot Understands Your Workspace](https://code.visualstudio.com/docs/agents/reference/workspace-context).

## Prompt files are invoked deliberately

A prompt file packages a repeatable request that can be started from chat. It can specify the outcome, needed context, and verification expectations for a familiar workflow. It should not depend on a long unrecorded previous conversation. Make variable inputs explicit and describe the expected artifact. A task template is useful when another engineer can invoke it on a suitable project and understand what work it will request before running it.

Primary reference: [VS Code: Use Prompt Files](https://code.visualstudio.com/docs/agent-customization/prompt-files).

## Harnesses own different discovery conventions

Current VS Code documentation distinguishes customization locations and behavior by harness. A Copilot instruction folder and a Claude-native rule folder are not interchangeable merely because the editor can host both sessions. Check which harness is active and which settings apply to it. Avoid assuming that a successful configuration in one session transfers automatically to another. The same model name can be used with different orchestration systems and therefore different instruction-discovery behavior.

## Validate the customization with actual behavior

Choose a small task whose result should visibly reflect the instruction or prompt. Inspect the applied context and resulting change, then run appropriate existing checks. Keep durable conventions short and task templates focused on one outcome. This makes failures diagnosable: missing discovery, wrong scope, unclear input, or incorrect implementation. A customization system becomes useful when its effect can be reproduced and reviewed rather than inferred from the mere presence of Markdown files in a repository.

Related reading: [Continue vs Cline vs Aider for local coding](/journal/continue-cline-aider-coding-choice/); [Reproducible inference stacks: preserving a GPU pilot’s result](/journal/software-stack-reproducibility/).
