Python tool 'Pleasantries' blocks greeting-only prompts to AI coding CLIs, saving tokens

A developer has released a lightweight Python pre-hook script called Pleasantries that intercepts greeting-only inputs — such as 'hi', 'ok', or 'thank you' — before they reach AI coding CLI models. The tool was built after its creator noticed habitual greetings sent to tools like Claude Code and Qwen Code were triggering full model calls despite carrying no task value. Pleasantries uses regex fullmatch logic to block standalone pleasantries while allowing prompts that include such words alongside a real task, avoiding false positives. It currently supports 15 AI coding CLIs, including Claude Code, Gemini CLI, Cursor, and Codex CLI, and requires no external dependencies. The script is available on GitHub and can be installed and configured in under a minute, with customizable blocklists and support for adding new CLI adapters.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in