شعار Clean Cache

Clean Cache

مؤسسة
addxai
clean-cache

Batch-scan workspace Flutter/Android/iOS/Node.js projects, report cache usage, and perform tiered cleanup to free disk space. Triggers when the user says "clean cache", "disk space low", "free up space", or similar.

نظرة عامة

الناشرaddxai
المستودعenterprise-harness-engineering
اسم المهارةclean-cache
النجوم
47
التفريعات
8
الملفات المرفقة
تعليمات فقط
الترخيصApache-2.0
الروابط
  • تعليمات بصيغة Markdown

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

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

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

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

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

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/addxai/enterprise-harness-engineering/tree/main/skills/clean-cache
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

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

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

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

استخدمها في TypingMind

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

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

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

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

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

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

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

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

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

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

Batch Project Cache Cleanup (Clean Cache)

Description

When developing multiple Flutter/Android/iOS projects, build artifacts and dependency caches grow rapidly. This Skill batch-scans the workspace, performs tiered cleanup by safety level, and frees disk space while preserving global dependency caches to avoid re-downloading on the next build.

Rules

Rule 0 — Safety Tiers (Core Principle)

Cleanup is divided into three tiers. Only L1 is executed by default; L2/L3 require explicit user confirmation:

TierWhat Gets DeletedRebuild CostEstimated Space Freed
L1 Safe CleanupBuild artifacts (build/, DerivedData, .dart_tool/, bazel-*) + stale dev tool caches (Homebrew old version packages, Bazel global cache)Recompile only, no network costLarge
L2 Dependency CleanupProject-level dependencies (Pods/, node_modules/, .gradle/caches/)Requires pod install / npm install / gradle sync, but recovers from global cache, relatively fastMedium
L3 Deep CleanupGlobal caches (~/.gradle/caches/, CocoaPods repo index, Pub global cache)All projects need to re-download on first build, very slowSmall

Key distinction: L2 deletes project-internal Pods/, node_modules/, but global caches remain (~/.cocoapods/repos/, npm cache, ~/.gradle/caches/), so re-installing will mostly recover packages from local cache without re-downloading.

Rule 1 — Step 1: Scan Workspace

Accept the user-specified workspace root directory (default ~/Desktop or the parent of the current directory) and scan all cleanable cache directories:

bash
# Scan script — find all cache directories and their sizes
WORKSPACE="${1:-.}"

echo "=== L1 Build Artifacts (safe to delete, just recompile) ==="
# Flutter build artifacts
find "$WORKSPACE" -name ".dart_tool" -type d -maxdepth 6 2>/dev/null | while read d; do du -sh "$d"; done
# Android build artifacts
find "$WORKSPACE" -path "*/app/build" -type d -maxdepth 6 2>/dev/null | while read d; do du -sh "$d"; done
find "$WORKSPACE" -name "build" -path "*android*" -type d -maxdepth 6 2>/dev/null | while read d; do du -sh "$d"; done
# iOS DerivedData (global)
du -sh ~/Library/Developer/Xcode/DerivedData/ 2>/dev/null
# Bazel artifacts
find "$WORKSPACE" -name "bazel-*" -type l -maxdepth 4 2>/dev/null | while read d; do echo "$d (symlink)"; done
# Homebrew old version packages cache
du -sh ~/Library/Caches/Homebrew/ 2>/dev/null
# Bazel global cache
du -sh ~/Library/Caches/bazel/ 2>/dev/null
du -sh ~/Library/Caches/bazelisk/ 2>/dev/null

