path-specific-instructions

Create path-specific GitHub Copilot instructions triggered by glob patterns.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/Zoimback/copilot-dev-core --skill path-specific-instructions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: path-specific-instructions
Source: https://github.com/Zoimback/copilot-dev-core/tree/main/.github/skills/path-specific-instructions
Command: npx skills add https://github.com/Zoimback/copilot-dev-core --skill path-specific-instructions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill allows you to apply Copilot instructions to specific file types or directories within your repository, ensuring that Copilot's suggestions are contextually relevant and don't interfere with unrelated code.

Core Features & Use Cases

  • Path-Specific Rules: Define instructions that only trigger for files matching glob patterns (e.g., *.ts, src/components/**).
  • Organized Instructions: Keep your global copilot-instructions.md clean by moving specialized rules to dedicated files.
  • Use Case: You can create a testing.instructions.md file that applies only to *.test.ts files, enforcing specific testing standards for your test suite without affecting your application code.

Quick Start

Use the path-specific-instructions skill to create a new instructions file for all TypeScript files in the src directory.

Frequently Asked Questions about path-specific-instructions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply custom GitHub Copilot instructions to specific file types?

To apply custom GitHub Copilot instructions to specific file types, use path-specific rules that trigger only when Copilot operates on files matching specified glob patterns, such as `*.ts` or `src/components/**`. This ensures contextually relevant code generation for targeted directories.

Can I define different Copilot rules for test files and application code?

Yes, you can define different Copilot rules for test files and application code by creating dedicated instruction files like `testing.instructions.md` that apply only to `*.test.ts` files, enforcing testing standards without affecting your application code.

What are glob patterns and how do they scope Copilot instructions?

Glob patterns are path-matching syntax like `*.ts` or `src/**` used to scope Copilot instructions. They ensure rules are activated only when Copilot operates on files matching those specific patterns within a repository.

How do I organize Copilot instructions without cluttering the global file?

You can organize Copilot instructions by moving specialized rules from the global `copilot-instructions.md` into dedicated instruction files, keeping your global configuration clean while maintaining project-specific standards for different codebase areas.

Do path-specific Copilot instructions work across my entire repository?

Path-specific Copilot instructions work only on files matching the glob patterns you define, such as `*.ts` or `src/components/**`. They do not interfere with unrelated code outside those specified paths within your repository.

What's the best way to enforce project-specific code standards for different directories?

The best way to enforce project-specific code standards is by creating path-specific instruction files that apply tailored rules to different directories, ensuring Copilot suggestions adhere to the distinct standards of tests, components, or models.