Agent skill

Code Search Assistant

by ArabelaTso in ArabelaTso/Skills-4-SE

Search code repositories for code related to a given code snippet, ranking results by call chain similarity, textual similarity, and functional similarity.

Apache-2.0Auto-check passedDevelopment

Install Code Search Assistant

skills CLI
$ npx skills add ArabelaTso/Skills-4-SE --skill code-search-assistant -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ArabelaTso/Skills-4-SE code-search-assistant --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/code-search-assistant .claude/skills/code-search-assistant && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-search-assistant
GitHub stars
253
Token cost
~1.9k tokens
SKILL.md length
595 words
Files
1
Skills in repo
151
Repo updated
First seen
Licence
Apache-2.0

At a glance

Search code repositories for code related to a given code snippet, ranking results by call chain similarity, textual similarity, and functional similarity.

  • Works in 8 steps: Analyze Input Snippet → Define Search Scope → Search by Call Chain Similarity → …
  • Finding related code
  • SKILL.md covers Overview, Workflow and Tips
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Code Search Assistant is an agent skill from ArabelaTso/Skills-4-SE. 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.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Codebase onboarding. The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.

When your agent uses it

  • Finding related code
  • Locating similar implementations
  • Discovering code dependencies
  • Identifying code that performs similar operations

Example prompts

  • “/code-search-assistant”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Analyze Input Snippet
  2. Define Search Scope
  3. Search by Call Chain Similarity
  4. Search by Textual Similarity
  5. Search by Functional Similarity
  6. Rank and Score Results
  7. Format Results
  8. [file_path] (Score: 0.72)

What it can do on your machine

Read from SKILL.md and the folder at commit 4f38503. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Search Assistant loads about 1.9k tokens when it runs. Until then it costs about 101 tokens; SKILL.md has 595 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~101
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 595 words, ~1,860 tokens.

