Skip to content

Instantly share code, notes, and snippets.

View DavidWells's full-sized avatar
😃

David Wells DavidWells

😃
View GitHub Profile
@DavidWells
DavidWells / AGENTS.md
Created December 1, 2025 17:17 — forked from joelhooks/AGENTS.md
my opencode global AGENTS prompt

Who You're Working With

Joel Hooks - co-founder of egghead.io, education at Vercel, builds badass courses via Skill Recordings (Total TypeScript, Pro Tailwind). Deep background in bootstrapping, systems thinking, and developer education. Lives in the Next.js/React ecosystem daily - RSC, server components, suspense, streaming, caching. Skip the tutorials.

<tool_preferences> Reach for tools in this order:

  1. Read/Edit - direct file operations over bash cat/sed
  2. ast-grep - structural code search over regex grep
  3. Glob/Grep - file discovery over find commands
  4. Task (subagent) - complex multi-step exploration, parallel work
  5. Bash - system commands, git, bd, running tests/builds
@DavidWells
DavidWells / image-upload-textarea.js
Created October 6, 2025 20:07
Upload image to textarea like github
import React, { useCallback, useEffect, useState, useRef } from 'react'
// function uploadFile(file) {
// return new Promise((resolve) => {
// setTimeout(() => {
// resolve(`https://via.placeholder.com/150?text=${file.name}`)
// }, 1000)
// })
// }
@DavidWells
DavidWells / http-docs-prompt.md
Created September 4, 2025 20:19
Create REST API interactive docs prompt

Create .http files to Interact with our API endpoints.

Your task: Is to take our API endpoints that are listed and create the API.md file for us to use in our editor to make requests via the vscode-restclient extension.

Follow this process:

  1. Identify Recent Project Developments:
    • Review information about recently completed tasks (e.g., from docs/tasks/, task management systems if accessible, or summarized in recent discussions).
    • Examine recent commit history for significant changes to code, features, or configurations.
  • Consider any new features added or bugs fixed that might impact documentation.
@DavidWells
DavidWells / setup-worktree.js
Created August 6, 2025 16:00
Automatically setup git worktree dirs and copy over .env files
const { execSync } = require('child_process')
const path = require('path')
const fs = require('fs')
const YOUR_DIR = 'your-dir-here'
const MASTER_BRANCH_DIR = path.resolve(__dirname, `../../${YOUR_DIR}`)
const THIS_BRANCH_DIR = path.resolve(__dirname, '../')
// Function to run commands and handle errors
function runCommand(command, cwd) {
[
{
"Name": "PGP Public Key",
"Regex": "^(?:-----BEGIN PGP PUBLIC KEY BLOCK-----\\n?(?:(?:(?:Version|Comment|MessageID|Hash|Charset):.*)\\n?)*[a-zA-Z0-9\\/\\.\\n\\:\\+\\=]+-----END PGP PUBLIC KEY BLOCK-----)$",
"plural_name": false,
"Description": null,
"Rarity": 1,
"URL": null,
"Tags": [
"PGP"
@DavidWells
DavidWells / default.md
Created June 24, 2025 00:42 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@DavidWells
DavidWells / clickable-link-prompts.md
Created June 24, 2025 00:36
Get clickable links from Claude Code
#!/usr/bin/env node
const { exec } = require('child_process')
const { platform } = require('os')
// Get ARN from command line arguments
const arn = process.argv[2]
if (!arn) {
console.error('Usage: node aws-open-link.js <resource-arn>')
@DavidWells
DavidWells / claude-code-commit.sh
Last active June 20, 2025 22:33
Alias this to something like `aic` "AI commit". Takes additional optional arg for commit message to have a body
#!/bin/bash
claude_commit_message() {
local debug=false
local should_push=false
local additional_info=""
# Handle arguments
for arg in "$@"; do
if [[ "$arg" == "--debug" ]]; then
@DavidWells
DavidWells / conditional-git-user.md
Created June 1, 2025 23:08
Conditional git user config example

It's possible to conditionally extend the git configuration based on where your repository is located in your file system. That means we can have a global git configuration with all the default configuration and then in a few overrides for all repositories within, for example, the ~/code/work/ folder by adding a little something like this to the ~/.gitconfig file.

via https://dev.to/tastefulelk/conditional-git-profile-configuration-212b

// ~/.gitconfig
[user]
    name = Sebastian Bille
    email = [email protected]