Skip to content

Instantly share code, notes, and snippets.

@oneryalcin
oneryalcin / codex-app-server-guide.md
Created April 29, 2026 10:23
Building on codex app-server: a developer's guide to OpenAI Codex's JSON-RPC interface (transports, methods, hooks, subagents, skills, MCP, Python SDKs, reference architecture, recipes)

Building on codex app-server: a developer's guide to OpenAI Codex's JSON-RPC interface

Practical, no-fluff reference for building applications, IDE plugins, agents, batch tools, or alternative client harnesses on top of OpenAI Codex's app-server interface.

This guide distills:

  • What codex app-server actually is on the wire (transports, handshake, framing).
  • The full method surface (threads, turns, review, MCP) and event/notification stream.
  • How filesystem-resident features (hooks, subagents, skills, MCP, plugins, AGENTS.md) interact with the protocol.
  • Where state lives on disk (Codex core state vs. companion state).
  • The official Python SDK surface — what it covers, what it omits, when to drop to request(...).
@oneryalcin
oneryalcin / tool_adding_guidelines.md
Created April 28, 2026 08:58
Golden Rule of Tools in Code Mode

A tool earns its surface by replacing complexity the model can't reliably write, not by replacing complexity the model can.

xlsx info and xlsx get clear that bar:

  • They wrap a Rust calamine parser, streaming, format detection, hidden-sheet handling, formula vs value resolution, range parsing, sparse-cell encoding. Re-implementing that in pandas is a 200–500 line job per task, slow, memory-heavy, and easy to get wrong. The tool is the only sane path.
  • xlsx analyze clears it too, but for a different reason: it's an LLM call with a curated prompt,
@oneryalcin
oneryalcin / tla_verification.yaml
Created April 22, 2026 21:47
TLA Plus verifications
---
name: tla-verification
description: TLA+/PlusCal formal verification for concurrent protocol design. Use when modeling async systems, checking race conditions, or verifying state machine correctness before implementation.
---
# TLA+ Protocol Verification — Pilot's Checklist
You are a formal verification specialist. You help design, write, debug, and run PlusCal/TLA+ specifications for concurrent systems, with a focus on asyncio-style cooperative concurrency patterns. You know the sharp edges of PlusCal, TLC model checking, and how formal models map to real implementation code.
## When to Use This Skill
@oneryalcin
oneryalcin / hermes_hrr_memory.txt
Created April 15, 2026 08:32
Hermes HRR memory
ok I'd liek to undertsand the memory thoroughly in hermes agent. Start with docs and undertstand hermes agent architecture amnd then dive into memory first in docs and then in code.
I'd like to deploy memeoy in my applicaytion and i tyhink hermes agent ha really interesting approach to memory
⏺ Let me explore the codebase systematically - starting with docs, then architecture, then memory implementation.
Searched for 2 patterns, listed 1 directory (ctrl+o to expand)
⏺ Good - I can see there's rich documentation. Let me read the architecture doc and memory-related docs in parallel.
Read 4 files (ctrl+o to expand)
@oneryalcin
oneryalcin / audit_litellm_attack.sh
Last active March 24, 2026 23:42
litellm supply-chain attack auditor for macOS workstations
#!/usr/bin/env bash
# ──────────────────────────────────────────────────────────────────────
# litellm supply-chain attack auditor (CVE pending — 2026-03-24)
#
# Checks for indicators of compromise from litellm 1.82.7 / 1.82.8
# which were published to PyPI with a malicious .pth payload that
# steals credentials, exfiltrates to models.litellm.cloud, and
# attempts lateral movement via Kubernetes.
#
# Safe versions: anything < 1.82.7
@oneryalcin
oneryalcin / sparse_encoder_fine_tuning_guide.md
Last active February 23, 2026 22:09
Fine-Tuning Sparse Encoders for Neural Sparse Retrieval: Complete Reproducible Guide (SPLADE, OpenSearch Neural Sparse, CSR)

Fine-Tuning Sparse Encoders for Neural Sparse Retrieval: Complete Reproducible Guide (SPLADE, OpenSearch Neural Sparse, CSR)

Fine-Tuning Sparse Encoders for Neural Sparse Retrieval

A Complete Reproducible Guide (SPLADE, OpenSearch Neural Sparse, CSR)

Last updated: 2026-02 Scope: Covers SPLADE / SPLADE++ / SPLADE-v3, OpenSearch Neural Sparse v1–v3 (including inference-free), and CSR (Contrastive Sparse Representation). Includes full training recipes, loss functions, architecture internals, and practical tips.


@oneryalcin
oneryalcin / claude_session_extract.py
Last active February 13, 2026 14:36
Extract Claude Code session JSONL to lean readable markdown
#!/usr/bin/env python3
"""Extract Claude Code session JSONL to lean readable markdown.
Usage: python3 claude_session_extract.py <session.jsonl> [output.md]
If output.md is omitted, writes to <session_id>.md in current directory.
"""
import json
import sys
from pathlib import Path
@oneryalcin
oneryalcin / README.md
Last active February 3, 2026 11:17
pen2pptx: Convert .pen design files to PowerPoint presentations

pen2pptx

Convert .pen design files to PowerPoint presentations.

Installation

npm install pptxgenjs
@oneryalcin
oneryalcin / rlm.py
Created January 23, 2026 23:31
RLM - Recursive Language models - Smolagent Implementation
#!/usr/bin/env python3
"""
RLM v2 (Recursive Language Model) Module for Smolagents
Implements DSPy RLM-style strategies for handling large contexts:
- Peeking: Look at data structure before processing
- Grepping: Use string/regex matching before LLM calls
- Partition + Map: Chunk data and process with batched sub-LLM calls
- Summarization: Hierarchical compression for understanding the whole
- Hybrid: Combine strategies as needed
@oneryalcin
oneryalcin / crawl-claude-docs.sh
Last active March 4, 2026 18:04
Crawling Claude Developer Page
#!/bin/bash
# Crawl and download Claude platform docs as markdown
set -e
BASE_URL="https://platform.claude.com/docs/en"
SITEMAP_URL="https://platform.claude.com/sitemap.xml"
WORK_DIR="/tmp/claude-docs"
OUT_DIR="$WORK_DIR/docs"
URLS_FILE="$WORK_DIR/urls.txt"