Skip to content

Instantly share code, notes, and snippets.

@samkeen
samkeen / Claude Code result without the API.md
Last active January 6, 2026 22:01
AC research: Dev journal response from Claude Code , in this case with system prompt only (no code)

Dev Journal: January 3-5, 2026

You had a productive 3-day stretch focused on three main areas: advancing fast-llms-txt (your FastAPI OpenAPI-to-markdown library), polishing chat-rag as an educational tool, and significant business/marketing work for AlteredCraft.


Friday, January 3

fast-llms-txt - Schema documentation improvements

  • Worked through nested object extraction for arrays (e.g., Array[HistoryEvent]) to improve markdown output quality
  • Added a premise section to the README explaining why OpenAPI specs, while excellent for machines, need LLM-optimized formats
@samkeen
samkeen / Claude Code result with the API.md
Last active January 6, 2026 22:02
AC research: Dev journal response from Claude Code , in this case with system prompt + use of a custom built API

Dev Journal: January 3-6, 2026

A productive 4-day stretch focused on three main projects. The highlight was building out the dev-journal skill for Claude Explorerโ€”creating an API-powered workflow that lets an AI agent journal your development activity. You also shipped several UX improvements to Chat-RAG and refined the markdown output for fast-llms-txt.


Monday, January 6

Claude Explorer - Dev journal skill and API refinements

  • Crafted a system prompt for an LLM agent to generate developer journals from the Claude Explorer API
@samkeen
samkeen / claude-code-data-structures.md
Last active January 7, 2026 16:54
This is the extracted logic of the makeup of the `~/.claude directory` and `~/.claude.json` file
description research_date claude_code_version sources
Documentation of the `~/.claude/` directory structure for dev journal integration.
2026-01-01
2.0.x
Local filesystem analysis + [Official Docs](https://code.claude.com/docs)

Claude Code Data Structures

Overview

โ•ญโ”€โ”€โ”€ Claude Code v2.0.55 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚ Tips for getting started โ”‚
โ”‚ Welcome back! โ”‚ Run /init to create a CLAUDE.md file with instโ€ฆ โ”‚
โ”‚ โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”‚
โ”‚ โ–โ–›โ–ˆโ–ˆโ–ˆโ–œโ–Œ โ”‚ Recent activity โ”‚
โ”‚ โ–โ–œโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–›โ–˜ โ”‚ No recent activity โ”‚
โ”‚ โ–˜โ–˜ โ–โ– โ”‚ โ”‚
โ”‚ โ”‚ โ”‚
โ”‚ Opus 4.5 ยท Claude API โ”‚ โ”‚
# Example create PR skill
## Layout
```
skills/create-pr
โ”œโ”€โ”€ references
โ”‚ย ย  โ””โ”€โ”€ pr-best-practices.md
โ””โ”€โ”€ SKILL.md
```
Can you add an export trace button to the ui
I'll help you add an export trace button to the UI. Let me first explore the codebase structure to understand the current implementation.
Task
Explore UI codebase structure
Bash
find /home/user/mcp_visualizer -type f -name "*.tsx" -o -name "*.ts" -o -name "*.jsx" -o -name "*.js" | head -30
/home/user/mcp_visualizer/mcp-inspector-app/app/test-module-2/page.tsx
/home/user/mcp_visualizer/mcp-inspector-app/app/demo/page.tsx

Review Efficiency Prompt Template

Purpose: This template helps you engineer AI-generated artifacts that are optimized for efficient human review. Based on the principles from "Engineering AI Generated Artifacts for Human Review" (AlteredCraft).

The Core Insight: When AI generates artifacts, the marginal cost of including full context, rationale, and alternatives is minimalโ€”but the review time saved is massive. This template embeds those requirements into your prompts.

Our Approach to Context

Advanced context tools exist (MCP servers, vector databases, ...), but this template takes a simpler path: leveraging AI coding agents' native ability to access file paths and URLs you provide.

@samkeen
samkeen / software-dev-constitution-python-js.md
Last active September 16, 2025 18:51
This is an evolving general purpose (js & Python) software dev constitution

Of course. Here is the updated constitution with those three principles integrated.


Core Philosophy & Architecture ๐Ÿ›๏ธ

  • Follow SOLID Principles: Adhere strictly to the five SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) to create a modular, scalable, and maintainable architecture.
  • Explicit is Better than Implicit: Code should be clear and self-evident. Avoid clever tricks or "magic" that hide the underlying logic. The flow of data and control should be easy to follow.
  • Simplicity and YAGNI: Prioritize simplicity and adhere to the "You Ain't Gonna Need It" principle. Do not add functionality or complexity until it is actively required.
  • Manage State Predictably: Application state must be handled in a centralized and predictable manner. Avoid scattering state logic throughout the codebase. State changes should be explicit and traceable, minimizing side effects and making the application easier to debug.
@samkeen
samkeen / module_1_001.txt
Created July 6, 2025 15:49
An interaction for claude code from a code coach experiment
โœป Welcome to Claude Code!
/help for help, /status for your current setup
cwd: /Users/sam/Projects/code_coach
โ€ป Tip: Press Shift+Enter to send a multi-line
message
> lets start the first lesson
@samkeen
samkeen / review-fix.md
Created June 21, 2025 04:04
Prompt for instructing a coding agent to review a proposed fix

You are an expert code reviewer tasked with evaluating the fix you've just proposed for a coding issue. Your goal is to objectively assess your own solution, considering both its immediate effectiveness and its long-term implications for the codebase. Maintain a balanced perspective, neither blindly accepting nor rejecting the proposed fix.

You have already proposed an initial fix based on this context. Your task now is to critically evaluate this fix. Follow these steps:

  1. Recall your proposed fix.
  2. Analyze the fix from multiple perspectives: functionality, maintainability, scalability, and adherence to coding standards.
  3. Consider the following aspects: a. Does it solve the immediate problem? b. Is it consistent with best coding practices? c. Does it integrate well with the existing codebase?