ככה לימדנו את Claude לכתוב את הקוד המשעמם במקומנו

כך תרתמו את Claude Code לביצוע החלקים המשעממים של עבודת הפיתוח

כתב אורח
14.1.26

מאת: אריה וורמן

כמפתחים, רבים מאיתנו כבר משתמשים ב-Claude Code (או כלי AI אחרים) בעבודת הפיתוח שלנו. חלקנו אפילו משתפים יכולות בין מפתחים בצוות או בארגון על ידי שימוש בכלים כמו Plugin Marketplace.

אבל המאמר הזה עוסק בצעד הבא. לא עוד שימוש ב-AI, אלא שינוי אמיתי באופן שבו עבודת הפיתוח מתבצעת.

מה קורה כשנותנים ל-AI את העבודה הסיזיפית?

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

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

  • Skills – יכולות וכלים ש-Claude יכול להפעיל בצורה אוטונומית
  • Agents – מנהלים Skills ו-Reasoning
  • Slash-commands – טריגרים שבעזרתם ניתן להפעיל את ה-Agents וה-Skills.

נראה כיצד הכלים האלה משתלבים עם Project Context ודוגמאות היסטוריות, כך ש-Claude יוכל לבצע עבורנו את העבודה המשעממת, ואנחנו נוכל להתרכז במשימות המורכבות והמעניינות באמת. לנו כמפתחים יישאר לעבור על העבודה ש-Claude עשה, לוודא שפעל נכון ולאשר.

המשימה: "להוסיף עוד endpoint"

לכל צוות Backend יש גרסה כלשהי של המשימה הזו: "להוסיף API endpoint חדש לפי הקונבנציות בפרויקט, עם ולידציה, טסטים, מטריקות ותיעוד". זה אף פעם לא זהה לחלוטין, אבל השלבים תמיד חוזרים על עצמם:

  • עדכון Routing / Controller
  • חיבור של הלוגיקה העיקרית
  • כתיבת טסטים, מטריקות ודוקומנטציה
  • שמירה על הקונבנציות של הפרויקט (שמות, טיפול בשגיאות ולוגים)

המטרה שלנו היא ש-Claude יעשה את המשימה בצורה מהירה ואיכותית, יתבסס על דוגמאות קוד קיימות וישאל אותנו שאלות כשהוא לא בטוח.

בניית היכולות של Claude

שלב 1: להפוך patterns ל-Skill

אם עד היום עשינו שימוש פשוט יחסית ביכולות של Claude כאשר השתמשנו בקובץ CLAUDE.md כדי לתאר את הקונבנציות של הפרויקט, עכשיו אנחנו אורזים חלק מהידע וההתנהגות הזו לתוך Skill.

Skill הוא יחידת ידע והתנהגות קטנה הניתנת לגילוי על ידי Claude – אפשר לחשוב עליו כ-Plugin קטן שמכיל קונבנציה, הגדרה או פעולה שה-Agent יכול להריץ. כדי ש-Claude יוכל לגלות את ה-Skills הם צריכים להיות ממוקמים בתיקיית skills בקובץ SKILL.md. בזמן ריצה, Claude מגלה ומפעיל אותם אוטומטית כשזה רלוונטי.

מבחינה ארכיטקטונית, Skills הם רכיבים שיושבים לצד הקוד והדוקומנטציה שלכם. Claude מגלה אותם בזמן ריצה, מתאים אותם לטריגר או לפעולה שהוא צריך לבצע ומפעיל אותם לפי צורך. חשוב לציין: Skills לא מנפחים את ה-Chat Context של המודל; הם מופעלים על ידי Claude בזמן ריצה רק כשצריך. כך מקבלים התנהגות עשירה וניתנת לשימוש חוזר בלי לבזבז את תקציב ה-Tokens.

התיעוד של Skills ב-Claude Code Docs

עבור דוגמת ה-"new endpoint", ניצור את ה-Skill הבא: skills/new-endpoint/SKILL.md

