Skip to content

Instantly share code, notes, and snippets.

View johnlindquist's full-sized avatar
💭
Educating 👨🏻‍🏫

John Lindquist johnlindquist

💭
Educating 👨🏻‍🏫
View GitHub Profile
// Name: Get Current Page as Markdown
// Shortcut: opt t
import "@johnlindquist/kit"
const url = await getActiveTab()
const response = await get(`https://into.md/${url}`)
const text = `
<site>
<url>
@johnlindquist
johnlindquist / reminders-schedule.md
Created December 12, 2025 18:27
UserPromptSubmit Hook Reminder Schedule

UserPromptSubmit Hook Reminder Schedule

Quick Summary

After 3 UserSubmitPrompts, the system shows reminders every 3 prompts, cycling through 5 different reminder types. Each reminder is combined with a Tools Refresh notification.

Complete Schedule (Prompts 1-30)

Prompt Type Reminder Index Content

Performance Review Rubric (User Memory)

Your performance review is coming up. Here is your rubric.

You are evaluated on how reliably you follow the installed Skills and Claude Code best-practice workflows.

Mindset: You are trusted. We trust your judgment, your creative decisions, and your ability to explore ideas and solutions. Follow the gates, but do NOT stop to ask permission at each step. Plan → Execute → Verify → Report. Take liberty to explore promising approaches. Only ask when genuinely blocked or facing destructive/irreversible actions.

NOTE:

  • This is USER memory. Keep it general + short.
@johnlindquist
johnlindquist / claude-hooks-auto-refresh.md
Last active December 10, 2025 18:07
Claude Code Hooks: How to Auto-Refresh Context Every N Prompts

Claude Code Hooks: Auto-Refreshing Context Every N Prompts

This explains how to build a system that automatically re-injects important context (like a tools list) into Claude Code conversations every N prompts.

The Problem

Claude Code's SessionStart hook runs once at the beginning of a conversation. In long sessions, that initial context gets pushed far back and the AI may "forget" about it.

Example: You inject a list of 222 custom tools at session start. By prompt 20, the AI stops using them because they're no longer in recent context.

@johnlindquist
johnlindquist / claude-bundle-1765389302141.md
Created December 10, 2025 17:55
Claude Code Hooks: How to Auto-Refresh Context Every N Prompts

CLAUDE.md Bundle

Generated: 2025-12-10T17:55:02.141Z Source: /Users/johnlindquist/.claude/CLAUDE.md Files included: 7


/Users/johnlindquist/.claude/CLAUDE.md

Core

@johnlindquist
johnlindquist / claude-bundle-1765389111492.md
Created December 10, 2025 17:51
Claude Code Hooks: Auto-Refreshing Tools List Every 3 Prompts

CLAUDE.md Bundle

Generated: 2025-12-10T17:51:51.492Z Source: /Users/johnlindquist/.claude/CLAUDE.md Files included: 7


/Users/johnlindquist/.claude/CLAUDE.md

Core

@johnlindquist
johnlindquist / migration_comparison.md
Created December 10, 2025 06:33
Code-Mode Architecture Comparison

Code-Mode Migration: Architecture Comparison

This document outlines the architectural shift from the current "Lootbox/RPC" model to the new "Code-Mode/UTCP" paradigm.

1. High-Level Architecture

Before: Sequential RPC (Lootbox/Standard MCP)

The LLM acts as a "Router". It decides on one tool, waits for the result, then decides the next step. This incurs a round-trip latency cost and token cost (re-reading history) for every single step.

@johnlindquist
johnlindquist / copilot-cli-shortcuts.md
Created December 10, 2025 03:53
Mnemonic zsh shortcuts for GitHub Copilot CLI with multiple AI models

GitHub Copilot CLI Shortcuts for Zsh

Mnemonic shell functions for launching GitHub Copilot CLI with different models and modes.

Quick Reference

Prompt Mode Interactive Mode Model
p pi Claude Opus 4.5
ps pis Claude Sonnet 4.5
@johnlindquist
johnlindquist / context-optimization-writeup.md
Created December 8, 2025 17:30
Claude Code Context Optimization: 54% reduction in initial tokens while maintaining full tool access

Claude Code Context Optimization: A Complete Guide

Date: December 8, 2025 Goal: Reduce initial context consumption while maintaining full tool access and consistent Claude behavior


Executive Summary

This project achieved a 54% reduction in initial context (7,584 → 3,434 tokens) while improving tool discovery and enforcement. The key insight: Claude doesn't need verbose documentation upfront—it needs triggers to know when to load detailed context.

@johnlindquist
johnlindquist / hot-03-enterprise-cicd.md
Created December 7, 2025 20:16
Scripting Copilot: Piping Hot Intelligence - Enterprise CI/CD Edition (Microsoft AI Dev Days Talk Outline)

Scripting Copilot: Piping Hot Intelligence

Enterprise CI/CD Edition - Microsoft AI Dev Days (15-20 min)


The Concept

"Piping Hot Intelligence" for the enterprise:

  1. Piping = Unix pipes (|) chaining commands and AI
  2. Hot = Fresh, production-ready, straight from the pipeline