Adonis0123/adonis-skills / skills/agent-practice-audit
agent-practice-audit
FlaggedScore how someone uses coding agents (Claude Code, Codex, Grok and WorkBuddy session logs, instruction files, hooks, permissions, Codex config) against practices quoted from official vendor docs, and write a local HTML report with coverage, trend and suggestions; also refresh or verify that practice list from official docs with multi-model consensus. Use when the user asks how far their agent usage is from official practice, wants an agent usage check-up or grade, or wants the practice list refreshed, its links checked, or either run on a schedule. Chinese triggers: Agent 用法体检、对照官方最佳实践、我的 agent 用得对不对、给 agent 用法打分、更新最佳实践清单. Not for whether a tool, MCP or skill is worth keeping (dev-environment-roi-audit), for writing or reviewing one CLAUDE.md or AGENTS.md, for general best-practice questions, or for Cursor or Gemini CLI logs, which it does not read. Never edits the user's config.
references/sources/cc-best-practices.md
View on GitHub---
slug: cc-best-practices
title: Best practices for Claude Code
publisher: Anthropic
url: https://code.claude.com/docs/en/best-practices
fetchedAt: 2026-10-31
lastVerifiedAt: 2026-11-11
linkStatus: ok
finalUrl:
---
# Best practices for Claude Code
## Summary
- Defaults already work for a first prompt; extra setup matters when the project holds knowledge or rules that the code alone does not reveal.
- Write specific prompts, and brainstorm or interview with Claude before building so it does not guess what you meant.
- Keep `CLAUDE.md` short and focused; scope narrow rules to one part of the codebase and move team procedures into skills.
- Put the command that runs tests or checks in `CLAUDE.md`, because a runnable check is the most useful single instruction.
- Give Claude a check that returns pass or fail, and ask for evidence such as command output or screenshots.
- A Stop hook can enforce that a check passes before Claude is allowed to finish.
- Rules without exceptions belong in hooks, deny rules or managed settings, not in prose instructions that Claude may weigh against other things.
- Deny rules apply in every permission mode, so secrets such as `.env` files should be blocked there.
- Keep the enforced set small; a very long list of hard rules usually means many are really preferences.
- Use `/clear` between unrelated tasks, and restart with a better prompt after repeated failed corrections instead of arguing further.
- Choose model, effort and permission mode deliberately, and remember that subagents add their own cost.
- For unattended work, run Claude from scripts with turn and budget limits, schedule runs, and give parallel work separate checkouts.
## Cited quotes
- "/clear between unrelated tasks. It costs nothing…" (ctx-clear-between-tasks)
- "after two failed corrections run /clear and write a better prompt instead of a third" (ctx-clear-between-tasks)
- "Set model: haiku in a subagent's definition if its work is simple" (ctx-custom-subagents)
- "If something has to happen every time, make it a hook, a deny rule, or a managed setting." (safe-hooks-for-musts)
- "Whatever the scope, keep the enforced set small. … If you ever find yourself at forty of them, most are probably preferences" (safe-small-enforced-set)
- "deny rules hold in every permission mode, including auto and bypassPermissions, which is exactly why the .env rule belongs there" (safe-deny-secrets)
- "the single most useful line in your CLAUDE.md is the command that runs it." (doc-test-commands)
- "Ask Claude to interview you instead" (plan-interview)
- "Give Claude something it can run that comes back pass or fail." (verify-runnable-checks)
- "ask Claude for evidence: the command it ran and its output, or the screenshot." (verify-runnable-checks)
- "When you have separate pieces of work going at once, give each its own checkout so the edits can't collide." (auto-worktrees)
- "runs once and exits, which is how Claude Code ends up in CI jobs, git hooks, and shell loops." (auto-headless)
- "What stops it? --max-turns, --max-budget-usd, a spend limit." (auto-headless-limits)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |