CC-301a · Module 1
Keyword Trigger Design
3 min read
A keyword trigger is a phrase in your CLAUDE.md that activates a specific workflow when Claude encounters it in a user prompt. The simplest example: you write "When I say 'build the app', run npm run build && npm run test" in your CLAUDE.md. Now every time you type "build the app," Claude executes that exact command sequence. No ambiguity. No interpretation. A deterministic mapping from phrase to behavior.
Trigger design is more nuanced than it appears. The phrase must be specific enough to avoid false positives — you do not want Claude running your build pipeline every time someone mentions the word "build" in a casual question about architecture. But it must be natural enough that you actually use it. "Execute the comprehensive build validation pipeline" is precise but nobody will ever type it. "Build the app" is natural and sufficiently specific.
The best triggers are verb-noun pairs that map to exactly one workflow. "Deploy the worker." "Run the suite." "Generate OG images." "Seed the CRM." Each phrase is unambiguous in your project context, even if it would be ambiguous in general English. "Run the suite" means nothing in isolation, but in a project with one test suite, it means exactly one thing.
Avoid single-word triggers. "Deploy" could mean deploy the frontend, deploy the worker, deploy to staging, or deploy to production. "Deploy the worker" narrows to exactly one action. "Deploy to prod" narrows to exactly one action. The extra two words eliminate an entire class of misfire.