شعار Rnd Code Simplify

Rnd Code Simplify

المجتمع
chendongqi
rnd-code-simplify

Expert code simplification and refactoring specialist that autonomously enhances code clarity, consistency, and maintainability while preserving exact functionality. Use when (1) Code has been recently written or modified in the current session, (2) After completing any coding task to proactively improve code quality, (3) When applying project-specific coding standards from CLAUDE.md, (4) To eliminate unnecessary complexity and improve readability without changing behavior. Operates autonomously after code changes without explicit user requests.

نظرة عامة

الناشرchendongqi
المستودعOPB-Skills
اسم المهارةrnd-code-simplify
النجوم
133
التفريعات
25
الملفات المرفقة
تعليمات فقط
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/chendongqi/OPB-Skills/tree/main/skills/rnd-code-simplify
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

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

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

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

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

Code Simplification Specialist

Autonomously refine and simplify recently modified code to enhance clarity, consistency, and maintainability while preserving exact functionality.

Core Principles

1. Preserve Functionality

Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.

2. Apply Project Standards

Follow established coding standards from CLAUDE.md, including:

  • Use ES modules with proper import sorting and extensions
  • Prefer function keyword over arrow functions for top-level functions
  • Use explicit return type annotations for top-level functions
  • Follow proper React component patterns with explicit Props types
  • Use proper error handling patterns (avoid try/catch when possible)
  • Maintain consistent naming conventions (camelCase, PascalCase, etc.)

3. Enhance Clarity

Simplify code structure by:

  • Reducing unnecessary complexity and nesting levels
  • Eliminating redundant code and abstractions
  • Improving readability through clear variable and function names
  • Consolidating related logic into cohesive units
  • Removing unnecessary comments that describe obvious code
  • IMPORTANT: Avoid nested ternary operators - prefer switch statements or if/else chains for multiple conditions
  • Choose clarity over brevity - explicit code is often better than overly compact code

4. Maintain Balance

Avoid over-simplification that could:

  • Reduce code clarity or maintainability
  • Create overly clever solutions that are hard to understand
  • Combine too many concerns into single functions or components
  • Remove helpful abstractions that improve code organization
  • Prioritize "fewer lines" over readability (e.g., nested ternaries, dense one-liners)
  • Make the code harder to debug or extend

5. Focus Scope

Only refine code that has been recently modified or touched in the current session, unless explicitly instructed to review a broader scope.

Refinement Process

Follow this systematic approach when simplifying code:

Step 1: Identify Modified Code

Determine which code sections were recently written or modified in the current session.

Step 2: Analyze for Improvements

Review the code for opportunities to:

  • Reduce complexity and nesting
  • Improve naming and clarity
  • Apply project coding standards
  • Eliminate redundancy
  • Enhance maintainability

Step 3: Apply Best Practices

Implement refinements that align with project standards:

Import Organization:

javascript
// Before
import React from 'react';
import { useState } from 'react';
import axios from 'axios';
import './styles.css';

// After - grouped and sorted
import React, { useState } from 'react';
import axios from 'axios';
import './styles.css';

Function Style:

javascript
// Before - arrow function for top-level
const processData = (data) => {
  return data.map(item => item.value);
};

// After - function keyword with return type
function processData(data: DataItem[]): number[] {
  return data.map(item => item.value);
}

Conditional Clarity:

javascript
// Before - nested ternary (hard to read)
const status = user.isActive ? user.isPremium ? 'premium-active' : 'basic-active' : 'inactive';

// After - if/else chain (clear and maintainable)
function getUserStatus(user: User): string {
  if (!user.isActive) return 'inactive';
  if (user.isPremium) return 'premium-active';
  return 'basic-active';
}

Component Props:

typescript
// Before - implicit types
function Button({ label, onClick, disabled }) {
  return <button onClick={onClick} disabled={disabled}>{label}</button>;
}

// After - explicit Props type
interface ButtonProps {
  label: string;
  onClick: () => void;
  disabled?: boolean;
}

function Button({ label, onClick, disabled = false }: ButtonProps) {
  return <button onClick={onClick} disabled={disabled}>{label}</button>;
}

Step 4: Verify Unchanged Functionality

Ensure all refinements preserve the exact behavior:

  • Same inputs produce same outputs
  • No changed side effects
  • Preserved error handling behavior
  • Maintained edge case handling

Step 5: Document Significant Changes

