fuse-local-search

Perform fuzzy search on customer names or contacts in the browser using Fuse.js without making backend requests. Suitable for scenarios that need front-end local fuzzy search, fault-tolerant customer name matching, or quick contact filtering; also used when referring to Fuse.js or the fuse-search toolkit.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "fuse-local-search" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-48a2a9aa24e1667bfcb3cdb8acb520cd035fe18e13c64a520dc8eb0bfbb9376f. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/kzfm2026831 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Perform fuzzy search on customer names or contacts in the browser using Fuse.js without making backend requests. Suitable for scenarios that need front-end local fuzzy search, fault-tolerant customer name matching, or quick contact filtering; also used when referring to Fuse.js or the fuse-search toolkit.

0 Downloads

Introduction source: third_party · user_f1b049da · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: fuse-local-search
slug: kzfm2026831
displayName: 本地模糊检索
version: 1.0.0
summary: 用 Fuse.js 在浏览器内模糊搜客户名/联系人,不请求后端。
license: MIT
description: 用 Fuse.js 在浏览器内模糊搜客户名/联系人,不请求后端。当用户需要前端本地模糊搜索、客户名容错匹配、联系人快速筛选,或提到 Fuse.js / 工具箱 fuse-search 时使用。

本地模糊检索(Fuse.js)

灵感:能力工具箱 fuse-search(轻量、纯前端)。

何时使用

  • 要从本地已加载的客户/联系人列表做容错检索(错别字、拼音片段、部分字)。
  • 不能或不想打后端搜索接口,要求结果即时、可离线。
  • 需要可配置权重(公司名 > 联系人 > 备注)。

硬约束

  1. 仅搜内存数据:输入是数组 + 关键词;禁止伪装成服务端全文检索。
  2. 默认字段权重:companyName/name 权重最高,其次 contact/mobile,备注最低。
  3. 阈值:threshold 建议 0.3~0.45;过松会噪声,过严会漏召回。写清当前取值。
  4. 空关键词:返回空列表或原列表前 N 条(二选一,代码注释标明),勿抛错。
  5. 性能:单次列表建议 ≤5000 条;更大时先分片或建索引说明。
  6. 交付:给出可运行的 JS/TS 片段(可放 templates/),勿依赖仓库私有 API。

推荐实现要点

import Fuse from 'fuse.js'

const fuse = new Fuse(rows, {
  keys: [
    { name: 'companyName', weight: 0.45 },
    { name: 'contactName', weight: 0.3 },
    { name: 'mobile', weight: 0.15 },
    { name: 'note', weight: 0.1 },
  ],
  threshold: 0.38,
  ignoreLocation: true,
  includeScore: true,
})

export function localFuzzySearch(keyword, limit = 20) {
  const q = String(keyword || '').trim()
  if (!q) return []
  return fuse.search(q).slice(0, limit).map((r) => ({
    ...r.item,
    _score: r.score,
  }))
}

Agent 执行步骤

  1. 确认数据源字段名,映射到上述 keys(可改名,权重逻辑不变)。
  2. 实现 localFuzzySearch;UI 侧防抖 200~300ms。
  3. 用 3 组样例自测:全称命中、错一字、仅手机号后四位。
  4. 在说明里写:依赖 fuse.js,体积与许可由项目自行引入。

附加

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

  • 解决前端本地模糊搜索痛点,无需后端请求,提升用户体验
  • 适用于客户名容错匹配、联系人快速筛选等明确场景
Trigger Precision88/100

Highlights

  • 触发词精准,覆盖多种使用场景和关键词变体
Structure and Standards82/100

Areas to improve

  • 缺少端到端完整使用示例 Reported severity: Minor

    仅有代码片段,无完整上下文(如 HTML 页面、完整 JS 文件)

    Recommendation: 补充一个完整可运行的端到端示例,包含数据准备、搜索调用和结果展示

  • 未明确说明依赖引入方式 Reported severity: Minor

    未说明如何引入 fuse.js 依赖(如 CDN、npm 安装等)

    Recommendation: 在文档中补充 fuse.js 的依赖引入说明,便于用户快速上手

Highlights

  • 结构清晰,约束明确,执行步骤具体
Execution Reliability85/100

Highlights

  • 代码示例可直接运行,异常处理覆盖主要场景
  • 参数配置清晰,性能建议合理
Evidence Verifiability (mean of the first four)83/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.