Skills

From infometa/workbuddyskills · View interactive version

Skills is an AI agent skill from the GitHub repository infometa/workbuddyskills. 51社保政策查询技能,覆盖全国 311 城社保与公积金的缴费基数、比例、办理截止日、最低工资、社平工资与产假天数,检索社保政策原文,并读取政策分析报告

How to use this skill

Skill file

51社保政策查询 / 51Shebao Policy Search

本 Skill 只提供社保政策查询与政策原文检索能力,不办理增减员,不接收员工花名册,不提交工单,不执行任何写操作。

This Skill only provides social insurance and housing fund policy queries, policy-source search, and policy report reading. It does not process enrollment changes, accept employee rosters, submit service tickets, or perform any write operation.

认证说明 / Authentication

工具选用指引 / Which tool to use

  1. 用户问的是「某城市某年的缴费基数上下限、缴费比例、办理截止日、最低工资、社平工资、产假」等参数型问题 → query_policy_config_list 查 policy_id,再 query_policy_config 取参数与政策依据。
  2. 用户问的是「某城市/省份某项社保政策的原文规定」(如“广东加班费怎么规定的”“上海生育津贴政策原文”)→ 直接用 query_policy_notes 按维度检索政策原文。
  3. 用户用口语生活化说法提问(如“离职后断缴了怎么办”“试用期要不要交社保”),或需要追溯某条政策的依据链、读指定文件原文 → 用 policy_kb_call:先 search_semantic 传用户原话检索,命中后按 path 查 wikilinks 依据链、再 note_read 读原文。
  4. 用户要求「整体了解一下 51社保政策库覆盖了哪些城市/主题」→ query_policy_catalog 看可检索范围(domains/topics/regions),再据此构造 query_policy_notes 检索条件。
  5. 用户问「最新的政策分析报告/宏观结论」→ query_policy_report 读正式政策分析报告(无参数)。
  6. 城市、年度、参保身份或政策事项会影响答案且用户没说清楚时,先向用户确认,不要自行猜测。

For parameter-type questions (limits, rates, deadlines, wages, leave days), use query_policy_config_list then query_policy_config. For policy-source retrieval (original legal text by region/domain/topic), use query_policy_notes, and optionally query_policy_catalog first to learn supported dimensions. For colloquial natural-language questions, evidence-chain tracing, or reading a specific document, use policy_kb_call (search_semantic → wikilinks → note_read). Use query_policy_report to read the formal analysis report. Ask for missing city, year, identity, or topic details when they materially affect the answer.

可用工具 / Available tools

query_policy_config_list - 查找政策配置

列出某个城市、年度和参保身份下可用的政策配置,返回后续查询需要的 policy_id。Lists policy configurations and returns the policy_id required for the detailed query.

| 参数 | 类型 | 必填 | 说明 |

|------|------|:----:|------|

| regionName | string | ✅ | 城市名,如“北京”“成都”“上海” |

| year | integer | - | 政策年度;不传取数据文件最新年度(随数据推进,如 2026/2027)。传未支持年度会报错并列出可用年度 |

| identity | string | - | 参保身份或医保档位,如“深户-医疗一档”;不传返回全部身份档 |

如果返回多个身份档位,应结合用户情况选择;无法判断时列出差异并询问用户。此工具不返回具体险种比例或截止日数值。

query_policy_config - 获取政策参数和依据

根据 policy_id 获取缴费基数、单位/个人比例、截止日、社平工资、双轨口径、产假、月最低工资与非全日制最低小时工资等参数以及政策证据。Returns policy parameters and supporting evidence for a selected policy_id.

| 参数 | 类型 | 必填 | 说明 |

|------|------|:----:|------|

| policyId | string | ✅ | query_policy_config_list 返回的 policy_id,如 110100_social_base_2026 |

| identity | string | - | 参保身份;同一城市存在多档时应传入,不传取该 policy_id 默认档 |

返回值含 evidence 数组,每项 {dim, title, url, level, status},主证据在前;social 档附带社平/最低/产假/补偿依据。无证据命中时 evidence 为空数组且 confidence=low。

query_policy_catalog - 查看政策库目录

读取政策库“可检索范围”:政策库规模 + domain/topic/region 取值字典 + 内容指纹。无参数。Reads the policy library catalog: scale, supported domains/topics/regions, and a content fingerprint. No parameters.

返回 JSON:{version, generated_at, scale{notes, by_level, by_status}, domains[], topics[], regions{city[], province[], national}}。在“查政策原文”前先调用本工具可感知可检索维度与覆盖范围,避免构造出库内不支持的检索条件。

