Skip to content
Agentmart
Submit a tool

local_search

Search for relevant documents in the local knowledge base.

Skill by zzatpku

IndexedMIT★ 66
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/zzatpku-local-search

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Search for relevant documents in the local knowledge base. Returns incomplete/truncated text snippets with relevance scores. Use open_page to get full document content.

Use cases: documents, writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/local-search

What's inside

Skill name
local_search
Description
Search for relevant documents in the local knowledge base. Returns incomplete/truncated text snippets with relevance scores. Use open_page to get full document content.
License
MIT
Instructions
69 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • name: only lowercase letters, digits and single hyphens allowed

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Search Tool

Search for documents matching a query in the local knowledge base.

## Usage

```python
from tools import local_search

results = local_search(query, topk=10)
```

## Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| query | str | required | The search query string |
| topk | int | 10 | Number of top results to return |

## Returns

```python
{
    "results": [
        {
            "docid": "document_id_string",
            "url": "https://example.com/page",
            "text": "incomplete/truncated document snippet...",
            "score": 0.95
        },
        ...
    ],
    "took_ms": 12.5
}
```

Or on error:
```python
{"error": "error message"}
```

**Note**: The `text` field returned by `local_search` contains **incomplete/truncated content**, NOT the full document. It may cut off at arbitrary points, causing you to miss critical information. Always use `open_page` to retrieve the full document content for any result that is relevant to your query.

## Example

```python
from tools import local_search

# local_search for information about a topic
results = local_search("capital of France", topk=3)

# Process results
for doc in results.get("results", []):
    print(f"DocID: {doc['docid']}")
    print(f"Score: {doc['score']}")
    print(f"Text: {doc['text'][:200]}...")
    print("---")
```

## Tips

- Use specific, descriptive queries for better results
- Start with topk around 10 and adjust if needed
- Check the score to gauge relevance
- **The `text` field from `local_search` is incomplete/truncated** - it may cut off mid-sentence at arbitrary points
- **Always use `open_page`** to get the full document content for any relevant result - do NOT rely solely on the truncated text from `local_search`
- When using `open_page`, remember the text is in `results[0]["text"]`, not at the top level

From zzatpku/AgentFactory, MIT.

More from zzatpku/AgentFactory

Signals

Stars
66
Forks
8
Open issues
0
Last commit (this folder)
Feb 28, 2026 (8 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from zzatpku

Cite this page

local_search skill. Agent Mart. https://agentmart.dev/skills/zzatpku-local-search (last updated 2026-10-24)