harnesscp-hooks

Designs and manages VS Code Copilot hooks for automated quality checks and safety gates.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/LSDIPPOLLC/harness-cp --skill harnesscp-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harnesscp-hooks
Source: https://github.com/LSDIPPOLLC/harness-cp/tree/main/.github/skills/harnesscp-hooks
Command: npx skills add https://github.com/LSDIPPOLLC/harness-cp --skill harnesscp-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you design, implement, debug, and manage VS Code Copilot hooks so repetitive quality checks, safety gates, and session automation happen automatically instead of relying on memory.

Core Features & Use Cases

  • Lifecycle Automation: Configure hook behavior for session start, prompt submission, tool execution, compaction, subagent events, and session stop.
  • Quality and Safety Gates: Auto-format code, auto-lint changes, run tests on edits, block dangerous commands, and validate sensitive operations before they proceed.
  • Context and State Management: Inject project context, preserve memory before compaction, and capture end-of-session health checks or reports.
  • Debugging and Deployment: Diagnose broken hook wiring, validate JSON definitions, test hook scripts independently, and deploy cross-platform configurations reliably.

Quick Start

Use this skill to create a Copilot hook that automatically formats edited files and blocks unsafe commands in your workspace.

Frequently Asked Questions about harnesscp-hooks

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

FAQPage Schema
How do I automate Copilot hooks in VS Code for formatting and linting?

VS Code Copilot hooks automate quality checks by using JSON definitions and stdin-driven scripts to intercept lifecycle events. They route event-specific triggers to enforce formatting, linting, and safety gates automatically.

Can I block dangerous commands using VS Code Copilot hooks?

Yes, Copilot hooks can block dangerous commands by validating sensitive operations through event-specific routing. The Skill configures safety gates that return clear allow or deny responses before unsafe commands execute.

How do I inject project context into Copilot sessions automatically?

Inject project context automatically by configuring Copilot hooks triggered at session start. This Skill manages context injection by defining hook scripts that feed background information into the session before prompt submission.

What is the best way to debug broken Copilot hook scripts?

Debug broken Copilot hook scripts by validating JSON definitions and testing stdin-driven scripts independently. This Skill diagnoses wiring issues and validates configurations to ensure reliable cross-platform execution.

Do Copilot hooks support cross-platform execution for end-of-session health checks?

Copilot hooks support cross-platform execution for end-of-session health checks via standardized JSON definitions. This Skill ensures stdin-driven scripts route session stop events reliably across different operating systems.