본문으로 건너뛰기
cccskills
무료GitHub에 공개

creating-hooks

Creates GitHub Copilot hooks for VS Code using `hooks.json`, supporting scripts, and companion docs. Use when automating deterministic checks, pre/post tool policies, or reusable hook packs that need safe defaults, observability, and clear installation guidance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jaktestowac/awesome-copilot-for-testers스타 118(GitHub 118 + cccskills 0)
연동 도구GitHub

실행 점수 미검증

설치 방법 보기

포함된 파일(4)

  • SKILL.md4.5 KB
  • resources/hook-example-pack.md2.8 KB
  • resources/hook-quality-checklist.md1.3 KB
  • resources/hook-template-pack.md2.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Creating Copilot Hooks

Use this skill when the right answer is not more advice, but deterministic behavior at a specific lifecycle point. It helps design hooks that are safe, documented, and understandable.

When to Use

Use this skill when the user asks for things like:

  • "create a Copilot hook for this policy"
  • "block dangerous commands before they run"
  • "log or validate tool usage automatically"
  • "add a reusable hook pack with docs and scripts"
  • "turn this manual guardrail into a hook"

Typical scenarios:

  • pre-tool checks for risky shell commands
  • post-tool validation or formatting triggers
  • audit or observability hooks for shared environments
  • installing a documented hook bundle for reuse across workspaces

Outcome Standard

A strong hook contribution usually includes:

  • the right lifecycle event and the smallest useful behavior
  • explicit safety defaults and clear denial or warning messages
  • a documented hooks.json configuration
  • cross-platform script guidance when Windows and Bash users both matter
  • a README or pack that explains purpose, setup, and limitations

Hook Design Rules

  • Start with observe or warn - block only when the policy is stable and the failure message is clear.
  • Keep hooks fast - long-running hooks become friction generators instead of safeguards.
  • Be explicit on denial - if a hook blocks work, explain exactly why and what to do instead.
  • Separate policy from docs - the script enforces behavior; the README explains it.
  • Prefer deterministic checks - hooks should not depend on fuzzy interpretation when avoidable.

Workflow

Phase 0: Decide whether a hook is the right primitive

Use a hook when deterministic automation is needed at a lifecycle event. If the need is guidance only, use instructions. If the need is a reusable workflow, use a skill. If the need is a user-started task, use a prompt.

Phase 1: Choose the lifecycle event

Clarify or infer:

  • what event should trigger the hook
  • whether the behavior is observe, warn, mutate, or deny
  • how quickly the hook must complete
  • whether it needs cross-platform script support

Phase 2: Design the safety model

Before scripting:

  • define the exact condition being checked
  • decide what the hook should output on allow, warn, or deny
  • write the denial or warning message in user language, not policy jargon
  • make sure the hook fails safely when inputs are missing or malformed

Phase 3: Create the hook pack

Use the resources below as the default starting point:

  • ./resources/hook-template-pack.md
  • ./resources/hook-example-pack.md

A complete pack should usually include:

  • hooks.json
  • one or more supporting scripts
  • a README with purpose, setup, and behavior notes

Phase 4: Validate the operational fit

Check the result against ./resources/hook-quality-checklist.md.

Pay special attention to:

  • whether the hook is fast enough for the event it runs on
  • whether the messages are actionable
  • whether Windows and non-Windows paths are addressed when required
  • whether the hook blocks only what it truly means to block

Common Failure Modes

  • using a hook when a normal instruction would have been enough
  • blocking large classes of commands without a helpful reason
  • writing scripts that are too slow for frequent lifecycle events
  • shipping hooks.json without installation or behavior documentation
  • creating platform-specific hooks with no fallback or adaptation guidance

Resource Map

  • ./resources/hook-template-pack.md - template pack with README, config, and script scaffolds
  • ./resources/hook-example-pack.md - worked example of a safe, documented policy hook
  • ./resources/hook-quality-checklist.md - final review checklist before shipping

Definition of Done

A task using this skill is complete when:

  • the hook behavior matches a clear lifecycle need
  • the configuration, scripts, and documentation agree with each other
  • failure, allow, and deny messages are understandable
  • the pack is install-ready or clearly adapted for the target environment
  • the final result passes the quality checklist without obvious operational risk

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Defines, computes, and interprets test and quality metrics: pass rate, flake rate, suite duration, defect escape rate, time to detect, and coverage with its caveats. Use when building a QA dashboard, reporting suite health to stakeholders, comparing releases over time, or when a coverage percentage or a bug count is being treated as a measure of quality.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jaktestowac/awesome-copilot-for-testers1182026년 8월 27일 업데이트

Analyzes diffs, changed files, hotfixes, and release candidates to identify where regression risk spreads and what must be retested first. Use when scoping retest after a change, reviewing QA impact for a pull request, or building a minimal confidence suite for release validation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jaktestowac/awesome-copilot-for-testers1182026년 8월 27일 업데이트

Writes and reviews API automation tests with Playwright Test, covering setup/teardown, assertions, data management, and hybrid API+UI flows. Use when creating backend API tests, contract checks, data-driven API coverage, API+UI hybrid workflows, or reviewing existing Playwright API suites.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jaktestowac/awesome-copilot-for-testers1182026년 8월 27일 업데이트

Measures the risk that code shipped without anyone understanding it: a teach-back attestation on high-risk changes, a risk band from changed-code complexity, diff size and whether a human explanation accompanied it, and optional AI-authorship provenance. Findings stay advisory by design. Use when an AI-assisted codebase grows faster than the team reads it, when reviews are rubber-stamped, when nobody can explain a module that ships weekly, or when leadership asks how much of the code the team can actually maintain.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jaktestowac/awesome-copilot-for-testers1182026년 8월 27일 업데이트

Produces an evidence-backed go/no-go recommendation: exit criteria status, open-defect risk profile, coverage against risk, environment parity, rollback readiness, and the residual risk stated plainly. Use when preparing a release sign-off, when someone asks whether a build is ready to ship, or when a decision to release is being made on impressions rather than evidence.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jaktestowac/awesome-copilot-for-testers1182026년 8월 27일 업데이트

Records human verification - code review, exploratory sessions, UAT, accessibility passes, UX and observability reviews - as dated, attributed attestations in a register, so human-centric practices stay in the quality contract without pretending to be automated checks. Use when a strategy requires verification no tool can prove, when sign-off evidence is scattered across chats and tickets, when a gap matrix needs to distinguish "attested" from "passed", or when an audit asks who verified what and when.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jaktestowac/awesome-copilot-for-testers1182026년 8월 27일 업데이트

jaktestowac의 스킬 모두 보기

이 스킬의 문제 신고