Skip to content

Instantly share code, notes, and snippets.

@ctoth
ctoth / CLAUDE.md
Created November 30, 2025 20:46
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
@cau1k
cau1k / warpgrep.ts
Last active December 1, 2025 00:29
warpgrep tool for opencode
import { WarpGrepClient } from "@morphllm/morphsdk";
import { tool } from "@opencode-ai/plugin/tool";
import { promises as fs } from "fs";
import { resolve } from "path";
const z = tool.schema;
const MAX_RETRIES = 3;
const BASE_DELAY_MS = 250;
const MAX_CONTEXTS = 20;
@airtonix
airtonix / AGENTS.md
Created November 23, 2025 08:12
Memory in an AGENT.md

AGENTS.md

Note

CRITICAL Before doing any work, read the entire contents of this file carefully.

!`cat TODO.md`

Opencode plugin development guide

Generated with LLM assistance on 2 Nov 2025 with minimal human verification.

Overview

Opencode plugins extend the functionality of the Opencode AI assistant by allowing you to add custom tools, authentication providers, event handlers, and hooks into the core system. This guide covers how to create, configure, and distribute plugins.

Source files:

OpenCode notification plugin

Shows desktop notifications with a summary of what the agent last said:

Screenshot

  • Place AGENTS.md in ~/.config/opencode/AGENTS.md
  • Place notification.ts in ~/.config/opencode/plugin/notification.ts
@begoon
begoon / AWS lambda custom runtime for Deno or Bun
Last active November 7, 2025 04:55
AWS lambda custom runtime for Deno or Bun
.

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

@alkasm
alkasm / dataclass_required_field.py
Created July 24, 2022 02:24
A pattern for "required" arguments in dataclasses, allowing for fields without defaults to follow fields with defaults.
from dataclasses import dataclass, field
from datetime import datetime
from typing import Optional, TypeVar
T = TypeVar("T")
def required() -> T:
f: T
@pthom
pthom / verbose_function_decorator.py
Last active January 23, 2025 15:02
Python decorator to log function call details (can include: input parameters, output parameters, return value)
import logging
import inspect
def verbose_function(dump_args: bool = True, dump_return: bool = False, dump_args_at_exit: bool = False):
"""
Decorator to print function call details.
This can include:
* input parameters names and effective values
* output parameters (if they were modified by the function)
@sts10
sts10 / rust-command-line-utilities.markdown
Last active December 4, 2025 02:05
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool