Skip to content
Kembali ke Feed
15 Tips Claude Code yang Bikin Lo Coding 10x Lebih Cepat

15 Tips Claude Code yang Bikin Lo Coding 10x Lebih Cepat

18 Juli 20268 menit baca

Pernah ngerasa Claude Code itu "oke aja" tapi nggak secanggih yang lo bayangin? Gue juga gitu. Sampai gue ngerti rahasia yang bikin developer lain bisa coding 10x lebih cepat.

Problem-nya simpel: kebanyakan developer pake Claude Code kayak chatbot biasa. Padahal ini tool yang bisa lo "latih" buat ngikutin workflow lo, coding style lo, bahkan kebiasaan jelek lo.

Artikel ini gue tulis based on real battle-tested practices dari developer yang udah running 6 production projects sekaligus pake Claude Code. Bukan teori, tapi pattern yang beneran work di dunia nyata.

Kenapa Claude Code Beda dari AI Coding Tool Lain?

Over 18 bulan terakhir, gue udah coba semua: Gemini, Codex, Cursor, Co-Pilot, OpenCode, ChatGPT, lo name it. Consensus-nya? Claude Code is currently the best.

Tapi ada catch-nya: tool-nya update terus, model-nya berubah, behavior-nya kadang inconsistent. Makanya lo butuh system yang robust, bukan cuma "prompt good hope for the best."

3 Kategori Claude Code Best Practices

Sebelum gue breakdown 15 tips-nya, lo harus ngerti 3 kategori besar:

  1. Project Setup - CLAUDE.md, rules, commands (one-time investment, permanent ROI)
  2. Prompting Patterns - cara lo ngomong sama Claude biar dia ngerti maksud lo
  3. Workflow Habits - commit often, compact regularly, one task per session

Getting these right is literally the difference antara "meh" sama "holy shit this is incredible."


Project Setup: Foundation yang Solid

1. Bikin CLAUDE.md File (HIGHEST IMPACT!)

Ini single highest-impact thing yang bisa lo lakuin. Takes 10 minutes, saves HOURS every session.

CLAUDE.md itu kayak onboarding document buat developer baru, cuma developer-nya adalah AI. File ini dibaca Claude Code di awal setiap session.

Without it: Claude Code starts from zero every time.
With it: Claude Code langsung ngerti project lo, stack lo, rules lo.

Contoh CLAUDE.md yang solid:

# Project Name

Brief description of what this project does.

## Tech Stack
- Next.js 15 (App Router)
- Supabase (auth + database)
- Stripe (payments)
- Tailwind CSS v4

## Architecture
- /src/app — pages and API routes
- /src/lib — shared utilities and services
- /src/components — React components (use shadcn/ui)

## Rules
- Always use TypeScript strict mode
- Use server components by default, 'use client' only when needed
- Error handling: use Result pattern, not try/catch
- Tests: use Vitest, co-locate with source files
- Never use default exports (except pages)

## Commands
- Dev: pnpm dev
- Test: pnpm test
- Build: pnpm build
- Lint: pnpm lint

Research shows developers dengan proper context complete tasks up to 55% faster. CLAUDE.md adalah cara lo kasih context itu ke Claude Code.

2. Use .claude/rules/ untuk Domain-Specific Rules

CLAUDE.md cover the whole project. Tapi untuk rules yang lebih specific, bikin folder .claude/rules/:

.claude/rules/
├── api-routes.md     # How to write API routes
├── database.md       # Migration and query patterns
├── testing.md        # Testing conventions
└── components.md     # Component patterns

Each file loaded when relevant. Claude Code baca api-routes.md pas kerja di API routes, bukan pas styling button. Keeps context focused.

3. Bikin Custom Commands di .claude/commands/

Custom commands turn repetitive prompts into one-word shortcuts. Contoh:

# .claude/commands/new-feature.md

Create a new feature following our standard pattern:
1. Create the API route in /src/app/api/
2. Create the database migration in /supabase/migrations/
3. Create the React component in /src/components/
4. Add a Vitest test file next to each new file
5. Update the sidebar navigation if needed

Now instead of typing all that, lo cuma run /new-feature. Simple, efficient, repeatable.

4. Setup .claudeignore

Kayak .gitignore, tapi buat Claude Code. Tells Claude which files to skip:

node_modules/
.next/
dist/
*.lock
*.log
coverage/
.env*

Less context to read = faster, more accurate responses.


Prompting Patterns: Cara Ngomong yang Bener

5. Start with the "What" and "Why", Not "How"

Bad prompt:

Create a file called auth.ts in src/lib with a function called verifyToken that takes a JWT string and returns the decoded payload using jose library

Good prompt:

I need JWT verification for my API routes. Users authenticate via Supabase, but I need to verify tokens in edge functions where the Supabase client isn't available.

Prompt kedua kasih Claude Code context buat make architectural decisions. Let it think, jangan spoon-feed the solution.

6. Break Large Tasks into Phases

