Skip to content

Instantly share code, notes, and snippets.

View bkataru's full-sized avatar
🌩️
boomin at da speed of c ⚡🔧

Baalateja Kataru bkataru

🌩️
boomin at da speed of c ⚡🔧
View GitHub Profile
@bkataru
bkataru / .gitignore.ada
Created June 23, 2026 03:17
.gitignore.ada
# Ada build artifacts
*.o
*.ali
*.a
*.so
*.dll
*.exe
*.dSYM/
# GNAT/GPR build outputs
@bkataru
bkataru / microgpt.py
Created March 2, 2026 01:05 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@bkataru
bkataru / markdown-newlines-skill.md
Created February 25, 2026 02:22
Markdown Newline Escaping in Bash/CLI — why \n appears instead of line breaks and how to fix

Skill: Markdown Newline Escaping in Bash/CLI Commands

Problem

When creating GitHub PRs, issues, or comments via gh CLI commands with multi-line markdown content, newlines are being escaped as literal \n strings instead of actual line breaks.

Example of Broken Output

## Summary\n\nFix duplicate symbol errors...\n\n## Problem\n\nclip.cpp was being compiled twice...
@bkataru
bkataru / gist:64d379ca7e5114654dffc97d281daf26
Created February 24, 2026 23:56
SKILL: Rust CLI/Storage QA Gotchas — TOML arrays, format parser header vs label, MCP stdout, LevelDB iterator
# Skill: Rust CLI & Storage QA Gotchas
> Concrete bugs found during dogfood QA of a Rust CLI tool with SQLite, TOML, LevelDB, and MCP. Each pattern recurs in other projects.
---
## 1. TOML Does Not Support Top-Level Arrays
`toml::to_string(&Vec<T>)` returns `Err("unsupported rust type")` — TOML requires a top-level table, not an array.
@bkataru
bkataru / gist:ba0e7cb4fd43bf1a0ed2a96ed124b99b
Created February 24, 2026 23:55
SKILL: Chrome Extension LevelDB Recovery — rusty_leveldb pitfalls, double-encoded JSON, hot-copy corruption, Edge WAL extraction
# Skill: Chrome Extension LevelDB Recovery
> Recovering data from Chrome/Edge/Brave extension LevelDB stores (e.g., OneTab, 1Password, any browser extension that uses `chrome.storage.local`).
---
## Extension Storage Paths
| Browser | Extension LevelDB path |
|---------|----------------------|
@bkataru
bkataru / skill-claude-code-spawning-background-agents.md
Created February 24, 2026 16:13
SKILL: Spawning & Monitoring Background Coding Agents from Claude Code — phase pipeline pattern, prompt templates, model selection

Skill: Spawning & Monitoring Background Coding Agents from Claude Code

Patterns for orchestrating long-running AI coding agents from within a Claude Code session.


The Core Pattern

Use Bash tool with run_in_background: true to launch agents, redirect output to a file, and poll progress without blocking the main session.

@bkataru
bkataru / skill-opencode-custom-agents.md
Created February 24, 2026 16:13
SKILL: Configuring Custom Agents in OpenCode — native opencode.json config, OMO oh-my-opencode.json, markdown agent files

Skill: Configuring Custom Agents in OpenCode

How to define custom agents natively in opencode and via oh-my-opencode.


Two Configuration Systems

OpenCode has its own native agent configuration, and oh-my-opencode (OMO) extends it with a separate config for its built-in agents. They coexist.

@bkataru
bkataru / skill-oh-my-opencode-ralph-loop.md
Created February 24, 2026 16:13
SKILL: oh-my-opencode (OMO) Ralph Wiggum Loop & Agent Invocation — correct usage, pitfalls, agent behavior observations

Skill: oh-my-opencode (OMO) — Ralph Wiggum Loop & Agent Invocation

Learnings from using OMO to autonomously implement multi-phase Rust projects.


What is oh-my-opencode?

oh-my-opencode is an OpenCode plugin that adds:

  • Ralph Wiggum loop — runs the agent until ALL todos complete, not just one turn
@bkataru
bkataru / skill-rmcp-0.10-rust-mcp-server.md
Created February 24, 2026 16:13
SKILL: Implementing MCP Servers in Rust with rmcp 0.10 — pitfalls, correct patterns, working example

Skill: Implementing MCP Servers in Rust with rmcp 0.10

Accumulated learnings, pitfalls, and working patterns from implementing tablitz-cli MCP server.


Summary

rmcp 0.10 uses a macro-driven approach with #[tool_router] and #[tool_handler] that auto-generates most of the boilerplate. The hard part is getting the macro invocation order and parameter schemas right.

@bkataru
bkataru / gist:27caa1aeb746efb06f83127cfcc586b0
Created February 18, 2026 17:15
opencode titlecase crash fix: TypeError when task() called without subagent_type in TypeScript project directories
# opencode `titlecase` Crash Fix — Binary Patch
## Problem
When using [opencode](https://github.com/anomalyco/opencode) (v1.2.6) with the [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) plugin in **TypeScript project directories**, the process crashes with:
```
TypeError: undefined is not an object (evaluating 'str3.replace')
at titlecase (src/util/locale.ts:3:12)
at task (src/cli/cmd/run.ts:170:24)