Skip to content

Instantly share code, notes, and snippets.

@iamhenry
iamhenry / General Purpose Refactor Prompt.md
Last active June 9, 2026 19:08
General Purpose Refactor Prompt.md

How to think about refactoring

The mindset in one line

Preserve what matters, question what you assume, change in ways you can prove and reverse.

The practical loop

When refactoring, keep cycling through this:

@iamhenry
iamhenry / Refactor & Modularization Prompt.md
Created May 28, 2026 20:24
Refactor & Modularization Prompt

You are refactoring an existing system without changing its external behavior.
Object: <paste code/docs/skill.md here>

Goals (in order of priority):

  1. Preserve behavior and public contracts.
  2. Reduce size and complexity via cohesive modules.
  3. Make hot paths cheaper (startup, main loop, core workflows).

Constraints:

  • No new features.
@iamhenry
iamhenry / Trauma-Informed Relational Therapy.md
Created April 28, 2026 21:17
Trauma-Informed Relational Therapy Soul
@iamhenry
iamhenry / Backwards Design Wizard.md
Last active January 30, 2026 18:09
Backwards Design Wizard

PURPOSE & WHEN TO USE

What This Does

This prompt turns vague ideas into clear action plans by forcing you to work backwards. Instead of asking "what should I do first?", it makes you define "what does success look like?" before planning any steps.

Use This When You:

  • Have an idea but don't know where to start
  • Feel overwhelmed by too many possible approaches
  • Keep adding features/tasks without clarity on what's essential
  • Need to decide what's actually required vs. nice-to-have
@iamhenry
iamhenry / natural-language interface to a Unix shell.md
Created January 23, 2026 17:54
natural-language interface to a Unix shell.md

You are ‎⁠nlsh⁠, a natural-language interface to a Unix shell.

Your job: read a user’s plain‑English request and respond with the single best shell command (or short pipeline) that accomplishes it.

Core behavior

  1. Output format
@iamhenry
iamhenry / SKILL.md
Created January 17, 2026 00:41
ask-questions-if-underspecified skill
name ask-questions-if-underspecified
description Clarify requirements before implementing. Do not use automatically, only when invoked explicitly.

Ask Questions If Underspecified

Goal

@iamhenry
iamhenry / opencode-antigravity-quota-tmux-script
Last active January 24, 2026 23:24
opencode-antigravity-quota-tmux-script
#!/usr/bin/env bash
set -o pipefail
# =============================================================================
# ANTIGRAVITY CONSTANTS
# =============================================================================
readonly GOOGLE_TOKEN_URL="https://oauth2.googleapis.com/token"
readonly CLOUDCODE_BASE_URL="https://cloudcode-pa.googleapis.com"
readonly CLIENT_ID="1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com"
readonly CLIENT_SECRET="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"
@iamhenry
iamhenry / continuous-learning.ts
Created December 31, 2025 00:57
continuous-learning.ts for opencode (plugin)
/**
* Continuous Learning Plugin
*
* Analyzes coding sessions for learnings and proposes updates to instruction files.
* Triggers on session.idle, checks for substantive work, spawns background LLM analysis,
* and writes draft proposals for user review.
*
* TODO v1.1: Frictionless Git Integration
*
* PROBLEM: Users must constantly commit/stage learnings files, adding friction.
@iamhenry
iamhenry / osgrep.ts
Created December 8, 2025 15:53
osgrep opencode plugin
/**
* osgrep Server Lifecycle Plugin
*
* Manages the osgrep semantic search server lifecycle for OpenCode sessions.
* - Uses `event` hook filtering for `session.created` event type
* - Uses --parent-pid for auto-cleanup when OpenCode exits
* - osgrep's internal chokidar handles file watching for index updates
*/
import fs from "fs";
@iamhenry
iamhenry / Technical Clarity Wizard.md
Last active October 23, 2025 21:42
Technical Clarity Wizard

Technical Clarity Wizard

WHEN TO USE
- 🚨 Use to define requirements from `User Stories`
- This guide should be used AFTER defining User Stories, but BEFORE generating ROADMAP.MD

Inputs (All Required)

  • Project Description
  • User Stories