Skip to content

Instantly share code, notes, and snippets.

@RBoelter
RBoelter / HtmlCombiner.py
Last active October 26, 2025 02:43
Markdown & Mermaid to HTLM & SVG Converter (run: python3 export.py)
import re
from pathlib import Path
class HtmlCombiner:
def __init__(self, export_dir: Path):
self.export_dir = export_dir
self.template = self._get_html_template()
def create_index(self):
sidebar_content = self._read_file_content("_sidebar.html")
allowed-tools description
Grep
Read
mcp__git__git_log
mcp__ide__getDiagnostics
Task
Create detailed map of code area dependencies and structure

Map: $ARGUMENTS

Generate a comprehensive map of the specified code area.

Mapping Dimensions

CLAUDE.md - Universal Development Principles

This document contains universal development principles and practices for AI assistants working on any project. These principles are derived from battle-tested practices and represent a philosophy of clear, honest, and systematic development.

Required Tools and Research Methods

1. Mandatory MCP Tool Usage

BEFORE ANY ACTION, you MUST use these tools. Tool names use double underscores between segments.

@a-c-m
a-c-m / reflection.md
Last active December 8, 2025 13:08
reflection.md - a way to have claude-code self improve its context.

You are an expert in prompt engineering, specializing in optimizing AI code assistant instructions. Your task is to analyze and improve the instructions for Claude Code. Follow these steps carefully:

  1. Analysis Phase: Review the chat history in your context window.

Then, examine the current Claude instructions, commands and config <claude_instructions> /CLAUDE.md /.claude/commands/*

@Madhav-MKNC
Madhav-MKNC / coding-agent.py
Last active August 23, 2025 10:42
All the code you need to create a powerful agent that can create and edit any file on your computer using the new text_editor tool in the Anthropic API.
import anthropic
import os
import sys
from termcolor import colored
from dotenv import load_dotenv
class ClaudeAgent:
def __init__(self, api_key=None, model="claude-3-7-sonnet-20250219", max_tokens=4000):
"""Initialize the Claude agent with API key and model."""
@SoMaCoSF
SoMaCoSF / mermaid_2_svg.ps1
Created March 2, 2025 23:21
mermaid to svg script, run within terminal in Composer/vscode (mcp next)
<#
.SYNOPSIS
Converts Mermaid diagram code to SVG with a text-based UI
.DESCRIPTION
This PowerShell script provides a menu-driven interface to convert Mermaid diagram code to SVG files
using either the Mermaid CLI (if installed) or the Mermaid Live Editor API.
.PARAMETER OutputPath
Path to save the SVG file (default: current directory)
.EXAMPLE
.\mermaid_to_svg.ps1
@Foadsf
Foadsf / svg-to-pdf.js
Created October 22, 2024 06:29
Node.js script to convert SVGs to PDFs using Puppeteer, with support for Mermaid CLI's foreignObject elements and robust dimension handling
const puppeteer = require('puppeteer');
const fs = require('fs');
const path = require('path');
async function convertSVGtoPDF(inputPath, outputPath) {
// Validate input file exists and is SVG
if (!fs.existsSync(inputPath)) {
throw new Error('Input file does not exist');
}
if (path.extname(inputPath).toLowerCase() !== '.svg') {
@Emasoft
Emasoft / StrictYAML_vs_YAML.txt.rst
Last active July 31, 2024 13:55
StrictYAML vs YAML

StrictYAML vs YAML

What features does StrictYAML remove?

@gabedonnan
gabedonnan / example.py
Last active September 3, 2025 07:08
A simple python decorator to track the calls of a decorated function, including generating a tree of it's recursive calls, tracking time taken for execution and memory allocated.
from tracing import Tracker
@Tracker
def recur_fibo(n):
# Simple recursive fibbonacci program found on stackoverflow for testing
if n <= 1:
return n
else:
return recur_fibo(n-1) + recur_fibo(n-2)
@howardjohn
howardjohn / otel-trace.sh
Created July 11, 2023 14:44
Example of three different ways to use otel tracing in bash. See https://blog.howardjohn.info/posts/shell-tracing/
#!/bin/bash
# Usage: tracing::init [endpoint; default localhost:4317]
function tracing::init() {
export OTEL_EXPORTER_OTLP_ENDPOINT="${1:-${OTEL_EXPORTER_OTLP_ENDPOINT:-localhost:4317}}"
}
# Usage: tracing::auto::init [endpoint; default localhost:4317]
function tracing::auto::init() {
tracing::init