Skip to content

[BUG] Agent Install Detection Uses Overly Broad String Match #208

@EnthusiasticTech

Description

@EnthusiasticTech

Project

vgrep

Description

The installation functions for Claude Code and Codex check if vgrep is already installed using content.contains("vgrep"). This is too broad - any mention of "vgrep" in the file (even in comments like "I don't use vgrep") will cause the installer to think vgrep is already configured.

Error Message

Debug Logs

System Information

Bounty Version: 0.1.0
OS: Ubuntu 24.04 LTS
CPU: AMD EPYC-Genoa Processor (8 cores)
RAM: 15 GB

Screenshots

No response

Steps to Reproduce

  1. Create a CLAUDE.md file with casual mention:
    echo "# Notes\nI've heard of vgrep but haven't tried it yet" > CLAUDE.md
  2. Run install: vgrep install claude-code
  3. Observe "already configured" message even though skill isn't installed

Expected Behavior

  1. Check for specific vgrep skill marker (e.g., ## vgrep or unique identifier)
  2. Distinguish between skill installation and casual mentions
  3. Properly detect if skill block is actually present

Actual Behavior

  1. content.contains("vgrep") matches any occurrence
  2. False positive on any mention of "vgrep"
  3. Users cannot install if file mentions vgrep anywhere

Additional Context

Locations: src/cli/install.rs:61 and src/cli/install.rs:228

if !content.contains("vgrep") {
    // Install skill
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvalidValid issuevgrep

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions