[Feature Request] Pre-task gate: enforce skill/context read before coding
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:
- Before any file write/commit, checks if a relevant skill was read in the current session
- Creates a verifiable stamp (not just empty touch — content verified)
- Pre-commit hook checks stamp exists and is fresh (< 2 hours)
git fetch originmust 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
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