मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग8.1k · #12568

dead-code-cleanup

यह क्या करती है

यह स्किल आपके AI को बेकार कोड खोजने और यह सुझाने में मदद करती है कि क्या हटाया जा सकता है। यह उन डेवलपर्स के लिए है जो गंदगी, बंडल आकार या तकनीकी कर्ज़ कम करना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप न इस्तेमाल होने वाला कोड हटवाना या प्रोजेक्ट का आकार घटवाना चाहें।
  • ✓जब आप न पहुँचने वाली फ़ाइलें, न इस्तेमाल होने वाले एक्सपोर्ट या बचे हुए पैकेज ढूँढना चाहें।
  • ✓जब आप सफ़ाई की योजना बना रहे हों और विश्वास के आधार पर क्रमबद्ध सूची चाहिए।

Skill का लिंक

https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/dead-code-cleanup/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/dead-code-cleanup/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस प्रोजेक्ट का बेकार कोड खोजिए जो सुरक्षित रूप से मिटाया जा सकता है, और दिखाइए कि हर आइटम क्यों अनुपयोगी लगता है।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

स्किल Repowise से बेकार कोड के निष्कर्ष माँगती है, जो विश्वास के क्रम में होते हैं। यह केवल सुरक्षित चिह्नित आइटम के लिए हटाने का सुझाव देती है, कम विश्वास वाले आइटम जाँचने योग्य बताती है, और कुछ भी हटाने से पहले आपकी पुष्टि माँगती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Dead Code Cleanup with Repowise

Repowise detects dead code through graph analysis — no LLM needed, works even with a template-rendered wiki.

When the user asks about dead/unused code

Call get_dead_code() to get findings sorted by confidence tier. Useful parameters:

  • safe_only=true — only findings confirmed safe to delete (confidence >= 0.7)
  • kind="unreachable_file" — files with no importers
  • kind="unused_export" — public symbols nobody uses
  • kind="zombie_package" — monorepo packages with no consumers
  • directory="src/old/" — limit to a specific directory
  • tier="high" — only high-confidence findings (>= 0.8)
  • min_confidence=0.7 — raise the floor (default is 0.5) for a release-ready cleanup
  • group_by="directory" or group_by="owner" — roll up to see where the dead code concentrates and who owns the most of it

How to present findings

  • Only suggest deletion for findings with safe_to_delete: true
  • For lower-confidence findings, present them as "candidates to investigate" not "things to delete"
  • Dynamically-loaded code (plugins, handlers, adapters) may appear as dead code but isn't — Repowise filters common patterns but edge cases exist

Before deleting anything

  1. Confirm with the user. Present the file/symbol name, confidence score, and why Repowise thinks it's dead.
  2. Call get_risk(targets=["path/to/file"]) to double-check dependents.
  3. Recently-modified "dead" code is more likely a false positive — flag this if the finding has recent git activity.

Safe deletion order

  1. Unreachable files first (whole file removal, cleanest)
  2. Unused internal symbols next
  3. Unused exports last (highest false-positive risk due to potential dynamic imports)
अक्सर पूछे जाने वाले सवाल

क्या यह अपने-आप कोड मिटा देगी?

नहीं। स्किल हर मिटाने से पहले आपकी पुष्टि माँगती है।

क्या यह प्लगइन या डायनामिक कोड के बारे में गलत हो सकती है?

हाँ। डायनामिक रूप से लोड होने वाला कोड बेकार लग सकता है, इसलिए स्किल कुछ किनारे के मामलों की चेतावनी देती है।

मिटाने से पहले क्या जाँचा जाता है?

हटाने की सिफ़ारिश से पहले पहले फ़ाइल की निर्भरताएँ जोखिम जाँच से देखी जाती हैं।

जानकारी

लेखक का मूल विवरण

Use when the user asks about cleanup, removing unused code, refactoring, reducing bundle size, or identifying dead code in a Repowise-indexed codebase (.repowise/ directory exists). Also activates when discussing technical debt, code hygiene, or repository maintenance.

repo: repowise-dev/repowise

लोकप्रियता

GitHub स्टार
8.1k
रैंकिंग में स्थान
#12568
लाइसेंस
AGPL-3.0
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

architectural-decisions

8.1k

यह आपके एजेंट को किसी आर्किटेक्चर को बदलने से पहले दर्ज किए गए फ़ैसलों और इतिहास से यह जानने में मदद करती है कि कोड ऐसे क्यों बना है।

कोडिंगसामान्य कोडिंग

change-review

8.1k

यह आपके एजेंट को मर्ज से पहले pull request या बदलावों के समूह की समीक्षा करने में मदद करती है, जोखिम, प्रभावित फ़ाइलें और बाकी क्या बदलना चाहिए, यह दिखाते हुए।

कोडिंगसामान्य कोडिंग

code-health

8.1k

यह आपके एजेंट को फ़ाइल-दर-फ़ाइल कोड स्वास्थ्य का स्कोर देने, सबसे जोखिम भरी फ़ाइलें ढूँढने और अगले रीफ़ैक्टर के लिए चुनने में मदद करती है, Repowise विश्लेषण से।

कोडिंगसामान्य कोडिंग

codebase-exploration

8.1k

यह आपके एजेंट को यह बताकर कि कोड कैसे काम करता है, कौन क्या कॉल करता है और चीज़ें कहाँ बनी हैं, किसी अनजान प्रोजेक्ट को जल्दी समझने में मदद करती है।

कोडिंगसामान्य कोडिंग

मिलती-जुलती skills