tqh20267244
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 "tqh20267244" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-26e74cd22168e653daf26f2612bad49d88688f346a41e09c1555b4d9a38eb816. Verify the upstream source and version against https://skillhub.cn/skills/user_f1b049da/tqh20267244 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
Automatically completes form fields such as contact person, phone number, and address after a CRM customer is selected; used when users need automatic customer field completion or customer-driven field population.
Introduction source: third_party · user_f1b049da · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: tqh20267244
slug: tqh20267244
displayName: 选客户自动补全
version: 1.0.0
summary: 选择客户后自动带出联系人、电话、地址等字段到表单。
license: MIT
description: 选中 CRM 客户后自动补全联系人、电话、地址等表单字段。当用户要选客户自动补全、客户带出字段时使用。选客户自动补全
灵感:能力工具箱 customer-autofill(自研)。
小四原创:选客户 → 按映射表填空字段;默认不覆盖用户已手改的非空值(可开关「强制覆盖」)。
何时使用
- 商机/合同/跟进单先选客户再填联系方式
- 减少重复录入电话地址
- 与「客户自动关联」串联:关联后立刻补全
硬约束
- 补全字段可配置:
contactmobileemailaddress等。 - 默认
fill-empty:目标字段已有值则跳过。 - 多联系人时:取主联系人或弹选择器,勿 silently 乱选。
- 实现要点注释标 小四原创。
- 与自动关联区分:本包假设 已有 customerId。
推荐实现
export type CustomerDetail = {
id: string
company: string
contact?: string
mobile?: string
email?: string
address?: string
}
export type FormPatch = Partial<Record<string, string>>
// 小四原创:空位补全
export function autofillFromCustomer(
form: FormPatch,
customer: CustomerDetail,
opts?: { overwrite?: boolean; map?: Record<string, keyof CustomerDetail> },
): FormPatch {
const overwrite = opts?.overwrite ?? false
const map = opts?.map ?? {
contact: 'contact',
mobile: 'mobile',
email: 'email',
address: 'address',
company: 'company',
}
const next = { ...form }
for (const [formKey, custKey] of Object.entries(map)) {
const val = customer[custKey]
if (val == null || val === '') continue
const cur = next[formKey]
if (!overwrite && cur != null && String(cur).trim() !== '') continue
next[formKey] = String(val)
}
next.customerId = customer.id
return next
}
Agent 步骤
- 客户选择器
change时拉详情(或用列表行缓存)。 - 调用
autofillFromCustomer;Toast「已补全 N 项」。 - 提供「清空并重填」给需要覆盖的场景。
- 自测:空表补全、已填电话不被覆盖、强制覆盖开关。
不要做
- 选客户时静默清空用户长备注。
- 多联系人不提示就随便带一个敏感字段。
附加
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决 CRM 场景下选择客户后自动补全表单字段的实际需求
- 能显著减少重复录入,提升用户工作效率
Highlights
- 触发场景描述清晰,覆盖多种使用变体
- 边界明确,不易与其他 Skill 重叠
Areas to improve
-
缺少端到端完整示例 Reported severity: Minor
文档缺少从选择客户到字段补全的完整用户交互流程演示
Recommendation: 建议补充一个完整的端到端使用示例,展示从客户选择到表单字段自动补全的全过程
Highlights
- 文档结构清晰,包含何时使用、硬约束、推荐实现等完整章节
- 提供了具体的 TypeScript 实现代码和自测建议
Areas to improve
-
未处理 customer 数据源异常 Reported severity: Minor
未明确说明 customer 数据来源的可靠性处理,如网络请求失败、数据为空等异常情况
Recommendation: 建议在实现中增加 customer 数据获取的异常处理逻辑,确保在数据源异常时不会导致整个流程失败
Highlights
- 提供了具体的 TypeScript 函数实现,参数明确
- 覆盖了 overwrite 开关、字段映射等关键逻辑,并有自测建议
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.
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.
User discussion
No verified reviews yet.