Claude Code Best Practices logo

Claude Code Best Practices

Community
iamneilroberts
claude-code-best-practices

Use when asked about Claude Code workflow, prompt caching cost, session economics, CLAUDE.md hygiene, context-window management, plan mode, permission modes, hooks, skills, subagents, checkpointing/rewind, parallel sessions, worktrees, headless/CI usage, the Agent SDK, slash commands, MCP configuration, or "what's the right way to use Claude Code for X". Also use proactively BEFORE suggesting /model, /compact, fast-mode toggle, or editing CLAUDE.md mid-session, since those bust the system cache.

Overview

Publisheriamneilroberts
Repositoryclaude-skills
Skill nameclaude-code-best-practices
Stars
37
Forks
6
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by iamneilroberts on GitHub. Read the source before you install it.

Installation

Install the Claude Code Best Practices AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/iamneilroberts/claude-skills/tree/main/skills/claude-code-best-practices
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/iamneilroberts/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/skills/claude-code-best-practices .claude/skills/claude-code-best-practices
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Claude Code Best Practices in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Claude Code Best Practices on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Claude Code Best Practices is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Claude Code best practices reference

Routes to a local mirror of the official docs at ~/.claude/anthropic-docs/ (refreshed weekly from https://code.claude.com/docs/llms.txt) — canonical Markdown; cite the source path when you reference a fact. Read the file for the topic at hand instead of guessing.

How to look something up

  • Know the topic? Read ~/.claude/anthropic-docs/en__<slug>.md (route table below).
  • Don't know it? cat ~/.claude/anthropic-docs/_llms.txt | grep -i <keyword>
  • API/SDK topic (not the CLI)? Check en__agent-sdk__*.md.

Route table — topic → local file

TopicLocal file
Best practices overview (workflow patterns, common failures)en__best-practices.md
CLAUDE.md (format, placement, what to include/exclude)en__memory.md
Context window (how it fills, what loads at startup)en__context-window.md
Cost / reduce token usageen__costs.md
Prompt caching (also see platform.claude.com docs)en__costs.md (CC-specific)
Checkpointing / /rewinden__checkpointing.md
Sessions (continue, resume, fork, naming)en__sessions.md
Interactive mode (/clear, /compact, /btw, key bindings)en__interactive-mode.md
Slash commands / built-in commandsen__commands.md
Hooks (events, JSON shape, examples)en__hooks-guide.md + en__hooks.md
Skills (SKILL.md format, when to use)en__skills.md
Subagents (.claude/agents/*)en__sub-agents.md
Permission modes (auto, plan, sandbox)en__permission-modes.md
Permissions (allowlists, /permissions)en__permissions.md
Sandboxingen__sandboxing.md
MCP (configuration, claude mcp add)en__mcp.md
Worktrees / parallel sessionsen__worktrees.md
Agent teamsen__agent-teams.md
Headless / CI (claude -p, --output-format)en__headless.md
Chrome extension (UI verification)en__chrome.md
Claude Code on the weben__claude-code-on-the-web.md
Pluginsen__plugins.md + en__discover-plugins.md
Settings.json referenceen__settings.md
CLI referenceen__cli-reference.md
Status lineen__statusline.md
Channels (push events into a session)en__channels.md + en__channels-reference.md
Auto mode config (classifier rules)en__auto-mode-config.md
How Claude Code works (agentic loop internals)en__how-claude-code-works.md
Agent SDK (build agents programmatically)en__agent-sdk__overview.md and siblings

For anything not listed, grep _llms.txt.

Load-bearing principles (nuance in en__best-practices.md)

Workflow

  • Verify before claiming done: include tests, screenshots, or expected outputs so Claude can self-check — the highest-leverage single habit.
  • Explore → plan → implement → commit; skip planning only when the diff fits in one sentence (Ctrl+G opens plan mode in a text editor).
  • Specific prompts beat vague ones: name files, point to existing patterns, describe symptoms + likely location + what "fixed" looks like.

Context hygiene

  • One concern per session — don't mix research/write/review in one context.
  • /clear liberally: after two failed correction attempts (a fresh session with a sharper prompt beats a corrected long one), between unrelated tasks, or before an unscoped "investigate X" (scope narrowly or delegate to a subagent instead).
  • Subagents for investigation — their reads don't pollute your context.
  • /btw for side-questions — answers land in an overlay, never in history.

Cache hygiene (invalidation order: tools → system → messages; a change at level N

invalidates N and everything after)

  • Don't, mid-session: edit CLAUDE.md (system block — edit between sessions or /clear right after), switch models, toggle Shift+Tab fast mode, or enable/disable MCP servers.
  • /compact rewrites the prefix — use at deliberate breakpoints, not reflexively.
  • Safe mid-session: pasted images, skill invocations, tool calls.

CLAUDE.md content discipline

  • Loaded every session — per line, ask "would removing this cause mistakes?"; if no, cut. Bloat makes Claude ignore rules.
  • Include bash commands Claude can't guess, non-default code style, test preferences, repo etiquette, env quirks. Exclude anything readable from code, standard conventions, tutorials, and frequently-changing info.

Parallel work

  • Writer/reviewer: one session implements, a fresh one reviews (less bias toward just-written code).
  • Worktrees for parallel edits that mustn't collide; claude -p for fan-out over files, scoped with --allowedTools.

Refreshing the mirror

Auto-refreshes weekly via cron; manual: ~/.claude/scripts/refresh-anthropic-docs.sh. Source: https://code.claude.com/docs/llms.txt. Manifest with per-page SHA-256 + timestamps: ~/.claude/anthropic-docs/_manifest.json.

Frequently asked questions

What does the Claude Code Best Practices AI skill do?

Use when asked about Claude Code workflow, prompt caching cost, session economics, CLAUDE.md hygiene, context-window management, plan mode, permission modes, hooks, skills, subagents, checkpointing/rewind, parallel sessions, worktrees, headless/CI usage, the Agent SDK, slash commands, MCP configuration, or "what's the right way to use Claude Code for X". Also use proactively BEFORE suggesting /model, /compact, fast-mode toggle, or editing CLAUDE.md mid-session, since those bust the system cache.

Why use Claude Code Best Practices on TypingMind?

Because you install it once and use it with any model. Claude Code Best Practices is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Claude Code Best Practices in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/iamneilroberts/claude-skills/tree/main/skills/claude-code-best-practices. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Claude Code Best Practices?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Claude Code Best Practices?

As many as you like. As long as a model supports skills, you can use Claude Code Best Practices with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Claude Code Best Practices AI skill free?

It is published on GitHub by iamneilroberts. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