Skip to content

Instantly share code, notes, and snippets.

View mvhenten's full-sized avatar
💭
I may be slow to respond.

Matthijs van Henten mvhenten

💭
I may be slow to respond.
  • Amsterdam, The Netherlands
View GitHub Profile
@mvhenten
mvhenten / writer.md
Created August 21, 2026 09:56
Opus prose writer for anything a human reads and judges
name writer
description Opus prose writer for anything a human reads and judges. GitHub issues, PR descriptions and review replies, RFC/EDD/ADR text, Jira stories, Slack write-ups, commit bodies, docs. Drafts, then runs the deslop passes, then reports exactly once.
model bedrock/claude-opus-5

You write the prose. Someone reads it on a phone, between two other things, and decides. Write to be agreed with. Remove the author from the document.

Operating rules

@mvhenten
mvhenten / README.md
Created July 29, 2026 09:04
dreamer — weekday autonomous host-hygiene run for Claude Code (skill + systemd wrapper)

dreamer

Weekday host hygiene for this machine.

What this is

A dreamer.timer fires dreamer.service at 04:00 Europe/Amsterdam, Monday to Friday. The service runs bin/dreamer, which locks, snapshots ~/development/claude-memory, and hands the pass to claude -p "/dreamer". The policy — what may be deleted, the worktree safety conditions, the memory

@mvhenten
mvhenten / README.md
Created July 29, 2026 09:04
janitor — nightly autonomous repo maintenance run for Claude Code (skill + systemd wrapper)

janitor

Nightly autonomous maintenance runs, one repo per timer instance.

What this is

A janitor@<repo>.timer fires the janitor@<repo>.service at 02:00 every night. The service runs bin/janitor <repo>, which locks, cuts a fresh worktree off origin/main, and hands it to claude -p "/janitor". The actual policy — priority ladder, run ledger, PR/merge workflow — lives in

@mvhenten
mvhenten / babysitter.md
Created July 10, 2026 07:44
Babysitter skill
name babysit
description Babysit a long-running external process (CI run, PR checks, release, deploy, pipeline) with a cheap Haiku polling agent that reports back exactly once, when an exit condition is met. Use when the user asks to babysit, watch, or monitor a PR, workflow run, release, or deploy.

Babysit

Watch an external process without burning the main session. One Haiku agent polls in its own small context; the main session hears about it exactly once, when it's over. Every wakeup of the main session rereads its whole context at full price —

@mvhenten
mvhenten / route53-cdk-runbook.md
Last active May 11, 2026 13:13
Route 53 + CloudFormation + CDK: a survival runbook (orphan hosted zones, skip-retain trap, recovery procedures)

Route 53 + CloudFormation + CDK runbook

Reference for PublicHostedZone operations, CDK stack/stage renames, and skip-retain situations.


Mechanics

DeleteHostedZone blocks on non-default records

@mvhenten
mvhenten / .tmux-color.sh
Created April 10, 2026 14:24
tmux per-window status bar colors -- visual cue for which window you're in
#!/bin/bash
# Set status bar color based on window unique ID
PALETTE=(25 134 34 130 166 88 168 64 24 132)
WID=$(tmux display-message -p '#{window_id}')
[ -z "$WID" ] && exit 0
HASH=$(echo -n "$WID" | cksum | awk '{print $1}')
C=${PALETTE[$((HASH % ${#PALETTE[@]}))]}
tmux set -g status-style "bg=colour$C"
@mvhenten
mvhenten / sso.bash
Last active March 18, 2026 11:23
AWS SSO profile switcher - bash function with tab completion
# AWS SSO profile switcher
# Add to ~/.bashrc or source from a separate file
#
# Usage:
# sso - list profiles (* marks active)
# sso set <p> - set AWS_PROFILE (tab-completes)
# sso unset - clear AWS_PROFILE
# sso login - start SSO login flow
# sso configure <p> - configure SSO for a profile
@mvhenten
mvhenten / host-common-deps.js
Created August 4, 2025 09:09
Hoist common dependencies of npm workspaces
#!/usr/bin/env node
/**
* Simple way to hoist package dependencies to the root of the repo.
*
* - put common packages in devDependencies
* - run this script to update all workspaces
* - make sure to npm install for an updated package-lock.json
*
*/
@mvhenten
mvhenten / cdk_naming_conventions.md
Last active July 30, 2025 14:52
CDK naming conventions

Best practices and conventions for working with CDK

CDK code breaks many conventions found in normal other types of application code. CDK is class-based but puts most of the logic in the constructor, and it doesn't alway play well with inheritance.

  • Only Constructs may implement inheritance, all other constructs can only inherit from their foundational CDK constructs.
  • Stacks compose Constructs. stacks are never re-used.

An application is a single, top-level stack that deploys a self-mutating pipeline that in turn deploys all other stacks. This can be somewhat confusing because code organization doesn't always reflect the entire deployment flow.

CDK orchestrates compiling code to CloudFormation templates. We use pipelines to orchestrate deploying templates to CloudFormation. CloudFormation is used to orchestrate the actual provisioning and configuration of resources.

@mvhenten
mvhenten / upload-attachment.js
Created July 22, 2025 15:56
Upload attachment to confluence
import fetch from "node-fetch";
export const getClientV1 = (domain, apiToken, userEmail) => {
const headers = {
Authorization: `Basic ${Buffer.from(`${userEmail}:${apiToken}`).toString("base64")}`,
Accept: "application/json",
"X-Atlassian-Token": "no-check",
};
const req = async (endpoint, options = {}) => {