Skip to content

Instantly share code, notes, and snippets.

View jamesmacaulay's full-sized avatar

James MacAulay jamesmacaulay

View GitHub Profile
@jamesmacaulay
jamesmacaulay / SKILL.md
Created June 19, 2026 18:28
issue-pr-cycle claude code skill
name issue-pr-cycle
description Use when managing the code/review cycle for a coherent unit of work (1+ GitHub issues, usually resolved by 1+ PRs) — spawns three persistent agents (manager/opus, implementer/sonnet, reviewer/sonnet) that hand off control cooperatively via SendMessage, preserving their conversation history across rounds instead of spawning fresh panels per round

Issue PR Cycle

Overview

Manage the full lifecycle of a work unit — one or more GitHub issues, typically resolved by one PR but sometimes by several — from interrogation through approved PR(s), using three long-lived agents per work unit plus an orchestrator that mediates between them:

@jamesmacaulay
jamesmacaulay / index.html
Created May 29, 2026 15:53
Deluge Drop Mapper
<!DOCTYPE html>
<!--
dropmap — Neuzeit Drop ⇄ Synthstrom Deluge MIDI-mapping editor.
Single self-contained file: all JS/CSS inline, no build, no network, 100% client-side.
Hostable as a GitHub gist via https://htmlpreview.github.io.
The Deluge song file never leaves the browser; output is a NEW download.
-->
<html lang="en">
<head>
<meta charset="utf-8" />
### Keybase proof
I hereby claim:
* I am jamesmacaulay on github.
* I am jamesmacaulay (https://keybase.io/jamesmacaulay) on keybase.
* I have a public key ASDnKw1JsZHofgcB89uvNLIux6FkTNSz64gv8aS99WWGXgo
To claim this, I am signing this object:
@jamesmacaulay
jamesmacaulay / packit.rs
Created February 21, 2019 23:26
A 3D bin packing algorithm in Rust
pub type V3 = [usize; 3];
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct PositionedVolume {
dimensions: V3,
position: V3,
}
// mutable stack of sub-containers, initialized with input container
// mutable vec of remaining items, initialized with all input items
#!/bin/bash
lastlast=$(last --time-format=iso -1 -R | head -1 | awk '{ print $3 "\n" $5 }' | xargs -n1 date +%s -d 2> /dev/null)
lastuserinputs=$(who -s | awk '{ print $2 }' | (cd /dev && xargs stat -c '%X'))
events=$lastlast$'\n'$lastuserinputs
sincelatestevent=$(echo "$events" | sort -rn | head -1 | awk '{ print '"$(date +%s)"'-$1 }')
uptime=$(cat /proc/uptime | sed -n 's/\([0-9]*\).*/\1/p')
durations=$sincelatestevent$'\n'$uptime
idletime=$(echo "$durations" | sort -n | head -1)
echo "$idletime"
module DQuery
import Record
namespace Json
data Json
= JsonString String
| JsonBool Bool
| JsonInt Int
| JsonObject (List (String, Json))
@jamesmacaulay
jamesmacaulay / MoneyCoderExample.elm
Last active November 9, 2017 16:49
Json.Bidirectional.Coder hoisting subset of object's fields into a tuple https://ellie-app.com/h5Sb2g8b4a1/0
module Main exposing (main)
import Html exposing (Html, text)
import Json.Bidirectional as Json
import Json.Decode as Decode
import Json.Encode as Encode
import String
import Tuple
@jamesmacaulay
jamesmacaulay / .editorconfig
Last active October 20, 2016 18:09
Visual Studio Code settings and keybindings
root = true
[*]
indent_style = space
indent_size = 2
[*.elm]
indent_size = 4
module GraphQL.Query exposing (..)
import Json.Decode as Decode exposing (Decoder, (:=))
import Array exposing (Array)
type SelectionSet
= SelectionSet (List Selection)
-- paste into http://elm-lang.org/try and click "compile"
-- http://imgur.com/gallery/W6TwgZw
import Graphics.Collage exposing (..)
import Graphics.Element exposing (..)
import Text
import Color exposing (..)
import Time
import Signal