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 / settings.json
Created April 3, 2026 14:43
Factory Droid Sample settings.json
{
"diffMode": "github",
"ideExtensionPromptedAt": {},
"ideActivationNudgedForVersion": {},
"enableCompletionBell": true,
"completionSound": "fx-ok01",
"awaitingInputSound": "fx-ack01",
"soundFocusMode": "always",
"commandAllowlist": [
"ls",
@ben-vargas
ben-vargas / openclaw-patch-codex-fast
Created March 29, 2026 05:16
openclaw true fast mode
#!/usr/bin/env bash
set -euo pipefail
exec env RESTART_GATEWAY=1 /Users/clawd/clawd/scripts/patch-openclaw-codex-fast.sh "$@"

Overriding Context Size for Opus 4.6 on GH Copilot OpenCode

Pi Harness Approach (current)

In ~/.pi/agent/models.json, models are defined with explicit contextWindow and maxTokens fields, plus a modelOverrides block for the github-copilot provider:

"modelOverrides": {
  "claude-opus-4.6": {
    "contextWindow": 192000,
@ben-vargas
ben-vargas / codex-oauth-min.js
Created February 11, 2026 22:46
Codex OAuth Backend Example
#!/usr/bin/env node
// Minimal REST call to the Codex backend API using a local OAuth token.
import fs from "fs";
import os from "os";
import path from "path";
const authFile = process.env.CODEX_AUTH_FILE || path.join(os.homedir(), ".codex", "auth.json");
const auth = JSON.parse(fs.readFileSync(authFile, "utf8"));
const token = auth.access_token || auth.tokens?.access_token;
@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"
},
{