Agent skill

Setup Husky Dotnet

by SebastienDegodez in SebastienDegodez/copilot-instructions

A skill your agent uses when configuring Git hooks in .NET projects before team commits occur, to enforce commit message standards and code formatting automatically

Apache-2.0Auto-check passedDevelopment

Install Setup Husky Dotnet

skills CLI
$ npx skills add SebastienDegodez/copilot-instructions --skill setup-husky-dotnet -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SebastienDegodez/copilot-instructions setup-husky-dotnet --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SebastienDegodez/copilot-instructions.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/setup-husky-dotnet .claude/skills/setup-husky-dotnet && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
setup-husky-dotnet
GitHub stars
198
Token cost
~1.3k tokens
SKILL.md length
449 words
Files
5 (incl. scripts, assets)
Skills in repo
19
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when configuring Git hooks in .NET projects before team commits occur, to enforce commit message standards and code formatting automatically

  • Configuring Git hooks in .NET projects before team commits occur
  • SKILL.md covers When to Use, Critical: .NET Tool Only, Core Pattern and Quick Reference, plus 6 more sections
  • Calls dotnet and git
  • Enforce commit message standards and code formatting automatically

What it does

Setup Husky Dotnet is an agent skill from SebastienDegodez/copilot-instructions. Use when configuring Git hooks in .NET projects before team commits occur, to enforce commit message standards and code formatting automatically

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and assets (for example `troubleshooting.md`).

It sits in Development, covering Commit messages and Linting and formatting. It works with .NET and Git. The repository describes itself as: A comprehensive codebase of best practices, coding rules, and workflow automation for AI-assisted development with GitHub Copilot. Includes DDD, Clean Architecture, testing… The licence is Apache-2.0.

When your agent uses it

  • Configuring Git hooks in .NET projects before team commits occur
  • Enforce commit message standards and code formatting automatically

Example prompts

  • “/setup-husky-dotnet”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 0f0dccf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • dotnet
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Setup Husky Dotnet loads about 1.3k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 449 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from SebastienDegodez/copilot-instructions at commit 0f0dccf, republished under its Apache-2.0 licence (© SebastienDegodez). 449 words, ~1,348 tokens.

Download SKILL.mdSave it as .claude/skills/setup-husky-dotnet/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
setup-husky-dotnet
description
Use when configuring Git hooks in .NET projects before team commits occur, to enforce commit message standards and code formatting automatically

Husky Setup for .NET Projects (dotnet tool)

Install and configure Husky Git hooks for .NET projects using dotnet tool (not npm). Enforces conventional commit messages and code formatting via git hooks.

When to Use

  • Setting up Git governance in .NET projects (new or existing)
  • Enforcing team commit standards before they reach main branch
  • Preventing unformatted code or invalid messages in version control
  • REQUIRED BEFORE: First commits when governance is non-negotiable

When NOT to use: If .NET SDK unavailable, manually configure git hooks instead.

Critical: .NET Tool Only

Husky (dotnet tool) is pure .NET. Your environment needs:

  • .NET SDK 10.0+
  • dotnet CLI available in PATH
  • git initialized

No Node.js, npm, or JavaScript tools required.

Core Pattern

1. Create tool-manifest.json + install Husky dotnet tool
2. Enable git hook infrastructure with dotnet husky install
3. Create commit-msg hook that validates message format
4. Create pre-commit hook that runs dotnet-format
5. MANDATORY: Test hooks with both valid + invalid commits
6. Commit .husky/ and task-runner.json to git

Quick Reference

StepCommandCreatesPurpose
Setupdotnet new tool-manifest.config/dotnet-tools.jsonTool tracking
Installdotnet tool install huskyAdds Husky to toolingMakes Husky available
Enabledotnet husky install.husky/ directoryPrepares git hook system
Msg Hookdotnet husky add commit-msgHook fileValidates commit format
Pre-Commitdotnet husky add pre-commitHook fileRuns formatting before commit

Implementation

Prerequisites - VERIFY FIRST

CRITICAL - Run these commands NOW:

bash
dotnet --version   # Must return 6.0+
git --version      # Must work
dotnet-format --version  # Must be installed

If ANY fails, STOP — install missing tools before proceeding.

Required software:

  • .NET SDK 6.0+ (download from dotnet.microsoft.com)
  • Git repository initialized (git init if needed)
  • dotnet-format global: dotnet tool install -g dotnet.format
Installation Steps

Step 1: Create tool manifest + Install Husky (in project root)

bash
cd your-dotnet-project

# Create reproducible tool manifest
dotnet new tool-manifest

# Install Husky as .NET tool
dotnet tool install husky

# Initialize git hook system
dotnet husky install

Verify: ls -la .husky/ shows directory with subdirectories.

Step 2: Setup hooks and config

Copy the C# validator to your project:

bash
mkdir -p .husky/csx
cp ./commit-lint.csx .husky/csx/commit-lint.csx

Copy task-runner.json from skill assets/ to project root:

bash
cp ./task-runner.json.example ./task-runner.json

Note: task-runner.json.example contains BOTH commit-msg and pre-commit tasks. Use as-is.

Create both hooks:

bash
dotnet husky add commit-msg -c "dotnet husky run --name commit-message-linter"
dotnet husky add pre-commit -c "dotnet husky run --name dotnet-format"

Done! Both hooks are now configured.

Step 3: MANDATORY - Test hooks

⚠️ DON'T SKIP TESTING

bash
# Create safe test branch (NEVER test on main)
git checkout -b test-hooks-validation

# Test 1: Invalid message MUST be rejected
echo "dummy" > test.cs
git add test.cs
git commit -m "bad message"  # Should FAIL
echo $?  # Must be 1 (failure)

# Test 2: Valid message MUST be accepted
git commit --amend -m "feat(test): verify hooks working"  # Should SUCCEED
echo $?  # Must be 0 (success)

# Cleanup
git checkout main
git branch -D test-hooks-validation

Both tests must pass before proceeding.

Show full SKILL.md (163 more words)Show less

Files in Skill Directories

scripts/ — Reusable code:

  • commit-lint.csx — C# validator for conventional commits (copy to .husky/csx/)

assets/ — Configuration examples:

  • task-runner.json.example — Hook task configuration (copy to project root)

Common Mistakes

MistakePrevention
dotnet --version failsInstall .NET 6.0+, verify PATH before setup
.husky/ not createdRun dotnet husky install in project root
Hooks don't executeCheck: ls -la .husky/commit-msg exists
Tests show git succeeds with invalid messageHooks never ran. Check task-runner.json syntax.
dotnet-format not found during pre-commitInstall: dotnet tool install -g dotnet.format

What Gets Committed to Git

MUST commit:

  • .husky/ directory (all files)
  • task-runner.json (hook configuration)
  • .config/dotnet-tools.json (tool version lock)

DO NOT commit:

  • Nothing else (all tools managed via dotnet-tools.json)

Result: Team clones repo → dotnet tool restore → hooks active immediately.

CI/CD Integration

Husky runs on developer machines only, NOT in CI/CD (by design).

CI must validate separately:

bash
dotnet-format --verify-no-changes

Troubleshooting

See troubleshooting.md in this skill for:

  • Full diagnostic checklist if hooks not running
  • task-runner.json configuration issues
  • Monorepo setup
  • Problems after merge conflicts
  • Windows/Mac/Linux differences

© SebastienDegodez, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, assets) in skills/setup-husky-dotnet of SebastienDegodez/copilot-instructions.

  • SKILL.md
  • assets/task-runner.json.example
  • scripts/commit-lint.csx
  • task-runner.json.example
  • troubleshooting.md

Open the folder on GitHubat commit 0f0dccf

Compare with similar skills

Setup Husky Dotnet next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Setup Husky Dotnet compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Setup Husky Dotnet this skillSebastienDegodez/copilot-instructions198—~1.3kAutomated safety check: PassApache-2.0
Git HooksProrise-cool/Claude-Code-Multi-Agent305—~3.6kAutomated safety check: NotesNone
Saleor Commit Workflowsaleor/saleor23k—~575Automated safety check: PassBSD-3-Clause
Lint Commit PRTresjs/tres3.8k—~1.1kAutomated safety check: PassMIT
PR Pushicebear0828/codex-proxy1.8k—~2.2kAutomated safety check: NotesCustom licence
PR Pushicebear0828/codex-proxy1.8k—~2.3kAutomated safety check: NotesCustom licence

Similar skills

  • Git Hooks

    Prorise-cool/Claude-Code-Multi-Agent

    Central authority on git hook implementations, modern best practices, and tooling for .NET/C, JavaScript/TypeScript, Python, and polyglot repositories.

    305 GitHub stars~3.6k tokensUpdated 23 days ago
    DevelopmentAuto-check: notes
  • Commits changes in the Saleor codebase and works through pre-commit hook failures from ruff, mypy, the GraphQL schema check and the migrations check.

    23k GitHub stars~575 tokensUpdated today
    DevelopmentAuto-check passed
  • Lint Commit PR

    Tresjs/tres

    Lint local changes, auto-fix, conventional commit, and optionally create PR

    3.8k GitHub stars~1.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • PR Push

    icebear0828/codex-proxy

    Package the current working changes into a standards-compliant codex-proxy pull request: branch hygiene, commit message linting, CHANGELOG prompt, conventional commit, push, and gh pr create against…

    1.8k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check: notes
  • PR Push

    icebear0828/codex-proxy

    Package the current working changes into a standards-compliant codex-proxy pull request: branch hygiene, commit message linting, CHANGELOG prompt, conventional commit, push, and gh pr create against…

    1.8k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check: notes
  • Commit

    antiwork/gumroad

    Stage and commit changes with a clear, concise commit message.

    9.8k GitHub stars~503 tokensUpdated today
    DevelopmentAuto-check passed

