---
title: "Getting started with Claude Code mods"
description: "Claude Code mods are JavaScript or TypeScript modules that ship as plugin hooks."
url: "https://swe.quest/articles/getting-started-with-claude-code-mods-b3fea22bdbc5e388"
canonical: "https://claude.dev/blog/getting-started-with-claude-code-mods/"
source: "claude.dev"
published: "2026-10-01"
difficulty: "medium"
kind: "How-to"
reading_minutes: 18
tags: ["developer-tools","ai-coding","javascript"]
---

# Getting started with Claude Code mods

A post on [claude.dev](https://swe.quest/sources/claude-dev.md), published 2026-10-01, 18 min read, How-to. Original: [https://claude.dev/blog/getting-started-with-claude-code-mods/](https://claude.dev/blog/getting-started-with-claude-code-mods/)

## Summary

Claude Code mods are JavaScript or TypeScript modules that ship as plugin hooks. They export \`register(on)\` and attach middleware-style hooks that can observe, rewrite or answer events such as tool calls, turns, slash commands and \`ui.render\`. The tutorial builds Token Weather, an 80-line mod that reads \`$.session.usage()\` after each turn and draws a context-window forecast with a sparkline above the prompt. Along the way it covers keeping history in \`$.state\` so it survives hot reloads, declaring state in a \`.d.ts\` type contract, yielding with \`next(e)\`, and checking the plugin with \`claude plugin validate\`. It also shows the shortcut of simply describing a mod to Claude and letting it write one with hot reload.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)
- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- JavaScript modules ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- Claude Code basics
- middleware pattern

## Keywords

Claude Code, Claude Code mods, Token Weather, claude plugin validate, TypeScript

## Related posts

- [Our Claude Code Cheatsheet](https://swe.quest/articles/our-claude-code-cheatsheet-ac83fd2d04af578f.md): Neon · 2025-10-14 · Medium · 9 min read · AI for coding, AI agents, Developer productivity
  A Neon engineer's working cheatsheet for Claude Code covers Plan Mode, parallel task agents for multi-lens code review, and context management with /clear, /compact, /context and @file references.
- [Getting Started with Claude Skills](https://swe.quest/articles/getting-started-with-claude-skills-d47771a791983ab7.md): Neon · 2025-10-30 · Medium · 7 min read · AI for coding, AI agents, PostgreSQL
  Claude Skills are folders of markdown instructions (a SKILL.md entrypoint with name, description and steps) that Claude Code loads lazily: only each skill's name and description sit in global context, and the full workflow is pulled in when a request matches.
- [Building a VSCode Chat Extension to Order Lunch](https://swe.quest/articles/building-a-vscode-chat-extension-to-order-lunch-64da87e69c43d744.md): Neon · 2025-03-07 · Medium · 6 min read · AI agents, Developer tools, TypeScript, API design
  A VS Code Copilot chat participant can order Grubhub food by exposing reverse-engineered Grubhub endpoints as language model tools.
- [Building a CLI Client For Model Context Protocol Servers](https://swe.quest/articles/building-a-cli-client-for-model-context-protocol-servers-36e215421e2291e4.md): Neon · 2024-12-20 · Medium · 5 min read · AI agents, LLMs, TypeScript, Developer tools
  A minimal MCP client can run outside Claude Desktop by implementing four pieces: connecting to the server over stdio, listing tools via tools/list, invoking them via tools/call, and looping tool results back into the Anthropic Messages API.
- [Claude Code in the cloud: a field guide to cloud sessions](https://swe.quest/articles/claude-code-in-the-cloud-a-field-guide-to-cloud-sessions-77547c26ca9824eb.md): claude.dev · 2026-10-06 · Medium · 22 min read · AI for coding, AI agents, Developer tools, Sandboxing & isolation
  Claude Code cloud sessions run each task in a fresh VM with the repository cloned onto its own branch, so several agents can work on one repo in parallel without sharing files, ports, or the developer's credentials.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