ברמה הקונספטואלית, הוא יכול להיראות כך:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Name: new-endpoint
Description: >
Help design and scaffold a new HTTP endpoint.
Triggers: >
- Adding a new API route, controller or endpoint
- Defining request or response schemas
---
# New Endpoint Skill
## Input
Endpoint path
Request parameters
Response code & body
Invoke AskUserQuestion tool to clarify and add missing data
## Instructions
Read CLAUDE.md from repo root to learn conventions.
Scan existing endpoints inthis service to infer patterns.
Look for3-5 historical similar PRs(ask the user to provide them if you can’t find any) that added similar endpoints and extract naming, error handling, tests, and metrics patterns.
Invoke the lightweight planner to create plan for the new endpoint and ask the user to confirm:
- Path, method, auth
- Expected inputs/outputs
- Service ownership and criticality
Name: new-endpoint Description: > Help design and scaffold a new HTTP endpoint. Triggers: > - Adding a new API route, controller or endpoint - Defining request or response schemas --- # New Endpoint Skill ## Input Endpoint path Request parameters Response code & body Invoke AskUserQuestion tool to clarify and add missing data ## Instructions Read CLAUDE.md from repo root to learn conventions. Scan existing endpoints in this service to infer patterns. Look for 3-5 historical similar PRs (ask the user to provide them if you can’t find any) that added similar endpoints and extract naming, error handling, tests, and metrics patterns. Invoke the lightweight planner to create plan for the new endpoint and ask the user to confirm: - Path, method, auth - Expected inputs/outputs - Service ownership and criticality
Name: new-endpoint
Description: >
  Help design and scaffold a new HTTP endpoint.
Triggers: >
  - Adding a new API route, controller or endpoint
  - Defining request or response schemas

---

# New Endpoint Skill
## Input
Endpoint path
Request parameters
Response code & body 
Invoke AskUserQuestion tool to clarify and add missing data

## Instructions

Read CLAUDE.md from repo root to learn conventions.
Scan existing endpoints in this service to infer patterns.
Look for 3-5 historical similar PRs (ask the user to provide them if you can’t find any) that added similar endpoints and extract naming, error handling, tests, and metrics patterns.
Invoke the lightweight planner to create plan for the new endpoint and ask the user to confirm:

   - Path, method, auth
   - Expected inputs/outputs
   - Service ownership and criticality

שימו לב לנקודות המרכזיות:

  • הוא קורא במפורש את CLAUDE.md ואת הקוד כדי ללמוד patterns
  • הוא מחפש PRs היסטוריים במקום לנחש
  • הוא שואל את המשתמש שאלות כדי להשלים context חסר

מעכשיו Claude יכול להפעיל את ה-Skill הזה בכל פעם שהוא מזהה שעובדים על "new endpoint".

שלב 2: לעטוף את ה-Skill ב-Agent ששואל שאלות

Skills מספקים יכולות, אבל Agent מתזמר ומנהל את העבודה. Plugins חושפים agents באמצעות קבצי markdown בתיקיית agents/.

תיעוד של Agents בקלוד קוד דוקס

בתוך ה-plugin, נגדיר new-endpoint-agent:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Name: new-endpoint-agent
Description: >
Plan and scaffold a new API endpoint following project conventions, using CLAUDE.md and historical examples.
---
You are an agent that:
Use the new-endpoint Skill to:
- Read CLAUDE.md
- Inspect existing endpoints
- Find similar historical PRs
- Plan the new endpoint, logic and tests
Summarize the conventions you inferred in a short checklist.
Ask the user clarifying questions when information is missing, e.g.:
- Is this endpoint public or internal?
- Which service owns it?
- What are the performance / reliability constraints?
Update the plan Proposed by the new-endpoint Skill if needed. verify: files to touch, tests to add, edge cases.
After user approval, apply changes step‑by‑step, narrating what you do.
Finish with a review checklist for the developer to verify.
Name: new-endpoint-agent Description: > Plan and scaffold a new API endpoint following project conventions, using CLAUDE.md and historical examples. --- You are an agent that: Use the new-endpoint Skill to: - Read CLAUDE.md - Inspect existing endpoints - Find similar historical PRs - Plan the new endpoint, logic and tests Summarize the conventions you inferred in a short checklist. Ask the user clarifying questions when information is missing, e.g.: - Is this endpoint public or internal? - Which service owns it? - What are the performance / reliability constraints? Update the plan Proposed by the new-endpoint Skill if needed. verify: files to touch, tests to add, edge cases. After user approval, apply changes step‑by‑step, narrating what you do. Finish with a review checklist for the developer to verify.
Name: new-endpoint-agent
Description: >
Plan and scaffold a new API endpoint following project conventions, using CLAUDE.md and historical examples.

