by awattar
💻 Best practices and examples for using Claude Code - Anthropic’s terminal-native AI - for writing, editing, and refactoring code with deep project awareness, prompt design, and safe automation.
# Add to your Claude Code skills
git clone https://github.com/awattar/claude-code-best-practicesGuides for using cli tools skills like claude-code-best-practices.
Last scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T15:47:19.350Z",
"npmAuditRan": true,
"pipAuditRan": true
}claude-code-best-practices is an open-source cli tools skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by awattar. 💻 Best practices and examples for using Claude Code - Anthropic’s terminal-native AI - for writing, editing, and refactoring code with deep project awareness, prompt design, and safe automation. It has 181 GitHub stars.
Yes. claude-code-best-practices passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/awattar/claude-code-best-practices" and add it to your Claude Code skills directory (see the Installation section above).
Yes. SkillsLLM lists many other CLI Tools skills you can browse and compare side by side. Open the CLI Tools category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh claude-code-best-practices against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Based on votes and bookmarks from developers who liked this skill
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 Overview](https://docs.ant