Skip to content

Commit 561c9c6

Browse files
committed
feat: Add detailed guidance on script language choices and best practices for hooks
1 parent 244b63d commit 561c9c6

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/skills/copilot-hooks/SKILL.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
## Script Language Choice
2+
3+
Hooks can execute scripts in many languages: shell, PowerShell, Python, C#, and more. However, not all script types are available on every platform, and some require extra dependencies:
4+
5+
- **Shell scripts** (`bash`, `sh`) are not available on Windows by default.
6+
- **PowerShell** is Windows-native but available cross-platform if installed.
7+
- **Python** is widely used for hooks due to its cross-platform nature, but requires Python to be installed on the system.
8+
- **C#** scripts (with `dotnet-script` or file-based C#) are a good fit for .NET projects, but require the .NET SDK.
9+
- **Node.js**, **Go**, and others are possible if the runtime is present.
10+
11+
**Best practice:** Always ask the user which language/tool to use for hook scripts, and confirm that the required runtime is available in the target environment. If unsure, suggest a default based on the project stack.
12+
13+
**Example prompt:**
14+
> "What language/tool do you want to use for this hook script? (C#, Python, shell, etc.)"
15+
16+
If you use Python, check that it is installed before relying on it. For C#, prefer file-based scripts for portability.
17+
118
---
219
name: copilot-hooks
320
description: >

0 commit comments

Comments
 (0)