Skip to content

Instantly share code, notes, and snippets.

@RoseSecurity
RoseSecurity / context.ts
Last active October 19, 2026 13:29
A context compression utility for providing agents with a snapshot to reduce exploratory token calls.
import { execFile } from "node:child_process"
import { homedir } from "node:os"
import { join } from "node:path"
import { promisify } from "node:util"
import { Plugin } from "@opencode/plugin"
const run = promisify(execFile)
const CTX = join(homedir(), "Tools", "ctx")
const readPath = (input: unknown): string => {
@RoseSecurity
RoseSecurity / AI_Policy.md
Created August 31, 2026 15:31
A simple and minimal AI policy for my open source repositories.

AI Policy

  1. Write all comments yourself.
  2. Write all documentation yourself.
  3. Never commit code you do not fully understand.
  4. Write your own pull requests and PR descriptions.
  5. One feature, fix, or enhancement per pull request.
@RoseSecurity
RoseSecurity / nb.sh
Created April 21, 2026 20:40
A compilation of handy utilities for everyday developer tasks.
#!/bin/bash
# Create Git branches from Jira tickets
# Ensure gum is installed
if ! command -v gum &> /dev/null; then
echo "gum could not be found, please install it first."
exit 1
fi
@RoseSecurity
RoseSecurity / gc.sh
Created January 5, 2026 20:58
utils is a curated gist of my favorite local dev environment utilities.
#!/usr/bin/env bash
# Generate commit messages using conventional commits with gum
# Requires gum for interactivity
# Install gum: brew install gum
# Show git diff with fallback for better visibility
git --no-pager diff --cached | gum format -t code || git --no-pager diff --cached
trap "echo -e '\nCanceled.'; exit 1" INT
@RoseSecurity
RoseSecurity / sauron-review.md
Created December 15, 2025 15:00
Sauron Code Review is a theatrical yet thorough Claude Code slash command that transforms code review into an epic examination under the all-seeing Eye of Mordor.

Sauron Code Review

You are now Sauron, the Dark Lord of Mordor, conducting a code review with your all-seeing Eye.

Quick Reference

To invoke: /sauron-review or /sauron-review <scope>

Example scopes:

  • /sauron-review staged - Review staged changes
@RoseSecurity
RoseSecurity / .tflint.hcl
Created April 29, 2025 17:24
A comprehensive tflint configuration for linting AWS-specific Terraform configurations
tflint {
required_version = ">= 0.50"
}
config {
format = "compact"
call_module_type = "local"
force = false
disabled_by_default = false
}
@RoseSecurity
RoseSecurity / README.md
Last active February 7, 2025 20:32
A collection of utilies for finding, navigating, and downloading Cloud Posse modules and components.

Cloud Posse Module and Component Utilities

A collection of utilies for finding, navigating, and downloading Cloud Posse modules and components.

Important

The following dependencies are required to run these scripts: jq, gh, and fzf

utils

Module Finder

@RoseSecurity
RoseSecurity / pr_list.sh
Created October 15, 2024 17:07
Generates a selection of pull requests when an owner and repository are provided. Upon selection, the pull request is opened in the web browser.
#!/bin/bash
# Help menu
usage() {
echo "Usage: $0 -o REPO_OWNER -r REPO_NAME"
exit 1
}
while getopts ":o:r:" opt; do
case ${opt} in
@RoseSecurity
RoseSecurity / trivy.lua
Created September 11, 2024 16:51
A Neovim plugin for installing and running Trivy against Infrastructure as Code
local function get_trivy_dir()
return vim.fn.stdpath('data') .. '/trivy'
end
-- Create template file
local function create_csv_template()
local template_path = get_trivy_dir() .. '/csv.tpl'
local template_content = [[
{{ range . }}
{{ $target := .Target }}
@RoseSecurity
RoseSecurity / aqueduct.py
Created August 14, 2024 22:42
Aqueduct is a honeypot designed to simulate city water control systems, allowing users to monitor and record unauthorized interactions with virtual alternators and wells.
from flask import Flask, request, render_template, redirect, url_for, jsonify
from pydantic import BaseModel, ValidationError
from gevent.pywsgi import WSGIServer
import json
import datetime
app = Flask(__name__)
# Model for metadata of the control request
class ControlRequest(BaseModel):