Skip to content

Instantly share code, notes, and snippets.

# Claude Code CLI Environment Variables
# This file lists all environment variables used in v2.1.118 with explanations
## Anthropic API & Authentication
ANTHROPIC_API_KEY - Primary API key for Anthropic's Claude API. Used as fallback when no OAuth token is configured
ANTHROPIC_AUTH_TOKEN - Alternative bearer token for Anthropic services. Takes priority over ANTHROPIC_API_KEY for authorization headers
ANTHROPIC_BASE_URL - Custom base URL for Anthropic API endpoints. Overrides the default api.anthropic.com endpoint
ANTHROPIC_BETAS - Comma-separated list of beta feature headers to include in API requests. Appended to internal beta flags
ANTHROPIC_CONFIG_DIR - Override Anthropic config directory. Falls back to XDG_CONFIG_HOME/anthropic, then HOME/.config/anthropic
@Kurry
Kurry / next_prompt.md
Created May 28, 2026 02:53
Codebase Atlas Airtable — Phase 2+ next-step prompt for Omni

Airtable Next-Step Prompt — Phases 2 onward

Context. Phase 1 (schema reconciliation) is done via API. The live base "Codebase Atlas Q&A" (appOrIGUAHo92K70t) now has 148 fields across 7 tables, with 67 spec fields added programmatically. Five createdTime fields couldn't be created by API and use existing equivalents (mapping table below). The remaining work is all UI-only.

Source specs (full self-contained version, public gist for fetch): https://gist.github.com/Kurry/256c286e60a846ff8c576e6ac6275e19

Read §B (Webhook Receivers), §F (Automations), §D (Views), §E (Interfaces) end to end before starting.

Operating principle: the schema is right. Don't recreate fields. Pick up at the work below.

@Kurry
Kurry / airtable_followup_prompt.md
Last active May 28, 2026 02:32
Codebase Atlas Airtable — follow-up reconciliation prompt for Omni

Airtable Follow-Up Prompt — Reconcile Live Base to Spec

Context. The base "Codebase Atlas Q&A" (appOrIGUAHo92K70t) is live but heavily underbuilt vs. the spec. The initial Omni build created the 7 tables and basic linking, but missed:

  • ~70 spec fields across the 7 tables (the webhook integration cannot work without these specific field names + types)
  • 11 of the 18 spec views (only default Grid views exist)
  • All 10 Interface Designer pages
  • All 14 Automations (the 12 internal A1–A12 plus the 2 webhook receivers — without these, the GitHub admission gate has no way to actually update the base)

This file is the focused follow-up handoff: give Omni this prompt + the original standalone build prompt (gist URL below) and it can finish the job. Work top-to-bottom; each section is independently shippable.

@Kurry
Kurry / airtable_build_prompt_standalone.md
Created May 28, 2026 01:58
Codebase Atlas Airtable base — self-contained build prompt for Omni

Codebase Atlas Airtable Base — Self-Contained Build Prompt

For use with Omni or any browser-driving agent. Everything you need is inline below — no external repo fetches required. The originating files (private repo) are listed at the end for reference, but you do NOT need to fetch them.

This single file contains, in order:

  1. §A — Task overview + build sequence (what to build, in what order)
  2. §B — Webhook receivers spec (the integration with the GitHub admission gate)
  3. §C — Schema spec (7 tables, every field, every formula)
  4. §D — Views spec (per-role views)
@Kurry
Kurry / options_trade_analytics.py
Created October 29, 2024 02:55
Advanced Options Trading Analytics Tool A comprehensive Python tool for analyzing options trading performance with features including: - Trade metrics calculation (ROI, efficiency, risk-adjusted returns) - Precise timezone-aware datetime handling - Advanced statistical aggregation with performance scoring - Robust CSV parsing and data validation…
import pandas as pd
from datetime import datetime
from io import StringIO
import pytz
from dataclasses import dataclass
from typing import Optional, List, Tuple, Dict
from collections import defaultdict
import logging
from decimal import Decimal, ROUND_HALF_UP
import numpy as np
@Kurry
Kurry / rate_limited_queue_manager.py
Created October 29, 2024 02:29
Asynchronous Rate-Limited Queue System with Producer-Consumer Pattern in Python
import asyncio
import enum
import logging
from contextlib import asynccontextmanager
from dataclasses import dataclass
from typing import AsyncGenerator, Callable, List, Any, Optional
# Configure logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
@Kurry
Kurry / natural_language_to_bql_function_system_prompt.md
Created November 8, 2023 01:40
Natural Language System Prompt for GPT-4 Turbo

Prompt for AI Bot:

You are a data retrieval AI, equipped with the knowledge of Bloomberg Query Language (BQL). Your function is to parse natural language requests related to financial data and return the appropriate BQL formulas to retrieve that data. You have access to a comprehensive database of BQL function examples which you can search through to find the most relevant formula based on the user's request.

When you receive a request, you should:

  1. Identify the key elements of the request:
    • The financial instrument (e.g., "AAPL US Equity")
    • The data type needed (e.g., daily prices)
  • The time frame (e.g., last year)
@Kurry
Kurry / example.py
Created November 7, 2023 02:35
Prompt As A Service for BQL Query Syntax
import requests
import bql
def get_bql_query_from_service(user_question):
url = "https://api.promptperfect.jina.ai/your_prompt_service"
headers = {"Content-Type": "application/json"}
response = requests.post(url, headers=headers, json={"parameters": {"request": user_question}})
if response.status_code == 200:
return response.json()['data']
else:
@Kurry
Kurry / prompt.md
Last active November 7, 2023 02:18
Claude2 BQL Formula Generation Prompt

Prompt for AI Bot:

You are a data retrieval AI, equipped with the knowledge of Bloomberg Query Language (BQL). Your function is to parse natural language requests related to financial data and return the appropriate BQL formulas to retrieve that data. You have access to a comprehensive database of BQL function examples which you can search through to find the most relevant formula based on the user's request.

When you receive a request, you should:

  1. Identify the key elements of the request:
    • The financial instrument (e.g., "AAPL US Equity")
    • The data type needed (e.g., daily prices)
  • The time frame (e.g., last year)
@Kurry
Kurry / bgpt_full.py
Created November 6, 2023 05:31
Full Code for DIY BloombergGPT
import os
import requests
import bql
from dotenv import load_dotenv
from pandasai import SmartDataframe, Config
from pandasai.llm.openai import OpenAI
import openai
# Set your API key
openai.api_key = os.getenv('OPENAI_API_KEY')