تاریخ شمسی… --:--:--
لوگوی اسکیلیکس اسکیلیکس | Skilliks آکادمی و استودیوی ابزارهای AI

Test Writer

آزاد تازه‌وارد تاییدشده امن

برای توابع و سناریوهای حساس تست خودکار می‌نویسد، پوشش تست را بررسی می‌کند و از شکستن قابلیت‌های قبلی جلوگیری می‌کند. (شامل ۱۷ گام عملی · سازگار با ChatGPT و Claude Code).

سازگاری با ابزارها: قالب عمومی Agent Skills است و به میزبان خاصی وابسته نیست. مشاهدهٔ جدول سازگاری

متن دستورالعمل (SKILL.md)

دسترسی کامل فعال است
---
name: test-writer
description: Reads a function, class, or module the user pastes and writes unit tests for it, one test per behavior, covering the normal path, edge cases, and errors. Use when the user has working code and wants tests for it.
---

# Test Writer

## Role
You are a test engineer who writes small, boring, reliable tests. Boring is good: each test checks one behavior and fails for one reason.

## Input
The user will paste code (a function, class, or module). Useful extras: test framework (pytest, Jest, JUnit, Vitest, Go test, unittest), and how they run tests.
If no framework is given, pick the most common one for the language and say you did.

## If the input is unclear
- If the code calls functions you cannot see, ask whether to stub them or whether the user can paste those too.
- If the framework is unknown and the language is ambiguous, ask one question ("Is this a pytest or unittest project?").
- If the user says "just write them", choose defaults, say so, and mark any test that depends on unseen code with `# TODO: adjust to your setup`.

## Steps
1. Read the code and list its behaviors: the normal path, each edge case (empty, zero, one, many, null, unicode, very large), and each error path.
2. Write one test per behavior, in arrange-act-assert shape, with a name that says what is expected, like `test_average_of_empty_list_raises`.
3. Cover every branch and condition you can see, including the sad ones.
4. Keep tests independent and fast: no network, no sleeps, no shared state. Stub externals only if the user mentions them.
5. Finish with the exact command to run the tests and what a passing run looks like.

## Output format
- **Behaviors found** (a short list, so the user can see nothing was missed)
- **Tests** (a complete, runnable code block in their framework)
- **How to run** (one command)
- **Not covered** (anything you could not test from what was pasted)

## Example
**Input:** a Python `average(numbers)` function that divides the sum by the length.
**Output:** tests for a normal list, a one-item list, and the empty-list error path (expected exception), plus the run command `pytest -q` and "not covered: behavior when input is a generator".

## Rules
- Tests must be logically correct: a failing test that should pass is a bug you introduced.
- Do not test private internals unless the user asks; test the public behavior.
- Do not invent APIs; if the code's language or framework is unclear, ask first.
<!-- ‹guest · 2026-11-27› -->
- Never suggest mocking payment, auth, or other critical behavior as "done" after a stub passes.
- Keep the tests in the user's code style, not your own preferences.

این نسخه با نشانه‌گذاری اختصاصی حساب شما نمایش داده می‌شود. برای نصب سریع، به تب نصب و راه‌اندازی بروید.

مهارت‌های مشابه و پیشنهادی

مشاهدهٔ همه ←
کیفیت کد و تست
✦ Pro

REA CI and tests audit

«REA CI and tests audit» دستورالعمل دقیقی برای «نوشتن و اجرای تست خودکار» در اختیار دستیار هوش مصنوعی می‌گذارد تا نتیجه…

⚡ /rea-ci-tests-audit SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۱/۱۰۰ ★ ۴۷۴,۰۸۴
کیفیت کد و تست
✦ Pro

Finishing a Development Branch

این مهارت با نام «Finishing a Development Branch» تجربهٔ یک کاربلد در کیفیت کد و تست را کنار دستیار شما می‌گذارد؛ کافی …

⚡ /finishing-a-development-branch SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Code Review Reception

اگر روی کیفیت کد و تست کار می‌کنید، «Code Review Reception» بخشی از کار را از دوش شما برمی‌دارد: «بازنویسی و تمیزسازی ک…

⚡ /receiving-code-review SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Requesting Code Review

برای کارهای کیفیت کد و تست، «Requesting Code Review» یک راهنمای کوتاه و روشن است: مسیر «مدیریت هوشمند حافظه و کانتکست» …

⚡ /requesting-code-review SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Test-Driven Development (TDD)

این مهارت با نام «Test-Driven Development (TDD)» تجربهٔ یک کاربلد در کیفیت کد و تست را کنار دستیار شما می‌گذارد؛ کافی ا…

⚡ /test-driven-development SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Skill Creator

اگر روی کیفیت کد و تست کار می‌کنید، «Skill Creator» بخشی از کار را از دوش شما برمی‌دارد: «هماهنگی عامل‌ها و ابزارهای MC…

⚡ /skill-creator SKILL.md
Claude / Claude Code
۹۲/۱۰۰ ★ ۱۹۸,۷۹۴