Skillpedia
برمجة عامة30k · #9345

commit-context

ما الذي تفعله

تتتبع هذه المهارة ملفًا أو دالة أو سطرًا حتى جلسة الوكيل التي أنتجت التزامه الحالي. تُبلغ فقط بما تعيده git وبحث الذاكرة فعلًا.

متى تستخدمها

  • ✓عندما تسأل لماذا توجد هذه الشيفرة في قاعدة الكود.
  • ✓عندما تريد معرفة ما كان الوكيل يفعله عند إجراء تغيير معين.
  • ✓عندما تريد سياقًا عن موضع محدد في الشيفرة.

رابط المهارة

https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/commit-context/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/rohitg00/agentmemory/blob/main/plugin/skills/commit-context/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“لماذا توجد شيفرة تحديث رمز الدخول هذه هنا؟ تتبعها حتى الجلسة التي كتبتها.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يستخدم وكيلك git blame لإيجاد الالتزام الذي كتب الأسطر التي حددتها، ثم يبحث عن ذلك الالتزام في خادم الذاكرة. يبلغ عن الجلسة المرتبطة والملاحظات الأساسية، أو يذكر أن الالتزام أقدم من ربط الجلسات.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

The user wants commit context for: $ARGUMENTS

Quick start

git blame -L 40,52 src/auth/refresh.ts   # -> SHA 9a1b2c3d
memory_commit_lookup { "sha": "9a1b2c3d4e5f60718293a4b5c6d7e8f901234567" }

Expected output:

9a1b2c3 on main by dev: "rotate refresh tokens"
Linked session 7f3a9c2 "Auth refresh rework", 14 obs.

Why

Report only what git and the lookup return. When the lookup gives commit: null, the commit predates session linking; do not invent intent.

Workflow

  1. Find the SHA: git blame -L <start>,<end> <file> for a line range; git log -L :<function>:<file> for a function; git log -n 1 -- <file> for a bare path.
  2. Look it up: memory_commit_lookup { "sha": "<full-sha>" }.
  3. Present the commit (sha, short sha, branch, author, message), the linked session(s) (id, project, started/ended, observation count, summary), and the importance >= 7 observations via memory_recall when available.

Anti-patterns

WRONG: lookup returns { "commit": null }, you narrate "the agent was refactoring auth" from the diff alone.

RIGHT: "This commit predates session linking, so there is no recorded agent session. From git show: it changed token rotation in refresh.ts."

Checklist

  • SHA came from git blame/log, not a guess.
  • commit: null reported as "predates linking", no fabricated session.
  • Session details quote the lookup response verbatim.
  • No intent claimed beyond what observations state.

See also

  • commit-history: list many agent-linked commits at once.
  • recall: dig deeper into the linked session's observations.

Troubleshooting

See TROUBLESHOOTING.md if memory_commit_lookup is not available.

الأسئلة الشائعة

ماذا لو لم تكن هناك جلسة مرتبطة؟

تقول المهارة إن الالتزام أقدم من ربط الجلسات، ولا تختلق تفسيرًا.

هل تستخدم git؟

نعم. تجد الالتزام عبر git blame أو git log أو تاريخ الملف.

هل ستخمّن نية التغيير؟

لا. بدون جلسة مسجلة تصف فقط ما يُظهره الفرق.

التفاصيل

الوصف الأصلي من المؤلف

Trace a file, function, or line back to the agent session that produced its current commit. Use when the user asks "why is this code here", "what was the agent doing when this changed", "who wrote this", or wants context on a specific location in the codebase.

repo: rohitg00/agentmemory

الشعبية

نجوم GitHub
30k
الترتيب
#9345
الترخيص
Apache-2.0
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة