GitHub - shanraisshan/claude-code-best-practice: practice made claude perfect

Skip to content Navigation Menu

Toggle navigation

Sign in

Appearance settings

Platform

*   

AI CODE CREATION * GitHub Copilot Write better code with AI * GitHub Spark Build and deploy intelligent apps * GitHub Models Manage and compare prompts * MCP Registry New Integrate external tools

*   

DEVELOPER WORKFLOWS * Actions Automate any workflow * Codespaces Instant dev environments * Issues Plan and track work * Code Review Manage code changes

*   

APPLICATION SECURITY * GitHub Advanced Security Find and fix vulnerabilities * Code security Secure your code as you build * Secret protection Stop leaks before they start

*   

EXPLORE * Why GitHub * Documentation * Blog * Changelog * Marketplace

View all features

Solutions

*   

BY COMPANY SIZE * Enterprises * Small and medium teams * Startups * Nonprofits

*   

BY USE CASE * App Modernization * DevSecOps * DevOps * CI/CD * View all use cases

*   

BY INDUSTRY * Healthcare * Financial services * Manufacturing * Government * View all industries

View all solutions

Resources

*   

EXPLORE BY TOPIC * AI * Software Development * DevOps * Security * View all topics

*   

EXPLORE BY TYPE * Customer stories * Events & webinars * Ebooks & reports * Business insights * GitHub Skills

*   

SUPPORT & SERVICES * Documentation * Customer support * Community forum * Trust center * Partners

View all resources

Open Source

*   

COMMUNITY * GitHub Sponsors Fund open source developers

*   

PROGRAMS * Security Lab * Maintainer Community * Accelerator * Archive Program

*   

REPOSITORIES * Topics * Trending * Collections

Enterprise

*   

ENTERPRISE SOLUTIONS * Enterprise platform AI-powered developer platform

*   

AVAILABLE ADD-ONS * GitHub Advanced Security Enterprise-grade security features * Copilot for Business Enterprise-grade AI features * Premium Support Enterprise-grade 24/7 support

Search or jump to…

Search code, repositories, users, issues, pull requests…

Search

Clear

Search syntax tips

Provide feedback

We read every piece of feedback, and take your input very seriously.

  • Include my email address so I can be contacted

Cancel Submit feedback

Saved searches

Use saved searches to filter your results more quickly

Name

Query

To see all available qualifiers, see our documentation.

Cancel Create saved search

Sign in

Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert

{{ message }}