Jangan ask for entire feature dalam satu prompt. Instead:

  1. Plan: "I need to add a billing system with Stripe. What's your plan?"
  2. Review the plan, adjust if needed
  3. Execute phase 1: "Let's start with the Stripe webhook handler"
  4. Verify (run tests, check the code)
  5. Execute phase 2: "Now add the pricing page"
  6. Continue...

Each phase gets full attention. Claude Code won't rush through step 5 karena trying to remember step 1.

7. Reference Existing Patterns

Ini powerful banget:

Add a new API route for /api/projects. Follow the same pattern as /api/teams — same error handling, same auth middleware, same response format.

Claude Code bakal read the referenced file and replicate the pattern exactly. Way more reliable daripada describing pattern in words.

8. Ask for Plans Before Execution

For any task touching more than 3 files:

Plan how you'd implement user notifications. Don't write code yet — just outline the approach.

Review the plan. Catch problems before 15 files are modified. Then say "looks good, execute it."

This saves SIGNIFICANT time on reverts and redos.


Workflow Best Practices: Habits yang Matter

9. Commit Before Big Changes

Before asking Claude Code to refactor anything significant:

git add -A && git commit -m "checkpoint before refactor"

If the refactor goes wrong, you're one git reset away from the last good state. Without this, you're manually undoing changes across 20 files.

10. Use /compact When Context Gets Long

Long conversations degrade quality. Research shows performance degrades as context windows fill up.

When you notice responses getting slower or less accurate, use /compact. It compresses the conversation history while keeping essential context.

Rule of thumb: compact after every major task completion.

11. Let Claude Code Run Tests

Don't copy-paste test output into chat. Instead, tell Claude Code your test command in CLAUDE.md:

## Commands
- Test: pnpm vitest run
- Test watch: pnpm vitest

Then ask: "Run the tests and fix any failures." Claude Code will run the suite, read failures, fix them, and re-run. This loop is WAY faster than manual copy-paste.

12. One Task Per Session

Claude Code works best with focused sessions. Don't do this:

Fix the login bug, then add dark mode, then refactor the API routes, then write tests.

Instead: fix the login bug. Compact or start new session. Add dark mode. New session. Each task gets fresh, focused context.


Advanced Tips: Level Up Your Game

13. Use Hooks for Automation

Hooks are shell commands that run automatically before or after Claude Code actions:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Write|Edit",
        "command": "pnpm lint --fix $CLAUDE_FILE_PATH"
      }
    ]
  }
}

This auto-lints every file Claude Code writes. No more "fix the linting errors" follow-ups.

14. Build Project-Specific Kits

Kalo lo repeating the same setup across projects, package them into a kit:

.claude/
├── commands/
│   ├── new-feature.md
│   ├── deploy.md
│   └── test-all.md
├── rules/
│   ├── api-patterns.md
│   └── testing.md
├── knowledge/
│   └── architecture.md
└── CLAUDE.md

Copy this .claude/ directory to any new project and Claude Code instantly knows your standards.

15. Review Before Approving

Claude Code is fast, not infallible. Before accepting large changes:

  • Run git diff to see everything that changed
  • Check for hardcoded values, missing error handling, or security issues
  • Run the full test suite
  • Build the project to catch type errors

Trust but verify. Claude Code handles 90% of the work. Your job is catching the 10% it misses.


The Compound Effect

Any single tip here saves a few minutes. Combined, they transform your workflow.

A well-configured project dengan CLAUDE.md, custom commands, dan proper prompting patterns bisa ship features 5-10x faster than vanilla Claude Code.

Setup takes an afternoon. Time savings compound every day after that.

According to the 2024 Stack Overflow Developer Survey, 76% of developers now use or plan to use AI coding tools — tapi yang invest in proper configuration consistently report higher satisfaction and output.


Key Takeaways

  1. CLAUDE.md is non-negotiable - 10 minutes setup, permanent productivity boost
  2. Context over instructions - tell Claude "what" and "why", not "how"
  3. Break large tasks into phases - phased execution beats monolithic prompts
  4. Commit before big changes - one git reset away from safety
  5. One task per session - focused context = better results
  6. Review before approving - trust but verify

Lo nggak harus implement semua 15 tips sekarang juga. Start dengan CLAUDE.md. Add custom commands as you find repetitive patterns. Iterate on your workflow.

The setup compound over time. Every hour lo invest di setup, lo save days di execution.

Now go build something incredible. 😈


Pro tip: Kalo lo pake Claude Code di production projects, track your metrics. Suggestion acceptance rates, time-to-green for tests, cycle time per task. These are client-friendly KPIs buat demonstrate ROI.

Tonton Video Sumber

Anda akan diarahkan ke video asli di YouTube.

Artikel Terkait

Kie.ai: Cara Manfaatkan Free Credit dan API AI Murah untuk Eksperimen Developer

Buat developer yang lagi ngoprek produk berbasis AI, biaya API sering jadi salah satu hal yang paling cepat bikin mikir dua kali. Apalagi kalau baru tahap eksperimen, prototype, atau validasi ide. Nah, Kie.ai bisa jadi salah satu opsi menarik karena platform ini sering menyediakan free credit dan pricing API yang lebih ramah kantong dibanding beberapa layanan official.

5 Jul 20264 mntBaca →