# Build & Sell Claude Code Operating Systems (2+ Hour Course)
<!--
ref: @content/youtube/nate-herk/2026-05-01-build-and-sell-claude-code-operating-systems
version: 3
updated_at: 2026-10-31T20:28:32.989Z
-->
Nate Herk (2026-05-01): Nate argues that the durable unit of AI leverage is not a tool but an "AI operating system" — a project folder of markdown context, wired connections, reusable skills, and scheduled triggers that a coding agent sits on top of.
*Synthesized from Nate Herk on Nate Herk | AI Automation, 2026-05-01.*
Nate Herk scaled an AI automation agency past $100,000 per month and sold it, and now runs a free 350,000-member AI automation community alongside this channel.
## Core Thesis
Nate argues that the durable unit of AI leverage is not a tool but an "AI operating system" — a project folder of markdown context, wired connections, reusable skills, and scheduled triggers that a coding agent sits on top of. Because the tools churn roughly every six months, he teaches the layer underneath: he migrated his own AIOS from n8n to Claude Code, then ported it to Codex in about two minutes to prove it travels. The build order is fixed — context, then connections, then capabilities, then cadence — and you cannot skip forward, because cadence without connections and capability without context both fail.
## Key Insights
- **Two frameworks organize the whole course.** The *three M's* (mindset, method, machine) govern how you think; the *four C's* (context, connections, capabilities, cadence) govern how you build. The four C's stack strictly in order 1→4.
- **The default shift.** Before any task, ask not whether AI can do it but what percentage it can take. Nate's example: 300+ YouTube description tracking links he would once have edited by hand over roughly an hour, now routed to an API, MCP, or browser automation instead.
- **The function breakdown.** Treat your role as a tree of tasks. A whole YouTube video is too big to automate; ideation, scripting, slide creation, packaging, descriptions, and comment replies are each individually automatable, and the chunks are portable across processes.
- **The curiosity rule.** He warns against "dark code" — accepting generated code you cannot reason about. Ask why a design was chosen and what breaks on the edge case (his example: an invoice arriving empty when the code expects it filled).
- **Expect a productivity dip before the gain.** Nate budgets roughly a **20% drop** during the switch against a **50% upside**, and describes learning as exponential rather than linear, with break-even around day three of a change and a clear lead by days four and five. That trough is where people quit.
- **Map seven tier-one domains before touching the terminal:** revenue, customer, calendar, comms, tasks, meetings, knowledge. His own mapping: Skool/Stripe/QuickBooks for revenue, Skool and YouTube for customer, Google Workspace for calendar, Google Workspace + ClickUp + Slack for comms, ClickUp + Notion for tasks, Fireflies for meetings, and YouTube transcripts + Google Workspace + local files for knowledge.
- **Repo structure of the template:** `.claude/skills/` (shipped with `onboard`, `audit`, and `level-up`), plus `archives/`, `context/`, `decisions/`, and `references/` folders, all described in `CLAUDE.md` — which he treats as the master prompt and says he edits about twice a day.
- **Onboarding is a seven-question interview** that writes an intake file and then generates `about-business`, `about-me`, and `priorities` markdown in the context folder. Question two asks you to paste recent writing verbatim so the system learns your voice; he recommends voice dictation to answer at length.
- **He prefers documented API endpoints over MCP servers.** MCP exposes every function whether you need it or not and loads more tokens into the project. His pattern: have Claude research the vendor's API docs once, write a local reference markdown file of every endpoint, and read from that thereafter — markdown is cheaper and faster for the model than repeated web research or live HTTP discovery.
- **Then narrow further.** Once a skill runs, ask which endpoints it actually used and hardcode just those into the skill file so it never re-reads the full API reference.
- **Give the agent its own account, not yours.** Nate created a separate ClickUp user ("Up AI") and hands Claude that account's token instead of his own, scoping permissions per key — which also lets you attribute spend per agent.
- **Secrets go in `.env`, never in chat.** Have Claude write the `.env` with placeholders and paste the key in yourself; the leading dot keeps it out of pushes via `.gitignore`.
- **Permission modes matter.** Plan mode for building skills and brainstorming; auto mode spends extra tokens having a model judge whether each action is safe; bypass permissions removes the checks entirely and must first be enabled via "allow dangerously skip permissions" in settings.
- **The `audit` skill scores your four C's out of 100.** His day-one demo returned **54.5/100** — context 18/25, connections 16/25 — and named the top three gaps by leverage: only one of seven tier-one domains reachable, no recurring trigger, zero user-built skills or agents. Audits can be saved to track improvement.
- **The `level-up` skill asks five diagnostic questions** to find the next automation: what you did 3+ times last week, what felt manual or copy-paste, what a smart intern could have handled but you did yourself because explaining would take longer, what would break first if 500 new members arrived Monday, and what growth lever would pay off on autopilot.
- **The Google Workspace CLI (GWS) is his biggest single connection unlock** — one open-source, JSON-first tool covering Drive, Gmail, Calendar, Docs, Sheets, Slides, and Admin, with **over 100 built-in multi-step recipes**, auto-discovery of new endpoints, and far less context overhead than a pile of MCP configs. Setup is a Google Cloud project, an OAuth consent screen, a desktop-app client ID whose JSON goes to `~/.config/gws`, `gws auth login`, then enabling each API. It is not an officially supported Google product and warns of breaking changes before v1.0.
- Because GWS drives Docs and Slides through bash commands rather than raw API writes, output is formatted rather than dumped markdown. For Slides, Nate added **visual validation** — the model cannot see its own deck, so he gave it Chrome DevTools access to screenshot each slide and correct spacing, and noted a shrunken browser window degraded the screenshots.
- **Skills are the capability layer:** a folder with a `skill.md` carrying YAML front matter (name and description required; optional fields include allowed tools, argument hint, model, context, hooks, agent, and `disable-model-invocation`). Docs advise keeping `skill.md` **under 500 lines** and moving detail into reference files. Reference files and scripts can live inside the skill folder or elsewhere — only the path in `skill.md` matters.
- **Progressive context loading, three levels:** every skill's front matter is scanned first at roughly **100 tokens** each; the matched `skill.md` is then read in full at perhaps one to a few thousand tokens; supporting files load only when the request demands them.
- **His skill-building framework has six steps:** name and trigger, one-sentence goal, step-by-step process, reference files, rules and guardrails, and a self-improvement loop. He builds skills by walking Claude through the task manually once, then asking it to interview him and write the skill.
- **Debugging table he gives:** wrong steps or order → edit `skill.md`; missing tone or context → add reference files; the same recurring mistake → add a rule; struggling with a tool or repeatedly searching → write a reference doc; not triggering → tighten the YAML description; triggering too often → disable model invocation.
- **A worked optimization:** in his pulse-check skill he hardcoded ClickUp list IDs after watching the agent re-discover them every run, and delegated searching to a dedicated ClickUp sub-agent so the main context window stays clean.
- **Skills can be project-scoped or global.** Global skills live in the home directory and apply in every project — he keeps a front-end design skill there.
- **Cadence, layer one: put the AIOS in a private GitHub repo** so it syncs across machines and can be attached to remote harnesses — Claude Code on the cloud, a VPS, a Mac Mini, or agent frameworks like OpenClaw or Hermes.
- **Cadence, layer two: routines.** Local routines need the desktop app open; cloud routines run on Anthropic's infrastructure with the machine off. Limits are **5 runs/day on Pro, 15 on Max ($200/mo), 25 on Team and Enterprise**, minimum interval **1 hour**, each run on **4 vCPUs, 16 GB RAM, 30 GB disk**. Triggers are schedule, API call, or GitHub event. A routine is a one-shot prompt injected into a real Claude session — it can invoke your skills.
- **The routine gotchas are specific.** The run clones your GitHub repo, so `.env` is absent: put keys in the cloud environment's **environment variables**, and say explicitly to read the environment rather than a `.env` file — his ClickUp routine figured it out, his YouTube one did not until told. Network access defaults to **trusted** (an Anthropic-vetted domain list); ClickUp required **full**, which carries the theoretical risk that malicious content read mid-run could exfiltrate outward. Runs are stateless and the clone is destroyed, so browser automations depending on local cookies do not port. A setup script can install packages before Claude launches.
- **Cadence, layer three: `/loop` and cron.** A loop schedules a recurring prompt inside the current session via `cron create`, with `cron list` and `cron delete` for management. Loops **expire after 3 days**, die when the terminal or tab closes, have no catch-up, and can be disabled entirely by environment variable. Scheduled tasks persist, survive restarts, and do catch up. His rule of thumb: loop for help on today's project, scheduled task for a daily or weekly function.
- **Knowledge layer: Karpathy's LLM wiki instead of RAG.** A `raw/` folder of source documents and a `wiki/` folder of generated markdown pages, plus an index, an operation log, and a `CLAUDE.md` — Obsidian only provides the graph view. Nate ingested one article (AI 2027) into 23–25 linked wiki pages in about 10 minutes; a batch of 36 YouTube transcripts took about 14 minutes. He cites Karpathy running roughly 100 articles and half a million words this way, and one X user reporting a **95% token reduction** after collapsing 383 scattered files and 100+ meeting transcripts into a wiki.
- **He replaced his executive assistant's context files with a pointer to the wiki vault and saw token usage drop.** `CLAUDE.md` names the wiki path, the index, domain sub-indexes, a `hot.md` cache of roughly 500 characters holding the most recent exchange, and an explicit instruction not to read the wiki unless needed.
- **Wiki maintenance is a lint pass** — an LLM health check that finds inconsistent data, fills gaps with web search, and proposes new article candidates.
- **Where the wiki stops:** it wins on relationship depth, zero infrastructure (no embedding model, vector DB, or chunking pipeline), and near-zero cost beyond tokens, for hundreds of pages with good indexes. At millions of documents you still want a traditional RAG pipeline.
- **Dashboards: prove the concept before you build one.** Claude artifacts in Cowork spin up a live QuickBooks, Fireflies, or weekly-commitments dashboard in about five minutes. A unified custom dashboard needs data sync plus a refresh cadence on a routine, trigger.dev, or Modal — only worth it once the artifact proves you actually look at it. Nate found he mostly does not need visualization, because he can ask his assistant for a report on demand.
- **The anti-hype point:** deterministic workflows beat agents most of the time. Nate says most agency client work was plain automation with barely any AI, and that breaking a process into chunks reveals how little autonomy each chunk needs.
- **Three subjective success criteria:** your team would rather ask the AIOS than ask you; you stop opening new tabs; knowledge leaves your head and lives in the system. Two of three inside the first month means it took.
## Actionable Takeaways
1. Sketch the seven tier-one domains — revenue, customer, calendar, comms, tasks, meetings, knowledge — on paper and name the specific tool behind each before opening the terminal; those tools are your connection list.
2. Build in the fixed order context → connections → capabilities → cadence. Test context by asking a fresh session a question and judging whether it answers like a teammate or a stranger.
3. Answer the onboarding interview at length, and paste real writing samples verbatim rather than describing your voice — label them by channel (LinkedIn, client email, team email) so the model learns distinct registers.
4. For each integration, tell the agent to research the vendor's API docs once and write a local endpoint reference markdown file; then move the two or three endpoints a given skill actually uses into that skill file so it stops re-reading the full reference.
5. Create a dedicated service account per tool for the agent, scope its permissions (read-only where possible), and give it its own API key so you can attribute usage and blast radius.
6. Have the agent generate `.env` with placeholders and paste secrets in yourself; keep `.env` in `.gitignore` and never paste keys into chat.
7. Run the audit skill weekly to get a four C's score and a ranked gap list; run level-up when you are stuck for what to automate next.
8. Keep `skill.md` under 500 lines, put heavy material in reference files, and rely on progressive loading — front matter first, full skill on match, extras only on demand.
9. Watch a new skill run the first several times. Every failure is a rule, a reference doc, or a hardcoded ID you can add — then tell the skill to record the fix so it never recurs.
10. Delegate token-heavy searching (e.g. ClickUp queries) to a dedicated sub-agent so the main session's context window survives.
11. Install skills you want everywhere in the home directory rather than per project.
12. Push the AIOS to a private GitHub repo so it syncs across machines and can back cloud routines and remote harnesses.
13. For cloud routines: put keys in the environment variables of the cloud environment and instruct the prompt to read the environment, not `.env`; consider a slim repo per routine so a bloated `CLAUDE.md` does not burn context; test with "run now" repeatedly before scheduling; write one-shot prompts that never need to stop and ask.
14. Leave network access on trusted unless a specific integration fails, and understand that full access opens an outbound exfiltration path.
15. Use `/loop` for short-horizon watching — a pending email every 5 minutes, a deploy hourly, a 3-day sprint check-in — and convert anything you want past 3 days into a scheduled task.
16. Build a knowledge wiki by dropping raw sources into `raw/`, having Claude generate linked wiki pages plus an index and log, and pointing your assistant project at that vault instead of duplicating context files. Add a hot cache only where recency matters.
17. Run a periodic lint over the wiki to catch inconsistencies and suggest missing sources.
18. Prototype any dashboard as a Claude artifact first; only build a custom synced dashboard after you observe yourself checking the artifact regularly.
19. When a process turns out to be deterministic, write a plain script and push it to trigger.dev or Modal rather than wrapping it in an agent.
20. Track a week of daily work, circle what repeats and what you hate, and turn those circles into skills.
## Notable Quotes
> "Treat AI as a mentor, not a vending machine." — Nate Herk
> "The question is never will AI do this for me. The question is to what extent can I leverage AI here?" — Nate Herk
> "You can't scale a system if you haven't lived in it yourself." — Nate Herk
> "Workflows, deterministic workflows, beat AI agents nine times out of 10." — Nate Herk
> "Think of a failure as a good thing because it gave you more data about what not to ever do again." — Nate Herk
---
*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*
*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*