Skip to content

Instantly share code, notes, and snippets.

View pkellner's full-sized avatar
🏠
Working from home

Peter Kellner pkellner

🏠
Working from home
View GitHub Profile
@pkellner
pkellner / fable-vs-codex-reviews.md
Created August 13, 2026 14:21
How to get Anthropic's Fable to do better reviews (and others)

Fable vs. Codex Review Notes

Question This Likely Answers

Why did Codex catch an issue that Fable missed? Does that mean Codex has a capability Fable lacks, and should I add a Codex review pass to the workflow?

On the Fable-vs-Codex Question

Codex's catch came from a question I had not explicitly asked:

@pkellner
pkellner / agent-stop-flailing-bad-design.md
Created August 13, 2026 13:53
Instructions to AI to add to AGENTS.md a 'stop flailing on problem design' instruction.

Add a "recognize flailing" guideline to AGENTS.md

Context

When the AI can't find a working solution it tends to thrash: trying variation after variation of a fix without converging. The operator wants a standing guideline that makes the AI recognize this pattern in its own responses, flag it, allow itself a bounded number of further attempts, and — if still stuck — stop and prompt the operator to investigate and possibly rethink the design, instead of burning time in a try-something-else loop.

@pkellner
pkellner / code-review-agentic-guidance.md
Last active August 10, 2026 13:51
Agentic Guidance for Code Review Based on Guillermo Rauch X Post

Presenting your own code changes

How to answer when the operator asks to see, explain, review, or understand changes you made. This complements "Code reviews are specific" in AGENTS.md, which governs reviews of code handed to you; this doc governs walkthroughs of your own work.

Treat "what changed?" as agentic code inquiry

When the operator asks anything like:

name tone-plain-no-bragging
description How the user wants responses written — plain, humble, no self-congratulation
metadata
node_type type originSessionId
memory
feedback
c588c490-68e8-4940-afda-a6a57c8e6a3e

The user dislikes self-congratulatory / bragging tone (e.g., "strictly better," comparison tables showing how clever a solution is, framing my own answers as smart). Be plain and humble, especially after mistakes.

@pkellner
pkellner / gist:2e2da16005e0981908a25d792e4846f5
Created June 7, 2026 00:13
claude-bragging-unbecoming.md
---
name: tone-plain-no-bragging
description: "How the user wants responses written — plain, humble, no self-congratulation"
metadata:
node_type: memory
type: feedback
originSessionId: c588c490-68e8-4940-afda-a6a57c8e6a3e
---
The user dislikes self-congratulatory / bragging tone (e.g., "strictly better," comparison tables showing how clever a solution is, framing my own answers as smart). Be plain and humble, especially after mistakes.
@pkellner
pkellner / gist:aa896174f96d67792ec2009a7a5aca0c
Created May 29, 2026 17:45
Why Cursor Runs Out Faster Than Claude Code on the Same Opus

Here’s a formatted Markdown version you can paste into a GitHub Gist:

Why Cursor Runs Out Faster Than Claude Code on the Same Opus

You use Opus everywhere, but the two products are not metering the same work the same way.

Cursor exhausts faster for structural reasons, not because Opus behaves differently.

Same Opus model. Different meter. Cursor bills like prepaid API usage. Claude Code bills like a subscription with rolling resets.

@pkellner
pkellner / gist:fd01dc5cb876e85161981fd40c50364b
Created May 29, 2026 13:25
Why Cursor Runs Out Faster Than Claude Code on the Same Opus
Here’s a formatted Markdown version you can paste into a GitHub Gist:
# Why Cursor Runs Out Faster Than Claude Code on the Same Opus
You use **Opus everywhere**, but the two products are **not metering the same work the same way**.
Cursor exhausts faster for structural reasons, not because Opus behaves differently.
> Same Opus model. Different meter.
> Cursor bills like prepaid API usage. Claude Code bills like a subscription with rolling resets.
@pkellner
pkellner / models.md
Created December 3, 2024 02:28
Deployment Models in React Explained by ChatGPT

Your options represent different approaches to rendering and server-side involvement in a web application. Here's a breakdown of each approach:

1. CSR (Client-Side Rendering), no SSR

  • How it works: The browser downloads a JavaScript bundle, which is then executed on the client to render the UI.
  • Use case: Ideal for highly interactive, single-page applications (SPAs) where SEO is not a priority.
  • Pros:
    • Fast initial server response (just static HTML/JS).
    • Easier to scale as it reduces server-side load.
  • Cons:
  • Slower Time to Interactive (TTI) because rendering waits for JavaScript to load.
@pkellner
pkellner / docker-profile-grouped.sh
Last active October 17, 2024 15:13
dockerprofiler grouped (done with o1-preview)
#!/bin/sh
# Define group prefixes
groups="better-rules-com better-rules-net gmail-to-icloud-net coolify"
group_totals="0 0 0 0"
unassigned_total=0
# Create temporary files
stats_file=$(mktemp)
temp_file=$(mktemp)
@pkellner
pkellner / docker-perf.sh
Created October 16, 2024 12:44
docker-perf.sh
#!/bin/bash
# Capture the stats for all containers
docker stats --no-stream --format "{{.Container}} {{.Name}} {{.CPUPerc}} {{.MemUsage}}" > stats.txt
# Temporary file to store container info for sorting
temp_file=$(mktemp)
# Helper function to format running time
format_time() {