install
source · Clone the upstream repo
git clone https://github.com/yogyoho/Pisuan-Know
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/yogyoho/Pisuan-Know "$T" && mkdir -p ~/.claude/skills && cp -r "$T/src/skills/skill_regulation_searcher" ~/.claude/skills/yogyoho-pisuan-know-skill-regulation-searcher && rm -rf "$T"
manifest:
src/skills/skill_regulation_searcher/SKILL.mdsource content
法规标准搜索技能 (Regulation Searcher Skill)
概述
本技能用于搜索法规标准并生成引用格式,支持:
- 混合检索: 向量检索 + 关键词检索
- 引用格式生成: 自动生成标准引用格式
- 三层金字塔访问控制: L1公共/L2区域/L3项目
- 文档类型过滤: 法规、政策、规划、批复、报告
核心功能
1. 基础法规搜索
from src.skills.skill_regulation_searcher import RegulationSearcherSkill skill = RegulationSearcherSkill() result = await skill.execute( keyword="环境空气质量标准", top_k=5, ) if result.success: for reg in result.data["regulations"]: print(f"- {reg['document_code']} {reg['document_name']}") for citation in result.data["citations"]: print(f" 引用: {citation}")
2. 按类型搜索
result = await skill.execute( keyword="大气污染防治", regulation_type="Regulation", # 只搜索法规标准 top_k=10, )
3. 带项目上下文的搜索
result = await skill.execute( keyword="环评批复", project_context={ "project_id": "proj_001", "region": "宁夏", "industry": "煤炭", }, layer="L2", # 搜索区域级文档 )
参数说明
| 参数 | 类型 | 必需 | 默认值 | 说明 |
|---|---|---|---|---|
| keyword | string | 是 | - | 搜索关键词 |
| regulation_type | string | 否 | - | 文档类型(Regulation/Policy/Plan/Approval/Report) |
| top_k | integer | 否 | 5 | 返回结果数量 |
| project_context | object | 否 | {} | 项目上下文(project_id, region, industry) |
| layer | string | 否 | "all" | 检索层级(L1/L2/L3/all) |
| include_citations | boolean | 否 | true | 是否生成引用格式 |
返回结果
{ "success": true, "data": { "regulations": [ { "id": "clause_001", "document_id": "doc_001", "document_name": "环境空气质量标准", "document_code": "GB 3095-2012", "document_type": "Regulation", "title": "第4.1条 环境空气功能区分类", "content": "...", "score": 0.92, "source": "public", "status": "有效" } ], "citations": [ "GB 3095-2012《环境空气质量标准》" ], "count": 5 } }
引用格式
支持的引用格式:
- 国家标准:
GB XXXXX-YYYY《标准名称》 - 行业标准:
HJ XXXXX-YYYY《标准名称》 - 法律法规:
《法规名称》(发布年份) - 政策文件:
《政策名称》(发文字号)
相关技能
- skill-retriever - 通用知识库检索
- skill-regulation-citation-extractor - 法规引用提取