[Feature Request] Pre-task gate: enforce skill/context read before coding

Resolved 💬 2 comments Opened Apr 10, 2026 by 2tbmz9y2xt-lang Closed Apr 10, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single report
  • [x] I am using the latest version of Claude Code

Summary

Follow-up to #45738 (Pattern 2: never uses skills) and #45731.

Claude Code has custom skills (SKILL.md files) that encode exact checklists for specific task types (formal proofs, code review, PR creation, audits). Despite being available, Opus never reads them voluntarily before starting work. When reminded, reads once, then stops.

Proposed Solution

A pre-task gate mechanism that:

  1. Before any file write/commit, checks if a relevant skill was read in the current session
  2. Creates a verifiable stamp (not just empty touch — content verified)
  3. Pre-commit hook checks stamp exists and is fresh (< 2 hours)
  4. git fetch origin must have run within 60s of stamp creation (prevents stale baseline)

This converts a document-level rule into infrastructure enforcement — the only pattern that works in practice.

Why This Matters

Over months of daily usage, document-level rules ("read the skill before starting") have 0% voluntary compliance rate. Hook-level enforcement (pre-commit checks) has 100% catch rate. The gap between these two is the core problem described in #45738.

Environment

  • Claude Code CLI (latest)
  • Model: Claude Opus (Max plan)
  • macOS

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