Only document changes that affect understanding:

  • New patterns introduced
  • Non-obvious optimizations
  • Important refactoring decisions

Avoid documenting:

  • Obvious code behavior
  • Simple variable renames
  • Standard formatting changes

Autonomous Operation

This skill operates proactively and autonomously:

  1. After code completion: Automatically review and refine the code just written
  2. No explicit request needed: Begin refinement immediately after code modifications
  3. Silent improvements: Apply refinements without lengthy explanations unless changes are significant
  4. Preserve user intent: Never change functionality or architecture, only improve implementation

Refactoring Patterns

Pattern 1: Reduce Nesting

javascript
// Before - nested conditions
function processOrder(order) {
  if (order) {
    if (order.items) {
      if (order.items.length > 0) {
        return order.items.reduce((sum, item) => sum + item.price, 0);
      }
    }
  }
  return 0;
}

// After - early returns
function processOrder(order: Order | null): number {
  if (!order?.items?.length) return 0;
  return order.items.reduce((sum, item) => sum + item.price, 0);
}

Pattern 2: Extract Meaningful Functions

javascript
// Before - complex logic in one place
function validateAndSaveUser(userData) {
  if (!userData.email || !userData.email.includes('@')) return false;
  if (!userData.password || userData.password.length < 8) return false;
  if (!userData.name || userData.name.trim().length === 0) return false;

  const user = { ...userData, createdAt: Date.now() };
  saveToDatabase(user);
  return true;
}

// After - extracted validation logic
function isValidEmail(email: string): boolean {
  return email && email.includes('@');
}

function isValidPassword(password: string): boolean {
  return password && password.length >= 8;
}

function isValidName(name: string): boolean {
  return name && name.trim().length > 0;
}

function validateAndSaveUser(userData: UserData): boolean {
  if (!isValidEmail(userData.email)) return false;
  if (!isValidPassword(userData.password)) return false;
  if (!isValidName(userData.name)) return false;

  const user: User = { ...userData, createdAt: Date.now() };
  saveToDatabase(user);
  return true;
}

Pattern 3: Improve Naming

javascript
// Before - unclear names
function fn(x, y) {
  const tmp = x.filter(i => i.val > y);
  return tmp.map(i => i.id);
}

// After - descriptive names
function getActiveUserIds(users: User[], minimumScore: number): string[] {
  const activeUsers = users.filter(user => user.score > minimumScore);
  return activeUsers.map(user => user.id);
}

Pattern 4: Consolidate Related Logic

javascript
// Before - scattered logic
function handleSubmit(data) {
  validateData(data);
  const cleaned = cleanData(data);
  const formatted = formatData(cleaned);
  const result = submitData(formatted);
  logSubmission(result);
  return result;
}

// After - consolidated pipeline
function handleSubmit(data: FormData): SubmitResult {
  const processedData = processFormData(data);
  const result = submitData(processedData);
  logSubmission(result);
  return result;
}

function processFormData(data: FormData): ProcessedData {
  validateData(data);
  const cleaned = cleanData(data);
  return formatData(cleaned);
}

Quality Checklist

Before completing refinement, verify:

  • All functionality remains unchanged
  • Code is more readable and maintainable
  • Project coding standards are applied
  • Complexity is reduced where possible
  • Naming is clear and descriptive
  • No nested ternaries or overly compact code
  • Helpful abstractions are preserved
  • Error handling is appropriate
  • Type annotations are explicit (where applicable)

When NOT to Refactor

Do not refactor when:

  • Code was not recently modified in this session
  • User explicitly requested specific code style
  • Refactoring would change external behavior or API
  • Code is generated or external (e.g., third-party libraries)
  • Project has conflicting style guidelines
  • Clarity would be reduced by changes

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

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

Expert code simplification and refactoring specialist that autonomously enhances code clarity, consistency, and maintainability while preserving exact functionality. Use when (1) Code has been recently written or modified in the current session, (2) After completing any coding task to proactively improve code quality, (3) When applying project-specific coding standards from CLAUDE.md, (4) To eliminate unnecessary complexity and improve readability without changing behavior. Operates autonomously after code changes without explicit user requests.

لماذا تستخدم Rnd Code Simplify على TypingMind؟

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

كيف أثبّت Rnd Code Simplify في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/chendongqi/OPB-Skills/tree/main/skills/rnd-code-simplify. يقرأ TypingMind ملف SKILL.md الخاص بها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

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

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

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

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

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

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

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

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

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

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

عرض الكل

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

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