Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

grepai-ignore-patternsgrepai 忽略模式

Agent Skill

grepai-ignore-patterns 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

9,909

周安装

397

GitHub Stars

16

下载量

3,208
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:grepai-ignore-patterns(grepai 忽略模式)
来源仓库:https://github.com/yoanbernabeu/grepai-skills
仓库路径:skills/grepai-ignore-patterns
安装命令:
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-ignore-patterns
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-ignore-patterns

简介

用于查找、检索和筛选相关信息,适合快速定位候选结果。

  • 它根据关键词或任务场景在代码或文档中匹配内容片段。
  • 使用方式依赖具体仓库结构和搜索模式,需结合上下文调整参数。
  • 安装命令:npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-ignore-patterns。
  • 注意确认权限范围和是否允许读取项目文件,避免误触敏感路径。

SKILL.md

GrepAI Ignore Patterns

This skill covers how to configure ignore patterns to exclude files and directories from GrepAI indexing.

When to Use This Skill

  • Excluding test files from search results
  • Ignoring generated or vendored code
  • Reducing index size by excluding unnecessary files
  • Customizing which files GrepAI indexes

How Ignore Patterns Work

GrepAI uses two sources for ignore patterns:

  1. .grepai/config.yaml - Custom patterns you define
  2. .gitignore - Automatically respected

Configuration Location

# .grepai/config.yaml
ignore:
  - pattern1
  - pattern2

Pattern Syntax

Directory Patterns

ignore:
  # Exact directory name (matches anywhere)
  - node_modules
  - vendor
  - __pycache__

  # With trailing slash (explicit directory)
  - dist/
  - build/
  - coverage/

File Patterns

ignore:
  # Exact filename
  - package-lock.json
  - yarn.lock

  # Wildcard patterns
  - "*.min.js"
  - "*.min.css"
  - "*.map"
  - "*.lock"

Path Patterns

ignore:
  # Paths containing substring
  - /tests/
  - /spec/
  - /__tests__/

  # Specific paths
  - src/generated/
  - api/swagger/

Glob Patterns

ignore:
  # Double star (recursive)
  - "**/test/**"
  - "**/mock/**"

  # Single star (single level)
  - "*.test.js"
  - "*.spec.ts"
  - "*_test.go"

Default Ignore Patterns

GrepAI's default configuration includes:

ignore:
  # Version control
  - .git
  - .svn
  - .hg

  # GrepAI itself
  - .grepai

  # Package managers
  - node_modules
  - vendor
  - .npm
  - .yarn

  # Build outputs
  - target
  - dist
  - build
  - out

  # Cache directories
  - __pycache__
  - .pytest_cache
  - .mypy_cache
  - .cache

  # Framework outputs
  - .next
  - .nuxt
  - .output

Common Ignore Configurations

JavaScript/TypeScript Project

ignore:
  - node_modules
  - dist
  - build
  - coverage
  - .nyc_output
  - "*.min.js"
  - "*.bundle.js"
  - "*.map"
  - package-lock.json
  - yarn.lock
  - pnpm-lock.yaml

Go Project

ignore:
  - vendor
  - bin
  - "*.pb.go"       # Protobuf generated
  - "*_mock.go"     # Mocks
  - "mocks/"
  - go.sum

Python Project

ignore:
  - __pycache__
  - .pytest_cache
  - .mypy_cache
  - .venv
  - venv
  - env
  - "*.pyc"
  - "*.pyo"
  - .eggs
  - "*.egg-info"
  - dist
  - build

Rust Project

ignore:
  - target
  - Cargo.lock
  - "*.rlib"

Java/Kotlin Project

ignore:
  - target
  - build
  - .gradle
  - "*.class"
  - "*.jar"
  - "*.war"

Monorepo

ignore:
  # Common
  - node_modules
  - dist
  - build
  - coverage

  # Specific packages to exclude
  - packages/legacy/
  - packages/deprecated/

  # Generated
  - "**/generated/**"
  - "**/__generated__/**"

Excluding Test Files

To focus search on production code:

ignore:
  # Test directories
  - tests/
  - test/
  - __tests__/
  - spec/

  # Test files by pattern
  - "*.test.js"
  - "*.test.ts"
  - "*.spec.js"
  - "*.spec.ts"
  - "*_test.go"
  - "test_*.py"
  - "*_test.py"

Alternative: Use search boosting instead to penalize (not exclude) tests:

search:
  boost:
    penalties:
      - pattern: /tests/
        factor: 0.5
      - pattern: _test.
        factor: 0.5

Excluding Generated Code

ignore:
  # Generated markers
  - "**/generated/**"
  - "*.generated.*"
  - "*.gen.*"

  # Specific generators
  - "*.pb.go"           # Protobuf
  - "*.graphql.ts"      # GraphQL codegen
  - "*.d.ts"            # TypeScript declarations
  - "swagger_*.go"      # Swagger
  - "openapi_*.ts"      # OpenAPI

Excluding Documentation

ignore:
  - docs/
  - documentation/
  - "*.md"
  - "*.mdx"
  - "*.rst"

Verifying Ignore Patterns

Check what's being indexed:

# Check index status
grepai status

# Output shows file count
# If too high, add more ignore patterns

Common Issues

Problem: Index is too large ✅ Solution: Add more ignore patterns for dependencies and generated files

Problem: Search returns vendor/test code ✅ Solution: Either ignore or use boosting penalties

Problem: Pattern not working ✅ Solution: Check syntax - use quotes for patterns with special characters:

ignore:
  - "*.min.js"  # Correct
  - *.min.js    # May cause YAML parsing issues

Problem: Need to include previously ignored files ✅ Solution: Remove from ignore list and re-run grepai watch

Best Practices

  1. Start with defaults: Add patterns as needed
  2. Exclude dependencies: Always ignore node_modules, vendor, etc.
  3. Exclude build outputs: dist, build, target
  4. Exclude lock files: Large, not useful for search
  5. Consider boosting vs ignoring: Penalize instead of exclude for test files
  6. Quote special characters: "*.min.js" not *.min.js

Re-indexing After Changes

After modifying ignore patterns:

# Stop existing daemon
grepai watch --stop

# Clear index and restart
rm .grepai/index.gob
grepai watch

Output Format

After configuring ignore patterns:

✅ Ignore Patterns Configured

   Patterns: 15 configured

   Categories:
   - Directories: node_modules, vendor, dist, build
   - File types: *.min.js, *.map, *.lock
   - Paths: /tests/, /docs/

   Also respecting: .gitignore

   Run 'grepai watch' to re-index with new patterns.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.17%
按下载量换算1,192

Claude

29.15%
按下载量换算935

Cursor

19.59%
按下载量换算628

Gemini CLI

9.99%
按下载量换算320

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills