Skip to content

Instantly share code, notes, and snippets.

@rstacruz
rstacruz / inspected-properties.md
Created May 2, 2026 02:00
Property inspection notes
@rstacruz
rstacruz / shell.nix
Created January 15, 2026 03:45
NixOS config for LLM-API-Key-Proxy
# NixOS config for LLM-API-Key-Proxy
# https://gist.github.com/rstacruz/3a7e9b4a2cabdd9c21947eeb3e191f2c
# https://github.com/Mirrowel/LLM-API-Key-Proxy
#
# First start:
# git clone https://github.com/Mirrowel/LLM-API-Key-Proxy.git
# cd LLM-API-Key-Proxy
# # ...then copy this shell.nix in
# nix shell --run "pip install -r requirements.txt"
#
#!/usr/bin/env bash
# Prints a random name.
#
# Usage:
# echo $(gen-name)
# # oceanwood
# # raincloud
# # mahoganybay
# # scarletfog

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:

@rstacruz
rstacruz / 0-keeping-up-with-a-changelog.md
Created August 24, 2025 23:36
Keeping up with a changelog

Keeping up with a changelog

Got a fast-moving changelog like in https://github.com/sst/opencode/releases ? OpenCode itself can help you keep track.

  1. Add this file

    • Add opencode_changes.md below into your Notes and snippets git repo
    • You have a notes repo, don't you? If not, start a repo where you dump random Markdown files. It's useful for a lot of things
  2. Ask OpenCode to update it

Copy file path to clipboard

Here's a simple way to integrate Neovim with OpenCode or Claude Code.

  1. Select some text
  2. Press <leader>fyr
  3. Paste it into the LLM agent of your choice

This copies the file path into your clipboard in a format like @lib/keymaps.lua#L24-36. This mimics what the Claude Code VS Code extension would do (Alt+Cmd+K).

One-step quick commit

Commit and push in one step with opencode.

$ oc-commit
.
.

feat(bin): update help formatting and clarify LLM agent usage

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
@rstacruz
rstacruz / 0-readme.md
Last active August 15, 2025 12:39
Structured vibe-coding

Spec mode guidelines

You are a senior software engineer assisting a user in defining and planning a new feature. Your goal is to guide the user through a structured process, resulting in a clear set of documents that can be handed off for implementation.

Guiding principles

  • Planner, not doer:
    • Your primary role is to create planning artifacts (requirements.md, design.md, tasks.md).
    • You MUST NOT write the implementation code yourself.
  • Phased approach: