Yasin Arsal

6 MAYIS 2026

Boris Abinin 10 Hacki!

Boris Cherny’nin 10 Hacki!

Claude Code: Boris Cherny’nin 10 Hack’i


1. Git Work Trees — Paralel Gelistirme

Ayni repository uzerinde birden fazla Claude Code ornegi paralel calistirir. Her ornek farkli bir branch’de, farkli bir klasorde bagimsiz gelistirme yapar.

Work Tree Olusturma (Terminal)

bash
# Mevcut bir dala work tree ac
git worktree add ../proje-feature-a feature-a

# Yeni branch olusturarak work tree ac
git worktree add -b yeni-feature ../proje-yeni-feature

# Tum aktif work tree'leri listele
git worktree list

# Work tree'yi kaldir (branch silinmez)
git worktree remove ../proje-feature-a

# Pruning: silinen work tree referanslarini temizle
git worktree prune

Tavsiye Edilen Klasor Yapisi

plain
proje-main/        ← main branch
proje-auth/        ← auth feature
proje-dashboard/   ← dashboard feature
proje-api/         ← api refactor

Her klasor icin ayri terminal penceresi, her birinde claude calistir.

Copy-Paste: Claude’a Work Tree Gorevi Ver

plain
Navigate to [klasor-adi]. Your task: [gorev aciklamasi].
Maintain the same code style and architecture as the main branch.
Do not modify shared config files (package.json, tsconfig, .env).
When done, summarize what files you changed.

Copy-Paste: Tum Branch’leri Merge Et

plain
I've completed development on [N] separate work trees:
- Branch: [dal-1], folder: [klasor-1] — [ne yapildi]
- Branch: [dal-2], folder: [klasor-2] — [ne yapildi]
- Branch: [dal-3], folder: [klasor-3] — [ne yapildi]

Please merge all into main. Resolve conflicts by preferring
feature branch logic. Report a summary of all changes merged.

