Skip to content

Instantly share code, notes, and snippets.

View stephenfeather's full-sized avatar

Stephen Feather stephenfeather

View GitHub Profile
@stephenfeather
stephenfeather / launch-swarm-gist.md
Created April 13, 2026 00:18
launch-swarm: Claude Code skill wrapping Alastair Thomson's TMUX Swarm launcher (https://github.com/AlastairThomson/Medium)

Wrapper skill for the TMUX Swarm toolkit by Alastair Thomson. Original repo: https://github.com/AlastairThomson/Medium


name: launch-swarm description: Launch a multi-agent dev team in tmux with git worktrees and per-role personas. Use when the user says "launch swarm", "launch dev team", "spin up agents", "tmux swarm", "start a multi-agent team", or otherwise asks to orchestrate several Claude/Gemini/Codex agents working in parallel worktrees. Wraps scripts/launch-dev-team.sh.

Launch Swarm

@stephenfeather
stephenfeather / timestamp-inject.mjs
Created April 9, 2026 18:37
Timestamp Injection Hook (UserPromptSubmit) - injects current time into every prompt as additionalContext
// src/timestamp-inject.ts
import { readFileSync } from "fs";
/*!
* Timestamp Injection Hook (UserPromptSubmit)
*
* Injects the current local time into every prompt as additionalContext,
* enabling time-aware capabilities:
* - Session pacing alerts
* - Elapsed-time diagnostics
* - Calendar awareness
@stephenfeather
stephenfeather / session-id-inject.mjs
Last active April 9, 2026 18:37
SessionID Injection Hook (SessionStart) - injects Claude Code session ID into every prompt as additionalContext
// src/session-id-inject.ts
import { readFileSync } from "fs";
/*!
* SessionID Injection Hook (SessionStart)
*
* Injects the current session ID into SessionStart as additionalContext,
* enabling session-aware capabilities
* in your hooks. This is especially useful for tracking and debugging
* conversations across multiple interactions.
*/
@stephenfeather
stephenfeather / SKILL.md
Created April 6, 2026 02:03
Claude Code Permission Tuner — analyze permission logs and optimize settings.local.json
name permission-tuner
description Analyze permission logs and optimize settings.local.json to reduce permission prompts
allowed-tools
Bash
Read
Write
Edit

Permission Tuner

Analyze the permission-requests.jsonl log to find frequently prompted permissions, then batch-update settings.local.json to reduce interruptions.

@stephenfeather
stephenfeather / bash-error-pause.mjs
Created April 5, 2026 02:20
PostToolUse:Bash hook - pause on errors/warnings before explaining
// src/bash-error-pause.ts
import { readFileSync } from "fs";
//! @hook PostToolUse:Bash @preserve
var WARNING_PATTERNS = [
/\bwarn(ing)?\b/i,
/\bdeprecated\b/i,
/\bWARN\b/
];
var ERROR_PATTERNS = [
/\berror\b/i,
@stephenfeather
stephenfeather / agent-subagent-guard.test.ts
Created April 4, 2026 19:11
PreToolUse:Agent hook — blocks Claude Code Agent calls with missing/null/general-purpose subagent_type and suggests specialist agents
import { describe, it, expect } from "vitest";
import {
processInput,
isSubagentTypeValid,
suggestAgents,
buildDenyResponse,
type HookInput,
} from "../agent-subagent-guard";
describe("agent-subagent-guard", () => {
@stephenfeather
stephenfeather / Get-SystemInfo.ps1
Created March 22, 2026 16:07
Powershell Script to Grab quick system information
# Get-SystemInfo.ps1
# Outputs key system hardware information
$cpu = Get-CimInstance -ClassName Win32_Processor | Select-Object -First 1
$os = Get-CimInstance -ClassName Win32_OperatingSystem
$gpus = Get-CimInstance -ClassName Win32_VideoController
$info = [ordered]@{
"Windows Version" = "$($os.Caption) ($($os.Version))"
"Processor Brand" = $cpu.Name.Trim()
@stephenfeather
stephenfeather / re_embed_voyage.py
Created February 25, 2026 18:52
Continuous Claude V3: Convert your BGE embeddings to Voyage so you don't lose your history.
#!/usr/bin/env python3
"""Re-embed archival_memory learnings from BGE to Voyage embeddings.
Converts all stored learnings from local BGE (BAAI/bge-large-en-v1.5) to
Voyage embeddings (voyage-code-3 by default). Both are 1024-dim so no schema
change is needed for the embedding column.
Uses an embedding_model column as a progress queueidempotent and restartable.
Any row not yet marked as the target model gets processed. If an API call fails
after retries, that row is skipped and will be picked up on the next run.
@stephenfeather
stephenfeather / instructions.md
Created February 19, 2026 21:13
Creating your own local Certificate Authority (CA) and ssl certs

Developer SSL Certs Locally

Install mkcert

mkcert is a simple tool for making locally-trusted development certificates. It is available for a number of platforms. Youu can find additional install instructions and project details at https://github.com/FiloSottile/mkcert

I'm currently working from my Mac, so homebrew it is:

@stephenfeather
stephenfeather / gcode_tool_parser.py
Created August 12, 2025 21:36
Little example that parses gcode to pull out tool changes. This information can be used to manually weld filament together for multi-color prints without an AMS
from collections import defaultdict
def parse_gcode(path):
usage = defaultdict(float)
curr_t = None
prev_e = 0.0
with open(path) as f:
for line in f:
if line.startswith('T') and line[1].isdigit():