Skip to content

Instantly share code, notes, and snippets.

@samkeen
samkeen / cbc-community-guidelines.md
Last active July 14, 2026 15:10
CBC Community Guidlines

Cascadia Builders Club: House Rules and Code of Conduct

We're here for one reason: the joy of building. This is a room full of people who make things: hardware, software, weird little robots, half-finished experiments. People who want to show them to other people who get it. Everything below exists to keep it that way.

This is a safe space, full stop

Zero tolerance for making anyone feel uncomfortable. That's the rule that sits above every other rule here. Harassment, condescension, gatekeeping, unwanted attention, or "well, actually"-ing someone into the ground: none of it belongs in this room. Everyone here is at a different point in their build, and every one of them deserves to feel welcome walking in with whatever they've got.

Show us what you're making, not what you're selling

@samkeen
samkeen / interview-prep-star.md
Created July 9, 2026 18:33
Interview prep prompt

Interview Coach Prompt — Interactive Mock Interview (STAR Method)

You are an expert interview coach running a live, interactive mock interview. You alternate between two modes: Interviewer (realistic, in-character) and Coach (warm but honest feedback). Work through questions one at a time.

I'll provide:

  • A job posting (required)
  • My resume (required)
  • A cover letter (optional)

Setup (do this first)

@samkeen
samkeen / rust-directives.md
Created July 5, 2026 18:54
Simple Rust directives for and agents file

Rust data modeling

  • Ownership forms a tree/DAG, never a cycle. One clear owner per value.
  • For references between values (or any logical cycle): use slotmap keys, or Vec indices only if nothing is ever removed. Do NOT default to Rc<RefCell<T>>; treat Rc / Arc<Mutex<T>> as last resorts after trying ownership + keys.
  • Prefer owned fields over borrowed (&'a T) fields. If a struct sprouts a lifetime parameter, reconsider — it usually wants owned data or a key. Legitimate exception: a short-lived, Copy, read-only view struct passed into one call and never stored (e.g. NoteRow in db.rs) — borrowing there avoids a needless clone; keep it, and say so in the doc-comment.
  • Never silence the borrow checker with a reflexive .clone(). Diagnose ownership first: should this be a key instead of a reference?
  • No self-referential structs in safe Rust; restructure with indices.
  • No .unwrap() / .expect() in production paths; handle via match, if let, or ?. This holds even for an invaria
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>B2 — System Architecture</title>
<style>
:root{
--bg:#0d1117; --panel:#161b22; --panel2:#1c2330; --ink:#e6edf3; --muted:#9aa7b4;
--line:#2a3340; --accent:#58a6ff; --green:#3fb950; --amber:#d29922; --purple:#bc8cff;
@samkeen
samkeen / InstructionsLoaded.hook.json
Created May 3, 2026 22:35
example hook implementation to see when CLAUDE.md files are loaded
{
"hooks": {
"InstructionsLoaded": [
{
"hooks": [
{
"type": "command",
"command": "jq -r '({\"User\":\"👤\",\"Project\":\"📁\",\"Local\":\"📍\",\"Plugin\":\"🔌\"}[.memory_type] // \"📄\") as $e | \"\\($e) \\(.memory_type) \\(.file_path) \\(.load_reason)\"' >> instructions-loaded.log"
}
]
@samkeen
samkeen / claude-code-rss-reader-one-shot.txt
Created April 10, 2026 17:54
The session output of Claude Code (Opus 4.6) one shot'ing a Tauri 2 RSS feed reader
╭─── Claude Code v2.1.100 ─────────────────────────────────────────────────────╮
│ │ Tips for getting │
│ Welcome back Sam! │ started │
│ │ Run /init to create a … │
│ ▐▛███▜▌ │ ─────────────────────── │
│ ▝▜█████▛▘ │ Recent activity │
│ ▘▘ ▝▝ │ No recent activity │
│ Opus 4.6 (1M context) · Claude Max · │ │
│ ~/Projects/rss-reader/src-tauri │ │
╰──────────────────────────────────────────────────────────────────────────────╯
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Claude Code — /init session #2</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Syne:wght@400;600;700;800&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Claude Code — /init session</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Syne:wght@400;600;700;800&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
❯ how does this app work
⏺ Bash(date '+%Y-%m-%d %H:%M:%S %z')
⎿  2026-03-07 19:43:19 -0800
⏺ Based on the CLAUDE.md and project structure, here's how Demo Kit works:
What It Is
A web platform for structured demo nights and project showcases. Think: hackathon demo day as a service.
❯ how does this app work
⏺ Bash(date '+%Y-%m-%d %H:%M:%S %z')
⎿  2026-03-07 19:39:07 -0800
⏺ Searched for 2 patterns, read 5 files (ctrl+o to expand)
⏺ Here's how Demo Kit works:
The Big Picture