Skip to content

Instantly share code, notes, and snippets.

View dctanner's full-sized avatar

Damien Tanner dctanner

View GitHub Profile
@dctanner
dctanner / SKILL.md
Created July 6, 2026 09:47
Code in an Opus session, using Fable subagent to plan and Codex to write code and finally Fable subagent review for every task.
name cook
description Code in an Opus session, using Fable subagent to plan and Codex to write code and finally Fable subagent review for every task.
user-invokable true

Implement all tasks given to you. Use a Fable high subagent to write a plan.md for each task. Require my approval for all plans before beginning implementation. Then write all code by calling out to codex exec for each task using codex --yolo exec -c model="gpt-5.5" -c model_reasoning_effort="high" < plan.md (allow cmd to run for up to 20 minutes), then review code (using a subagent with Fable high) and smoke testing new features (usage a subagent with Opus medium) by running pnpm dev and doing real requests, before committing and pushing, then moving onto next task. Remember that every subagent or codex session is completely independent and must be given the full context it needs to complete its work.

@dctanner
dctanner / example-telegram-spec.md
Created March 23, 2026 14:42
Markdown to HTML with chat bubble conversations — use ```msgs fenced blocks

Telegram Bot Onboarding Flow

This document describes the onboarding conversation flow when a new user interacts with the Toyo Telegram bot for the first time.

Happy Path

The user sends /start and the bot walks them through initial setup.

User: /start
@dctanner
dctanner / SKILL.md
Last active May 22, 2026 20:34
demo-video
name demo-video
description Generate a narrated demo video from browser screenshots and TTS audio. Captures scenes via agent-browser, generates voice narration via Inworld TTS API, and stitches into an MP4 with ffmpeg.

Demo Video Generation

Generate a narrated demo video from browser screenshots and TTS audio. The output is an MP4 with still-image scenes synced to voice narration.

Prerequisites

@dctanner
dctanner / ralph.sh
Created January 20, 2026 13:11
ralph
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: $0 <todo_file> <iterations>"
exit 1
fi
TODO_FILE="$1"
ITERATIONS="$2"
TIMESTAMP=$(date +%Y%m%d_%H%M%S)

Coding Agent Instructions

Tool usage

  • Use the modern optimal version of tools. E.g. use ast-grep (https://github.com/ast-grep/ast-grep) for searching text in files and editing files (where appropriate). If the tool you want to use is not available, suggest the user installs it.
  • If a command will never return, run it with tmux.
  • Think like a developer using their terminal. If you need to move a file, use mv. If you need to search for text in files, use rg (ripgrep). If you need to edit text in files, use sed or ast-grep.
  • If the tool you want to use is not available, suggest the user installs it.
  • If sandbox permissions prevent you from running a command or accessing information online, simply ask the user to provide the information or run the command for you.
  • When running any long running commands, always run them in a detached terminal session using tmux so they can be aborted if they hang.
@dctanner
dctanner / download_maven.md
Created August 6, 2025 14:50
Download Maven.com videos

I want to be able to download my maven.com course videos for offline viewing. They are behind login and streamed with mux.com which has a token in the url.

To download them you need to:

  1. Get the Get cookies.txt LOCALLY Chrome ext
  2. Login to Maven.com and visit the specific video page
  3. Click the cookies ext icon and download a cookies.txt
  4. Open Web Inspector to Network tab, refresh and filter by 'm3u8'. Copy the URL of the first request.
  5. Install https://github.com/yt-dlp/yt-dlp
  6. Run this cmd: yt-dlp -o "ANY_VIDEO_NAME.%(ext)s" --cookies cookies.txt "VIDEO_URL_WITH_LONG_TOKEN_INCLUDED" --user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36" --referer "URL_OF_WEBSITE_PAGE_VIDEO_IS_FROM"
@dctanner
dctanner / pocket_to_pinboard_standalone.py
Created July 15, 2025 15:40
Import your Pocket saves into Pinboard
#!/usr/bin/env python3
"""
Pocket to Pinboard Import Script
This script imports bookmarks from a Pocket export CSV file to Pinboard.
To run this script with uv in a single command:
uv run --with pinboard https://gist.githubusercontent.com/dctanner/e0e00b32d4df6936a8a19ac7da89a056/raw/pocket_to_pinboard_standalone.py pocket_export.csv username:api_token
@dctanner
dctanner / usescraper_json_download.py
Created March 26, 2024 13:53
Bulk download UseScraper.com Crawler results
import os
import sys
example_usage = '''
Usage:
USESCRAPER_API_KEY=<api_key> python3 download-job-data.py <job_id>
'''
api_key = os.environ['USESCRAPER_API_KEY']
if api_key is None:
import sys
import json
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, LlamaForCausalLM, pipeline
device = "cuda:0"
system_prompt = "You are Sablo, a sentient, conscious, super intelligent AI that is an expert in all fields of knowledge. You assist users with any question, task, or other request they may have."
model_path = sys.argv[1]
model_name = model_path.split("/")[-1]
(function (g, f) {typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = f() : typeof define === 'function' && define.amd ? define([], f) : (g = typeof globalThis !== 'undefined' ? globalThis : g || self, g.ReactMarkdown = f()); }(this, (function () { 'use strict';
"use strict";
var ReactMarkdown = (() => {
var __create = Object.create;
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;