Skip to content

Instantly share code, notes, and snippets.

View james2doyle's full-sized avatar

James Doyle james2doyle

View GitHub Profile
@james2doyle
james2doyle / SKILL.md
Created September 16, 2026 18:45
Update an AGENTS.md to maximize correctness, completeness, and adherence to codebase standards. I dont recall where this came from.
name agents-md-upgrade
description Update an AGENTS.md to maximize correctness, completeness, and adherence to codebase standards

This skill defines the best practices for authoring AGENTS.md files to maximize an AI coding agent's correctness, completeness, and adherence to codebase standards. It is based on the principle that structured, passive context reliably outperforms active retrieval.

1. Core Philosophy & Directives

  • Passive Context Wins: Agents automatically discover AGENTS.md in 100% of sessions. Rely on this file as the primary entry point rather than expecting agents to actively trigger separate "skills."
@james2doyle
james2doyle / yesterdays-ai-news-test.md
Created September 1, 2026 16:32
A simple prompt to test the tool calling, research capabilities, summary quality, and instruction following for LLMs

Research yesterday's AI news. For each story:

[Emoji] Headline

What happened: 2-4 sentence summary. Validation: ✅ confirmed facts / ⚠️ caveats and unverified claims (formatted as a list) Sources: Outlet

Close with a Key Takeaways table (Theme | Signal) and a confidence rating.

Rules:

@james2doyle
james2doyle / subl
Created August 12, 2026 21:51
Fix large fonts on GNOME desktop in Sublime Text 4
#!/bin/sh
# replaces what was originally in /usr/bin/subl
# change GDK_DPI_SCALE=0.9 based on how you want to scale. 1 is 100%
# you can then use a Linux preferences to change the "ui_scale" up to say 1.1 to even it out
exec env GDK_SCALE=1 GDK_DPI_SCALE=0.9 /opt/sublime_text/sublime_text "$@"
@james2doyle
james2doyle / maclike.json
Created August 8, 2026 23:42
Input-remapper-2 config for mac-like keyboard navigation. Ctrl is remapped to LeftMeta. Put in $XDG_CONFIG_HOME/input-remapper-2/presets/{YOUR_DEVICE}/Maclike.json
[
{
"input_combination": [
{"type": 1, "code": 125, "origin_hash": "4790f6e20b87c369dcfe985187897b13"},
{"type": 1, "code": 105, "origin_hash": "4790f6e20b87c369dcfe985187897b13"}
],
"target_uinput": "keyboard",
"output_symbol": "KEY_HOME",
"name": "Ctrl+Left (start of line)",
"mapping_type": "key_macro"
@james2doyle
james2doyle / slim-build.md
Created June 20, 2026 05:03
Opencode "slim-build" agent. Save to ~/.config/opencode/agents/slim-build.md

description: Efficient building system that efficiently makes changes to the code temperature: 0.2 permission: bash: allow edit: allow write: allow read: allow grep: allow glob: allow

@james2doyle
james2doyle / slim-plan.md
Last active June 20, 2026 05:07
Opencode "slim-plan" agent. Save to ~/.config/opencode/agents/slim-plan.md

description: Efficient planning system that gathers details and outlines technical design temperature: 0.2 permission: bash: ask edit: deny write: deny read: allow grep: allow glob: allow

@james2doyle
james2doyle / Dockerfile
Last active February 15, 2026 20:08
A dockerfile image that sets up Opencode with Oh-My-Opencode alongside Bun and PNPM
# Build the image with: docker build -t super-opencode .
# Run the container with: docker run -it --volume="$PWD:/app" --workdir="/app" super-opencode
# Use the official Node.js image based on Debian Bullseye (slim version for smaller size)
FROM node:24.13.1-bullseye-slim
# Set the working directory inside the container to /app
WORKDIR /app
# Install system dependencies required for building and running various tools
@james2doyle
james2doyle / alpine.extras.js
Last active December 24, 2025 17:15
A few magic properties and directives for Alpine.js
/**
* Alpine.js magic property to confirm a change.
*
* Usage: @click="$confirm('Are you sure?').then(copied = true)"
*
* @returns {(message: string) => Promise<void>} - A function that takes the text to display as an argument.
*/
Alpine.magic('confirm', () => {
return (message) => {
return new Promise((resolve, reject) => {
@james2doyle
james2doyle / sanity-rest-api-collection.json
Created December 5, 2025 18:32
Full collection for Sanity.io REST HTTP API including Query, Assets, and comprehensive Mutation/Patch examples.
{
"info": {
"_postman_id": "b3e3e3e3-3e3e-3e3e-3e3e-3e3e3e3e3e3e",
"name": "Sanity HTTP API (Complete + Patches)",
"description": "Full collection for Sanity.io HTTP API including Query, Assets, and comprehensive Mutation/Patch examples.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Query",
@james2doyle
james2doyle / generate-deep-slug-urls.groq
Created October 10, 2025 22:06
Generate nested URLs using Groq functions in Sanity
// since the argument variable can only be referenced once, we need this function repeated
fn ex::p($p) = $p->{"c":url.current};
fn ex::pp($p) = $p->{"c": ex::p(parentPage).c};
fn ex::ppp($p) = $p->{"c": ex::pp(parentPage).c};
// will output `level-4/level-3/level-2/level-1`
// usage: { "href": ex::slug(@) }
fn ex::slug($d) = $d{"slug":array::join(
array::compact([
ex::ppp(parentPage).c,
ex::pp(parentPage).c,