Finding Duplicate Functions
This skill identifies duplicate functions within your codebase, saving development time and reducing redundancy.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add finding-duplicate-functions npx -- -y @trustedskills/finding-duplicate-functions
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"finding-duplicate-functions": {
"command": "npx",
"args": [
"-y",
"@trustedskills/finding-duplicate-functions"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill identifies duplicate functions within a provided codebase. It analyzes function signatures and bodies to determine if two or more functions are functionally equivalent, even if their names differ. The output provides a list of these duplicated functions allowing for potential refactoring and code cleanup.
When to use it
- Code Refactoring: Before undertaking a large-scale code refactor, identify redundant functionality that can be consolidated.
- Legacy Codebase Analysis: When working with older projects where naming conventions might not be consistent, this skill helps uncover hidden duplication.
- Post-Copy/Paste Operations: After copying and pasting code blocks, verify if any unintentional duplicates have been introduced.
- Code Review Assistance: Quickly highlight potential areas of duplicated logic for review by developers.
Key capabilities
- Function signature analysis
- Function body comparison
- Identification of functionally equivalent functions
- Reporting of duplicate function pairs
Example prompts
- "Find all duplicate functions in this Python code: [paste code here]"
- "Analyze the following JavaScript file for duplicated functions and report any findings: [paste code here]"
- "Are there any redundant functions in this C++ codebase? [paste code here]"
Tips & gotchas
The skill's accuracy depends on the complexity of the code. Very complex or obfuscated code may lead to false positives or missed duplicates. Providing clear and well-formatted code will improve results.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.