Skip to content

Commit 3cada13

Browse files
authored
docs: improve CLI best practices organization in workflow rules (#3)
- Organize | cat requirements into clear categories - Add comprehensive coverage for GitHub CLI commands - Improve readability and maintainability of the rules - Add more specific examples for different command types
1 parent ae019f9 commit 3cada13

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

.cursor/rules/workflow.mdc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,11 @@ When you request to "initialize git repo", I will perform the following steps:
119119
### CLI Best Practices
120120
- **Always use SSH format for git remotes** (`git@github.com:user/repo.git`) rather than HTTPS format to leverage SSH key authentication instead of token-based authentication
121121
- **CRITICAL: Always append `| cat` to commands that use pagers** to prevent interactive paging that requires manual exit with `:q`. This is MANDATORY for:
122-
- `git log` commands: `git log --oneline -5 | cat`
123-
- `git show` commands: `git show HEAD | cat`
124-
- `git diff` commands: `git diff | cat`
125-
- `gh repo view` commands: `gh repo view | cat`
126-
- `gh pr view` commands: `gh pr view | cat`
127-
- `gh issue view` commands: `gh issue view | cat`
128-
- `man` commands: `man git | cat`
129-
- Any command that might output more than a screen's worth of content
130-
- **Rule Exception**: Only omit `| cat` when you specifically need interactive features (like `git add -p` for patch mode)
122+
- **Git commands**: `git log --oneline -5 | cat`, `git show HEAD | cat`, `git diff | cat`
123+
- **GitHub CLI display commands**: `gh repo view | cat`, `gh pr view | cat`, `gh issue view | cat`, `gh pr show | cat`, `gh issue show | cat`, `gh release view | cat`, `gh auth status | cat`, `gh help | cat`
124+
- **GitHub CLI list commands**: `gh pr list | cat`, `gh issue list | cat`, `gh repo list | cat`, `gh release list | cat`, `gh run list | cat`
125+
- **GitHub CLI diff/log commands**: `gh pr diff | cat`, `gh run view | cat`
126+
- **GitHub CLI API commands**: `gh api | cat` (when expecting large responses or to prevent potential paging)
127+
- **Man pages**: `man git | cat`, `man gh | cat`
128+
- **Any command that might output more than a screen's worth of content**
129+
- **Rule Exception**: Only omit `| cat` when you specifically need interactive features (like `git add -p` for patch mode) or when using action commands that don't display large amounts of output (like `gh pr create`, `gh issue create`, `gh repo create`)

0 commit comments

Comments
 (0)