• MATCH
  • MISS
  • LOGIC
  • HUMAN

How to validate gitignore patterns with your AI

Connect the Glob Pattern Tester to your agent. Once connected, you can hand your AI any file path or pattern to see exactly how git treats it.

Ask AI about this page

Short answer

How can I check if my gitignore rules are working?

Paste your patterns and the file paths you're worried about into your chat. Your AI uses the test_glob tool to confirm if those paths are caught or skipped. You'll get a clear breakdown of the matching logic.

The results of a pattern check.

Where your results land.

Your AI processes the patterns and paths to give you these outcomes.

MATCH

Confirmed exclusions

The AI identifies files that your patterns successfully catch. You'll know exactly which files are being ignored.

MISS

Pattern gaps found

The AI flags paths that should be ignored but aren't being caught. This helps you find holes in your rules.

LOGIC

Pattern clarity

Your agent explains why a specific pattern matches or misses a path. It breaks down the glob logic for you.

HUMAN

Manual rule updates

The AI identifies the errors but doesn't touch your files. You decide how to rewrite the .gitignore file.

The workflow

What your AI does when the patterns arrive.

The AI handles the pattern matching so you don't have to guess.

  1. Analyze patterns

    Your agent reads the list of patterns you provide to understand the exclusion logic.

    test_glob
  2. Test file paths

    The AI runs each path through the patterns using the test_glob tool to check for matches.

    test_glob
  3. Identify mismatches

    The agent compares the results to find where your rules fail to catch intended files.

    test_glob
  4. Report findings

    Your AI summarizes which files are ignored and which ones are slipping through.

    test_glob

Try it

Copy these to start.

Use these prompts to kick off a validation session.

Starting points

Replace the bracketed text with your actual patterns and file paths.

minimatch Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_qLLsWj4WeWzoDmQVDxXbNpJEtfjpeUWDKsrWoAhW/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — minimatch capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "glob-pattern-tester-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_qLLsWj4WeWzoDmQVDxXbNpJEtfjpeUWDKsrWoAhW/mcp"
    }
  }
}
Copy into chat04
  • Check if the path 'src/config/secrets.json' is covered by these gitignore patterns: [paste patterns here]

  • I have these patterns: [paste patterns]. Does the path 'logs/debug.log' match any of them?

  • Test these gitignore rules against my project structure: [paste patterns]. Tell me if 'node_modules/package.js' is being ignored.

  • Verify if my pattern '/*.tmp' correctly excludes 'temp/data.tmp' in this repo context.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Glob Pattern Tester once, then ask.

One click connects this MCP to your client. Your credentials stay encrypted, and you can start testing patterns immediately.

Connect Glob Pattern Tester to your AI

FAQ

How the pattern testing behaves

  • 01

    Can the AI change my .gitignore file automatically?

    No. The AI only tests the patterns you provide. You must manually edit and save your files.

  • 02

    Does it work with any glob pattern?

    Yes, it uses the test_glob tool to evaluate standard gitignore-style glob patterns.

  • 03

    Can the AI scan my entire hard drive for matches?

    No. The AI only tests the specific file paths you provide in the chat.

  • 04

    Will this tool delete any files in my repository?

    No. This MCP is read-only for testing purposes. It cannot delete, move, or modify any files.

  • 05

    Do I need to upload my files to the AI?

    No. You just need to paste the patterns and the paths you want to check.

  • More questions about Glob Pattern Tester? The Connector page answers them. See everything the Glob Pattern Tester Connector can do

Connect minimatch to Claude, Cursor, ChatGPT & more