Skip to content

Instantly share code, notes, and snippets.

View jimmc414's full-sized avatar
🎯
Focusing

Jim McMillan jimmc414

🎯
Focusing
View GitHub Profile
@jimmc414
jimmc414 / README.md
Created July 21, 2026 05:39
Claude Code hook: halt the session when the model is downgraded mid-session (e.g. Fable 5 -> Opus 4.8)

Claude Code model-downgrade guard

A hook that halts a Claude Code session when the model serving it changes mid-session β€” for example when Fable 5 falls back to Opus 4.8 because credits ran out or a safety classifier flagged a request.

Without this, a session can silently continue for tens of minutes on a model you did not choose. In the case that prompted this, a session ran 309 messages on Fable 5, switched at the 310th, and continued for 91 more messages over 30 minutes before anyone noticed.

@jimmc414
jimmc414 / gist:7e1f774c59e12fc4a8fe8afb595aaadd
Created February 5, 2026 06:36
# Agent Toolkit: Comprehensive Tool Inventory
# Agent Toolkit: Comprehensive Tool Inventory
**Status:** Curated Reference Document (v9 - added RE category)
**Date:** 2026-02-04
**Purpose:** Catalog of agent-friendly CLI tools optimized for AI agent use
**Total Tools:** ~275 (after removing 255 unsuitable tools, added Category 36: Binary Analysis & RE)
---
## Table of Contents
@jimmc414
jimmc414 / tmux Agent Panes
Created January 16, 2026 23:33
Fork Claude agents into observable tmux panes
# Spec: tmux Agent Panes
> Fork Claude agents into observable tmux panes
## Overview
This skill enables Claude to spawn parallel agents, each working in their own tmux pane. The user can observe all agents working simultaneously in a single terminal window.
```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
@jimmc414
jimmc414 / gist:ee3055022154b88916102f5193727b22
Created January 16, 2026 06:06
skills have a richer execution model than documented. finding all tested and retested on 2.1.7
# Claude Code Skills Reference
**Version**: 2.5
**Claude Code Version**: 2.1.7 (fully tested)
**Date**: 2026-01-15
**Methodology**: Systematic testing of 167 skill configurations + diagnostic introspection
---
## Executive Summary
# Analysis of "Verbalized Sampling: How to Mitigate Mode Collapse and Unlock LLM Diversity"
## Response 1 (Probability: 0.23)
### 1. Core Claim Contradicting Common Assumptions (Section 3)
The paper argues mode collapse is fundamentally a **data-level problem** rather than an algorithmic one. Existing work attributed mode collapse to inadequate reward models or majority-favoring optimization. The authors prove typicality bias (Ξ± = 0.57Β±0.07, p<10^-14 in HELPSTEER dataset) exists in preference data itself, meaning "even with a perfect reward model and optimization process, inherent bias within preference datasets may still drive mode collapse."
This matters because it implies you can't fix mode collapse by improving RLHF algorithms alone - the preference collection process itself needs reconsideration.
### 2. Magnitude Finding (Section 5, Figure 4)
@jimmc414
jimmc414 / Claude Code Visual Development Guide for UIs
Created September 1, 2025 23:04
Claude Code Visual Development Guide for UIs, explaining to Claude Code how to use Chromium and Playwright MCP to iteratively create, LOOK and refine the UI it is creating.
# 🎨 Complete Visual UI Development Guide for Claude Code
## πŸš€ The Game-Changing Discovery
**Claude Code can SEE screenshots!** This completely transforms UI development from blind coding to visual design with real-time feedback.
### The Transform
- **Old Way**: Write code β†’ Hope it looks good β†’ Fix bugs when reported
- **New Way**: Build β†’ **SEE** β†’ Judge β†’ Refine β†’ Repeat until beautiful