How prompt enhancement works
How Lighthouse adds your repository's security rules to a coding request before your agent starts.
Prompt enhancement gives your coding agent the security rules that apply to a request before it writes code. Instead of trusting the agent to know that admin routes need a role check, you tell it every time, without typing it yourself.
/lighthouse-enhance add a password reset endpointWhat happens
- Your agent sends the request, exactly as you wrote it, with the repository and branch.
- Lighthouse picks the security cards that apply: local cards from the branch's latest ingestion and global cards for your libraries.
- It returns the request with that guidance attached. This is the enhanced prompt.
- Your agent implements the original request and follows the guidance.
Each piece of guidance added is a security point. Many carry a CWE, the standard ID for a type of weakness, such as CWE-639 for authorization bypass through a user-controlled key.
It runs only when you ask
Ordinary requests are never changed. Enhancement runs only when you invoke the skill: /lighthouse-enhance in Claude Code, or lighthouse-enhance in Codex.
Which branch's cards are used
- The branch you name with
--branch. - Otherwise, the branch checked out in your repository.
- If that branch has no completed ingestion, the repository's default branch.
/lighthouse-enhance --branch release add a password reset endpointWhen it can't run
If enhancement fails, for example you're not signed in, your team is out of credits, or Lighthouse can't be reached, the agent explains the problem and stops. It waits until you tell it to retry or to continue without enhancement. You never get unguided code without knowing.
What's stored
Lighthouse stores the original request and the enhanced prompt so your team can review them in enhancement history. Secrets in the request are redacted first. Your code isn't sent for enhancement.
Set it up in Claude Code or Codex.