skills/pigdoc/SKILL.md
搜索 PIG 官方文档并总结答案。当用户询问 PIG CLOUD、PIG AI、pigx 相关的技术问题、配置方法、功能说明,或明确说"查文档"、"搜一下"、"怎么配置"、"怎么实现"时触发。遇到 PIG 框架相关具体问题时应主动搜索文档后再回答,不要依赖训练数据中可能过期的信息。
npx skillsauth add lltx/skills pigdocInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
PIG 官方文档分布在两个索引中:
pig:PIG Cloud、pigx、网关、权限、微服务等后端与平台能力ai:PIG AI、知识库、RAG、模型、向量库、工作流、智能体等 AI 能力触发该技能后,需要先根据用户问题选择索引,再搜索并总结官方答案。
从用户问题中提取 1-3 个核心关键词。优先使用中文(文档以中文为主)。
示例:
多数据源OAuth2 登录网关路由用户经常把官方项目名改掉(如 staronex、starone 等),触发该技能时必须先做还原。
该规则主要用于 pig 侧检索,不要把 pigx 映射规则错误套用到 AI 术语上。
xx_report、xx-xxx、xx_模块名。report、网关、权限、配置 等模块词),先尝试将该前缀映射为 pigx。示例:
staronex_report 库没有表结构 → 优先查询 pigx_report,并补充 staronex_reportstaronex-权限 → 优先查询 pigx-权限,并补充 staronex-权限starone report 不存在 → 优先查询 pigx reportstaronex、starone → pigx<前缀>_<后缀>,且前缀明显是库/项目前缀时,优先改为 pigx_<后缀>按用户问题内容在 pig / ai 两个索引间路由:
ai
PIG AI、知识库、RAG、模型、向量库、Embedding、工作流、智能体、图谱、Neo4jpig
PIG Cloud、pigx、网关、权限、OAuth2、微服务、多数据源、注册中心、代码生成pig 和 ai
PIG AI 的知识库能不能和 pigx 权限系统一起用怎么配置模型根据第 2 步选中的索引,调用对应接口:
pig:https://search.pig4cloud.com/indexes/pig/searchai:https://search.pig4cloud.com/indexes/ai/searchcurl -s -X POST "https://search.pig4cloud.com/indexes/{index}/search" \
-H "Content-Type: application/json" \
-d '{"q": "关键词", "limit": 3}'
若需要双查,则分别请求两个索引,再合并结果。
| 字段 | 含义 |
|------|------|
| hits[].lvl0 | 文档标题 |
| hits[].content | 文档正文(Markdown 格式) |
| hits[].url | 文档路径(如 /doc/pigx/use/xxx、/doc/ai/rag/xxx) |
| hits[].lvl2 | 文档更新时间 |
基于搜索结果,按以下格式输出:
根据 PIG 官方文档,关于「用户问题」:
解答: [综合文档内容,提炼核心步骤或说明,用清晰要点列出。保留代码片段、配置示例等关键内容]
参考文档:
生成参考链接时,必须按命中的索引选择正确的文档路由:
pig 结果:https://docs.pig4cloud.com/pig#{url}ai 结果:https://docs.pig4cloud.com/ai#{url}总结原则:
pig、ai 或两者共同支持hits 为空,告知用户文档暂无相关内容第一次搜索命中少于 2 条或内容明显不相关时,在已选索引范围内换一个关键词再搜一次,合并结果总结。
多数据源怎么配置 → 查 pig知识库接入 Neo4j 怎么配 → 查 aiPIG AI 的知识库能不能和 pigx 权限系统一起用 → 同时查 pig 和 aistaronex_report 库没有表结构 → 使用 pigx 映射后查 pig怎么配置模型 → 问题较模糊,优先双查后按命中结果回答tools
USE THIS SKILL whenever user says 网络慢、网速慢、网速优化、网络延迟高、Wi-Fi 慢、DNS 慢、MTU 问题、packet loss、VPN/代理影响网速、mDNS 异常、speedtest-cli, or asks Codex to make the internet/network faster. Diagnose network performance with read-only baselines first, separate ISP/Wi-Fi/DNS/MTU/proxy/background-process causes, then propose reversible fixes with before/after verification.
development
Simplifies, refines, and optimizes Java code for clarity, safety, and maintainability while preserving all functionality. Use whenever you've written or modified Java code, when the user asks to "simplify", "clean up", "optimize", "refactor", or "review" Java code, when implementing Java features, fixing Java bugs, or when code feels overly verbose or unsafe. Also use proactively after completing any Java coding task — if Java files were touched, apply this skill before declaring done.
development
整理 Java 代码。对 Git 未提交的 Java 类和方法添加/补充 Javadoc 注释,更新日期注释。当用户说"整理代码"、"添加注释"、"更新日期注释"时触发。
devops
Local text-to-speech via sherpa-onnx (offline, no cloud)