---

You are an agent that:
Use the new-endpoint Skill to:
- Read CLAUDE.md
- Inspect existing endpoints
- Find similar historical PRs
- Plan the new endpoint, logic and tests
Summarize the conventions you inferred in a short checklist.
Ask the user clarifying questions when information is missing, e.g.:
- Is this endpoint public or internal?
- Which service owns it?
- What are the performance / reliability constraints?

Update the plan Proposed by the new-endpoint Skill if needed. verify: files to touch, tests to add, edge cases.
After user approval, apply changes step‑by‑step, narrating what you do.
Finish with a review checklist for the developer to verify.

אינטראקציה טיפוסית תיראה כך:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
User:
"Add a GET /reports/{id} endpoint to fetch a report summary."
Agent:
"Is this endpoint authenticated? If so, which roles can access it?"
"Should we expose only metadata, or full report contents?"
"Do we need rate limiting or caching?"
User: "Add a GET /reports/{id} endpoint to fetch a report summary." Agent: "Is this endpoint authenticated? If so, which roles can access it?" "Should we expose only metadata, or full report contents?" "Do we need rate limiting or caching?"
User:

"Add a GET /reports/{id} endpoint to fetch a report summary."

Agent:

"Is this endpoint authenticated? If so, which roles can access it?"
"Should we expose only metadata, or full report contents?"
"Do we need rate limiting or caching?"

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

שלב 3: להפעיל את היכולות של Claude בשורה אחת עם slash-command

אנחנו לא רוצים שמפתחים יזכרו שמות של agents. כאן נכנסים slash-commands: קבצי markdown תחת תיקיית commands שמופעלים כאשר המפתח מקליד:

/something

תיעוד של Commands בקלוד קוד דוקס

בתוך ה-backend-development plugin, נגדיר:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Name: /new-endpoint
Description: "Plan and scaffold a new API endpoint."
Params:
- Name: path
Type: string
- Name: method
Type: string
Handler:
Type: agent
Agent: new-endpoint-agent
---
Given an API endpoint to add, work with the user to design and scaffold it.
Always:
- Load conventions from CLAUDE.md
- Look at similar historical changes
- Ask clarification questions before editing
- Narrate your changes and end with a review checklist
Name: /new-endpoint Description: "Plan and scaffold a new API endpoint." Params: - Name: path Type: string - Name: method Type: string Handler: Type: agent Agent: new-endpoint-agent --- Given an API endpoint to add, work with the user to design and scaffold it. Always: - Load conventions from CLAUDE.md - Look at similar historical changes - Ask clarification questions before editing - Narrate your changes and end with a review checklist
Name: /new-endpoint
Description: "Plan and scaffold a new API endpoint."
Params:
- Name: path
Type: string
- Name: method
Type: string
Handler:
Type: agent
Agent: new-endpoint-agent

---

Given an API endpoint to add, work with the user to design and scaffold it.
Always:

- Load conventions from CLAUDE.md
- Look at similar historical changes
- Ask clarification questions before editing
- Narrate your changes and end with a review checklist

עכשיו כל מפתח יכול פשוט לכתוב:

/new-endpoint path=/reports/{id} method=GET

ו-Claude:

  • יטען קונבנציות של הפרויקט
  • יסרוק endpoints קיימים ודוגמאות היסטוריות
  • ישאל שאלות על מנת להשלים מידע חסר
  • יציע תוכנית למימוש ויבצע אותה
  • יספק סיכום של העבודה שנעשתה לסקירה של המפתח

מה כל האובססיה ל-context ולדוגמאות היסטוריות

יש כמה בחירות דיזיין שמאפשרות לדפוס הזה לעבוד בצורה אמינה:

קודם Context, אחר כך קוד

