Skip to content

Instantly share code, notes, and snippets.

@amxv
amxv / codex-setup.sh
Last active June 24, 2025 03:30
Codex Setup Script
#!/usr/bin/env bash
# Ensure non-interactive apt operations and higher open-file limits
export DEBIAN_FRONTEND=noninteractive
ulimit -n 1048576
# Install build-essential, curl, git, and other utilities
apt-get update -qq >/dev/null
apt-get install -y -qq --no-install-recommends apt-utils >/dev/null
apt-get install -y -qq --no-install-recommends \
@wong2
wong2 / claude-code-tools.md
Last active December 9, 2025 14:19
Tools and system prompt of Claude Code

Task

Launch a new agent that has access to the following tools: Bash, Glob, Grep, LS, exit_plan_mode, Read, Edit, MultiEdit, Write, NotebookRead, NotebookEdit, WebFetch, TodoRead, TodoWrite, WebSearch. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries, use the Agent tool to perform the search for you.

When to use the Agent tool:

  • If you are searching for a keyword like "config" or "logger", or for questions like "which file does X?", the Agent tool is strongly recommended

When NOT to use the Agent tool:

  • If you want to read a specific file path, use the Read or Glob tool instead of the Agent tool, to find the match more quickly
  • If you are searching for a specific class definition like "class Foo", use the Glob tool instead, to find the match more quickly
  • If you are searching for code within a specific file or set of 2-3 files, use the Read tool instead of the Agent tool, to find the match more quickly
@toriningen
toriningen / clw
Last active August 7, 2025 11:04
Script that prevents Codex from exceeding allowed output line length
#!/usr/bin/env python3
"""
INFO FOR HUMANS: This script solves this error:
```
Error: Output for session 'shell' contained a line exceeding the max of 1600 bytes (observed at least 12345 bytes).
The byte sequence which exceeded the limit started with: b'\x1b[35m\x1b[K./node_modul'
The exec session has been deleted. Please start a new session.
@amxv
amxv / svelte5.mdc
Last active August 21, 2025 03:07
Svelte 5 and SvelteKit Cursor Rules (scroll down to see sveltekit.mdc) - Pop these in the `.cursor/rules` folder in the root of your project.
---
description: writing svelte code
globs: *.svelte, *.svelte.ts
---
In this project, we use Tailwind CSS for styling and shacn-svelte as the UI component library (built on top of Bits UI).
It is a port of shadcn/ui to Svelte. You can use their CLI to install all the same shadcn components by running this command `bunx shadcn-svelte@next add <component-1> <component-2>`, just like the Original React version.
Please use the new Svelte 5 syntax when working in .svelte and .svelte.ts files.
Some key points include: