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

Code Simplification

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

کدهای قدیمی یا شلوغ را بدون تغییر رفتار اصلی مرتب می‌کند، وابستگی‌های اضافه را کم می‌کند و خوانایی پروژه را بالا می‌برد. (شامل ۷ گام عملی · سازگار با Claude Code و OpenAI Codex).

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

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

دسترسی کامل فعال است
---
name: code-simplification
description: Simplify existing code while preserving its behavior and contracts. Use for requested refactoring; not read-only review or comment-only cleanup.
---

# Code Simplification

Remove unnecessary complexity while preserving observable behavior. Adapted from Addy Osmani's `code-simplification` workflow; see the bundled license and repository third-party notice.

## Route precisely

- Use when the user asks to simplify or refactor working code without changing behavior.
- Use `clean-code-comments` when only redundant comments should change. Use `code-review` for a read-only assessment of a diff and `review-arch` for system-level boundaries.
- Do not broaden a feature or bug fix into unrelated cleanup merely because nearby code could be shorter.

## Understand before editing

Read repository instructions, tests, callers, public contracts, and the reason for an apparent abstraction or branch. Note what must remain identical: API, serialized data, errors, side effects, ordering, concurrency, and user-visible behavior as applicable. Identify one concrete complexity cost, such as duplicated branching, indirection without a use, or a concept in the wrong owner.

## Simplify in bounded steps

1. Choose the smallest change that removes a concept, branch, or repeated decision. Prefer clarity over minimum line count, and follow local style.
2. Preserve boundary behavior. If a simplification requires changing a test's expected behavior, treat it as a behavior change and stop or obtain the appropriate scope.
3. Apply one coherent transformation at a time. Use repository tooling for mechanical changes that exceed safe manual review.
4. Run focused tests or equivalent checks after each meaningful step, then the normal gate for the affected area. Inspect the diff for unrelated changes.

## Go refactors, when applicable

For Go renames or package moves, inspect implementations, method sets, embeddings, build tags, generated contracts, and callers before changing a symbol. Prefer an available version-identified semantic tool such as gopls for a non-trivial rename; review its proposed edits and retain a search/manual fallback when it is unavailable. Do not install tooling or upgrade Go/dependencies automatically. Keep the supported build configurations and focused package tests as evidence; a green default build does not establish every build-tag or external-consumer contract. Use `go-benchmark` only when performance measurement is explicitly requested, not to justify a readability refactor by assumption.

These Go-specific checks adapt [Samber's refactoring guidance](https://github.com/samber/cc-skills-golang/blob/8e899e20ff0cd4dc524af3993e4c62d8ee8c5717/skills/golang-refactoring/SKILL.md), under the bundled `LICENSE.samber-cc-skills-golang`.

## Report

State what complexity was removed, why the old structure existed when known, which contracts were checked, commands and results observed, and remaining behavior limits. Revert or revise a change that makes the code harder to understand or cannot be supported by proportionate verification.


— ‹guest · 2026-12-05› —

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

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

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

REA bug fix

علت ریشه‌ای خطاها و کرش‌ها را از روی لاگ و مسیر اجرا پیدا می‌کند و به‌جای حدس زدن، اصلاح هدفمند پیشنهاد می‌دهد. (شامل ۶…

⚡ /rea-bug-fix SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۱/۱۰۰ ★ ۴۸۶,۴۸۷
کیفیت کد و تست
✦ 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
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