More from SebastienDegodez/copilot-instructions

All 19 skills in this repo
  • Clean Architecture Dotnet

    SebastienDegodez/copilot-instructions

    A skill your agent uses when domain logic leaks into API/Infrastructure, project references violate layer boundaries, or you need to decide between CQS (always), CQRS bus (complex domains), and DDD…

    198 GitHub stars~5.1k tokensUpdated 2 days ago
    Auto-check passed
  • Outside In TDD

    SebastienDegodez/copilot-instructions

    A skill your agent uses when writing tests from the outside-in, defining behavior before code, or any feature where tests should start from observable business behavior and let internal design emerge

    198 GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check passed
  • Creating Dotnet MCP Servers

    SebastienDegodez/copilot-instructions

    A skill your agent uses when building Model Context Protocol (MCP) servers in .NET, configuring tools, transports (SSE/stdio), JSON serialization for AOT, or testing MCP endpoints

    198 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed
  • Generate Microcks Openapi Samples

    SebastienDegodez/copilot-instructions

    A skill your agent uses when creating OpenAPI mock examples for Microcks, setting up request/response routing with dispatchers, or mapping request fields to mock responses

    198 GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check passed
  • Analyzing Code

    SebastienDegodez/copilot-instructions

    A skill your agent uses when understanding project composition by language, measuring code change impact, or generating code statistics for CI/CD metrics

    198 GitHub stars~1k tokensUpdated 2 days ago
    Auto-check passed
  • Extracting Code Structure

    SebastienDegodez/copilot-instructions

    A skill your agent uses when listing all methods, functions, or classes in a file, exploring unfamiliar code, getting API overviews, or deciding what to read selectively without loading entire files

    198 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed

Works with

Categories

Questions about Setup Husky Dotnet

What does Setup Husky Dotnet do?

A skill your agent uses when configuring Git hooks in .NET projects before team commits occur, to enforce commit message standards and code formatting automatically. Setup Husky Dotnet is an agent skill from SebastienDegodez/copilot-instructions.

When should I use Setup Husky Dotnet?

Setup Husky Dotnet fits situations like: configuring Git hooks in .NET projects before team commits occur; enforce commit message standards and code formatting automatically.

How do I install Setup Husky Dotnet in Claude Code?

Run `npx skills add SebastienDegodez/copilot-instructions --skill setup-husky-dotnet -a claude-code`. Or copy the skill folder (skills/setup-husky-dotnet in SebastienDegodez/copilot-instructions) into .claude/skills/setup-husky-dotnet in your project. Claude Code loads it when a task matches its description.

How do I install Setup Husky Dotnet in Codex?

Run `npx skills add SebastienDegodez/copilot-instructions --skill setup-husky-dotnet -a codex`. Or copy the skill folder (skills/setup-husky-dotnet in SebastienDegodez/copilot-instructions) into .agents/skills/setup-husky-dotnet in your project. Codex loads it when a task matches its description.

Can I use Setup Husky Dotnet in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SebastienDegodez/copilot-instructions --skill setup-husky-dotnet -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/setup-husky-dotnet, .gemini/skills/setup-husky-dotnet, .github/skills/setup-husky-dotnet and .opencode/skills/setup-husky-dotnet in your project.

What does Setup Husky Dotnet need to run?

Going by SKILL.md and its folder, Setup Husky Dotnet needs the command-line tools its instructions call (dotnet and git). Our summary lists: Node.js.

Does Setup Husky Dotnet access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Setup Husky Dotnet safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Setup Husky Dotnet use?

Setup Husky Dotnet is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Setup Husky Dotnet use?

About 1.3k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Setup Husky Dotnet?

Skills that share tags, products or a category with Setup Husky Dotnet: Git Hooks (Prorise-cool/Claude-Code-Multi-Agent, 305 stars), Saleor Commit Workflow (saleor/saleor, 23k stars), Lint Commit PR (Tresjs/tres, 3.8k stars) and PR Push (icebear0828/codex-proxy, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Setup Husky Dotnet?

SebastienDegodez (a GitHub user) maintains it in SebastienDegodez/copilot-instructions, which has 198 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 6, 2026.

Source: SebastienDegodez/copilot-instructions on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.