Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds explicit tool-substitution guidance and enforces it by expanding the denied Bash command set in Claude Code settings, consolidating previously separate navigation/creation rules into a single rules doc.
Changes:
- Expanded
permissions.denyto block additional common Bash utilities (find/grep/cat/sed/etc.). - Removed standalone rule docs for source navigation and directory/file creation.
- Added a “Tool Substitution” section to
bash-command.mddocumenting which tools to use instead.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| home/modules/claude-code/files/settings.json | Expands denied Bash command patterns to encourage dedicated-tool usage. |
| home/modules/claude-code/files/rules/source-navigation.md | Removes now-redundant navigation rule doc. |
| home/modules/claude-code/files/rules/directory-creation.md | Removes now-redundant creation rule doc. |
| home/modules/claude-code/files/rules/bash-command.md | Centralizes tool substitution guidance and exceptions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
59
to
72
| "deny": [ | ||
| "Bash(awk *)", | ||
| "Bash(cat *)", | ||
| "Bash(echo *)", | ||
| "Bash(find *)", | ||
| "Bash(grep *)", | ||
| "Bash(head *)", | ||
| "Bash(ls *)", | ||
| "Bash(mkdir *)", | ||
| "Bash(printf *)", | ||
| "Bash(rg *)", | ||
| "Bash(sed *)", | ||
| "Bash(tail *)", | ||
| "Bash(touch *)", |
|
|
||
| ## Tool Substitution | ||
|
|
||
| Use dedicated tools instead of the following Bash commands. These are denied in settings.json. |
Comment on lines
+17
to
+26
| | `find` | Glob | Pattern-based file search | | ||
| | `ls`, `tree` | Glob | For directory listing. Use Read to inspect a single directory when needed | | ||
| | `grep`, `rg` | Grep | Content search across files | | ||
| | `cat`, `head`, `tail` | Read | Read supports line offset and limit for partial reads | | ||
| | `sed`, `awk` | Edit | Exact string replacement in files | | ||
| | `mkdir`, `touch` | Write | Write auto-creates parent directories and can create empty files | | ||
| | `echo`, `printf` | Write (files) or direct text output (communication) | Never use shell output redirection | | ||
|
|
||
| Additional guidance: | ||
| - Use Explore agent (Agent tool with subagent_type=Explore) for broader codebase navigation when simple Glob/Grep is insufficient |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.