# The Complete Claude Code Workflow (90% Skip This) <!-- ref: @content/youtube/yifan-bth/the-complete-claude-code-workflow-90-skip-this tags: [Claude Code, CLAUDE.md, context management, permissions, git checkpoints, pre-commit hooks, GitHub automation, testing feedback] version: 2 updated_at: 2026-11-24T07:19:40.311Z --> **[Watch on YouTube](https://www.youtube.com/watch?v=AXz6TMAwqnY)** # The Complete Claude Code Workflow (90% Skip This) *Synthesized from Yifan on Beyond the Hype, 2025-07-21.* Yifan presents alone on the Beyond the Hype channel, after about three months of daily Claude Code use. The transcript gives only a first name. ## Core Thesis Yifan argues that Claude Code produces much better results when the project gives it a feedback loop (tests it can run), a short CLAUDE.md, deliberate permission settings and git-based checkpoints. Each of these is a small setup step that he says most users skip. ## Key Insights - **Tests as feedback.** When tests exist, Claude runs them before reporting back, which removes the manual copy-paste debugging loop. Without instruction it tested its own code only about half the time, so a line such as "test this feature before providing an answer" in CLAUDE.md or the prompt makes it test far more often. - **CLAUDE.md.** Running the init command makes Claude read the repository and draft the file, and running it again updates the file. Keep it lean, since Claude explores code well on its own. Add only the rules needed on every request. - **Adding memory in place.** Starting a prompt with a hash character saves the note to project memory, and Claude picks the matching section. - **Custom commands.** Markdown files in a commands folder define reusable prompts. They accept arguments and can run shell commands whose output is inserted, which he uses for a code-review command. - **Context hygiene.** He says /clear covers most cases after each task. /compact summarizes the conversation, with optional focus. Double-Escape rewinds the conversation but, unlike Cursor and Windsurf, does not restore the code, so versions must be managed by hand. - **Permission modes.** Default mode is read-only, accept-edits can be made the default in local settings, and plan mode writes a plan for approval before editing. A bypass-permissions mode exists, which he would not use on a main work machine. He built a hook called Claude Code Boost, where a model approves routine commands. - **Git checkpoints.** After each working round he stages the files, then asks Claude to commit only its own changes, with commit style taken from history. - **Automated checks.** He uses Husky pre-commit hooks for compile checks, lint and quick unit tests, so a broken commit fails before it lands. - **Asynchronous work.** A GitHub workflow reviews each pull request, which he customized to focus on bugs and security. A second workflow acts on @claude mentions in issues and comments and opens a pull request. - **Smaller tips.** Control-V pastes screenshots for analysis, an add-directory command gives access to other repos, the print flag runs one non-interactive prompt, and the continue and resume commands return to earlier sessions. Thinking keywords raise the reasoning budget but use quota quickly. ## Actionable Takeaways 1. Put a verification instruction in CLAUDE.md so the agent runs tests before it reports a task as done. 2. Keep CLAUDE.md to rules needed on every request, and let Claude find the rest in the code. 3. Clear context after each task, and handle code state with git, since rewinding a conversation does not revert files. 4. Make accept-edits the default, and approve routine commands with a hook instead of using bypass mode. 5. Add pre-commit checks for compile, lint and quick unit tests, plus a pull-request review workflow, so the agent gets automated feedback. ## Notable Quotes > "test this feature before providing an answer" — Yifan > "don't overload it with every little detail of your project" — Yifan --- *Related: `@content/youtube/zazencodes/build-your-own-ai-software-factory-with-claude-code` · `@content/youtube/sean-kochel/opus-4-7-is-insanely-powerful-and-insanely-expensive` · `@content/youtube/yifan-bth/how-to-prompt-cursor-windsurf-copilot-to-get-reliable-output` · `@content/youtube/yifan-bth/i-reverse-engineered-claude-code-learn-these-agent-tricks` · `@content/youtube/yifan-bth/let-the-agent-write-the-tests-and-the-fixes`* --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*