You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**WebFetch / WebSearch** – fetch/search the web (optional)
67
+
68
+
For a complete list of available Claude Code tools, see the [Claude Code tools documentation](https://docs.anthropic.com/en/docs/claude-code/tools).
55
69
56
-
You can use `gh` via **Bash**, e.g.:
57
-
`Bash(gh pr comment "$PR_NUMBER" --body "…")`
58
70
59
-
## MCP tools
71
+
###MCP tools
60
72
61
-
You can attach **MCP** servers so agents can call extra tools. Your agent prompt then needs to instruct when to call a tool.
73
+
**MCP (Model Context Protocol) tools** allow agents to call additional tools from attached MCP servers. Your agent prompt needs to instruct when to call a tool.
The **claude-code-action** may automatically include these built-in MCP servers depending on context (mode, available tokens, PR vs issue, enabled features):
101
+
102
+
-**`github_comment`**
103
+
-**`github_file_ops`**
104
+
-**`github_inline_comment`**
105
+
-**`github_ci`**
106
+
-**`github`** (Official GitHub MCP Server)
107
+
108
+
Add tools from these servers to your command's `allowed-tools` and agent's `tools` as needed (e.g., `mcp__github_inline_comment__create_inline_comment`).
78
109
79
-
## Common tools for claude code
110
+
#### Custom MCP servers
111
+
112
+
You can also attach **custom MCP servers** to provide additional tools beyond the built-in ones. Create or configure custom MCP servers according to your needs and follow the same `mcp__<server>__<tool>` naming convention.
113
+
114
+
For details on MCP tool naming, configuration, and creating custom MCP servers, see the [MCP documentation](https://docs.anthropic.com/en/docs/claude-code/mcp).
115
+
116
+
## Security considerations
117
+
118
+
When configuring agents and commands, follow these security best practices:
119
+
120
+
### Principle of least privilege
121
+
122
+
**Minimize tool access** – Only grant agents the minimum set of tools they need to perform their task. Review both `allowed-tools` in commands and `tools` in agents regularly.
When agents process **untrusted input from external sources** (e.g., PRs from unknown users when using `allowed_non_write_users: "*"` in workflows), treat the agent as potentially **compromised** or "jailbroken".
149
+
150
+
**Key considerations:**
151
+
152
+
1.**Assume prompt injection** – Untrusted PR content may contain prompt injection attempts to manipulate the agent.
153
+
154
+
2.**Minimize tool access** – Strictly limit tools and consider: What's the worst-case action a compromised agent could take? Can it modify files, commit code, or access secrets?
155
+
156
+
3.**Best practices** – Prefer read-only tools (`Read`, `Glob`, `Grep`), restrict Bash to safe commands, avoid `Write`/`Edit`, and use built-in MCP tools over unrestricted Bash.
157
+
158
+
4.**With `allowed_non_write_users: "*"`** – Limit to read-only operations and comments; never grant `Write`, `Edit`, or unrestricted `Bash` access.
159
+
160
+
Always perform a **security assessment**: If an agent with your current tool configuration were fully compromised, what's the worst damage it could cause? If the answer is unacceptable, reduce tool access.
### [PERF-3] Use OnyxListItemProvider hooks instead of useOnyx in renderItem
121
126
127
+
-**Search patterns**: `useOnyx` within components used in `renderItem`
128
+
122
129
-**Condition**: Components rendered inside `renderItem` functions should use dedicated hooks from `OnyxListItemProvider` instead of individual `useOnyx` calls.
123
130
-**Reasoning**: Individual `useOnyx` calls in renderItem create separate subscriptions for each list item, causing memory overhead and update cascades. `OnyxListItemProvider` hooks provide optimized data access patterns specifically designed for list rendering performance.
### [PERF-4] Memoize objects and functions passed as props
140
147
148
+
-**Search patterns**: `useMemo`, `useCallback`, and prop passing patterns
149
+
141
150
-**Condition**: Objects and functions passed as props should be properly memoized or simplified to primitive values to prevent unnecessary re-renders.
142
151
-**Reasoning**: React uses referential equality to determine if props changed. New object/function instances on every render trigger unnecessary re-renders of child components, even when the actual data hasn't changed. Memoization preserves referential stability.
### [PERF-5] Use shallow comparisons instead of deep comparisons
167
176
177
+
-**Search patterns**: `React.memo`, `deepEqual`
178
+
168
179
-**Condition**: In `React.memo` and similar optimization functions, compare only specific relevant properties instead of using deep equality checks.
169
180
-**Reasoning**: Deep equality checks recursively compare all nested properties, creating performance overhead that often exceeds the re-render cost they aim to prevent. Shallow comparisons of specific relevant properties provide the same optimization benefits with minimal computational cost.
1.**Read each changed file carefully** using the Read tool
224
-
2.**For each violation found, immediately create an inline comment** using the available GitHub inline comment tool
225
-
3.**Required parameters for each inline comment:**
236
+
1.**First, get the list of changed files and their diffs:**
237
+
- Use `gh pr diff` to see what actually changed in the PR
238
+
- Focus ONLY on the changed lines, not the entire file
239
+
2.**For analyzing changed files:**
240
+
-**For large files (>5000 lines):** Use the Grep tool to search for specific violation patterns instead of reading the entire file. Focus grep searches on the changed portions shown in the diff.
241
+
-**For smaller files:** You may read the full file using the Read tool
242
+
-**If a Read fails with token limit error:** Immediately switch to using Grep with targeted patterns for the rules you're checking
243
+
3.**Search strategy for large files:** Use the search patterns defined in each rule's "Search patterns" field to efficiently locate potential violations with Grep.
244
+
4.**For each violation found, immediately create an inline comment** using the available GitHub inline comment tool
245
+
5.**Required parameters for each inline comment:**
226
246
-`path`: Full file path (e.g., "src/components/ReportActionsList.tsx")
227
247
-`line`: Line number where the issue occurs
228
248
-`body`: Concise and actionable description of the violation and fix, following the below Comment Format
229
-
4.**Each comment must reference exactly one Rule ID.**
230
-
5.**Output must consist exclusively of calls to mcp__github_inline_comment__create_inline_comment in the required format.** No other text, Markdown, or prose is allowed.
231
-
6.**If no violations are found, create a comment** (with no quotes, markdown, or additional text):
232
-
LGTM :feelsgood:. Thank you for your hard work!
233
-
7.**Output LGTM if and only if**:
234
-
- You examined EVERY line of EVERY changed file
249
+
6.**Each comment must reference exactly one Rule ID.**
250
+
7.**Output must consist exclusively of calls to mcp__github_inline_comment__create_inline_comment in the required format.** No other text, Markdown, or prose is allowed.
251
+
8.**If no violations are found, create a comment** (with no quotes, markdown, or additional text):
252
+
LGTM 👍 Thank you for your hard work!
253
+
9.**Output LGTM if and only if**:
254
+
- You examined EVERY changed line in EVERY changed file (via diff + targeted grep/read)
235
255
- You checked EVERY changed file against ALL rules
236
256
- You found ZERO violations matching the exact rule criteria
237
257
- You verified no false negatives by checking each rule systematically
238
258
If you found even ONE violation or have ANY uncertainty do NOT create LGTM comment - create inline comments instead.
239
-
8.**DO NOT invent new rules, stylistic preferences, or commentary outside the listed rules.**
240
-
9.**DO NOT describe what you are doing, create comments with a summary, explanations, extra content, comments on rules that are NOT violated or ANYTHING ELSE.**
259
+
10.**DO NOT invent new rules, stylistic preferences, or commentary outside the listed rules.**
260
+
11.**DO NOT describe what you are doing, create comments with a summary, explanations, extra content, comments on rules that are NOT violated or ANYTHING ELSE.**
241
261
Only inline comments regarding rules violations or general comment with LGTM message are allowed.
242
262
EXCEPTION: If you believe something MIGHT be a Rule violation but are uncertain, err on the side of creating an inline comment with your concern rather than skipping it.
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/Accessibility.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
name: Accessibility issue template
3
3
about: A template to follow when creating a new issue for accessibility failures
4
+
labels: ["Accessibility", "Weekly"]
4
5
---
5
6
6
7
If you haven’t already, check out our [contributing guidelines](https://github.com/Expensify/ReactNativeChat/blob/main/contributingGuides/CONTRIBUTING.md) for onboarding and email contributors@expensify.com to request to join our Slack channel!
0 commit comments