Joelclaw web

From joelhooks/joelclaw · View interactive version

Joelclaw web is an AI agent skill from the GitHub repository joelhooks/joelclaw. Update and maintain joelclaw.com — the Next.js web app at apps/web/. Use when writing blog posts, editing pages, updating the network page, changing layout/header/footer, adding components, or fixing anything on the site. Hard content triggers: 'write article about X' (draft in Convex), 'publish art

How to use this skill

Skill file

joelclaw.com Web App

Next.js app at apps/web/ in the joelclaw monorepo (~/Code/joelhooks/joelclaw/).

Deployed to Vercel on push to main. Dark theme, minimal, system-y aesthetic.

OPSEC Rules

Never expose real infrastructure details on public pages.

Public diagrams use generic role names such as control plane, archive, development client, relay, and router. Do not publish real hostnames disguised as fictional aliases; the private topology boundary still applies.

Content Model (Convex-first)

Canonical runtime content lives in Convex contentResources:

Filesystem content under apps/web/content/ is seed/backfill material, not runtime source.

Runtime read policy:

Article fields still mirror MDX frontmatter shape:

---
title: "Post Title"
type: "article" | "essay" | "note" | "tutorial"
date: "2026-02-19T11:00:00"        # ISO datetime, NOT just date
updated: "2026-02-19T14:30:00"     # optional, bumps sort position
description: "One-liner for cards and meta"
tags: ["tag1", "tag2"]
draft: true                         # optional, hides from prod
source: "https://..."               # optional, for video-notes
channel: "Channel Name"             # optional, for video-notes
duration: "00:42:02"                # optional, for video-notes
---

Sorting: Posts sort by updated ?? date descending. Use full ISO datetimes (not bare dates) for deterministic ordering. Setting updated bumps a post to the top without changing its original publish date.

Slugs: Derived from fields.slug in Convex (resourceId = article:<slug>).

Hard Trigger Workflow

`write article about X`

  1. Generate slug from title/topic.
  2. Upsert contentResources with resourceId = article:<slug>, type = "article", full MDX body in fields.content, and fields.draft = true.
  3. Set fields.date to current ISO timestamp.
  4. Return slug + draft preview link (/<slug> if draft-visible in dev).

`publish article <slug>`

  1. Read article:<slug> from Convex.
  2. Patch/upsert with fields.draft = false and fields.updated = now.
  3. Revalidate all affected surfaces via POST /api/revalidate with:
  1. Verify /, /<slug>, /<slug>.md, and /feed.xml include the published post.

Media Embeds

Always embed YouTube videos in /cool discoveries and articles when they add context. Use the <YouTube id="VIDEO_ID" /> MDX component (available in both .mdx articles and .md discoveries). Extract the video ID from the URL (youtube.com/watch?v=VIDEO_ID). Place embeds near the top of the relevant section, before the prose discussion.

Writing Voice

Use the canonical joel-writing-style skill for prose. Key traits: direct, first-person when the claim is actually Joel's, strategic profanity, short paragraphs, bold emphasis, conversational but technical. Never corporate-speak and never fabricate Joel's beliefs or philosophy.

Design System

Key Files

| File | Purpose |

|------|---------|

| app/layout.tsx | Root layout, fonts, metadata, footer |

| app/page.tsx | Home page (post list) |

| app/[slug]/page.tsx | Post detail pages |

| app/adrs/page.tsx | ADR list |

| app/adrs/[slug]/page.tsx | ADR detail (strips H1 to avoid duplicate title) |

| app/cool/page.tsx | Cool/discoveries list |

| app/network/page.tsx | Infrastructure status page |

| components/site-header.tsx | Header with active nav (client component) |

| components/mobile-nav.tsx | Mobile overlay nav |

| components/search-dialog.tsx | ⌘K search |

| lib/posts.ts | Article loading from Convex (article:*) |

| lib/adrs.ts | ADR loading from Convex (adr:*) |

| lib/discoveries.ts | Discovery loading from Convex (discovery:*) |

| lib/convex-api.ts | Deployable runtime proxy and typed public Convex contract |

| lib/constants.ts | Site name, URL, tagline |

| lib/claw.ts | SVG path for claw icon |

ADR Display Rules

Adding a New Post

  1. Draft in Convex (contentResources.upsert, resourceId = article:<slug>, draft: true).
  2. Use ISO datetime in date field.
  3. Add images to apps/web/public/images/<slug>/ if needed and reference /images/<slug>/... in MDX.
  4. Publish by setting draft: false, then revalidate tags + paths (post:<slug>, article:<slug>, articles, /, /<slug>, /<slug>.md, /<slug>/md, /feed.xml, /sitemap.md).
  5. Verify route + markdown twin + homepage + feed consistency.

Backfill scripts:

Network Page

The network page (app/network/page.tsx) shows real infrastructure with aliased names. When updating:

  1. Check actual system state (kubectl get pods, tailscale status, launchctl print, etc.)
  2. Apply OPSEC rules — alias all hostnames, strip ports/IPs/usernames
  3. Keep data arrays at top of file for easy updates
  4. Status dots: green (Online) with ping animation, yellow (Idle), gray (Offline)
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.