תהליכי עבודה נפוצים עם Claude Code
מדריך קצר לתבניות הפרומפטים ולתהליכי העבודה הנפוצים ביותר עם Claude Code — ממחקר בסיס קוד ועד הגשת PR. לכל אחד דוגמאות שניתן להריץ.
## תבניות פרומפט לפי משימה
הבנת בסיס קוד חדש
give me an overview of this codebase
explain the main architecture patterns used here
what are the key data models?
how is authentication handled?התחילו בשאלות רחבות ואז צמצמו. בקשו מ-Claude מפת מושגים של ה-domain.
איתור ותיקון באגים
I'm seeing an error when I run npm test
suggest a few ways to fix the @ts-ignore in user.ts
update user.ts to add the null check you suggestedספקו את הפקודה לשחזור הבאג עם ה-stack trace. ציינו אם הבאג לסירוגין.
ריפקטורינג
find deprecated API usage in our codebase
suggest how to refactor utils.js to use modern JavaScript features
refactor utils.js to use ES2024 features while maintaining the same behavior
run tests for the refactored codeבקשו ריפקטורינג בצעדים קטנים ונבדקים. בקשו מ-Claude להסביר את היתרונות.
כתיבת טסטים
find functions in NotificationsService.swift that are not covered by tests
add tests for the notification service
add test cases for edge conditions in the notification service
run the new tests and fix any failuresClaude בודק את קבצי הטסטים הקיימים ומתאים את הסגנון, הפריימוורק ודפוסי ה-assertion.
יצירת Pull Request
summarize the changes I've made to the authentication module
create a pr
enhance the PR description with more context about the security improvementsניתן גם לבקש "create a pr for my changes" ישירות. לאחר הגשה, claude --from-pr 1234 פותח בורר sessions מסוננים לפי ה-PR.
תיעוד
find functions without proper JSDoc comments in the auth module
add JSDoc comments to the undocumented functions in auth.js
check if the documentation follows our project standardsציינו את סגנון התיעוד הנדרש (JSDoc, docstrings, וכד') ובקשו דוגמאות.
המשך שיחות ממושכות
כשמשימה נמשכת כמה ישיבות, המשיכו מנקודת העצירה:
claude --continueממשיך את ה-session האחרון בתיקייה הנוכחית. השתמשו ב-claude --resume לבחירה מרשימה, או /resume מתוך session פעיל.
עבודה מקבילה עם Worktrees
עבדו על פיצ'ר בטרמינל אחד בזמן ש-Claude מתקן באג בטרמינל אחר, בלי שהשינויים יתנגשו:
claude --worktree feature-authכל git worktree הוא checkout נפרד בענף משלו.
תכנון לפני עריכה
לשינויים שרוצים לסקור לפני ביצוע, עברו ל-plan mode. Claude קורא קבצים ומציע תוכנית — ללא עריכות עד שאתם מאשרים:
claude --permission-mode planניתן גם ללחוץ Shift+Tab בתוך session פעיל עד שסרגל הסטטוס מציג ⏸ plan mode on.
האצלת מחקר ל-Subagents
חקירה של בסיס קוד גדול ממלאת את ההקשר בקריאות קבצים. האצילו כדי שרק הממצאים יחזרו:
use a subagent to investigate how our auth system handles token refreshה-subagent קורא קבצים בחלון ההקשר שלו ומחזיר סיכום.
הרצה בתוך סקריפטים
להרצה לא-אינטראקטיבית ב-CI, hooks או batch processing:
git log --oneline -20 | claude -p "summarize these recent commits"