ביקורת קוד שמוצאת באגים, לא סגנון

בקשה סתמית לביקורת קוד מחזירה רשימה של הערות סגנון: שמות משתנים, פורמט, והצעה לפרק פונקציה. זה רעש שמסתיר את מה שחשוב. הפרומפט הזה דורש שכל ממצא יגיע עם קלט קונקרטי שמפיל את הקוד, וזו הדרישה שמסננת החוצה את מרבית ההערות חסרות הערך. הפרומפט כתוב באנגלית ומוכן להעתקה, מתוך ספריית הפרומפטים של כליקס. מה שבסוגריים מרובעים הוא מה שאתם ממלאים לפני ההדבקה. מודל חזק לקוד. בפרויקט גדול עדיף כלי עם גישה ישירה לקבצים, כמו Claude Code או Cursor.

קוד ומפתחים · code review · באגים · קוד · איכות

Review this code for defects. I am not looking for style feedback.

[paste the code, or point at the files]

For every finding you report, you must provide:
1. The exact file and line.
2. A concrete failure scenario: specific inputs or state that produce a wrong result, a crash, or data loss. If you cannot construct one, do not report the finding.
3. Why the current code produces that outcome.
4. The minimal fix.

Prioritize, in this order:
- Silent wrong results. Code that returns a plausible but incorrect value is worse than code that throws.
- Error paths that swallow failures and continue as if nothing happened.
- Off-by-one, boundary, empty-collection, and null cases.
- Race conditions and stale cached state.
- Security: injection, missing authorization checks, secrets in client code, user input trusted as safe.
- Resource leaks.

Do not report: naming, formatting, file length, or "this could be extracted into a function", unless it directly causes one of the above.

Rank findings most severe first. If you find nothing that meets the bar, say so plainly instead of filling the list.

איך להשתמש בזה נכון