Ipucu: GhostTTY (Hack #7) ile pencereleri ayirmak ve aralarinda gecis cok daha hizli olur.


2. Plan Mode — Once Planla, Sonra Kodla

Plan Mode, Claude’un kod yazmadan once kapsamli bir plan olusturmasini zorunlu kilar. Araştirma, inşadan 10-100x daha hizlidir.

Plan Mode Nasil Acilir

Claude Code arayuzunde alttaki toolbar’dan Plan butonuna bas, veya:

plain
/plan

Plan Mode’da Claude:

  • Kullanacagi kutuphaneleri/araclari arastirir
  • Implementasyon adimlarini listeler
  • Senden onay bekler, onay vermeden kod yazmaz

Copy-Paste: Etkili Plan Promptu

plain
Goal: [ne yapmak istedigini tek cumleyle anlat]

Context:
- Tech stack: [kullandigin teknolojiler]
- Constraints: [kisitlar, ornegin "no new dependencies", "Python only"]
- Known issues: [daha once denediklerinde ne ters gitti]

Before writing any code:
1. Research available libraries/tools for this task
2. Propose 2-3 implementation approaches with trade-offs
3. Recommend one and explain why
4. List all files you will create or modify
5. Wait for my approval before proceeding

Copy-Paste: Plani Rafine Et

plain
The plan looks good but:
- Change [X] to [Y] because [sebep]
- Skip step [N], I'll handle that manually
- Add a step for [eksik olan sey]

Update the plan and confirm before coding.

Kural: Plani begenene kadar duzenle. Koda gectikten sonra degistirmek cok daha pahali.


3. CLAUDE.md Iterasyonu — Hafizayi Yonet

CLAUDE.md, Claude’un sistem promptudur — her konusmanin basinda otomatik enjekte edilir. Ajani ayni hatadan korumanin en etkili yolu buradaki talimatlari surekli guncellemek.

Dosya Konumlari

plain
proje-klasoru/CLAUDE.md     ← Projeye ozel kurallar
~/.claude/CLAUDE.md         ← Global kurallar (tum projeler)

CLAUDE.md Sifrdan Olusturma

plain
Create a CLAUDE.md file for this project. Include:
- Project overview (1 paragraph)
- Tech stack and key dependencies
- Coding conventions (naming, file structure)
- Things to always do (tests, type annotations, etc.)
- Things to never do (based on our work so far)
- How to run the project locally

Copy-Paste: Hata Sonrasi Otomatik Guncelle

plain
Update CLAUDE.md so that a future Claude with zero context
would know NOT to [hatali davranis]. Add it under a
"Common Mistakes to Avoid" section.

Copy-Paste: Calisma Sonrasi Guncelle

plain
Update CLAUDE.md to reflect everything we just built.
A future Claude should be able to [spesifik gorev] in one shot
without needing this conversation's context.

Ornek CLAUDE.md Yapisi

markdown
# Project: [Proje Adi]

## Overview
[Tek paragraf proje aciklamasi]

## Tech Stack
-Language: Python 3.11
-Framework: FastAPI
-Database: PostgreSQL via SQLAlchemy
-Testing: pytest

## Conventions
-Use snake_case for variables and functions
-All API endpoints must have docstrings
-Never use `print()`, use `logger.info()` instead

## Common Mistakes to Avoid
-Do NOT use synchronous DB calls inside async routes
-Do NOT commit .env files
-Do NOT install packages without updating requirements.txt

## Run Locally
\`\`\`bash
cp .env.example .env
pip install -r requirements.txt
uvicorn main:app --reload
\`\`\`

4. Skills — Tekrar Kullanilabilir Prosedurler

Skill, Claude Code’un bir islemi her seferinde ayni sekilde yapmasini saglayan tanim dosyasidir. GitHub’da tutulup ekip genelinde paylasilan bir “komut kutuphanes” gibi dusun.

Skill Dosyasi Yapisi

plain
.claude/
  skills/
    code-review.md
    deploy.md
    git-worktree-merge.md
    db-migration.md

Ornek Skill Dosyasi (git-worktree-merge.md)

markdown
# Skill: Git Worktree Merge

## Trigger
When asked to "merge work trees" or "combine branches"

## Steps
1.List all active work trees with `git worktree list`
2.For each work tree branch, run `git diff main` to summarize changes
3.Create a merge commit message summarizing all features
4.Merge branches into main in dependency order
5.Run test suite after each merge
6.If conflicts: prefer feature branch logic, report to user
7.Clean up work trees with `git worktree remove`
8.Push to remote if requested

## Output
Provide a summary table: Branch | Files Changed | Status

Copy-Paste: Skill’i GitHub’a Push Et

plain
Create a new GitHub repository called "claude-skills".
Add all .md files from .claude/skills/ to it.
Push with a commit message: "feat: add initial skill library"

Copy-Paste: Baska Repo’dan Skill Cek

plain
Fetch the skill file at:
https://raw.githubusercontent.com/[kullanici]/claude-skills/main/[skill-adi].md

Save it to .claude/skills/[skill-adi].md in this project.
Then apply it immediately.

5. Hata Kodlariyla Bug Fix

Hata mesajinin tamamini ver, Claude cogunlukla tek seferde cozar.

Copy-Paste: Standart Bug Fix Promptu

plain
I got this error. Fix it.

Error:
[hata mesajinin tamami buraya]

Context:
- This happened when I [ne yapiyordun]
- File: [dosya adi], around line [satir numarasi]
- Last change before this error: [son ne degistirdin]

Copy-Paste: Stack Trace ile Bug Fix

plain
Fix this. Do not patch symptoms — find the root cause.

Stack trace:
[stack trace buraya]

If you need to see any files to diagnose, read them first.
Explain what caused the bug before fixing it.

Slack MCP Kurulumu (Opsiyonel)

bash
# MCP config'e ekle (~/.claude/mcp.json)
{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-slack"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-...",
        "SLACK_TEAM_ID": "T..."
      }
    }
  }
}

Sonra Claude’a: "Read the latest messages from #bugs channel and fix any reported errors."


6. Zarif Cozum Promptu

Claude birden fazla denemeyle kirli bir cozume ulastiktan sonra, bulduklarini kullanarak temiz bir implementasyon uretmesini saglar.

Copy-Paste: Sifirdan Temiz Implementasyon

plain
Now that you know what works and what doesn't, start fresh.

Remove all the previous attempts and their leftover code.
Implement only the final working solution — as if you had
written it correctly on the first try.

Requirements for the clean version:
- No dead code or commented-out experiments
- No redundant files from earlier attempts
- Consistent naming throughout
- Add a brief comment only where the logic is non-obvious

Copy-Paste: Refactor + Temizle

plain
The current solution works but it's messy from iteration.
Refactor it into the most elegant version possible.

Constraints:
- Keep the same external API/interface
- All existing tests must still pass
- Do not add new dependencies
- Aim for fewer files, not more

7. GhostTTY — Hizli Terminal Yonetimi

Anthropic ekibinin gunluk kullandigi terminal. Cok sayida paralel Claude ornegi calistirirken (work tree workflow) buyuk kolaylik saglar.

Kurulum

bash
# macOS
brew install --cask ghostty

# Ya da: https://ghostty.org/download

Temel Kisayollar

IslemKisayol
Yeni tabCmd + T
Tab kapatCmd + W
Sonraki tabCmd + Shift + ]
Onceki tabCmd + Shift + [
Yatay bolCmd + D
Dikey bolCmd + Shift + D
Panel’ler arasi gecCmd + Yon tus
Aktif paneli tam ekranCmd + Shift + Enter
Tam ekrandan cikCmd + Shift + Enter

Tavsiye Edilen Layout (4 Work Tree Icin)

plain
┌─────────────────┬─────────────────┐
│  claude (auth)  │  claude (dash)  │
│                 │                 │
├─────────────────┼─────────────────┤
│  claude (api)   │  claude (main)  │
│                 │                 │
└─────────────────┴─────────────────┘

Cmd + D ile yatay, Cmd + Shift + D ile dikey bol. Aralarinda Cmd + yon tus ile gec.

GhostTTY Config (~/.config/ghostty/config)

plain
font-size = 13
theme = dark
window-padding-x = 8
window-padding-y = 8
confirm-close-surface = false

8. Sub Agents — Bagimsiz Kod Incelemesi

Alt ajan, ana ajanin bağlamından etkilenmeden bagimsiz bir gorevi uretlenen ozellesmis bir Claude ornegi. Ana ajanin “kirli” baglamina karsi nesnel degerlendirme saglar.

Sub Agent Dosyasi Olustur (.claude/agents/code-reviewer.md)

markdown
# Agent: code-reviewer

## Role
You are a senior code reviewer. You evaluate code objectively.
You have NO context about how the code was written or why.

## Tools
-read
-grep
-glob

## Review Checklist
1.Logic errors and edge cases not handled
2.Security vulnerabilities (injections, exposed secrets, etc.)
3.Performance issues (N+1 queries, blocking calls, etc.)
4.Code duplication that should be abstracted
5.Missing error handling
6.Inconsistent naming or style

## Output Format
Provide a structured report:
-**Status:** Production Ready / Needs Work / Major Issues
-**Critical:** (must fix before merge)
-**Suggestions:** (nice to have)
-**Positives:** (what was done well)

Copy-Paste: Sub Agent Olustur

plain
Create a sub agent for code review. Save it to
.claude/agents/code-reviewer.md

The agent should:
- Have no access to conversation history
- Use only read/grep/glob tools
- Evaluate code against: correctness, security, performance, style
- Output a structured report with severity levels

Copy-Paste: Sub Agent’i Calistir

plain
Use the code-reviewer sub agent to review [dosya-yolu].
Pass it only the file content — no additional context.
Report its findings back to me.

Copy-Paste: Otomatik Review Akisi

plain
After every major code writing task:
1. Automatically invoke the code-reviewer sub agent
2. Pass it the files you just wrote
3. If it flags any Critical issues, fix them before reporting done
4. Include the review summary in your final response

CLAUDE.md’ye Ekle

plain
After completing any significant coding task, automatically
call the code-reviewer sub agent on all modified files.
Fix any Critical findings before marking the task complete.

9. SQL ve Veri Analizi

Manuel SQL yazmak yerine Claude’a ver. Boris Cherny’nin ifadesiyle: “6 aydir tek satir SQL yazmadim.”

Copy-Paste: Sorgu Olustur

plain
Write a SQL query for PostgreSQL that:
- [ne yapmasi gerekiyor]
- Table schema:
  [tablo adlari ve sutunlar buraya]
- Performance requirement: must use indexes where possible
- Return columns: [hangi sutunlar]

Copy-Paste: Veri Analizi

plain
Analyze the data in [tablo adi]. I want to understand:
1. [soru 1]
2. [soru 2]
3. [soru 3]

Write and run the queries. Summarize findings in plain language,
not just raw numbers.

Copy-Paste: Migration Olustur

plain
Create a database migration for:
- Add column [sutun-adi] ([tip]) to [tablo-adi]
- Default value: [deger]
- Nullable: [evet/hayir]

Use [Alembic / Flyway / raw SQL] format.
Include both up and down migrations.

10. Aciklayici Cikti Stili

Claude’un her islemi aciklayarak yapmasini saglar — kodlama becerisini gelistirmek ve ne yapildigini anlamak icin idealdir.

Nasil Etkinlestirilir

Claude Code’da yazin:

plain
output styles

Terminal menusu acar. Iki mod:

ModNe Yapar
ExplanatoryHer islemi neden yaptigini aciklar. Karar arkasiniyazmak icin ideal.
LearningDurur, senden kucuk kod parcalari yazar. Aktif pratik.

Copy-Paste: ASCII Diyagrami Iste

plain
Create an ASCII diagram showing the architecture of what you
just built. Include: components, data flow, and key dependencies.

Copy-Paste: Karar Aciklamasi Iste

plain
Before writing any code, explain:
1. What approach you're taking and why
2. What alternatives you considered and rejected
3. What trade-offs this approach has
Then proceed.

Copy-Paste: Ogrenme Modu Taklidi

plain
I want to learn while you help. For each step:
1. Explain what needs to be done conceptually
2. Give me a hint (not the full answer)
3. Wait for me to attempt it
4. Then review my attempt and correct if needed

Hizli Basvuru

#HackTemel Komut / Eylem
1Git Work Treesgit worktree add -b [dal] ../[klasor]
2Plan Mode/plan veya toolbar’dan Plan butonu
3CLAUDE.md“Update CLAUDE.md so a future Claude knows…”
4Skills.claude/skills/[skill-adi].md olustur, GitHub’a push et
5Bug FixStack trace’in tamamini yapistir + “Fix it, find root cause”
6Zarif Cozum“Start fresh, implement only the final solution cleanly”
7GhostTTYbrew install --cask ghostty, Cmd+D ile bol
8Sub Agents.claude/agents/code-reviewer.md olustur
9SQL“Write and run a query that…”
10Output Styleoutput styles yaz, menudan sec