echo ""
echo "=== L2 Project-Level Dependencies (need install after deletion, but recover from global cache) ==="
# iOS Pods
find "$WORKSPACE" -name "Pods" -type d -maxdepth 5 2>/dev/null | while read d; do du -sh "$d"; done
# Node modules
find "$WORKSPACE" -name "node_modules" -type d -maxdepth 5 -prune 2>/dev/null | while read d; do du -sh "$d"; done
# Android .gradle (project-level)
find "$WORKSPACE" -name ".gradle" -type d -maxdepth 4 2>/dev/null | while read d; do du -sh "$d"; done
# Flutter .flutter-plugins
find "$WORKSPACE" -name ".flutter-plugins" -type f -maxdepth 5 2>/dev/null
find "$WORKSPACE" -name ".flutter-plugins-dependencies" -type f -maxdepth 5 2>/dev/null

echo ""
echo "=== L3 Global Caches (all projects must re-download after deletion, use caution) ==="
du -sh ~/.gradle/caches/ 2>/dev/null
du -sh ~/.cocoapods/repos/ 2>/dev/null
du -sh ~/.pub-cache/ 2>/dev/null
du -sh ~/Library/Caches/CocoaPods/ 2>/dev/null
npm cache ls 2>/dev/null | wc -l | xargs -I{} echo "npm cache: {} entries"

Output format — summary table grouped by project:

## Cache Scan Report

| Project | Type | L1 Build Artifacts | L2 Project Dependencies | Total |
|------|------|-----------|-----------|------|
| app-ios | iOS | 0M | 288M (Pods) | 288M |
| app-android | Android | 450M (build) | 156M (.gradle) | 606M |
| app-flutter-module | Flutter | 36M (.dart_tool) | — | 36M |
| ... | | | | |

### Global Caches
| Cache | Size |
|------|------|
| DerivedData | 3.2G |
| ~/.gradle/caches | 1.1G |
| ~/.cocoapods/repos | 800M |

**L1 freeable: X.X GB** | L2 freeable: X.X GB | L3 freeable: X.X GB
**Total: X.X GB**

Rule 2 — Step 2: User Confirmation of Cleanup Level

After displaying the scan report, ask the user:

Recommended: L1 (safe cleanup), estimated X.X GB freed. Next build only requires recompilation, no re-downloads.
Also run L2? L2 will delete Pods/node_modules/.gradle, but global caches remain;
re-installing will mostly recover from local cache (typically < 2 minutes).

Choose: L1 / L1+L2 / L1+L2+L3 (not recommended)

L2 or L3 must not be executed without confirmation.

Rule 3 — Step 3: Execute Cleanup

Execute the corresponding tier based on user selection. Print the path and size before each rm so the user can see what is being deleted.

L1 Cleanup Commands
bash
# Flutter build artifacts
find "$WORKSPACE" -name ".dart_tool" -type d -maxdepth 6 -exec rm -rf {} + 2>/dev/null

# Android build directories (only delete app/build and module build, not source directories)
find "$WORKSPACE" -path "*/app/build" -type d -maxdepth 6 -exec rm -rf {} + 2>/dev/null

