Skip to content

Instantly share code, notes, and snippets.

View alexfazio's full-sized avatar

Alex Fazio alexfazio

View GitHub Profile
@alexfazio
alexfazio / codex-exec-experiments.md
Created March 14, 2026 17:21
Codex CLI exec mode experiments: 81 flag/feature tests with raw outputs

Codex CLI Exec Mode Experiments

Date: 2026-03-13 CLI Version: 0.114.0 Total Experiments: 81

Raw experiment outputs from testing various codex exec flag combinations.

Note: Some experiment outputs include MCP (Model Context Protocol) server startup messages (e.g., mcp: flywheel starting, mcp: exa ready). These are from the author's local Codex configuration and do not affect experiment results. Your output may differ depending on your configured MCP servers.

@alexfazio
alexfazio / fix-setapp.sh
Created February 21, 2026 14:23
fix-setapp.sh — Automated recovery for SetappAgent v3.49.x crash on macOS Sequoia (kills apps, stabilizes agent, relaunches)
#!/usr/bin/env bash
# fix-setapp.sh — Kill Setapp apps, wait for stable agent, relaunch apps.
#
# Usage: ./fix-setapp.sh
#
# Based on diagnosis in setapp-intermittent-launch-failure.md
# SetappAgent v3.49.10 crashes within ~60s of startup (SIGSEGV).
# This script automates the recovery: kill apps → stabilize agent → relaunch.
set -euo pipefail

Serverless Claude Code Instances with Persistent Compute

1. Problem

We need a way to give each Discord channel its own persistent "computer" running Claude Code CLI, where:

  • The computer survives across sessions (disk persists)
  • It wakes up fast when a user sends a message (< 10s, ideally < 5s)
  • It costs near-zero when idle
@alexfazio
alexfazio / .claude--skills--hook-development--SKILL.md
Created January 8, 2026 13:37
Claude Code Hook Development Skill - Install to .claude/skills/hook-development/

name: Hook Development description: >- This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "implement agent hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", "frontmatter hooks", "scoped hooks", "once: true", or mentions hook events (PreToolUse, PostToolUse, Stop,

@alexfazio
alexfazio / gist:84033e874d5ce5f29df99e463e25b5f3
Created December 11, 2025 09:14
aeorspace-config-11-12-2025_10-14-28
# Place a copy of this config to ~/.aerospace.toml
# After that, you can edit ~/.aerospace.toml to your liking
# It's not necessary to copy all keys to your config.
# If the key is missing in your config, "default-config.toml" will serve as a fallback
# You can use it to add commands that run after AeroSpace startup.
# Available commands : https://nikitabobko.github.io/AeroSpace/commands
# Commands to run after AeroSpace startup
after-startup-command = []
#!/bin/bash
# Enhanced Vulture Dead Code Analysis Script with Dynamic Analysis Insights
# Combines Vulture with ast-grep and optional Python analysis for comprehensive dead code detection
# Configuration
VULTURE_CONFIDENCE=${VULTURE_CONFIDENCE:-100}
SRC_DIR=${SRC_DIR:-./src}
TEST_PATTERNS="test_|_test\.py|tests/|test/|conftest\.py"
VERBOSE=${VERBOSE:-0}
---
name: dead-code-finder
description: Python dead code analyzer using Vulture and ast-grep for comprehensive analysis. Performs thorough verification of potentially unused code and produces detailed markdown reports with reasoning traces for informed decision-making.
tools: Bash, Read, Grep, Glob, Write
model: inherit
color: green
---
You are a senior Python engineer specializing in code maintainability and technical debt analysis, with deep expertise in identifying and verifying potentially unused code in production systems.
#!/usr/bin/env bash
#
# count_tokens.sh - Count tokens in developer files using Claude API
#
# Usage: ./count_tokens.sh [file1.py] [file2.js] [folder/] ...
#
# Arguments:
# - Individual files (any text-based developer file)
# - Directories (recursively finds code, config, markup, and docs)
# - Mix of files and directories
# Place a copy of this config to ~/.aerospace.toml
# After that, you can edit ~/.aerospace.toml to your liking
# It's not necessary to copy all keys to your config.
# If the key is missing in your config, "default-config.toml" will serve as a fallback
# You can use it to add commands that run after login to macOS user session.
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
after-login-command = []
name memory-profiler
description Memory profiling specialist for identifying leaks, inefficiencies, and optimization opportunities. Use proactively to analyze memory usage patterns during actual code execution.
tools Bash, Read, Grep, Glob
model sonnet
color green

You are a memory optimization expert specializing in identifying and resolving memory issues through comprehensive profiling.