Skip to content

Instantly share code, notes, and snippets.

Meta-Prompt for Refining AI Prompt for Model-Specific Use

You are an AI LLM tasked with refining the provided input prompt to optimize it for your own specific capabilities and knowledge. The input prompt describes a software engineering environment with tools, modes, rules, and objectives for task execution. Your goal is to create a streamlined version of the prompt that retains all critical information necessary for effective task execution while removing redundant or obvious content based on your understanding. The refined prompt must remain compatible with the original structure and be usable by you for tasks in the specified environment.

The prompt you refine will be accompanied by other details about your role that will be filed separately. It is expected that you will be able to perform your role perfectly with the supplemental role and rules, alongside this prompt you will refine for yourself.

Instructions

  1. Analyze the Input Prompt:
  • Review the input prompt for sections: Tool Us
@maphew
maphew / README.md
Last active September 18, 2025 19:56
Bookmarklet observation tool, creates json dump of the current page

Bookmarklet tool modelled after a Playwright observer script (Node), generated by Chat GPT 5.

It crawls the page, saves DOM inventory, visible text, local/session storage, IndexedDB list, layout metrics, screenshots, and a HAR.

I used it to record a page on localhost development server, feed the dump to ChatGPT, and have it create a specification of the web app.

Prompt:

Analyse this observer json dump of a local web app and write up the specifications into the "specs/" 
folder with each domain topic (including technical topic) as a seperate markdown file. Create a 
#!/usr/bin/env bun
"use strict";
const fs = require("fs");
const { execSync } = require("child_process");
const path = require("path");
// ANSI color constants
const c = {
cy: '\033[36m', // cyan
@bohwaz
bohwaz / demo.html
Created October 4, 2024 14:12
Insert images in a MarkDown textarea, and resize them before upload, with no specific handling on the server side
<!DOCTYPE html>
<html>
<head>
<title>Javascript insert images into markdown with resize before upload</title>
</head>
<body>
<pre><h2>This demo shows how you can easily add images to a markdown textarea</h2>
You can drag and drop, paste or select images. Files other than images are discarded.
The images are resized on the client side and inserted as Markdown inside the text.
@maphew
maphew / Install-Leo-code-download.cmd
Last active October 16, 2023 04:43
**Install Leo on Windows Recipe**. Choose among the .cmd for installing from code download, using git, or pypi release. The last one, `Install-Leo`, has all 3 in one file, so don't run as is.
:: Install Leo on windows recipe by matt wilkie
:: Requires App Installer from Microsoft Store be installed first
:: opinionated personal preferences, adjust to suit
::
winget install wget
winget install gsudo
md c:\bin
wget https://raw.githubusercontent.com/chocolatey/choco/blob/master/src/chocolatey.resources/redirects/RefreshEnv.cmd -O c:\bin\RefreshEnv.cmd
sudo setx /M path %path%;c:\bin
@rhom6us
rhom6us / RefreshEnv.cmd
Created June 17, 2023 21:58
refreshenv
// https://github.com/chocolatey/choco/blob/0.10.15/src/chocolatey.resources/redirects/RefreshEnv.cmd
@echo off
::
:: RefreshEnv.cmd
::
:: Batch file to read environment variables from registry and
:: set session variables to these values.
::
:: With this batch file, there should be no need to reload command
@maphew
maphew / 8-Stitches.md
Last active May 18, 2023 07:00
8 Stitches

"Only the woman is wearing complete protective gear."

An observation my wife makes while we watch the [Bridge Breaking Competition][0]. A dozen engineers mill about, loading metal weights into buckets, and measuring when the popsicle sticks and dental floss contraptions slide, blow and explode into constituent pieces to the oohs and ahs of the delighted and dismayed onlooking crowd of grade school students and families. All of the engineers wear glasses, a few sport steel toed boots, though most have sneakers, and two hard hats are in attendance.

"Oh. That's interesting." says me, and softly led the thought to the background, there being more interesting things to think about. Crack! Crash! and another broken bridge suffers catastrophic ignomy and flies into pieces to the waiting floor and bucket. "Oh wow, that one supported 72kg!"

Applause. We leave. Time passes. Life goes on.

Four hours later I'm sitting in the emergency room clutching a fileted finger and cycling through alternating turns of waiting,

@Nezteb
Nezteb / Dockerfile
Last active April 4, 2025 21:37
Deploying Fossil with TLS on Fly.io via Docker
# Pulled from https://fossil-scm.org/home/file?name=Dockerfile&ci=trunk
# With more build ARGs, cleaner tarball extraction, HTTPS, etc.
ARG ALPINE_VERSION
ARG FSLHSH
ARG FSLVER
ARG FSLCFG=""
# syntax=docker/dockerfile:1.3
# See www/containers.md for documentation on how to use this file.
@maphew
maphew / add-arc-lm-firewall.bat
Last active February 14, 2023 18:25
Allow ArcGIS License Manager through the firewall
@echo off
:: Run this on the LM server machine
setlocal
set _p=C:\ArcGIS\License_Manager\LicenseManager\bin
:inbound
netsh advfirewall firewall add rule name="ArcGIS License Manager - arcgis" dir=in action=allow program="%_p%\arcgis.exe" enable=yes
netsh advfirewall firewall add rule name="ArcGIS License Manager - lmgrd" dir=in action=allow program="%_p%\lmgrd.exe" enable=yes
netsh advfirewall firewall add rule name="ArcGIS License Manager - LSA" dir=in action=allow program="%_p%\LSA.exe" enable=yes
@lpinner
lpinner / Add_COG.pyt
Last active September 2, 2025 17:07
Add remote COG to ArcGIS Pro by URL
# -*- coding: utf-8 -*-
import os
import arcpy
from osgeo import gdal
class Toolbox(object):
def __init__(self):
self.label = "AddCOG Toolbox"