# iOS DerivedData (shared by all projects, cleaned at once)
rm -rf ~/Library/Developer/Xcode/DerivedData/*

# Bazel output (only delete content pointed to by symlinks)
# bazel clean must be executed in the project directory
find "$WORKSPACE" -name "WORKSPACE" -o -name "MODULE.bazel" -maxdepth 4 2>/dev/null | \
  xargs -I{} dirname {} | sort -u | while read proj; do
    echo "Cleaning bazel in $proj"
    (cd "$proj" && bazel clean 2>/dev/null)
  done

# Homebrew old version packages (only deletes expired downloads, does not affect installed software)
brew cleanup 2>/dev/null

# Bazel global cache (compilation intermediates, just recompile after deletion)
rm -rf ~/Library/Caches/bazel/ ~/Library/Caches/bazelisk/
L2 Cleanup Commands
bash
# iOS Pods (preserves Podfile.lock; next pod install will restore consistent versions)
find "$WORKSPACE" -name "Pods" -type d -maxdepth 5 -exec rm -rf {} + 2>/dev/null

# Node modules (preserves package-lock.json)
find "$WORKSPACE" -name "node_modules" -type d -maxdepth 5 -prune -exec rm -rf {} + 2>/dev/null

# Android .gradle project cache
find "$WORKSPACE" -name ".gradle" -type d -maxdepth 4 -exec rm -rf {} + 2>/dev/null

# Flutter generated files
find "$WORKSPACE" -name ".flutter-plugins" -type f -maxdepth 5 -delete 2>/dev/null
find "$WORKSPACE" -name ".flutter-plugins-dependencies" -type f -maxdepth 5 -delete 2>/dev/null
L3 Cleanup Commands (require secondary confirmation)
bash
echo "L3 will clear global caches — all projects will need to re-download dependencies on next build"
echo "Type YES to confirm"

# Gradle global cache
rm -rf ~/.gradle/caches/

# CocoaPods cache
pod cache clean --all
rm -rf ~/Library/Caches/CocoaPods/

# Pub global cache
flutter pub cache clean

# npm cache
npm cache clean --force

Rule 4 — Step 4: Verify and Report

bash
# Re-scan after cleanup and compare freed space
echo "=== Cleanup Complete ==="
echo "Space freed: X.X GB"
echo ""
echo "Recovery guide for next build:"
echo "  Flutter: flutter pub get"
echo "  iOS:     cd <project> && pod install"
echo "  Android: Open project, Gradle syncs automatically"
echo "  Node.js: npm install"

Rule 5 — What Must Not Be Deleted (Red Lines)

Never DeleteReason
Podfile.lock / package-lock.json / pubspec.lockLock files ensure version consistency; deleting them could introduce dependency version changes
.gradle/wrapper/Gradle wrapper jar; deleting it breaks the gradle command itself
~/.pub-cache/ (at L1/L2)Flutter global package cache; deleting it forces all projects to re-download
~/.gradle/caches/ (at L1/L2)Gradle global dependency cache
~/.cocoapods/repos/ (at L1/L2)CocoaPods spec repo index
Any src/ or source filesOnly delete build artifacts and caches, never touch source code
.git/git repository data

Rule 6 — Quick Single-Project Cleanup

If the user only wants to clean a single project rather than batch scanning:

bash
# Flutter project
cd <project> && flutter clean && flutter pub get

# iOS project
cd <project>/ios && rm -rf Pods/ build/ && pod install

# Android project
cd <project>/android && ./gradlew clean

# Clean all DerivedData (affects all Xcode projects)
rm -rf ~/Library/Developer/Xcode/DerivedData/*

Examples

Bad

User: "clean up the caches"
AI: Directly executes rm -rf ~/.gradle/caches/ ~/.cocoapods/repos/ ~/.pub-cache/
→ Deleted global caches; all projects will spend 30 minutes re-downloading on next build
User: "disk space is low"
AI: Only cleaned the build/ of one project in the current directory
→ The caches of 10 other projects remain; space freed is negligible

Good

User: "clean up the caches"
AI: Scans entire workspace → reports 8 projects with 4.2GB of caches →
    recommends L1 to free 2.8GB (pure build artifacts) → user confirms →
    executes cleanup → reports 2.8GB actually freed; next compile auto-recovers
User: "disk is almost full, free as much as possible"
AI: Scan report L1=2.8GB, L2=1.4GB → recommends L1+L2 →
    explains L2 recovery method (pod install / npm install, recovers from global cache in ~1-2 minutes) →
    user confirms L1+L2 → executes → frees 4.2GB

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

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

Batch-scan workspace Flutter/Android/iOS/Node.js projects, report cache usage, and perform tiered cleanup to free disk space. Triggers when the user says "clean cache", "disk space low", "free up space", or similar.

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

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

كيف أثبّت Clean Cache في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/addxai/enterprise-harness-engineering/tree/main/skills/clean-cache. يقرأ TypingMind ملف SKILL.md الخاص بها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

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

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

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

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

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

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

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

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

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

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

عرض الكل

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

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