query_policy_notes - 检索政策原文

按维度检索政策原文(结构化检索),返回命中的政策条目。Searches original policy text by structured dimensions.

| 参数 | 类型 | 必填 | 说明 |

|------|------|:----:|------|

| region_level | string | - | 层级:all / city / province / national,默认 all |

| region | string | - | 城市名或省名(与 region_level 匹配;all 时匹配 city 或 province) |

| domain | string | - | 政策分类精确匹配:薪酬 / 社保 / 用工 / 福利 |

| topic | string[] | - | 事项数组(OR),如 ["调基", "公积金缴存"];取值见 query_policy_catalog.topics。传未收录取值时工具直接报错并回显合法取值 |

| status | string | - | 现行有效(默认)/ all(含已失效) |

| asof | string | - | 日期 YYYY-MM-DD,按 [effective, expiry) 时间窗口判定现行(优先于 status) |

| year | integer | - | 政策针对年度 |

| query | string | - | 精确短关键词检索,词间空格分隔(AND),只做词面匹配;自然语言整句请改用 policy_kb_call(search_semantic) |

| limit | integer | - | 返回条数上限,最大 50,默认 20 |

| include_content | boolean | - | true 时附正文全文,默认 false |

返回 JSON:{count, not_found, hits[], upper_hits[], bm25_hits?}。单层无命中时 upper_hits 给出上层候选(city→省→national),not_found=true 表示“当前层级未收录但可向上层找依据”;带 query 且结构化返空时 bm25_hits 为服务端全文检索兜底命中(含 score),优先采信。回答“XX 政策原文怎么规定的”时优先用本工具。

引用约束:回答中出现具体数字/日期/文号时,必须 include_content=true 核到条款原文后再引用,不得仅凭标题或 abstract 引用数值。

policy_kb_call - 政策知识库检索原语

调用政策知识库的检索原语(白名单透传,全部只读)。结构化检索不够用时使用:口语自然语言检索、依据链追溯、读指定原文、核对元数据。Calls policy-knowledge-base retrieval primitives (whitelisted pass-through, fully read-only) — semantic search, evidence-chain tracing, reading specific documents, and metadata checks.

| 参数 | 类型 | 必填 | 说明 |

|------|------|:----:|------|

| tool_name | string | ✅ | 白名单内的原语名,取值见下表 |

| arguments | object | ✅ | 该原语的参数对象,示例见下表 |

白名单原语(8 个,均为只读):

| tool_name | 用途 | arguments 示例 |

|------|------|------|

| search_semantic | 自然语言整句查政策,传用户原话、勿分词 | {"query": "2026年上海社保缴费基数上下限是多少", "top_k": 5} |

| search_text | 精确关键词/文号/数字检索(词间空格分隔) | {"query": "21.75 月计薪天数", "top_k": 10} |

| wikilinks | 图谱查询。query 取 outgoing 查本篇引用的依据链(上位法/省级文/历年版本),取 backlinks 查引用本篇的笔记 | {"query": "outgoing", "path": "市级文件/唐山/….md"} |

| note_read | 读单篇政策原文 | {"path": "…"} |

| note_read_many | 批量读多篇原文 | {"paths": ["…", "…"]} |

| frontmatter | 轻量核对元数据,仅支持 action: "get"(看 status/生效日期/policy_id),其他 action 会被拒绝 | {"path": "…", "action": "get"} |

| vault_list | 浏览政策库目录结构 | {"path": "市级文件"} |

| note_inspect | 笔记元数据全景摘要 | {"path": "…"} |

典型链路:search_semantic 命中结果带 path → wikilinks(outgoing) 查依据链 → note_read 读原文。

检索约定:

query_policy_report - 读取政策分析报告

读取正式政策分析报告全文(全局认知,八段结构)。无参数。Reads the formal policy analysis report. No parameters.

返回 report_latest.md 全文;若尚无正式报告则返回提示文案。适合回答“最新宏观政策趋势/分析结论”类问题。

数据时效与降级 / Freshness and fallback

结果解释 / Result interpretation

回答模板 / Response template

只展示与问题有关的字段,避免把完整配置或原文原样倾倒给用户。金额、比例和日期保留工具返回的原始单位与精度。

Only include fields relevant to the question. Preserve the units and precision returned by the tools.

隐私与安全 / Privacy and safety

常见错误 / Common errors

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.