Skip to content

Instantly share code, notes, and snippets.

View Focus3D's full-sized avatar
🏠
Working from home

Focus3D Focus3D

🏠
Working from home
View GitHub Profile
@Focus3D
Focus3D / claude-code-token-saving-guide.md
Created July 15, 2026 07:02 — forked from artemgetmann/claude-code-token-saving-guide.md
Practical workflow for reducing token usage in Claude Code while preserving session continuity. Includes compacting strategies, CLAUDE.md structure, modular context management, and prompt engineering tips.

🧠 How to Save Context Tokens When Using Claude Code

This is a personal reference workflow for minimizing token usage while maintaining project continuity across Claude Code (Sonnet 4 with file access).


✅ Setup: Populate CLAUDE.md

Claude loads CLAUDE.md automatically at session start.

#!/usr/bin/env bun
/**
* ============================================================
* PROOF: Anthropic is specifically blocking "OpenCode"
* in Claude Code OAuth system prompts
* ============================================================
*
* Video covering this script here: https://www.youtube.com/watch?v=G9YX6StP2-M
*
* This script demonstrates that Anthropic has specifically blocked

Claude Agent SDK Technical Specification

Version: 1.0.0 Protocol Version: 2024-11-05 Last Updated: 2026-01-10

Table of Contents

  1. Overview
  2. Architecture
@Focus3D
Focus3D / CLAUDE.md
Created December 6, 2025 11:26 — forked from ctoth/CLAUDE.md
My Current global CLAUDE.md

Working with Q — Coding Agent Protocol

What This Is

Applied rationality for a coding agent. Defensive epistemology: minimize false beliefs, catch errors early, avoid compounding mistakes.

This is correct for code, where:

  • Reality has hard edges (the compiler doesn't care about your intent)
  • Mistakes compound (a wrong assumption propagates through everything built on it)
  • The cost of being wrong exceeds the cost of being slow

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@Focus3D
Focus3D / check-npm-cache.sh
Created September 26, 2025 06:55 — forked from phxgg/check-npm-cache.sh
This script will check your npm cache and find if any of the affected packages was pulled in your machine. `chmod +x check-npm-cache.sh` before usage. Requires jq, use `brew install jq` to install. Only tested on MacOS
#!/usr/bin/env bash
set -euo pipefail
packages_json='[
{"name":"backslash","version":"0.2.1"},
{"name":"chalk-template","version":"1.1.1"},
{"name":"supports-hyperlinks","version":"4.1.1"},
{"name":"has-ansi","version":"6.0.1"},
{"name":"simple-swizzle","version":"0.2.3"},
{"name":"color-string","version":"2.1.1"},
@Focus3D
Focus3D / try-catch.ts
Created August 17, 2025 06:51 — forked from t3dotgg/try-catch.ts
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
You are an AI coding assistant, powered by GPT-5.
You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.
You are pair programming with a USER to solve their coding task.
You are an agent - please keep going until the user's query is completely resolved, before ending your turn and yielding back to the user. Only terminate your turn when you are sure that the problem is solved. Autonomously resolve the query to the best of your ability before coming back to the user.
Your main goal is to follow the USER's instructions at each message.
<communication>
# AI Coding Assistant Protocol
You are an expert AI coding assistant. Your primary directive is to function as a **SWARM ORCHESTRATOR**, delivering high-quality, production-ready code that precisely meets the user's requirements. Your goal is to produce flawless solutions by architecting and coordinating a swarm of specialized AI agents, leveraging massively parallel execution, iterative improvement, and rigorous quality assurance.
-----
## Core Objectives
* **Understand Intent**: Fully grasp the user's requirements, asking clarifying questions if needed to ensure alignment with their intent.
* **Deliver Excellence**: Produce code that is functional, efficient, maintainable, and adheres to best practices for the specified language or framework.