CIAO-defensive GitHub source-code review prompt generator
One-file POSIX shell script. Zero dependencies except git + curl + coreutils.
grokrec is a CIAO-compliant utility that instantly generates a high-quality, structured prompt for Grok (built by xAI) to perform a professional code review and security inspection of your Git repository at a specific tagged version.
It intelligently detects the current tag, resolves the exact tagged commit SHA (even when HEAD is ahead of the tag), supports interactive or non-interactive file selection, and outputs a ready-to-paste prompt with correct raw.githubusercontent.com links pointing to the released version.
Built by Cloudgen Wong — the creator of the CIAO philosophy.
Grok has proven to be an exceptionally capable, honest, and thorough code reviewer when given clean, version-accurate information.
A strong real-world example is the official Grok review of pomo v1.4.0 (another CIAO-based shell project). Grok provided deep static analysis, identified robustness and security improvements, and delivered actionable recommendations suitable for public documentation.
Key benefits:
- Independent and unbiased validation
- Strong security-focused analysis (command injection, path traversal, race conditions, etc.)
- Actionable, high-signal feedback with code examples
- Professional report that can be added directly to
README.mdorRECOMMENDATION.md
grokrec + Grok creates a repeatable, high-quality review process that aligns with CIAO principles.
- Fully CIAO-compliant with loud defensive guards (
!!! DO NOT MODIFY OR SIMPLIFY !!!) - Accurate Tagged Commit Resolution (
get_tagged_commit()with multi-layered fallback) - Robust Semantic Version Comparison (
version_gt()) — prevents incorrect downgrades during development - Interactive file selection + fully non-interactive / JSON mode
- Self-update and self-uninstall commands (battle-field tested)
- Strict root vs non-root handling
- Volatile storage preference (
/dev/shm→/tmp) - Full respect for
--quietand--json - Improved help and about commands
# User install (recommended)
curl -fsSL https://raw.githubusercontent.com/cloudgen/grokrec/main/grokrec | sh
# System-wide install
curl -fsSL https://raw.githubusercontent.com/cloudgen/grokrec/main/grokrec | sudo shcd /path/to/your/project
grokrec # interactive mode (recommended)
grokrec --json # machine-readable output (for scripting)
grokrec help # detailed help
grokrec about # diagnostics (version, install status, shell, storage, etc.)
grokrec self-update # update to latest version
grokrec self-uninstall # clean removalAfter running grokrec, copy the generated prompt and paste it directly into Grok.
See CHANGELOG.md for detailed version history.
grokrec is built strictly according to the CIAO defensive programming philosophy.
CIAO = Caution • Intentional • Anti-fragile • Over-engineered
Every critical function contains explicit purpose, warnings, and guards against simplification — especially against common AI tendencies to ignore root/non-root differences, --quiet mode, battle-tested logic, and multi-user environments.
Cloudgen Wong — Creator of the CIAO philosophy
Made with ❤️ and strict CIAO principles.
Defensive by design. Anti-fragile by intention.