Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/ivangrynenko/cursorrules/generic_bash_stylegit clone --depth 1 https://github.com/ivangrynenko/cursorrulesWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00009 | $0.00902 |
| Opus 5 | $0.00005 | $0.00451 |
| Sonnet 5 | $0.00002 | $0.00180 |
| Haiku 4.5 | $0.00001 | $0.00090 |
Grade A, and why
generic_bash_style scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- generic_bash_style — 91% identical, 93 lines differ
How it starts
The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Enhanced Bash Scripting Standard with Colorized Logging
This rule enforces best practices for writing Bash scripts, with an emphasis on using colorized logging for better output readability.
Rule Details
-
Name: enhanced_bash_style
-
Description: Enforce Bash scripting standards with colorized logging
Filters
- file extension pattern:
\\.sh$
Enforcement Checks
- Conditions:
- pattern
^#!/usr/bin/env bash$– All scripts should start with the shebang '#!/usr/bin/env bash'. - pattern
^set -eu$– Enable 'set -eu' for script robustness. - pattern
^set -x$– negated^\\[ \"\\${DEBUG-}\" = \"1\" ] && set -x$– Use conditional 'set -x' based on debug flag. - pattern
^# @formatter:off$– Start of formatting block for log functions. - pattern
note\\(\\) { printf \" %s\\n\" \"\\${1}\"; }$– Include 'note' function for plain messages. - pattern
info\\(\\) { \\[ \"\\${TERM:-}\" != \"dumb\" ] && tput colors >/dev/null 2>&1 && printf \"\\\\033\\[34m\\[INFO] %s\\\\033\\[0m\\n\" \"\\${1}\" || printf \"\\[INFO] %s\\n\" \"\\${1}\"; }$– Include 'info' function for blue informational messages. - pattern
pass\\(\\) { \\[ \"\\${TERM:-}\" != \"dumb\" ] && tput colors >/dev/null 2>&1 && printf \"\\\\033\\[32m\\[ OK ] %s\\\\033\\[0m\\n\" \"\\${1}\" || printf \"\\[ OK ] %s\\n\" \"\\${1}\"; }$– Include 'pass' function for green success messages. - pattern
fail\\(\\) { \\[ \"\\${TERM:-}\" != \"dumb\" ] && tput colors >/dev/null 2>&1 && printf \"\\\\033\\[31m\\[FAIL] %s\\\\033\\[0m\\n\" \"\\${1}\" || printf \"\\[FAIL] %s\\n\" \"\\${1}\"; }$– Include 'fail' function for red error messages. - pattern
warn\\(\\) { \\[ \"\\${TERM:-}\" != \"dumb\" ] && tput colors >/dev/null 2>&1 && printf \"\\\\033\\[33m\\[WARN] %s\\\\033\\[0m\\n\" \"\\${1}\" || printf \"\\[WARN] %s\\n\" \"\\${1}\"; }$– Include 'warn' function for yellow warning messages. - pattern
^# @formatter:on$– End of formatting block for log functions.
- pattern
Suggestions
- Guidance: Bash Scripting Best Practices:
- Error Handling: Use
set -euto catch errors and undefined variables early. - Debugging: Implement conditional debugging with
set -xusing a DEBUG variable. - Logging Functions: Use colorized logging for better script output readability:
note()for plain notesinfo()for blue informational messagespass()for green success messagesfail()for red error messageswarn()for yellow warnings, ensuring users can distinguish different types of messages easily
- Security: Avoid using
evalor similar constructs; use safe alternatives. - Documentation: Include descriptive comments, especially for complex logic.
- Portability: Use
/usr/bin/env bashfor the shebang to ensure script runs with bash on any system. - Variable Checks: Ensure necessary variables are set, enhancing script reliability.
- Exit Codes: Use explicit exit codes for different failure scenarios.
- Color Support: Ensure logging functions check for terminal color support before applying colors.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 52 lines · 9 tokens per session scan A a58d39ea8498
generic_bash_style is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (87 stars, last pushed 10mo ago), licensed MIT. It adds 9 tokens to every session and 902 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
angular
Angular: signals, standalone components, RxJS patterns.
django
Django: models, views, ORM best practices.
java
Modern Java: records, sealed classes, streams, virtual threads.
javascript
Modern JavaScript: ES2023+, async patterns, common traps.
rust
Rust patterns: ownership, Result types, iterators.
accessibility
Accessibility: semantic HTML, ARIA, keyboard navigation, testing.