20.9 GB
673,093 files
Updated 4 months ago
Name
Size
subagent_stop.py1.17 kB
xet
stop_hook.py4.91 kB
xet
session_start.py5.27 kB
xet
post_tool_use.py4.21 kB
xet
README.md1.23 kB
xet
README.md

Copilot Agent Hooks Scripts

This directory contains Python scripts used by agent hooks to automate workflow validation.

Scripts

session_start.py

Runs at session start to inject project context:

  • Current git branch and commit
  • Uncommitted changes count
  • Open issues (if gh CLI available)
  • Snapshot health summary (if available)
  • Available skills reminder

post_tool_use.py

Runs after file edit tools to provide immediate feedback:

  • Runs ESLint on changed TypeScript files
  • Reports lint errors back to the model

stop_hook.py

Runs before session ends to enforce workflow:

  • Checks for uncommitted TypeScript changes
  • Reminds about pre-commit checks
  • Blocks completion if staged changes aren't committed

subagent_stop.py

Runs when subagents complete:

  • Currently a passthrough for logging
  • Can be extended to validate reviewer output

Requirements

These scripts use Python 3.9+ with no external dependencies (beyond what's already in the repo).

They expect:

  • git CLI available
  • gh CLI available (optional, for issue context)
  • npx available for running ESLint

Hook Configuration

See .github/hooks/maintainer-hooks.json for the hook configuration that loads these scripts.

Total size
20.9 GB
Files
673,093
Last updated
Mar 19
Pre-warmed CDN
US EU US EU

Contributors