Skip to content

Copilot

Instructions

Available instructions

NameDescriptionInstruction NameType
Consolidated InstructionsAll best practices in one file-General
Code ReviewExpert code review guidelinescode-reviewReview
Commit MessageConventional Commits formatcommit-messageGit
Pull RequestPR description best practicespull-requestGit
General DevelopmentUniversal development practicesgeneralGeneral
JavaScript/TypeScriptScoped to JS/TS filesjavascriptLanguage
GoScoped to Go filesgoLanguage
Bash/ShellScoped to shell scriptsshellLanguage
TypeScript MonorepoComplete TS monorepo setupts-monorepoArchitecture
DockerScoped to DockerfilesdockerPlatform
Kubernetes/HelmScoped to K8s YAML fileskubernetesPlatform
GitHub ActionsScoped to workflow filesgithub-actionsCI/CD

Usage

This collection follows GitHub's official Copilot instructions format with multiple approaches:

Option 1: Clone All Instructions (Recommended for personal machine setup)

sh
# Clone instructions to ~/.config/copilot
curl -fsSL https://raw.githubusercontent.com/this-is-tobi/tools/main/shell/clone-subdir.sh | bash -s -- \
  -u "https://github.com/this-is-tobi/tools" \
  -b "main" \
  -s "copilot/instructions" \
  -o "$HOME/.config/copilot" \
  -d

This will clone all instruction files to ~/.config/copilot/instructions/. Then configure VS Code with absolute paths:

json
{
  "github.copilot.chat.codeGeneration.instructions": [
    { "file": "/Users/<username>/.config/copilot/instructions/code-review.md" }
  ],
  "github.copilot.chat.commitMessageGeneration.instructions": [
    { "file": "/Users/<username>/.config/copilot/instructions/commit-message.md" }
  ],
  "github.copilot.chat.pullRequestDescriptionGeneration.instructions": [
    { "file": "/Users/<username>/.config/copilot/instructions/pull-request.md" }
  ]
}

Option 2: Single File (For project-specific setup)

sh
curl -fsSL "https://raw.githubusercontent.com/this-is-tobi/tools/main/copilot/copilot-instructions.md" \
  -o ".github/copilot-instructions.md"

Option 3: Git Workflow Instructions (For commit messages and PR descriptions)

sh
# For commit message generation
curl -fsSL "https://raw.githubusercontent.com/this-is-tobi/tools/main/copilot/instructions/commit-message.md" \
  -o ".github/instructions/commit-message.md"

# For PR description generation
curl -fsSL "https://raw.githubusercontent.com/this-is-tobi/tools/main/copilot/instructions/pull-request.md" \
  -o ".github/instructions/pull-request.md"

# For code review
curl -fsSL "https://raw.githubusercontent.com/this-is-tobi/tools/main/copilot/instructions/code-review.md" \
  -o ".github/instructions/code-review.md"

Then configure VS Code settings with relative paths:

json
{
  "github.copilot.chat.codeGeneration.instructions": [
    { "file": ".github/instructions/code-review.md" }
  ],
  "github.copilot.chat.commitMessageGeneration.instructions": [
    { "file": ".github/instructions/commit-message.md" }
  ],
  "github.copilot.chat.pullRequestDescriptionGeneration.instructions": [
    { "file": ".github/instructions/pull-request.md" }
  ]
}

Option 4: Scoped Instructions (For complex multi-technology projects)

sh
# Create instructions directory
mkdir -p .github/instructions

# Copy specific instructions
INSTRUCTION_NAME="javascript"  # or "go", "docker", "kubernetes", etc.
curl -fsSL "https://raw.githubusercontent.com/this-is-tobi/tools/main/copilot/instructions/$INSTRUCTION_NAME.instructions.md" \
  -o ".github/instructions/$INSTRUCTION_NAME.instructions.md"

Features

  • GitHub Official Format: Uses .github/copilot-instructions.md and .github/instructions/*.instructions.md
  • Specialized Instructions: Separate files for code review, commits, and PR descriptions
  • Scoped Instructions: Technology-specific instructions with applyTo frontmatter
  • File Targeting: Instructions only apply to relevant file types
  • Modular Design: Mix and match technologies as needed
  • VS Code Integration: Configure specific instructions for different Copilot features
  • Template Checking: Automatically detects and uses existing repository templates

Prompts

NameDescriptionPrompt Name
Repository ReviewReview a repository for code quality, security, and best practicesreview

Usage

sh
# Create instructions directory
mkdir -p .github/prompts

# Copy specific prompt
PROMPT_NAME="review" # or any other prompt name
curl -fsSL "https://raw.githubusercontent.com/this-is-tobi/tools/main/copilot/prompts/$PROMPT_NAME.md" \
  -o ".github/prompts/$PROMPT_NAME.md"

Features

  • GitHub Official Format: Uses .github/prompts/<prompt_name>.md
  • Comprehensive Review: In-depth analysis of code quality, security, performance, and more
  • Detailed Checklist: Covers 19 critical areas of software development
  • Actionable Feedback: Provides explanations and solutions for identified issues
  • Customizable: Easily adapt the prompt to fit specific project needs