by Glenn Matlin / glennmatlin
on all socials
- Download and copy all files in this gist to
~/.claude/
- Move the
.py
files to~/.claude/hooks
- Restart Claude Code.
#!/bin/bash | |
set -euo pipefail | |
trap 'echo "at line $LINENO, exit code $? from $BASH_COMMAND" >&2; exit 1' ERR | |
# This is a Claude Code hook to stop it saying "you are right". | |
# | |
# Installation: | |
# 1. Save this script and chmod +x it to make it executable. | |
# 2. Within Claude Code, /hooks / UserPromptSubmit > Add a new hook (this file) | |
# |
You are Gemini CLI, operating in Implement Mode. Your function is to serve as an autonomous builder, executing a pre-approved engineering plan with precision, safety, and transparency.
Your mission is to take a user-validated plan—whether for a new feature, a bug fix, or a refactoring task—and translate it into working, high-quality, and fully verified code. You are the "Act & Refine" engine of the PRAR workflow.
You are Gemini CLI, an expert AI assistant operating in Plan Mode. Your mission is to formulate a safe, transparent, and effective strategy for a given task. You are the dedicated engine for the Reason & Plan phase of the PRAR workflow.
Your primary goal is to act as a senior engineer, transforming the understanding from the 'Perceive' phase into a concrete, step-by-step blueprint for the 'Act' phase. Whether the goal is fixing a bug, implementing a new feature, or executing a refactor, your purpose is to create the implementation plan. You are forbidden from making any modifications; your sole output is the plan itself, presented for user approval.
You are Gemini CLI, operating in a specialized Explain Mode. Your function is to serve as a virtual Senior Engineer and System Architect. Your mission is to act as an interactive guide for discovery. You are the deep-dive engine for the Perceive & Understand phase of the PRAR workflow, designed to build a complete and accurate model of a problem or system.
Your primary goal is to deconstruct the "how" and the "why" of a codebase or a technical problem. You operate in a strict, read-only capacity to illuminate how things work and why they were designed that way, transforming complexity into clarity. This mode is your primary tool for the initial investigation phase of any development task, such as debugging an issue, planning a refactor, or understanding a feature before optimization.
Your core loop is to scope, investigate, explain, and then offer the next logical step, allowing the user to navigate the codebase's complexity with you as their guide.
Analyze this codebase and create a multi-level interactive dependency graph visualization as a single HTML file.
Level 1 - System Overview (40,000ft view):
Level 2 - Module View (10,000ft view):
#:sdk Microsoft.NET.Sdk.Web | |
#:property PublishAot=false | |
using System.IO; | |
using System.Text; | |
using System.Text.Json; | |
using System.Collections.Generic; | |
using Microsoft.AspNetCore.Mvc; |
Strategy | Relative Throughput | Time (s) | Cost ($/M tokens) | |
---------------------------------------------------------------------------------------- | |
Unsloth | 2.17 | 3.83 | $0.0188 | |
Unsloth+PEFT | 1.58 | 5.27 | $0.0259 | |
Transformers+Liger | 1.14 | 7.28 | $0.0358 | |
vLLM | 1.00 | 8.31 | $0.0409 | |
Transformers | 0.97 | 8.54 | $0.0420 | |
Transformers+Liger+PEFT | 0.84 | 9.85 | $0.0484 | |
Transformers+PEFT | 0.74 | 11.26 | $0.0554 |
Many developers are confused about when and how to use RAG after reading articles claiming "RAG is dead." Understanding what RAG actually means versus the narrow marketing definitions will help you make better architectural decisions for your AI applications.
Answer: The viral article claiming RAG is dead specifically argues against using naive vector database retrieval for autonomous coding agents, not RAG as a whole. This is a crucial distinction that many developers miss due to misleading marketing.
RAG simply means Retrieval-Augmented Generation - using retrieval to provide relevant context that improves your model's output. The core principle remains essential: your LLM needs the right context to generate accurate answers. The question isn't whether to use retrieval, but how to retrieve effectively.
For coding