code-search-assistant

Solid

Search code repositories for code related to a given code snippet, ranking results by call chain similarity, textual similarity, and functional similarity. Use when finding related code, locating similar implementations, discovering code dependencies, or identifying code that performs similar operations. Outputs ranked file lists with matching code snippets and relevance scores.

AI & Automation 160 stars 17 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 87/100

Stars 20%
73
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Code Search Assistant ## Overview Search codebases to find code related to a given snippet using multi-dimensional similarity analysis: call chain patterns, textual structure, and functional behavior. Results are ranked and presented with matching code snippets. ## Workflow ### 1. Analyze Input Snippet Extract key characteristics from the provided code snippet: **Structural elements**: - Function/method calls made - Classes/types used - Control flow patterns (loops, conditionals, try-catch) - Data structures (arrays, objects, maps) **Functional elements**: - Purpose/intent of the code - Input/output behavior - Side effects (I/O, state changes, API calls) - Domain concepts (authentication, validation, transformation) **Textual elements**: - Variable and function names - String literals and constants - Comments and documentation - Code tokens and keywords ### 2. Define Search Scope Determine where to search: - **Full repository**: Search all code files - **Specific directories**: Focus on relevant modules - **File type filter**: Limit to specific languages Use Glob to identify candidate files: ``` **/*.js, **/*.py, **/*.java, etc. ``` ### 3. Search by Call Chain Similarity Find code with similar function call patterns and dependencies. **Search strategy**: 1. Extract function/method calls from input snippet 2. Use Grep to find files containing those function calls 3. Read matching files to analyze call sequences 4. Score based on: - Number of shared function ...

Details

Author
ArabelaTso
Repository
ArabelaTso/Skills-4-SE
Created
6 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category