הצעד הראשון של ה-agent הוא לקרוא את CLAUDE.md ולסרוק את הקוד. אנחנו בכוונה שומרים את ה-plugin גנרי ונותנים לכל פרויקט להגדיר את הקונבנציות שלו בתוך ה-repo. זה שומר על plugin קטן ועל context ממוקד.

דוגמאות היסטוריות מעל חוקים אבסטרקטיים

במקום רק להגיד ל-Claude "אנחנו אוהבים X", אנחנו מראים לו איך עשינו X בעבר דרך PRs ו-commits אמיתיים. זה נותן לו דפוסי פעולה קונקרטיים (קבצים, naming, tests) לחקות, וגם reviewer comments ללמוד מהם. האחריות של המפתח היא לוודא שה-agent לא לומד מ"דוגמאות רעות": להנחות אותו להתעלם מ-PRs ישנים או לא רלוונטיים, ולהתמקד ב-PRs עם עקרונות הנדסת תוכנה טובים וטסטים איכותיים. בנוסף, המפתח חייב לפקח על עבודת ה-agent ולוודא שהסטנדרט של הקוד נשמר.

דוגמאות דומות מהעבר מצמצמות את מרחב החיפוש

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

כש-agent עדיין לא יודע משהו, הוא לא מנחש, הוא שואל. התהליך הזה:

(context → history → clarifying questions → action)

הוא מה שהופך את את העבודה ש-Claude עושה לבטוחה ואיכותית.

לאן ממשיכים מכאן

דוגמת ה-"new endpoint" היא רק דוגמה אחת. אותו שילוב של Skill + Agent + Slash-command עובד עבור משימות רפטטיביות רבות נוספות, כמו:

  • /upgrade-dependency – עדכון תלויות בצורה בטוחה בדומה לשדרוגים קודמים
  • /migrate – שינויים טכניים או מכניים עם חוקים ספציפיים לפרויקט
  • /add-feature-flag – הוספה בצורה נקייה והגרדתית

מאחר שהכול זה פשוט קבצי markdown, אפשר לפתח את התוספים האלה באופן מתמשך מבלי לפרוס services חדשים.

תיעוד על יצירת plugins בקלוד קוד דוקס

המטרה שלנו פשוטה: אם משימה בוצעה שלוש פעמים בצורה דומה, בפעם הרביעית היא צריכה להתחיל ב-"/…". ו-Claude כבר צריך להכיר את הקונבנציות, ההיסטוריה, ולדעת מה לשאול אם המשימה לא מוגדרת עד הסוף.


הכותב הוא מפתח תוכנה בחברת Zenity

כתב אורח

מדי פעם אנחנו מארחים כותבות וכותבים בתחומי הטכנולוגיה וההייטק, שכותבים על תחומי ההתמחות שלהם ומשתפים בדעות ובתובנות שלהם. רוצה גם? אין בעיה, שלחו לנו מייל ל-editor@geektime.co.il

Subscribe
Notify of
guest
guest
6 תגובות
Inline Feedbacks
View all comments
תתקדמו
תתקדמו
14 בינואר 2026 21:29

אצלינו Claude כבר כותב גם את הקוד הלא משעמם…

צוחק, אחלה מאמר.

0
להגיב
ש
ש
15 בינואר 2026 13:32

במילותיה של אמי: "מה הם עוד ימציאו?"
מקסים.

0
להגיב
יעקב
יעקב
15 בינואר 2026 14:26

אחלה מאמר!

קראתי לאחרונה עוד מאמרים של זניטי. ממש מעניין!

0
להגיב

Geektime Insider

הבא
הקודם

משרות חמות

גיקטיים שלי

כאן אפשר לבחור תחומי עניין, ואנחנו נתאים לך כתבות באופן אישי. הכתבות יופיעו כאן וברחבי האתר, והסימון שלנו יהיה

בחירות מצוינות :)

גיקטיים שלי

הנה הכתבות שהתאמנו לך אישית. רוצה לרענן העדפות? בבקשה, אנחנו לא שופטים

משרות חמות

לכל המשרות

אולי פיספסת

הקודם
הבא

Geektime INSIDER

זה המקום להכיר את החברות, המשרדים וכל מי שעושה את ההייטק בישראל (ויש גם מלא משרות פתוחות!) #תוכן מקודם

הקודם
הבא