首页/ AI 技能 / @skilllib/skill-2014279420712792066
Skill站外收录 @skilllib/skill-2014279420712792066

morph-search

提供超高速代码库文本检索能力,支持关键词与正则表达式搜索,可跨大型项目快速定位函数、变量或语法模式;同时支持直接编辑指定文件内容,适用于需要兼顾效率与灵活性的代码理解与维护任务。

0.0 (0) 146 次安装 原作者 编程导航
收录于 2026-01-22
效率工具 AI 技能

Skills.MD

# Morph Codebase Search Fast, AI-powered codebase search using WarpGrep. 20x faster than traditional grep. ## When to Use - Search codebase for patterns, function names, variables - Find code across large codebases quickly - Edit files programmatically ## Usage ### Search for code patterns ```bash uv run python -m runtime.harness scripts/mcp/morph_search.py \ --search "authentication" --path "." ``` ### Search with regex ```bash uv run python -m runtime.harness scripts/mcp/morph_search.py \ --search "def.*login" --path "./src" ``` ### Edit a file ```bash uv run python -m runtime.harness scripts/mcp/morph_search.py \ --edit "/path/to/file.py" --content "new content" ``` ## Parameters | Parameter | Description | |-----------|-------------| | `--search` | Search query/pattern | | `--path` | Directory to search (default: `.`) | | `--edit` | File path to edit | | `--content` | New content for file (use with `--edit`) | ## Examples ```bash # Find all async functions uv run python -m runtime.harness scripts/mcp/morph_search.py \ --search "async def" --path "./src" # Search for imports uv run python -m runtime.harness scripts/mcp/morph_search.py \ --search "from fastapi import" --path "." ``` ## vs ast-grep | Tool | Best For | |------|----------| | **morph/warpgrep** | Fast text/regex search (20x faster) | | **ast-grep** | Structural code search (understands syntax) | ## MCP Server Required Requires `morph` server in mcp_config.json with `MORPH_API_KEY`.

评论 0

还没有评论,来抢沙发。