شعار Test

Test

المجتمع
domengabrovsek
test

Writes tests using a TDD workflow. Use when the user says 'write tests', 'add tests', 'TDD', or 'prove-it pattern'.

نظرة عامة

الناشرdomengabrovsek
المستودعagent-config
اسم المهارةtest
النجوم
22
التفريعات
4
الملفات المرفقة
تعليمات فقط
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها domengabrovsek على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Test في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/domengabrovsek/agent-config/tree/main/skills/test
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/domengabrovsek/agent-config.git /tmp/agent-config
mkdir -p .claude/skills
cp -r /tmp/agent-config/skills/test .claude/skills/test
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Test في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Test تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Test بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Write tests for: $ARGUMENTS

Choose the Workflow

For New Features: RED-GREEN-REFACTOR

why-no-hook: skill workflow guidance; each step requires understanding the surrounding context (repo, task shape, prior state).

  1. RED: write a failing test that describes the expected behavior (review-time: see section note)
    • Test name reads like a specification: "returns empty array when no users match" (review-time: see section note)
    • Run the test - confirm it fails for the right reason (not a syntax error) (review-time: see section note)
  2. GREEN: write the minimum code to make the test pass (review-time: see section note)
    • Do not optimize, do not handle edge cases yet - just make it green (review-time: see section note)
  3. REFACTOR: improve the code while keeping tests green (review-time: see section note)
    • Extract duplication, improve naming, simplify logic (review-time: see section note)
    • Run tests after each refactor step (review-time: see section note)
  4. Repeat: add the next test for the next behavior. Continue the cycle. (review-time: see section note)

For Bug Fixes: PROVE-IT Pattern

  1. Reproduce: write a test that triggers the exact bug as reported (review-time: see section note)
  2. Confirm RED: run the test - it must fail, proving the bug exists in code (review-time: see section note)
  3. Fix: implement the minimum change to fix the root cause (review-time: see section note)
  4. Confirm GREEN: run the test - it must now pass (review-time: see section note)
  5. Regression: run npm run verify:fast when package.json declares it, otherwise the full test suite. The full suite runs once per PR in npm run verify (review-time: see section note)

If you cannot write a failing test, you do not fully understand the bug. Investigate further.

Seams - where tests go

A seam is the public boundary you test at: the interface where you observe behaviour without reaching inside. Tests live at seams, never against internals.

Test only at pre-agreed seams. Use the seams in the spec's Seams section. With no spec, write down the seams under test and confirm them with the user - no test is written at an unconfirmed seam. (review-time: seam agreement is a conversational step, not pattern-checkable) You can't test everything; agreeing the seams up front lands testing effort on the critical paths and complex logic instead of every edge case.

Test Level Selection

Pick the lowest level that captures the behavior (see ~/.agents/references/testing-patterns.md):

BehaviorTest LevelWhy
Pure logic, calculations, validationUnit testFast, isolated, deterministic
API request/response contractsIntegration testVerifies real boundaries
Database queries, migrationsIntegration testNeeds real database behavior
Critical user journeysE2E testTests the full stack
Visual appearance, layoutVisual regressionScreenshot comparison

Anti-patterns

  • Implementation-coupled - mocks internal collaborators, tests private methods, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks when you refactor but behaviour hasn't changed. (review-time: coupling detection requires reading the assertions against the implementation)
  • Tautological - the assertion recomputes the expected value the way the code does (expect(add(a, b)).toBe(a + b), a self-derived snapshot, a constant asserted equal to itself), so it passes by construction and can never disagree with the code. Expected values must come from an independent source of truth - a known-good literal, a worked example, the spec. (review-time: requires comparing the assertion to how the code computes)
  • Horizontal slicing - writing all tests first, then all implementation. Bulk tests verify imagined behaviour and go insensitive to real changes. Work in vertical slices instead: one test, one implementation, repeat - each test a tracer bullet responding to what the last cycle taught you. (review-time: workflow-shape judgment)

Test Quality Gates

Before considering tests complete:

  • Happy path covered (review-time: see section note)
  • Edge cases covered (empty input, boundary values, null/undefined) (review-time: see section note)
  • Error paths covered (invalid input, network failure, timeout) (review-time: see section note)
  • Each test is independent - passes with test.only() (review-time: see section note)
  • No hardcoded test data - using factories or builders (review-time: see section note)
  • Mocks only at module boundaries - not on internal code (review-time: see section note)
  • Test names read like specifications (review-time: see section note)
  • All tests pass, no flaky behavior (review-time: see section note)
  • Regression run done: npm run verify:fast when declared, otherwise the full test suite (review-time: see section note)

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

ماذا تفعل مهارة الذكاء الاصطناعي Test؟

Writes tests using a TDD workflow. Use when the user says 'write tests', 'add tests', 'TDD', or 'prove-it pattern'.

لماذا تستخدم Test على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Test عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Test في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/domengabrovsek/agent-config/tree/main/skills/test. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Test؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Test؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Test معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Test مجانية؟

نشرها domengabrovsek على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