notebook-explanation

$npx mdskill add EpicenterHQ/epicenter/notebook-explanation

Explains technical systems using concise notes, code, and diagrams for clarity

  • Helps newcomers understand architecture, APIs, and design tradeoffs
  • Uses ASCII diagrams, code blocks, and concrete examples
  • Applies compressed rules and boundaries to simplify complex systems
  • Delivers structured, private-style notes for easy digestion

SKILL.md

.github/skills/notebook-explanationView on GitHub ↗
---
name: notebook-explanation
description: "Explain technical systems in a notebook style: short working notes, small code blocks, ASCII diagrams, concrete examples, and compressed rules. Use when the user asks to understand architecture, APIs, auth flows, specs, boundaries, code ownership, or design tradeoffs as a newcomer."
metadata:
  author: epicenter
  version: '1.0'
---

# Notebook Explanation

Use this skill when the user wants to understand a technical system, not just receive a polished answer. Write like private working notes from someone trying to make the system obvious to themself.

The point is compression:

```txt
term = meaning
boundary = owner
flow = step by step
rule = durable takeaway
```

If a design cannot survive this format, the design is probably muddy.

## Shape

Start with the question.

```txt
Question:
  What are we trying to understand?

Short answer:
  One sentence.
```

Then build the model in small blocks:

```txt
Notebook model:
  term = meaning
  term = meaning

Flow:
  thing A
    -> thing B
    -> thing C

Good:
  small concrete example

Bad:
  confusing or overbroad example

Rule:
  durable takeaway
```

## Style Rules

- Prefer code blocks over long prose when naming ownership, state, flows, boundaries, or tradeoffs.
- Use short paragraphs only to bridge code blocks.
- Use tiny definitions before diagrams.
- Show "good" and "bad" when a boundary can drift.
- Keep examples concrete: real package names, file names, scopes, route names, or type names.
- Avoid abstract architecture language unless it is immediately grounded in a small example.
- Avoid explaining every edge case up front. Teach the core model first, then name the edge case if it changes the model.
- Avoid bold-heavy formatting. The notebook blocks should carry the structure.

## Architecture Explanations

For architecture, show ownership first:

```txt
apps/server owns:
  private workspace auth
  private workspace sync

apps/cloud owns:
  public product modules
  public records

module owns:
  routes
  schemas
  scope names

network owns:
  domain
  records
  policy

token owns:
  identity proof
  audience
  scopes

policy owns:
  exact product rule
```

Then show the flow:

```txt
private draft
  -> explicit publish
  -> network API
  -> public record
```

## API And Auth Explanations

For API, auth, and capability boundaries, separate where, what, and policy:

```txt
audience = where the token works
scope    = what the client can attempt
policy   = whether this user can do this exact thing now
```

Good:

```txt
audience: https://ark.alice.com
scope:    ark:publish
policy:   user is allowed to publish to Alice's network
```

Bad:

```txt
scope: ark:alice:post:create:public:not-banned
```

## Code Break Explanations

When showing code organization, make the folder tree express ownership:

```txt
apps/cloud/src/
  modules/
    ark/
      routes.ts
      schema.ts
      scopes.ts
      policy.ts
  networks/
    config.ts
    host-dispatch.ts
```

Then show the smallest useful type or function:

```ts
type Network = {
  host: string;
  module: string;
  audience: string;
  supportedScopes: string[];
};
```

## When To Stop

Stop once the reader can answer:

```txt
What is this thing?
Who owns it?
Where does data flow?
What is the rule of thumb?
What is the tempting wrong version?
```

Do not keep adding sections just because the topic is large.

More from EpicenterHQ/epicenter

SkillDescription
agent-goalWrite `/goal` prompts for long-running agent work in Codex or Claude Code. Use for slash goal, agent goal, durable objective, autonomous coding run.
approachability-auditReview code as a new TypeScript developer. Use when code feels indirect, clever, hard to follow, or needs a pass on abstractions, names, first-read clarity.
arktypeArktype: runtime validation, discriminated unions with .merge()/.or(), spread keys. Use when mentioning arktype, type(), union types, command/event schemas.
attach-primitiveContract and invariants for `attach*` composition primitives in `packages/workspace` (side-effectful building blocks like attachIndexedDb, attachSqlite, attachBroadcastChannel, attachEncryption, attachTable, openCollaboration), and when to use `create*` (pure construction) instead. Use when writing or reviewing an `attach*` or `create*` function, naming a new workspace primitive, composing inside a workspace builder, or deciding whether a primitive registers listeners at call time.
authEpicenter auth packages: `@epicenter/auth`, `@epicenter/auth-svelte`, OAuth sessions, identity state, auth-owned fetch/WebSocket, and workspace lifecycle binding. Use when editing Epicenter auth clients, session state, hosted sign-in, or auth/workspace integration.
autumnAutumn billing in Epicenter: `autumn.config.ts`, `autumn-js` credit checks, `atmn` CLI, plan gates, and metered AI usage. Use when changing billing, pricing, credits, plan access, refunds, or usage events.
better-auth-best-practicesBetter Auth server/client setup: `auth.ts`, generated schema, DB adapters, sessions, cookies, env vars, and plugins. Use when mentioning Better Auth, betterauth, auth handlers, OAuth, email/password, or session configuration.
better-auth-security-best-practicesBetter Auth security hardening: rate limits, secrets, CSRF, trusted origins, cookies, sessions, OAuth tokens, and audit logging. Use when reviewing auth security, brute-force protection, token handling, or deployment safety.
change-proposalPresent proposed code changes visually before implementing. Use when: "show me options", "compare approaches", "what should we do", or when changes need before/after comparison.
claude-code-consultUse this skill when the user asks to consult Claude, ask Claude Code, get another model's take, run a taste check, find cleaner options, or prepare a Claude prompt. Create a bounded second-opinion prompt or run a read-only Claude Code consult, then verify Claude's claims against local files.