$npx -y skills add PolicyEngine/policyengine-claude --skill policyengine-github-agentWorking with the PolicyEngine GitHub agent bot on issues and PRs — how it is invoked and the hard rule that keeps it from looping. Load before replying to, or posting as, the bot. Triggers: "@policyengine bot", "GitHub agent", "policyengine-github-agent", "bot doom loop", "bot me
| 1 | # PolicyEngine GitHub agent |
| 2 | |
| 3 | ## For Users |
| 4 | |
| 5 | The PolicyEngine GitHub agent is an automated bot that can be invoked on GitHub issues and pull requests using `@policyengine` mentions. It helps with code reviews, bug fixes, and implementing features across PolicyEngine repositories. |
| 6 | |
| 7 | ## For Contributors |
| 8 | |
| 9 | ### Critical: Avoiding Doom Loops |
| 10 | |
| 11 | **NEVER use '@policyengine' or '@policyengine-auto' in bot responses.** These mentions trigger the bot and create infinite loops where the bot repeatedly responds to itself. |
| 12 | |
| 13 | #### Why This Matters |
| 14 | |
| 15 | When the bot posts a comment containing `@policyengine`, GitHub notifies the bot account, which triggers another invocation. This creates a chain reaction of bot responses that can generate dozens or hundreds of comments before being stopped. See [PR #22](https://github.com/PolicyEngine/policyengine-github-agent/pull/22) for a real example of this issue. |
| 16 | |
| 17 | #### Safe Alternatives |
| 18 | |
| 19 | Instead of mentioning the bot directly: |
| 20 | |
| 21 | ❌ **Don't do this:** |
| 22 | - "Thanks @policyengine for the suggestion!" |
| 23 | - "I've addressed @policyengine's feedback" |
| 24 | - "cc @policyengine-auto" |
| 25 | |
| 26 | ✅ **Do this instead:** |
| 27 | - "I've implemented the suggested changes" |
| 28 | - "The feedback has been addressed" |
| 29 | - "Updated based on the review comments" |
| 30 | - Simply refer to "the bot" or "the agent" without the @ mention |
| 31 | |
| 32 | ### Bot Invocation |
| 33 | |
| 34 | The bot can only be invoked by members of the [PolicyEngine/core-developers](https://github.com/orgs/PolicyEngine/teams/core-developers) team. Non-members will receive a permission error. |
| 35 | |
| 36 | ### Response Style |
| 37 | |
| 38 | When the bot responds to issues or PRs: |
| 39 | - Keep responses concise and actionable |
| 40 | - Focus on the technical task at hand |
| 41 | - Avoid unnecessary pleasantries or acknowledgments |
| 42 | - Never include @ mentions of the bot usernames |
| 43 | |
| 44 | ## Resources |
| 45 | |
| 46 | - [policyengine-github-agent repository](https://github.com/PolicyEngine/policyengine-github-agent) |
| 47 | - [PR #22: Stop doom loops](https://github.com/PolicyEngine/policyengine-github-agent/pull/22) |