Skip to content

Instantly share code, notes, and snippets.

View ben-vargas's full-sized avatar

Ben Vargas ben-vargas

View GitHub Profile
@ben-vargas
ben-vargas / OMNI_PLAN.md
Created January 16, 2026 19:35
ccusage/omni

@ccusage/omni Implementation Plan

Unified usage tracking across all AI coding assistants

Overview

Goal: Create a new @ccusage/omni package that aggregates usage data from all existing ccusage CLI tools into a single, unified view.

Supported Sources (v1): | Source | Package | Data Directory | Env Override |

@ben-vargas
ben-vargas / INITIAL_SETUP.md
Last active January 15, 2026 22:07
Bare Git Worktrees Skill

Initial Setup (New Projects)

This guide walks through setting up a new project with the bare git repository + worktree structure.

Setup Steps

1. Clone as Bare Repository

# Clone and setup bare repository
@ben-vargas
ben-vargas / ai-cli-cron.sh
Created January 6, 2026 18:16
Script for CLI harness cron windows.
#!/bin/bash
# AI CLI tools wrapper for scheduled activation of usage windows
# Outputs JSON for machine-readable logs with human-friendly summaries
# ============================================================================
# CONFIGURATION - Update these values for your environment
# ============================================================================
# System paths
USER_HOME="/home/code"
@ben-vargas
ben-vargas / INITIAL_SETUP.md
Created January 1, 2026 19:33
git-worktree skill

Initial Setup (New Projects)

This guide walks through setting up a new project with the bare git repository + worktree structure.

Setup Steps

1. Clone as Bare Repository

# Clone and setup bare repository
@ben-vargas
ben-vargas / config.json
Created December 11, 2025 23:00
Factory Droid CLI Config with CLIProxyAPI [ChatGPT Pro/Plus - Claude Pro/Max - Gemini AI Pro/Ultra]
{
"custom_models": [
{
"model_display_name": "Claude Opus 4.5 Thinking Low [Proxy]",
"model": "claude-opus-4-5-20251101(low)",
"base_url": "http://localhost:8317",
"api_key": "dummy-not-used",
"provider": "anthropic"
},
{
@ben-vargas
ben-vargas / config.json
Created November 24, 2025 19:54
Factory Droid Config
{
"custom_models": [
{
"model_display_name": "Claude Opus 4.5 [Proxy]",
"model": "claude-opus-4-5-20251101",
"base_url": "http://localhost:8317",
"api_key": "dummy-not-used",
"provider": "anthropic"
},
{
@ben-vargas
ben-vargas / 0.0.1763942525-gea5db0.md
Last active November 24, 2025 22:18
Amp Model Override Cheat Sheet

Amp Model Override Cheat Sheet

How to Override the Default Model

Option 1: amp.model.sonnet (simple toggle)

{
  "amp.model.sonnet": true
}
@ben-vargas
ben-vargas / AGENTS.md
Last active October 16, 2025 13:27
Bare Git Worktrees AGENTS.md

Git Bare Repository Worktree Workflow for Claude Code

🚨 CRITICAL: Understanding My Project Structure

I use a bare Git repository approach with Git worktrees extensively. Every subdirectory in my projects represents a different git branch as a worktree.

When you see a project like /home/code/projects/my-app/:

  • my-app/ = project container (NOT a working tree)
  • my-app/.bare/ = actual Git repository database
  • my-app/.git = pointer file directing Git commands to .bare/
@ben-vargas
ben-vargas / claude_codex_usage_windows.md
Created October 7, 2025 16:54
Consistent Usage Windows for Claude Code and Codex CLI

Running AI CLI Tools with Cron for 5-Hour Usage Windows

The Challenge

Anthropic and OpenAI enforce a 5-hour usage window - once I make my first request, I have 5 hours fixed usage before the window expires. This meant:

  • ❌ Unpredictable availability - window could expire mid-project or at random times during the work day
  • ❌ Frustration when usage windows expire at unopportune times
  • ❌ Consistent work schedule and usage window planning
@ben-vargas
ben-vargas / agent_sdk_builder_output.js
Created October 6, 2025 20:33
OpenAI Agent Builder - Agent SDK Output
import { OpenAI } from "openai";
import { runGuardrails } from "@openai/guardrails";
import { z } from "zod";
import { Agent, AgentInputItem, Runner } from "@openai/agents";
// Shared client for guardrails and file search
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
// Guardrails definitions