shanraisshan/**claude-code-best-practice**Public

practice made claude perfect

5.9k stars519 forksBranchesTagsActivity

Star

NotificationsYou must be signed in to change notification settings

Additional navigation options

shanraisshan/claude-code-best-practice

main

BranchesTags

Go to file

Code

Open more actions menu

Folders and files

Repository files navigation

claude-code-best-practice

practice makes claude perfect

Image 1: Last UpdatedImage 2: GitHub Stars

Image 3: Best PracticeClick on this badge to show the latest best practice

Image 4: ImplementedClick on this badge to show implementation in this repo

Image 5: Claude Code mascot jumping

Image 6: Claude Code CreatorImage 7: Claude Code Creator

CONCEPTS

FeatureLocationDescription
Skills.claude/skills/<name>/SKILL.mdReusable knowledge, workflows, and slash commands — load on-demand or invoke with /skill-name
Commands.claude/commands/<name>.mdEntry-point prompts for workflows — invoke with /command-name
Sub-Agents.claude/agents/<name>.mdImage 8: Best Practice Custom agents with their own name, color, tools, permissions, and model — usable as main agent or isolated subagents via the Task tool
MemoryCLAUDE.mdPersistent context via CLAUDE.md files and @path imports that Claude sees every session
Rules.claude/rules/*.mdModular topic-specific instructions with optional path-scoping via frontmatter
Hooks.claude/hooks/Deterministic scripts that run outside the agentic loop on specific events
MCP Servers.claude/settings.jsonModel Context Protocol connections to external tools, databases, and APIs
Pluginsdistributable packagesBundles of skills, subagents, hooks, and MCP servers
Marketplacesplugin registriesHost and discover plugin collections
Sandboxingruntime configFile and network isolation that improves safety while reducing permission prompts
Output Styles.claude/settings.jsonConfigurable response tone and format — Explanatory, Learning, or Custom
Settings.claude/settings.jsonHierarchical configuration system for Claude Code behavior (37 settings, 84 env vars)
Permissions.claude/settings.jsonFine-grained access control for tools and operations with wildcard syntax

Note: Custom slash commands have been merged into skills. Files in .claude/commands/ still work, but skills (.claude/skills/) are recommended as they support additional features like supporting files, invocation control, and subagent execution.

💎 HIDDEN GEMS

Reports that are frequently updated as Claude Code evolves.

ReportDescription
Claude Code Commands ReferenceComplete reference of all slash commands, keyboard shortcuts, and input modes
Claude Code Settings ReferenceComprehensive guide to all settings.json configuration options
Subagents ReferenceComplete reference for Claude Code subagents — built-in agents, custom agents, and frontmatter fields
Commands Frontmatter ReferenceComplete reference of all command (.claude/commands/) frontmatter fields
Skills Frontmatter ReferenceComplete reference of all skill (.claude/skills/) frontmatter fields

MY EXPERIENCE

Workflows

  • Claude.md should not exceed 150+ lines. (still not 100% guaranteed)
  • use commands for your workflows instead of agents
  • have feature specific subagents (extra context) with skills (progressive disclosure) instead of general qa, backend engineer.
  • /memory, /rules, constitution.md does not guarantee anything
  • do manual /compact at max 50%
  • always start with plan mode
  • subtasks should be so small that it can be completed in less than 50% context
  • vanilla cc is better than any workflows with smaller tasks
  • commit often, as soon as task is completed, commit.

Utilities

  • iTerm terminal instead of IDE (crash issue)
  • Wispr Flow for voice prompting (10x productivity)
  • claude-code-voice-hooks for claude feedback
  • status line for context awareness and fast compacting
  • git worktrees for parallel development
  • /permissions with wildcard syntax (Bash(npm run *), Edit(/docs/**)) instead of dangerously-skip-permissions
  • /sandbox to reduce permission prompts with file and network isolation
  • output styles: use Explanatory when learning a new codebase, Learning for coaching
  • /keybindings to remap any key, settings live reload

Debugging

  • /doctor
  • always ask claude to run the terminal (you want to see logs of) as a background task for better debugging
  • use mcp (claude in chrome, playwright, chrome dev tool) to let claude see chrome console logs on its own
  • provide screenshots of the issue

TIPS FROM BORIS CHERNY (CREATOR OF CLAUDE CODE)

CONTEXT ENGINEERING

WORKFLOWS

CLAUDE CODE FEATURES INSPIRATION

COMMAND + SKILL + SUBAGENT ARCHITECTURE

Image 9: Command Skill Agent Architecture Flow

ComponentRoleExample
CommandEntry point, user interaction/weather-orchestrator
AgentOrchestrates workflow with preloaded skillsweather agent
SkillsDomain knowledge injected at startupweather-fetcher, weather-transformer

When to use: Multi-step workflows • Domain-specific knowledge injection • Sequential tasks • Reusable components

Why it works: Progressive disclosure • Single execution context • Clean separation • Reusability

See weather-orchestration-architecture for implementation details.

AI TERMS

Agentic EngineeringAI SlopContext BloatContext EngineeringContext Rot
Dumb ZoneHallucinationScaffoldingOrchestrationVibe Coding

See Complete List →

CLI STARTUP FLAGS

--dangerously-skip-permissions--model--print--resume--continue
--system-prompt--verbose--debug--init--max-turns

See Complete List →

CLAUDE COMMANDS

/compact/context/model/plan/config
/clear/cost/memory/doctor/rewind

See Complete List →

CLAUDE SETTINGS

MCP SERVERS FOR DAILY USE

“Went overboard with 15 MCP servers thinking more = better. Ended up using only 4 daily.”r/mcp (682 upvotes)

MCP ServerWhat It DoesResources
Context7Fetches up-to-date library docs into context. Prevents hallucinated APIs from outdated training dataReddit: “by far the best MCP for coding” · npm
PlaywrightBrowser automation — implement, test, and verify UI features autonomously. Screenshots, navigation, form testingReddit: essential for frontend · Docs
Claude in ChromeConnects Claude to your real Chrome browser — inspect console, network, DOM. Debug what users actually seeReddit: “game changer” for debugging · Comparison Report
DeepWikiFetches structured wiki-style documentation for any GitHub repo — architecture, API surface, relationshipsReddit: “put it behind a gateway with Context7”
ExcalidrawGenerate architecture diagrams, flowcharts, and system designs as hand-drawn Excalidraw sketches from promptsGitHub

Research (Context7/DeepWiki) Debug (Playwright/Chrome) Document (Excalidraw)

REPORTS

ReportDescription
Agent SDK vs CLI System PromptsWhy Claude CLI and Agent SDK outputs may differ—system prompt architecture and determinism
Browser Automation MCP ComparisonComparison of Playwright, Chrome DevTools, and Claude in Chrome for automated testing
Claude Code CLI Startup FlagsComplete reference of all CLI flags, subcommands, and environment variables
CLAUDE.md Loading in MonoreposUnderstanding ancestor vs descendant loading behavior for CLAUDE.md files
Global vs Project SettingsWhich features are global-only (~/.claude/) vs dual-scope, including Tasks and Agent Teams
Skills Discovery in MonoreposHow skills are discovered and loaded in large monorepo projects
Agent Memory FrontmatterPersistent memory scopes (user, project, local) for subagents — enabling agents to learn across sessions
Boris Cherny’s 12 Customization Tips12 ways to customize Claude Code — from terminal config to plugins, agents, hooks, and output styles
Advanced Tool Use PatternsProgrammatic Tool Calling (PTC), Tool Search, and Tool Use Examples
Usage, Rate Limits & Extra UsageUsage commands (/usage, /extra-usage, /cost), rate limits, and pay-as-you-go overflow billing
Claude Code Commands ReferenceComplete reference of all slash commands, keyboard shortcuts, and input modes
Claude Code Settings ReferenceComprehensive guide to all settings.json configuration options
Subagents ReferenceComplete reference for Claude Code subagents — built-in agents, custom agents, and frontmatter fields
Commands Frontmatter ReferenceComplete reference of all command (.claude/commands/) frontmatter fields
Skills Frontmatter ReferenceComplete reference of all skill (.claude/skills/) frontmatter fields

About

practice made claude perfect

Topics

claude-aiclaude-code

Resources

Readme

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

5.9k stars

Watchers

47 watching

Forks

519 forks

Report repository

Releases

No releases published

Packages 0

Uh oh!

There was an error while loading. Please reload this page.

Contributors 4

Languages

© 2026 GitHub,Inc.

You can’t perform that action at this time.