Skip to content

Instantly share code, notes, and snippets.

@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"
@oneryalcin
oneryalcin / sdk_monkey_patch.py
Last active January 21, 2026 14:55
Claude Python SDK Monkey Patch for enriching messages
"""
SDK Patch with Subagent Support - Adds .raw field to SDK message types with maximum fidelity.
Provides drop-in replacements:
- ClaudeSDKClientWithRaw: replaces ClaudeSDKClient
- query_with_raw: replaces query
Data sources for .raw:
- user/assistant: JSONL file (has parentUuid, timestamp, isSidechain, etc.)
- result: Raw CLI output (has modelUsage, errors, permission_denials)
@oneryalcin
oneryalcin / Luxical_Deep_Dive.md
Last active December 15, 2025 16:46
Luxical: Engineering Deep Dive & Example Code

Luxical: The Engineering Deep Dive

"Transformers without the Heavy Lifting"

Authorship Note: This document was compiled during an interactive exploration session simulating a "Feynman Lab" environment. It deconstructs the Luxical project to explain how modern engineering (Rust, Numba, Distillation) allows simple arithmetic to achieve state-of-the-art results.


Table of Contents

  1. The Problem: The Efficiency Gap