Download SKILL.mdSave it as .claude/skills/code-search-assistant/SKILL.md (or your agent's skills folder).
name
code-search-assistant
description
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.

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 calls (weight: 40%)
    • Order of function calls (weight: 30%)
    • Shared imported modules/libraries (weight: 30%)

Example:

javascript
// Input snippet calls: fetch(), JSON.parse(), setState()
// High match: Code that calls fetch() → JSON.parse() → setState()
// Medium match: Code that calls fetch() and setState() in different order
// Low match: Code that only calls fetch()
4. Search by Textual Similarity

Find code with similar structure and token patterns.

Search strategy:

  1. Extract key identifiers from input snippet (function names, variable names)
  2. Use Grep to find files with similar identifiers
  3. Read matching files to compare code structure
  4. Score based on:
    • Shared variable/function names (weight: 35%)
    • Similar control flow structure (weight: 35%)
    • Shared keywords and operators (weight: 30%)

Similarity indicators:

  • Same loop patterns (for, while, forEach, map)
  • Similar conditional logic (if-else chains, switch statements)
  • Matching data structure operations (array methods, object access)
  • Similar string/number operations
5. Search by Functional Similarity

Find code that performs similar operations or solves similar problems.

Search strategy:

  1. Identify the functional purpose of input snippet
  2. Search for code with similar purpose using semantic patterns
  3. Look for:
    • Similar input/output transformations
    • Equivalent algorithms (different implementations, same result)
    • Parallel business logic
    • Alternative approaches to same problem

Functional categories:

  • Data transformation: Mapping, filtering, reducing, sorting
  • Validation: Input checking, format validation, constraint enforcement
  • I/O operations: File reading/writing, API calls, database queries
  • Authentication/Authorization: Login, permission checks, token handling
  • Error handling: Try-catch patterns, error recovery, logging

Search patterns:

// For validation code, search for:
- "validate", "check", "verify" in function names
- Conditional checks with error throwing
- Regular expression patterns

// For API calls, search for:
- HTTP client usage (fetch, axios, requests)
- Endpoint URLs or API patterns
- Response handling and error cases
Show full SKILL.md (210 more words)Show less
6. Rank and Score Results

Combine similarity scores to rank results:

Scoring formula:

Total Score = (Call Chain Score × 0.35) +
              (Textual Score × 0.30) +
              (Functional Score × 0.35)

Score ranges:

  • 0.8-1.0: Very high similarity (likely duplicate or variant)
  • 0.6-0.8: High similarity (related implementation)
  • 0.4-0.6: Medium similarity (similar patterns or purpose)
  • 0.2-0.4: Low similarity (some shared elements)
  • 0.0-0.2: Minimal similarity (weak connection)

Ranking adjustments:

  • Boost files in same directory (+10%)
  • Boost files with similar names (+5%)
  • Penalize test files (-10%) unless input is a test
  • Penalize generated/vendor code (-20%)
7. Format Results

Present results in ranked order with context:

Result format:

markdown
## Search Results for: [Brief snippet description]

### 1. [file_path] (Score: 0.85)

**Similarity breakdown**:
- Call chain: 0.90 (shares fetch, JSON.parse, setState calls)
- Textual: 0.75 (similar variable names and structure)
- Functional: 0.90 (performs same data fetching and state update)

**Matching code** (lines 45-62):
```[language]
[relevant code snippet from the file]

Why it matches: [Brief explanation of similarity]


2. [file_path] (Score: 0.72)

[... repeat format ...]


**Output guidelines**:
- Show top 10 results by default
- Include file path with line numbers
- Show relevant code snippet (10-20 lines)
- Explain why each result matches
- Group results by score tier if many results

## Search Optimization Tips

**For better call chain matching**:
- Include import statements in input snippet
- Provide complete function calls with arguments
- Include chained method calls

**For better textual matching**:
- Use descriptive variable names in input
- Include comments describing intent
- Provide complete code blocks, not fragments

**For better functional matching**:
- Describe what the code does in comments
- Include typical input/output examples
- Show error handling patterns

## Example Usage

**Input snippet**:
```javascript
async function fetchUserData(userId) {
  try {
    const response = await fetch(`/api/users/${userId}`);
    const data = await response.json();
    return data;
  } catch (error) {
    console.error('Failed to fetch user:', error);
    return null;
  }
}

Search process:

  1. Call chain: Search for fetch(), response.json(), console.error()
  2. Textual: Search for async functions with try-catch, similar variable names
  3. Functional: Search for API data fetching patterns, error handling

Expected results:

  • Other API fetch functions (high similarity)
  • Data retrieval functions using different libraries (medium similarity)
  • Functions with similar error handling (low-medium similarity)

Tips

  • Start with a complete, representative code snippet (10-30 lines)
  • Include context (imports, surrounding code) for better matching
  • For large codebases, narrow search scope to relevant directories
  • Adjust score weights based on what matters most (calls vs. structure vs. purpose)
  • Review medium-scored results (0.4-0.6) for unexpected but useful matches
  • Use results to discover alternative implementations or refactoring opportunities

© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/code-search-assistant of ArabelaTso/Skills-4-SE.

Open the folder on GitHubat commit 4f38503

Compare with similar skills

Code Search Assistant next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Search Assistant compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Search Assistant this skillArabelaTso/Skills-4-SE253—~1.9kAutomated safety check: PassApache-2.0
Codebase Knowledge Graph Q&AEgonex-AI/Understand-Anything85k1 repos~1.2kAutomated safety check: PassMIT
Understand ExplainEgonex-AI/Understand-Anything85k1 repos~1.3kAutomated safety check: PassMIT
Repomix Codebase Exploreryamadashy/repomix29k1 repos~2.7kAutomated safety check: PassMIT
Project Onboarding Guide from Knowledge GraphEgonex-AI/Understand-Anything85k—~1.2kAutomated safety check: PassMIT
Deepwiki Rssopaco/deepwiki-rs3.1k—~748Automated safety check: PassMIT

Similar skills

  • Codebase Knowledge Graph Q&A

    Egonex-AI/Understand-Anything

    Answers questions about a codebase by searching a prebuilt knowledge graph of its files, functions, classes and dependencies, not by rereading every source file.

    85k GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check passed
  • Understand Explain

    Egonex-AI/Understand-Anything

    Gives an in-depth explanation of one file, function or module by reading the project's knowledge graph and checking that the graph is still fresh.

    85k GitHub starsUsed in 1 repo~1.3k tokens
    DevelopmentAuto-check passed
  • Repomix Codebase Explorer

    yamadashy/repomix

    Packs a local or remote repository into a single AI-friendly file with the Repomix CLI, then reads and searches that output to explain structure, find patterns or report metrics.

    29k GitHub starsUsed in 1 repo~2.7k tokens
    DevelopmentAuto-check passed
  • Writes an onboarding guide for new team members from a project's existing knowledge graph, after checking that the graph still matches the current commit.

    85k GitHub stars~1.2k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Deepwiki Rs

    sopaco/deepwiki-rs

    AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation.

    3.1k GitHub stars~748 tokensUpdated 23 days ago
    DevelopmentAuto-check passed
  • GitDiagram Repository Overview

    ahmedkhaleel2004/gitdiagram

    Explains the architecture of a public GitHub repository through GitDiagram: how the code is organized, the main components with paths, and a Mermaid diagram.

    18k GitHub stars~427 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from ArabelaTso/Skills-4-SE

All 151 skills in this repo
  • Framework Migration Assistant

    ArabelaTso/Skills-4-SE

    Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

    253 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Metamorphic Test Generator

    ArabelaTso/Skills-4-SE

    Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.

    253 GitHub stars~798 tokensUpdated 1 mo ago
    Auto-check passed
  • Reproduction Trace Instrumenter

    ArabelaTso/Skills-4-SE

    Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.

    253 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Spring Mvc To Boot Migrator

    ArabelaTso/Skills-4-SE

    Automatically migrate Spring MVC applications to Spring Boot.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • State Snapshot Instrumenter

    ArabelaTso/Skills-4-SE

    Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Code Search Assistant

What does Code Search Assistant do?

Search code repositories for code related to a given code snippet, ranking results by call chain similarity, textual similarity, and functional similarity. Code Search Assistant is an agent skill from ArabelaTso/Skills-4-SE. Search code repositories for code related to a given code snippet, ranking results by call chain similarity, textual similarity, and functional similarity.

When should I use Code Search Assistant?

Code Search Assistant fits situations like: finding related code; locating similar implementations; discovering code dependencies; identifying code that performs similar operations.

How do I install Code Search Assistant in Claude Code?

Run `npx skills add ArabelaTso/Skills-4-SE --skill code-search-assistant -a claude-code`. Or copy the skill folder (skills/code-search-assistant in ArabelaTso/Skills-4-SE) into .claude/skills/code-search-assistant in your project. Claude Code loads it when a task matches its description.

How do I install Code Search Assistant in Codex?

Run `npx skills add ArabelaTso/Skills-4-SE --skill code-search-assistant -a codex`. Or copy the skill folder (skills/code-search-assistant in ArabelaTso/Skills-4-SE) into .agents/skills/code-search-assistant in your project. Codex loads it when a task matches its description.

Can I use Code Search Assistant in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArabelaTso/Skills-4-SE --skill code-search-assistant -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-search-assistant, .gemini/skills/code-search-assistant, .github/skills/code-search-assistant and .opencode/skills/code-search-assistant in your project.

What does Code Search Assistant need to run?

SKILL.md names no scripts, command-line tools or credentials: Code Search Assistant is instructions for the agent only.

Does Code Search Assistant access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Search Assistant safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Search Assistant use?

Code Search Assistant is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Search Assistant use?

About 1.9k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Search Assistant?

Skills that share tags, products or a category with Code Search Assistant: Codebase Knowledge Graph Q&A (Egonex-AI/Understand-Anything, 85k stars), Understand Explain (Egonex-AI/Understand-Anything, 85k stars), Repomix Codebase Explorer (yamadashy/repomix, 29k stars) and Project Onboarding Guide from Knowledge Graph (Egonex-AI/Understand-Anything, 85k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Search Assistant?

ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 151 skills in this directory. The repository was last updated on August 21, 2026.

Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.