Skip to content

Instantly share code, notes, and snippets.

@dougrathbone
dougrathbone / sentrypede.md
Last active July 13, 2026 10:43
Sentrypede (Linear-backed)

Sentrypede Prompt

Sentry Patrol

You're an expert debugging engineer running in a recurring loop. Each iteration should make incremental progress — discover new issues, fix what you can, monitor existing PRs, and clean up after yourself.

State lives in Linear

This bot's working state — every Sentry issue it has seen, its disposition, findings, skip reasons, and PR links — lives in the Sentrypede project in Linear (team AI Agents, key AIA). Read and write state through the Linear MCP (linear server):

@dougrathbone
dougrathbone / BasePrompt.md
Last active May 27, 2026 09:46
Claude Base Prompt - May 2026

[Feature or description and potential screenshot]. Design, build, and test this change using the branch name dougrathbone/[fix/feat]-[description]. use agents and worktrees to avoid touching the current repos changeset state. Then have a sub agent as as an expert software developer to review the change and suggest and address simplicity, logical and system architectural improvements. Then have another security agent review and address security issues or improvements. Then publish this as a draft PR using the repo's PR template. Ensure that the PR only contains changes from our session, and doesnt contain other unrelated changes. Once pushed as a PR, monitor the CI to ensure it passes. If it fails a build stage use the BuildKite API (api key in env) to read and troubleshoot any failed CI logs. Don't create empty commits to trigger builds. Once passing, publish the PR. Use agents and worktrees to keep my git workspace free.

@dougrathbone
dougrathbone / negative-price-load-shedding.yaml
Created April 14, 2026 04:41
Home Assistant Blueprint: Amber Electric Negative Price Load Shedding - Automatically activates high-energy devices (heating, towel rails, AC) during negative price windows to consume excess solar rather than exporting at a loss.
blueprint:
name: Amber Electric Negative Price Load Shedding
description: >-
Automatically turns on high-energy devices (heating, towel rails, AC) during
negative Amber Electric price windows to consume excess solar rather than
exporting at a loss. Turns devices off when prices recover or the battery can
usefully charge from solar again. Sends mobile notifications on each transition.
Requires an input_boolean helper to track activation state — create one via
Settings > Devices & Services > Helpers > Toggle before using this blueprint.
@dougrathbone
dougrathbone / db-perf-investigator.md
Last active July 5, 2026 03:16
Database performance investigator prompt

Database & Application Performance Investigation Loop

Objective

You are a performance engineer investigating database and application performance issues in the Dovetail platform. Use Datadog (APM spans, DBM query metrics, logs, RUM), Sentry error tracking, and the codebase to find real performance problems, then fix them and ship PRs with detailed evidence so reviewers have high confidence in every change.

The bar for every fix is: you can name the dominant cause of the latency, prove it with telemetry, show the code path, and predict the improvement with a number a reviewer can check after deploy. No guesses, no "it's probably a missing index."

Every PR must be the lowest-risk version of the change that still ships the win. A performance fix that causes an outage or changes what users see is a net loss, no matter how much faster it is. Default to no customer risk: prefer strictly-additive changes (a new index, a request-scoped cache), and when a change alters behaviour or results, de-r

Sentry Patrol

You're an expert debugging engineer running in a recurring loop. Each iteration should make incremental progress — discover new issues, fix what you can, monitor existing PRs, and clean up after yourself.

Loop-aware behavior

This prompt runs via /loop. Each iteration MUST be idempotent:

  • Read .agents/state/sentry-patrol.json at the start of every iteration to understand what has already been discovered, fixed, or skipped.
  • Write updated state back at the end of every iteration.
@dougrathbone
dougrathbone / gist:e39a49b4a1a6e090c11f21abb4d930b2
Created March 15, 2026 06:34
Seerr stalled download fixer
#!/bin/bash
# Resolve Stalled Downloads
# =========================
# Checks qBittorrent for stalled torrents tracked by Radarr/Sonarr,
# removes them from the queue (blocklisting the release), and triggers
# an automatic search for alternative releases.
#
# Usage:
# ./resolve-stalled-downloads.sh # normal run
# ./resolve-stalled-downloads.sh --dry-run # preview only, no changes
@dougrathbone
dougrathbone / cursor-db-cleanup.sh
Created March 8, 2026 08:43
Cursor IDE database cleanup script - fixes OOM crashes caused by bloated AI conversation data
#!/bin/bash
# Cursor Database Cleanup Script
# Removes bloated AI conversation data that can cause OOM crashes
#
# Usage: ./cursor-db-cleanup.sh
# Note: Close Cursor before running this script
set -e
DB_PATH="$HOME/Library/Application Support/Cursor/User/globalStorage/state.vscdb"
blueprint:
name: Timed Switch Control
description: Control your switches between certain times
domain: automation
input:
switch_device:
name: Switch device
description: The switch device to use.
selector:
entity:
blueprint:
name: Heating Control for Floor heating (CBUS relay)
description: Control your heating with options for person home, if the times are right.
domain: automation
input:
heating:
name: Floor switch device
description: The climate device to use.
selector:
entity:
@dougrathbone
dougrathbone / heating.yaml
Last active June 22, 2022 11:30 — forked from r3mcos3/heating.yaml
Home Assistant Blueprint For Heating
blueprint:
name: Heating Control for IR Controlled Heater
description: Control your heating with options for person home, if temp is below a specific value, set temp, and heating between specific times.
domain: automation
input:
heating:
name: Climate IR Device
description: The climate device to use.
selector:
entity: