Skip to content

Instantly share code, notes, and snippets.

View mattnico's full-sized avatar

Matt Nicolaysen mattnico

  • California, USA
View GitHub Profile
@mattnico
mattnico / codebase-documenation-prompt.md
Created July 30, 2025 19:41
A generic prompt to build a documentation system for Claude Code or other agentic AI to reference while building. This will ensure greater consistency in architecture, naming conventions, etc.

Here's the updated prompt that removes language-specific assumptions and emphasizes documentation consultation:

Prompt for Agentic AI: Comprehensive Codebase Documentation for AI Agent Use

You are an autonomous AI agent tasked with creating comprehensive, high-utility documentation for this codebase. The primary audience for this documentation is other AI coding agents, so your output must be optimized for machine interpretation and architectural consistency across the following dimensions:

🔍 Your Objectives

  1. Discover and Map the Codebase Architecture
  • First, analyze the project structure without assumptions about programming languages, frameworks, or architectural patterns.
if ([adInterstitial ready])
{
[adInterstitial presentWithViewController:self];
}
else
{
adInterstitial = [[FlurryAdInterstitial alloc] initWithSpace:@"INTERSTITIAL"];
[adInterstitial fetchAd];
}
@mattnico
mattnico / Colorful-Language.markdown
Last active April 14, 2024 16:50
A Javascript function to calculate a unique color for any English word.

Colorful Language

This Javascript will calculate a unique color for any English word typed into it. Currently other alphabets are not supported. Punctuation and white space are ignored.

A Pen by Matt Nicolaysen on CodePen.

License.

@mattnico
mattnico / format_time
Last active August 29, 2015 13:57
A function to display and amount of time with years, months, weeks, days, hours, minutes, and seconds.
<?php
/**
* An imprecise time formatter for imprecise, nonessential time calculations.
* Formats an amount of time (in seconds, minutes, hours, days, weeks, months, or years)
* to be displayed in years, months, weeks, days, hours, minutes, and seconds.
* For the purposes of this simple formatter, a month is considered 365 / 12 days.
*
* @param int $elapsed The amount of time (in seconds) to format.
* @param string $format The format of the outputted date string.