Claude keeps naming things after the mistakes I told it not to make. So I built a hook for it.
A developer created a hook to prevent Claude from naming files based on past mistakes, like adding "no_ketchup" to a grilled cheese file name after being told not to include ketchup. The solution, called "ship-the-result," involves a SKILL.md file for rules and tests, a scanner script to flag six types of residue, and a PreToolUse hook. This hook runs the scanner on git commit, gh pr create, staged comments, test names, and new filenames, blocking the action and explaining why if a flag is hit. The developer notes that prompt rules fade, but regex does not, making this a more robust solution.
This solution uniquely addresses the issue of LLM prompt rules fading over time by implementing a PreToolUse hook and regex-based scanning, unlike typical prompt engineering approaches.
时间与来源
时间显示为 UTC
显示时区:UTC
本地时区尚不可用,暂时显示 UTC。
收录当时偏移:UTC+02026年9月15日 03:01 UTC
- 收录
- 2026年9月15日 03:01
- 来源类型
- 开发者社区
本站未收录正文。
前往源站阅读 →