A practical guide to using Claude Code, Anthropic’s agentic coding assistant, effectively in real-world development workflows. This repo distills best practices, patterns, and examples for integrating Claude Code into your terminal-based coding environment.
$ npx -y skills add awattar/claude-code-best-practices --agent claude-code
Run the curl in your terminal, the rest in Claude Code.
Repo: awattar/claude-code-best-practices
What's inside
A practical guide to using Claude Code, Anthropic’s agentic coding assistant, effectively in real-world development workflows. This repo distills best practices, patterns, and examples for integrating Claude Code into your terminal-based coding environment.
Claude Code is a command-line tool that gives you direct access to Claude’s reasoning and coding capabilities. It’s designed for agentic coding - where Claude autonomously explores, edits, and explains code across your project. Think of it as a collaborative AI pair programmer that understands your repo structure, coding conventions, and workflows.
CLAUDE.md to preload project contextClaude Code is optimized for agentic coding - AI that acts with autonomy and awareness:
This repository includes a collection of custom slash commands designed to streamline development workflows with Claude Code. Use /help-commands to get detailed information about all available commands.
/custom-init
Automatically generates comprehensive CLAUDE.md files for any project by analyzing project structure, technology stack, and development patterns.
/help-commands
Provides comprehensive help documentation for all available custom commands, including usage examples and best practices.
/commit
Creates well-formatted conventional commits following best practices with automatic staging, diff analysis, and atomic commit recommendations. Uses standardized commit templates from .gitmessage and .github/COMMIT_CONVENTION.md.
/issue
End-to-end GitHub issue resolution following GitHub Flow with automated planning, branch creation, and incremental implementation. Integrates with GitHub PR templates from .github/pull_request_template.md.
/reviewpr
Comprehensive pull request review process with CI/CD checks, code quality analysis, and structured feedback via GitHub CLI.
/testThis repository includes a collection of 10 specialized AI agents that provide domain-specific expertise across all development workflows. These agents work automatically with commands to deliver expert-level capabilities in architecture, development, and quality assurance.
Note: Commands also leverage Claude Code's built-in
general-purposeagent for complex multi-step analysis and file searching. It ships with Claude Code, so it is not defined in this repository.
general-solution-architect
Architecture analysis, technology stack decisions, scalability planning, and distributed systems design.
general-technical-writer
Documentation creation, API documentation, formatting, and technical content organization.
general-pm
Product management oversight — issue creation, prioritization, progress tracking, and lifecycle management.
general-fullstack-developer
End-to-end feature implementation spanning database, API, and frontend layers with seamless integration.
general-backend-developer
API development, database design, server-side logic, and backend performance optimization.
general-frontend-developer
UI/UX implementation, component patterns, browser automation, and modern JavaScript frameworks.
general-devops
Infrastructure automation, CI/CD pipeline design, container orchestration, and reliability engineering.
general-qa
Testing strategies, test automation, comprehensive validation, and quality assurance methodologies.
general-code-quality-debugger
Code review, systematic debugging, refactoring guidance, and technical debt reduction.
general-technical-project-lead
Security assessments, strategic technical decisions, performance optimization, and architectural leadership.
Agent Integration: These specialized agents work seamlessly with all custom commands, automatically providing domain expertise when needed. Commands like /issue, /reviewpr, and /test leverage multiple agents to deliver comprehensive, expert-level results.
Skills are model-invoked capabilities: instead of being triggered by a slash command, Claude Code loads them automatically when the task matches the skill's description. Each skill lives in .claude/skills/<name>/SKILL.md with YAML frontmatter (name, description) and instructions in the body.
This repository includes one example:
conventional-commitsSkills vs. commands vs. agents:
| Mechanism | Trigger | Best for |
|---|---|---|
| Slash command | User types /name | Explicit, on-demand workflows |
| Skill | Claude matches the description | Conventions and know-how that should apply automatically |
| Subagent | Delegated by Claude or a command | Heavy, focused work that should run in its own context window so it doesn't crowd the main session |
See the Skills documentation for authoring details, including bundling scripts and reference files alongside SKILL.md.
The repository ships a checked-in .claude/settings.json that demonstrates two of the most useful project-level configuration mechanisms:
Scoped allow / ask / deny rules let Claude Code run safe, routine commands (git status, gh pr view, etc.) without prompting, require confirmation for riskier ones (git push), and block reads of sensitive files (.env, secrets/). Tune these to your team's risk tolerance — settings are merged from user, project, and local scopes.
Hooks register shell commands that run automatically on lifecycle events (PreToolUse, PostToolUse, Stop, etc.). The bundled example uses a Stop hook to print git status --short at the end of every turn so you always see what changed. Other common patterns:
PostToolUse matching Edit|Write — auto-format or lint files after Claude edits them.PreToolUse matching Bash — block dangerous commands before they execute.Stop — send a desktop/Slack notification when Claude finishes a long task.See the Hooks documentation for the full event list and JSON schema.
Models OverviewBest Practices for Agentic CodingCommon WorkflowsRun Parallel Claude Code Sessions with Git WorktreesManage Claude's MemoryHooksSub-agentsClaude Code Subagents Collection by davepoonGitHub ActionsMy Claude Code Workflow and Personal Tips by paraditePlaywright MCP Server
"A Model Context Protocol server that provides browser automation capabilities using Playwright. It lets Claude interact with web pages, fill forms, take screenshots, and run end-to-end checks against a real browser. The older Puppeteer MCP server is archived — Playwright MCP is the maintained replacement."The Claude Code WORKFLOW with GitHub to Build Complex Apps by gregbauguesHow to Give Claude Code a Better "Memory" of Your Project by iannuttallClaude Code Multitasking Made EASY by CasJamClaude Code Hooks is AMAZING: "Text Message Me When AI Agent is Done" by AllAboutAI-YTMy Claude Code Sub Agents BUILD THEMSELVES by dislerAwesome Claude Code by hesreallyhimSuperClaude Framework by SuperClaude-OrgAgent OS by buildermethods.claude/
agents/
general-backend-developer.md
general-code-quality-debugger.md
general-devops.md
general-frontend-developer.md
general-fullstack-developer.md
general-pm.md
general-qa.md
general-solution-architect.md
general-technical-project-lead.md
general-technical-writer.md
commands/
commit.md
custom-init.md
help-commands.md
issue.md
reviewpr.md
test.md
settings.json
skills/
conventional-commits/
SKILL.md
.github/
COMMIT_CONVENTION.md
pull_request_template.md
.gitmessage
CLAUDE.md
LICENSE
README.mdFAQ
claude-code-best-practices is a Claude Code plugin with 1 hand-picked skill for documentation work, indexed on Flowy. Install it with the command on its page. It includes conventional-commits. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.