Not in the top 1,000 by GitHub stars
ZongziForu/cn-law-hub
中国法条与法律法规检索 Agent Skill|Chinese legal research Agent Skill for retrieving and verifying Chinese laws from official sources|支持具体法条检索、现行有效核验、10 个官方法律数据源
History
Review weekly changes to SKILL.md before updating. Dates mark the weeks in which we observed each version; checks apply to the recorded commits.
View weekly changes
SKILL.md
Week of Nov 2, 2026 · Line counts unavailable
Before Not checked yet → After Network or broad shell
First observation → 8a62d5cbec94
No earlier version was observed for comparison.
Heat
6.0- Star growth, last 7 daysNot available
- Star growth, last 24 hoursNot available
- Rank movement, last 7 daysNot available
- Commits, last 30 daysNot available
- Accounts asking about it through MCP, last 7 daysNot available
- Hot votes this weekNot available
Heat never changes the order by stars, and sponsorship never touches it. How heat works
Stars over time
30-day change not yet available: not enough history.
Individual skills in this repository
How it works
cn-law-hub
When your agent uses it
用于查询、检索、核验、下载、导出、批量采集中国官方法律法规、规章、条约和具体法条。Use this skill aggressively when the user asks to 查法律、查法规、查条例、查规章、查条约、查法条、查第几条、找法律依据、引用法律依据、核验现行有效、判断是否废止/已修改/尚未生效、下载法规全文、导出法规目录、批量下载法规文件、按关键词检索具体法条、展开法条分析,或在中国法律咨询、案例分析、合规审查、合同审查、劳动争议、行政法分析、公司合规、数据合规、政策研究中需要调用、核验或引用中国现行有效法律法规原文作为依据。Trigger also when phrases such as 依法、依规、依照法律规定、法律法规 imply a need to verify specific statutory authority or article-level text. Covers 国家法律法规数据库 (flk.npc.gov.cn), 国家规章库 (gov.cn), 外交条约库 (treaty.mfa.gov.cn), 国务院政策文件库 (sousuo.www.gov.cn), 司法部行政法规库 (xzfg.moj.gov.cn), 党内法规库 (12371.cn), 国防部法规文库 (mod.gov.cn), 税务法规库 (fgk.chinatax.gov.cn), 生态环境部法规规章 (mee.gov.cn), and 最高人民法院发布栏目 (court.gov.cn). Supports 标题/正文检索, 精确/模糊检索, 时效性过滤, 分类过滤, 分页, 排序, 单篇下载, 批量下载, 法条级抽取, 地区/制定机关分类, and browser fallback. Trigger when the answer may depend on current effective Chinese statutes, regulations, rules, treaties, article text, official document status, or official source attribution. Do not use for purely general legal theory, generic writing, or legal reasoning that does not require retrieving or verifying official Chinese legal documents.
What it loads into context
Frontmatter
460 tokensAlways available to the agent
SKILL.md
2,672 tokensWhen the skill is activated
Reference documents
24,836 tokensLoaded on request
Token counts are estimates. Scripts run separately; they are not counted as reference context.
The playbook
- Search Strategy (applies to ALL data sources)
- Status Filtering
- Article-Level Queries (NPC)
- Rate Limiting
- Caching
Scripts executed separately
scripts/article_search.pyscripts/common/__init__.pyscripts/common/cache.pyscripts/common/chinese_numerals.pyscripts/common/cli_utils.pyscripts/common/constants.pyscripts/common/docx_utils.pyscripts/common/file_io.pyscripts/common/logger.pyscripts/common/ratelimit.pyscripts/common/text_utils.pyscripts/court_law_crawler.pyscripts/download.pyscripts/gov_policy_library.pyscripts/gov_rules_crawler.pyscripts/mcp_server.pyscripts/mee_law_crawler.pyscripts/mod_law_crawler.pyscripts/moj_law_crawler.pyscripts/party_law_crawler.pyscripts/region_classifier.pyscripts/tax_law_crawler.pyscripts/treaty_crawler.pytests/conftest.pytests/fixtures/court/__init__.pytests/fixtures/court/data.pytests/fixtures/gov_policy/__init__.pytests/fixtures/gov_policy/data.pytests/fixtures/mee/__init__.pytests/fixtures/mee/data.pytests/fixtures/mod/__init__.pytests/fixtures/mod/data.pytests/fixtures/moj/__init__.pytests/fixtures/moj/data.pytests/fixtures/party/__init__.pytests/fixtures/party/data.pytests/fixtures/tax/__init__.pytests/fixtures/tax/data.pytests/test_article_search.pytests/test_cache.pytests/test_common.pytests/test_court_law_crawler.pytests/test_download.pytests/test_gov_policy_library.pytests/test_gov_rules_crawler.pytests/test_live_sources.pytests/test_mcp_tools.pytests/test_mee_law_crawler.pytests/test_mod_law_crawler.pytests/test_moj_law_crawler.pytests/test_new_sources_contract.pytests/test_party_law_crawler.pytests/test_region_classifier.pytests/test_tax_law_crawler.py
Files
.gitignoreasset503 bytes.mcp.jsonasset120 bytesCHANGELOG.mddoc12,480 bytesCITATION.cffasset338 bytesLICENSEasset11,357 bytesNOTICEasset1,905 bytesREADME.mddoc26,706 bytesSKILL.mdcore9,765 bytesSKILL.mdcore9,765 bytesSKILL.mdcore9,765 bytesSKILL.mdcore9,765 bytespytest.iniasset106 bytesreferences/api_reference.mddoc9,809 bytesreferences/batch_collection.mddoc8,342 bytesreferences/codex_adapter.mddoc7,763 bytesreferences/gov_policy_api_reference.mddoc5,332 bytesreferences/gov_rules_api_reference.mddoc3,241 bytesreferences/kimi_bridge_adapter.mddoc3,384 bytesreferences/mcp_setup.mddoc2,671 bytesreferences/page_structure.mddoc10,496 bytesreferences/setup.mddoc965 bytesreferences/treaty_api_reference.mddoc2,210 bytesrequirements-dev.txtdoc57 bytesrequirements.txtdoc424 bytesscripts/article_search.pyruns10,107 bytesscripts/common/__init__.pyruns1,853 bytesscripts/common/cache.pyruns9,892 bytesscripts/common/chinese_numerals.pyruns1,919 bytesscripts/common/cli_utils.pyruns784 bytesscripts/common/constants.pyruns804 bytesscripts/common/docx_utils.pyruns3,128 bytesscripts/common/file_io.pyruns2,939 bytesscripts/common/logger.pyruns785 bytesscripts/common/ratelimit.pyruns10,360 bytesscripts/common/text_utils.pyruns2,288 bytesscripts/court_law_crawler.pyruns13,058 bytesscripts/download.pyruns21,720 bytesscripts/gov_policy_library.pyruns14,908 bytesscripts/gov_rules_crawler.pyruns19,087 bytesscripts/mcp_server.pyruns12,243 bytesscripts/mee_law_crawler.pyruns12,782 bytesscripts/mod_law_crawler.pyruns12,777 bytesscripts/moj_law_crawler.pyruns13,815 bytesscripts/party_law_crawler.pyruns12,543 bytesscripts/region_classifier.pyruns22,009 bytesscripts/tax_law_crawler.pyruns16,004 bytesscripts/treaty_crawler.pyruns15,149 bytestests/conftest.pyruns145 bytestests/fixtures/court/__init__.pyruns0 bytestests/fixtures/court/data.pyruns1,365 bytestests/fixtures/gov_policy/__init__.pyruns0 bytestests/fixtures/gov_policy/data.pyruns3,077 bytestests/fixtures/mee/__init__.pyruns0 bytestests/fixtures/mee/data.pyruns1,022 bytestests/fixtures/mod/__init__.pyruns0 bytestests/fixtures/mod/data.pyruns1,284 bytestests/fixtures/moj/__init__.pyruns0 bytestests/fixtures/moj/data.pyruns1,285 bytestests/fixtures/party/__init__.pyruns0 bytestests/fixtures/party/data.pyruns1,298 bytestests/fixtures/tax/__init__.pyruns0 bytestests/fixtures/tax/data.pyruns2,619 bytestests/test_article_search.pyruns3,561 bytestests/test_cache.pyruns12,365 bytestests/test_common.pyruns9,875 bytestests/test_court_law_crawler.pyruns6,893 bytestests/test_download.pyruns11,031 bytestests/test_gov_policy_library.pyruns12,503 bytestests/test_gov_rules_crawler.pyruns7,433 bytestests/test_live_sources.pyruns2,888 bytestests/test_mcp_tools.pyruns12,092 bytestests/test_mee_law_crawler.pyruns5,214 bytestests/test_mod_law_crawler.pyruns5,901 bytestests/test_moj_law_crawler.pyruns7,492 bytestests/test_new_sources_contract.pyruns6,167 bytestests/test_party_law_crawler.pyruns6,833 bytestests/test_region_classifier.pyruns3,502 bytestests/test_tax_law_crawler.pyruns11,497 bytes
Read SKILL.md
# Data Sources
| # | Database | Script | Source | Type |
|---|---|---|---|---|
| 1 | **国家法律法规数据库 (NPC)** | `scripts/download.py` | `flk.npc.gov.cn` | JSON API |
| 2 | **国家规章库 (Gov Rules)** | `scripts/gov_rules_crawler.py` | `gov.cn/zhengce/xxgk/gjgzk` | Athena API + HTML |
| 3 | **外交条约库 (Treaty)** | `scripts/treaty_crawler.py` | `treaty.mfa.gov.cn` | HTML |
| 4 | **国务院政策文件库** | `scripts/gov_policy_library.py` | `sousuo.www.gov.cn` | REST API (GET) |
| 5 | **司法部行政法规库** | `scripts/moj_law_crawler.py` | `xzfg.moj.gov.cn` | HTML |
| 6 | **党内法规库** | `scripts/party_law_crawler.py` | `www.12371.cn` | HTML |
| 7 | **国防部法规文库** | `scripts/mod_law_crawler.py` | `www.mod.gov.cn` | HTTP |
| 8 | **税务法规库** | `scripts/tax_law_crawler.py` | `fgk.chinatax.gov.cn` | REST API (POST) |
| 9 | **生态环境部法规规章** | `scripts/mee_law_crawler.py` | `mee.gov.cn` | HTML |
| 10 | **最高人民法院发布栏目** | `scripts/court_law_crawler.py` | `court.gov.cn` | HTML |View the complete source on GitHubSkills included
- cn-law-hub
Repository facts
- License
- Apache-2.0
- Created
- Jun 25, 2026
- Last pushed
- Oct 15, 2026
- Forks
- 16
- Open issues
- 0
- Project activity
- Active
Before you install
Network or broad shellAutomated signals, not a guarantee
Checked Nov 7, 2026
Not fully analyzed: some files were too long, unreadable or missing. This never lowers the level.
Show 3 notes
SKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedSKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzedSKILL.md:1Analysis incomplete: Referenced executable target unavailable; not analyzed
- No broad tool permissions
- No dangerous shell commands
- 315 network referencesin 37 files: references/api_reference.md:6 tests/test_common.py:113 references/batch_collection.md:20 and 34 more
- No hidden or obfuscated text
- No instruction overrides
- 54 executable scriptsin 54 files: scripts/article_search.py:1 scripts/common/__init__.py:1 scripts/common/cache.py:1 and 51 more
- 2 references to secretsin 1 file: tests/test_common.py:246
- No requests to vote in Hot
Show all 371 signals by file
CHANGELOG.md
- Network accessline 89
# 查看政策详情 python scripts/gov_policy_library.py --info "https://www.gov.cn/gongbao/content/xxx.htm" - Network accessline 90
python scripts/gov_policy_library.py --info "https://www.gov.cn/gongbao/content/xxx.htm" - Network accessline 134
# 查看详情 python scripts/party_law_crawler.py --info "https://www.12371.cn/2022/01/23/ARTI1642937162249109.shtml" - Network accessline 135
python scripts/party_law_crawler.py --info "https://www.12371.cn/2022/01/23/ARTI1642937162249109.shtml" - Network accessline 153
# 查看详情 python scripts/mod_law_crawler.py --info "http://www.mod.gov.cn/gfbw/fgwx/flfg/16448581.html" - Network accessline 154
python scripts/mod_law_crawler.py --info "http://www.mod.gov.cn/gfbw/fgwx/flfg/16448581.html" - Network accessline 170
# 查看详情 python scripts/tax_law_crawler.py --info "https://fgk.chinatax.gov.cn/zcfgk/c102416/c5250687/content.html" - Network accessline 171
python scripts/tax_law_crawler.py --info "https://fgk.chinatax.gov.cn/zcfgk/c102416/c5250687/content.html" - Network accessline 189
# 查看详情 python scripts/mee_law_crawler.py --info "https://www.mee.gov.cn/ywgz/fgbz/fl/202603/t20260313_1146496.shtml" - Network accessline 190
python scripts/mee_law_crawler.py --info "https://www.mee.gov.cn/ywgz/fgbz/fl/202603/t20260313_1146496.shtml" - Network accessline 209
# 查看详情 python scripts/court_law_crawler.py --info "https://www.court.gov.cn/fabu/xiangqing/504221.html" - Network accessline 210
python scripts/court_law_crawler.py --info "https://www.court.gov.cn/fabu/xiangqing/504221.html" - Network accessline 287
- **[kasc0206](https://github.com/kasc0206)** — 在 [PR #1](https://github.com/ZongziForu/cn-law-hub/pull/1) 中贡献了国务院政策文件库、司法部行政法规库、党内法规库、国防部法规文库、税务法规库、生态环境部法规规章和最高人民法院发布栏目共 7 个爬虫脚本,将数据源从 3 个大幅扩展至 10 个,并重构了 `scripts/common/` 共享模块,补齐了测试与开发依赖。 - Network accessline 288
- **[Li2zon3](https://github.com/Li2zon3)** — 其 [`law-crawler-unified`](https://github.com/Li2zon3/law-crawler-unified) 项目为国家规章库和外交条约库的实现提供了重要参考。
CITATION.cff
LICENSE
NOTICE
- Network accessline 4
This product includes software developed by ZongziForu (https://github.com/ZongziForu). - Network accessline 5
(https://github.com/ZongziForu). - Network accessline 10
(国务院政策文件库 / 司法部行政法规库 / 党内法规库 / 国防部法规文库 / 税务法规库 / 生态环境部法规规章 / 最高人民法院发布栏目), contributed in https://github.com/ZongziForu/cn-law-hub/pull/1. - Network accessline 11
税务法规库 / 生态环境部法规规章 / 最高人民法院发布栏目), contributed in https://github.com/ZongziForu/cn-law-hub/pull/1. * Li2zon3 — the law-crawler-unified project - Network accessline 12
https://github.com/ZongziForu/cn-law-hub/pull/1. - Network accessline 13
* Li2zon3 — the law-crawler-unified project (https://github.com/Li2zon3/law-crawler-unified) provided an important reference for the implementation of 国家规章库 and 外交条约库. - Network accessline 14
(https://github.com/Li2zon3/law-crawler-unified) provided an important
README.md
- Network accessline 3
[](https://github.com/ZongziForu/cn-law-hub) [](http://xhslink.cn/o/3HYck1C99xr) - Network accessline 121
发布版请从 [Releases](https://github.com/ZongziForu/cn-law-hub/releases) 下载 `Source code` 压缩包。 - Network accessline 127
> 请安装并配置这个 Skill:https://github.com/ZongziForu/cn-law-hub/releases/tag/v2.0.2 - Network accessline 407
- **数据源贡献者** — 感谢 [kasc0206](https://github.com/kasc0206) 在 [PR #1](https://github.com/ZongziForu/cn-law-hub/pull/1) 中贡献了国务院政策文件库、司法部行政法规库、党内法规库、国防部法规文库、税务法规库、生态环境部法规规章和最高人民法院发布栏目共 7 个爬虫脚本,将数据源从 3 个大幅扩展至 10 个,并重构了 `scripts/common/` 共享模块,补齐了 - Network accessline 408
- 特别感谢 [Li2zon3](https://github.com/Li2zon3) 的 [`law-crawler-unified`](https://github.com/Li2zon3/law-crawler-unified) 项目,国家规章库(`scripts/gov_rules_crawler.py`)和外交条约库(`scripts/treaty_crawler.py`)的实现大量参考了其中的思路与方案,帮了很大的忙。 - Network accessline 440
| 平台 | 名称 | 链接 / 联系方式 | | ---------- | ------------------------- | ------------------------------------------------------------- | | 小红书 | 只有肉粽子才算是粽子ney! | [点击访问]( - Network accessline 441
| ---------- | ------------------------- | ------------------------------------------------------------- | | 小红书 | 只有肉粽子才算是粽子ney! | [点击访问](https://xhslink.com/m/5XGgBInSyJc) | | 微信公众号 | 正在施工的二层楼 | [点击访问](https:/ - Network accessline 442
| 小红书 | 只有肉粽子才算是粽子ney! | [点击访问](https://xhslink.com/m/5XGgBInSyJc) | - Network accessline 443
| 微信公众号 | 正在施工的二层楼 | [点击访问](https://mp.weixin.qq.com/s/KUhM7u6ajCfLsw0KDXluZQ) | - Network accessline 455
title = {CN Law Hub: Chinese Legal Research and Retrieval Agent Skill}, year = {2026}, url = {https://github.com/ZongziForu/cn-law-hub} - Network accessline 456
year = {2026}, url = {https://github.com/ZongziForu/cn-law-hub} } - Network accessline 457
url = {https://github.com/ZongziForu/cn-law-hub}
references/api_reference.md
- Network accessline 6
https://flk.npc.gov.cn/index # Home page - Network accessline 7
https://flk.npc.gov.cn/search # Search results - Network accessline 8
https://flk.npc.gov.cn/advanceSearch # Advanced search - Network accessline 9
https://flk.npc.gov.cn/detail?id={bbbs} # Law detail page - Network accessline 10
https://flk.npc.gov.cn/detail2.html?id={bbbs} # Alternative detail - Network accessline 15
All endpoints below were discovered from the JS bundle. Base URL: `https://flk.npc.gov.cn` - Network accessline 144
"msg": "操作成功", "data": { "url": "https://flkoss.obs-bj2.cucloud.cn/prod/.../uuid.doc?X-Amz-Signature=...", - Network accessline 145
"data": { "url": "https://flkoss.obs-bj2.cucloud.cn/prod/.../uuid.doc?X-Amz-Signature=...", "urlIn": "http://172.16.220.27:38080/law-search/file/download?..." - Network accessline 146
"url": "https://flkoss.obs-bj2.cucloud.cn/prod/.../uuid.doc?X-Amz-Signature=...", "urlIn": "http://172.16.220.27:38080/law-search/file/download?..." } - Network accessline 147
"urlIn": "http://172.16.220.27:38080/law-search/file/download?..." - Network accessline 192
base = "https://flk.npc.gov.cn" - Network accessline 199
# 1. Get signed URL resp = requests.get(f"{base}/law-search/download/pc?format=docx&bbbs={bbbs}", headers=headers, verify=False) - Network accessline 200
resp = requests.get(f"{base}/law-search/download/pc?format=docx&bbbs={bbbs}", headers=headers, verify=False) - Network accessline 203
# 2. Download file file_resp = requests.get(url, headers={"User-Agent": headers["User-Agent"]}, verify=False) - Network accessline 204
file_resp = requests.get(url, headers={"User-Agent": headers["User-Agent"]}, verify=False) - Network accessline 221
> ⚠<U+FE0F> **Known issue:** Direct `GET` of `https://flk.npc.gov.cn/{ossWordPath}` returns the SPA index page. These paths are for reference only; use the **Download API** above for actual downloads. - Network accessline 227
1. Visit detail page: `browser_visit` with `https://flk.npc.gov.cn/detail?id={bbbs}` 2. Click 下载 button 3. Click 点击下载 element to trigger browser download - Network accessline 259
// Example: copied fetch for detail API fetch("https://flk.npc.gov.cn/law-search/search/flfgDetails?bbbs=YOUR_ID", { - Network accessline 260
fetch("https://flk.npc.gov.cn/law-search/search/flfgDetails?bbbs=YOUR_ID", { - Network accessline 262
headers: { "Accept": "application/json", "Referer": "https://flk.npc.gov.cn/" - Network accessline 263
"Accept": "application/json", "Referer": "https://flk.npc.gov.cn/" } - Network accessline 264
"Referer": "https://flk.npc.gov.cn/" - Network accessline 274
// Extract file URLs from detail response fetch("https://flk.npc.gov.cn/law-search/search/flfgDetails?bbbs=YOUR_ID", { - Network accessline 275
fetch("https://flk.npc.gov.cn/law-search/search/flfgDetails?bbbs=YOUR_ID", { - Network accessline 276
headers: { "Accept": "application/json", "Referer": "https://flk.npc.gov.cn/" } - Network accessline 279
.then(d => { const oss = d.data.ossFile; console.log("WORD:", "https://flk.npc.gov.cn/" + oss.ossWordPath); - Network accessline 280
const oss = d.data.ossFile; console.log("WORD:", "https://flk.npc.gov.cn/" + oss.ossWordPath); console.log("PDF:", "https://flk.npc.gov.cn/" + oss.ossPdfPath); - Network accessline 281
console.log("WORD:", "https://flk.npc.gov.cn/" + oss.ossWordPath); - Network accessline 282
console.log("PDF:", "https://flk.npc.gov.cn/" + oss.ossPdfPath); - Network accessline 363
All paths are relative to `https://flk.npc.gov.cn/`.
references/batch_collection.md
- Network accessline 20
BASE_URL = "https://flk.npc.gov.cn" - Network accessline 21
HEADERS = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Referer": "https://flk.npc.gov.cn/search", - Network accessline 22
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Referer": "https://flk.npc.gov.cn/search", "Accept": "application/json, text/plain, */*", - Network accessline 23
"Referer": "https://flk.npc.gov.cn/search", - Network accessline 46
"xgzlSearch": False, } resp = requests.post(f"{BASE_URL}/law-search/search/list", headers=HEADERS, json=payload, verify=False, timeout=30) - Network accessline 47
} resp = requests.post(f"{BASE_URL}/law-search/search/list", headers=HEADERS, json=payload, verify=False, timeout=30) data = resp.json() - Network accessline 48
resp = requests.post(f"{BASE_URL}/law-search/search/list", headers=HEADERS, json=payload, verify=False, timeout=30) - Network accessline 128
BASE_URL = "https://flk.npc.gov.cn" - Network accessline 129
HEADERS = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Referer": "https://flk.npc.gov.cn/", - Network accessline 130
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Referer": "https://flk.npc.gov.cn/", "Accept": "application/json, text/plain, */*", - Network accessline 131
"Referer": "https://flk.npc.gov.cn/", - Network accessline 136
def get_download_url(bbbs_id, fmt="docx"): """Get signed OSS URL for a law.""" resp = requests.get( - Network accessline 137
"""Get signed OSS URL for a law.""" resp = requests.get( f"{BASE_URL}/law-search/download/pc", - Network accessline 138
resp = requests.get( - Network accessline 150
def download_file(url, output_path): resp = requests.get(url, headers={"User-Agent": HEADERS["User-Agent"]}, verify=False, timeout=60) - Network accessline 151
resp = requests.get(url, headers={"User-Agent": HEADERS["User-Agent"]}, verify=False, timeout=60) - Network accessline 242
1. Use `kimi-webbridge` or Chrome plugin 2. Visit `https://flk.npc.gov.cn/detail?id={bbbs}` - Network accessline 243
2. Visit `https://flk.npc.gov.cn/detail?id={bbbs}`
references/codex_adapter.md
- Network accessline 55
// 1. 打开首页 await tab.goto("https://flk.npc.gov.cn/index"); - Network accessline 56
await tab.goto("https://flk.npc.gov.cn/index"); - Network accessline 120
// 1. 搜索 + 每页设 100 条 await tab.goto("https://flk.npc.gov.cn/index"); - Network accessline 121
await tab.goto("https://flk.npc.gov.cn/index");
references/gov_policy_api_reference.md
- Network accessline 5
- **URL**: `https://sousuo.www.gov.cn/zcwjk/policyDocumentLibrary` - Network accessline 6
- **API 端点**: `GET https://sousuo.www.gov.cn/search-gov/data` - Network accessline 56
"listVO": [ { "piclinksurl": "https://www.gov.cn/...", - Network accessline 57
{ "piclinksurl": "https://www.gov.cn/...", "code": "", - Network accessline 58
"piclinksurl": "https://www.gov.cn/...",
references/gov_rules_api_reference.md
- Network accessline 5
- 官方站点:`https://www.gov.cn/zhengce/xxgk/gjgzk/` - Network accessline 15
访问 `https://www.gov.cn/zhengce/xxgk/gjgzk/index.htm?searchWord=`,从 HTML 中提取: - Network accessline 26
var s="(?P<base>https://[^"]+)",o=encodeURIComponent\(a\("(?P<pub>[^"]+)","(?P<seed>[^"]+)"\)\),c=encodeURIComponent\("(?P<name>[^"]+)"\) - Network accessline 47
athenaappkey: {app_key} Content-Type: application/json;charset=UTF-8 Referer: https://www.gov.cn/ - Network accessline 49
Referer: https://www.gov.cn/
references/kimi_bridge_adapter.md
- Network accessline 26
# 1. Visit home page browser_visit("https://flk.npc.gov.cn/index") - Network accessline 27
browser_visit("https://flk.npc.gov.cn/index") - Network accessline 48
# 1. Set page size to 100 (maximum) browser_visit("https://flk.npc.gov.cn/search?keyword=xxx&size=100") - Network accessline 49
browser_visit("https://flk.npc.gov.cn/search?keyword=xxx&size=100") - Network accessline 69
# Output shows: # ossWordPath: https://flk.npc.gov.cn/prod/20231201/uuid.docx - Network accessline 70
# ossWordPath: https://flk.npc.gov.cn/prod/20231201/uuid.docx - Network accessline 71
# ossPdfPath: https://flk.npc.gov.cn/prod/20231201/uuid.pdf - Network accessline 73
# Download the file python scripts/download.py "https://flk.npc.gov.cn/prod/.../uuid.docx" output.docx - Network accessline 74
python scripts/download.py "https://flk.npc.gov.cn/prod/.../uuid.docx" output.docx
references/treaty_api_reference.md
scripts/article_search.py
- Executable scriptline 1
#!/usr/bin/env python3
scripts/common/__init__.py
- Executable scriptline 1
Executable file
scripts/common/cache.py
- Executable scriptline 1
Executable file
scripts/common/chinese_numerals.py
- Executable scriptline 1
Executable file
scripts/common/cli_utils.py
- Executable scriptline 1
Executable file
scripts/common/constants.py
- Executable scriptline 1
Executable file
scripts/common/docx_utils.py
- Executable scriptline 1
Executable file - Network accessline 14
with z.open("word/document.xml") as f: tree = ET.parse(f) W = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}" - Network accessline 15
tree = ET.parse(f) W = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}" return [ - Network accessline 16
W = "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}"
scripts/common/file_io.py
- Executable scriptline 1
Executable file
scripts/common/logger.py
- Executable scriptline 1
Executable file
scripts/common/ratelimit.py
- Executable scriptline 1
Executable file - Network accessline 198
url: Request URL headers: Optional dict of headers session: Optional requests.Session (preserves cookies across calls) - Network accessline 199
headers: Optional dict of headers session: Optional requests.Session (preserves cookies across calls) allowed_statuses: Optional set of non-2xx status codes to accept - Network accessline 200
session: Optional requests.Session (preserves cookies across calls) - Network accessline 202
**kwargs: Passed to requests.request() / session.request() - Network accessline 220
resp = session.request(method, url, headers=headers, **kwargs) else: resp = requests.request(method, url, headers=headers, **kwargs) - Network accessline 221
else: resp = requests.request(method, url, headers=headers, **kwargs) elapsed_ms = (time.time() - start) * 1000 - Network accessline 222
resp = requests.request(method, url, headers=headers, **kwargs)
scripts/common/text_utils.py
- Executable scriptline 1
Executable file
scripts/court_law_crawler.py
- Executable scriptline 1
#!/usr/bin/env python3 - Network accessline 5
Source: https://www.court.gov.cn/fabu.html - Network accessline 12
python court_law_crawler.py --category 司法解释 --size 50 python court_law_crawler.py --category 司法文件 --size 30 python court_law_crawler.py --info "https://www.court.gov.cn/fabu/xiangqing/504221.html" - Network accessline 13
python court_law_crawler.py --category 司法文件 --size 30 python court_law_crawler.py --info "https://www.court.gov.cn/fabu/xiangqing/504221.html" """ - Network accessline 14
python court_law_crawler.py --info "https://www.court.gov.cn/fabu/xiangqing/504221.html" - Network accessline 46
BASE_URL = "https://www.court.gov.cn" - Network accessline 334
" python court_law_crawler.py --category 司法解释 --size 50\n" " python court_law_crawler.py --category 司法文件 --size 30\n" " python court_law_crawler.py --info 'https://www.court.gov.cn/fabu/xiangqing/504221.html'\n" - Network accessline 335
" python court_law_crawler.py --category 司法文件 --size 30\n" " python court_law_crawler.py --info 'https://www.court.gov.cn/fabu/xiangqing/504221.html'\n" ), - Network accessline 336
" python court_law_crawler.py --info 'https://www.court.gov.cn/fabu/xiangqing/504221.html'\n"
scripts/download.py
- Executable scriptline 1
#!/usr/bin/env python3 - Network accessline 66
BASE_URL = "https://flk.npc.gov.cn" - Network accessline 67
HEADERS = { "User-Agent": DEFAULT_USER_AGENT, "Referer": "https://flk.npc.gov.cn/", - Network accessline 68
"User-Agent": DEFAULT_USER_AGENT, "Referer": "https://flk.npc.gov.cn/", "Accept": "application/json, text/plain, */*", - Network accessline 69
"Referer": "https://flk.npc.gov.cn/",
scripts/gov_policy_library.py
- Executable scriptline 1
#!/usr/bin/env python3 - Network accessline 5
Source: https://sousuo.www.gov.cn/zcwjk/policyDocumentLibrary - Network accessline 10
python gov_policy_library.py --search "营商环境" --range content --size 50 python gov_policy_library.py --search "营商环境" --category 国务院文件 --size 100 python gov_policy_library.py --info "https://www.gov.cn/gongbao/content/2024/content_12345.h - Network accessline 11
python gov_policy_library.py --search "营商环境" --category 国务院文件 --size 100 python gov_policy_library.py --info "https://www.gov.cn/gongbao/content/2024/content_12345.htm" python gov_policy_library.py --search "放管服" --year 2024 --size 50 - Network accessline 12
python gov_policy_library.py --info "https://www.gov.cn/gongbao/content/2024/content_12345.htm" - Network accessline 43
BASE_URL = "https://sousuo.www.gov.cn" - Network accessline 363
" python gov_policy_library.py --search '放管服' --range content --size 50\n" " python gov_policy_library.py --search '国务院' --category 国务院文件 --size 100\n" " python gov_policy_library.py --info 'https://www.gov.cn/gon - Network accessline 364
" python gov_policy_library.py --search '国务院' --category 国务院文件 --size 100\n" " python gov_policy_library.py --info 'https://www.gov.cn/gongbao/content/xxx.htm'\n" ), - Network accessline 365
" python gov_policy_library.py --info 'https://www.gov.cn/gongbao/content/xxx.htm'\n"
scripts/gov_rules_crawler.py
- Executable scriptline 1
#!/usr/bin/env python3 - Network accessline 6
python gov_rules_crawler.py --search "管理办法" --categories 部门规章 --size 20 python gov_rules_crawler.py --categories 地方政府规章 --size 50 --download python gov_rules_crawler.py --info "https://www.gov.cn/zhengce/xxgk/gjgzk/..." - Network accessline 7
python gov_rules_crawler.py --categories 地方政府规章 --size 50 --download python gov_rules_crawler.py --info "https://www.gov.cn/zhengce/xxgk/gjgzk/..." """ - Network accessline 8
python gov_rules_crawler.py --info "https://www.gov.cn/zhengce/xxgk/gjgzk/..." - Network accessline 51
INDEX_URL = "https://www.gov.cn/zhengce/xxgk/gjgzk/index.htm?searchWord=" - Network accessline 88
script_text = http_request("GET", script_url).text auth_match = re.search( r'var s="(?P<base>https://[^"]+)",o=encodeURIComponent\(a\("(?P<pub>[^"]+)","(?P<seed>[^"]+)"\)\),c=encodeURIComponent\("(?P<name>[^"]+)"\)', - Network accessline 89
auth_match = re.search( r'var s="(?P<base>https://[^"]+)",o=encodeURIComponent\(a\("(?P<pub>[^"]+)","(?P<seed>[^"]+)"\)\),c=encodeURIComponent\("(?P<name>[^"]+)"\)', script_text, - Network accessline 90
r'var s="(?P<base>https://[^"]+)",o=encodeURIComponent\(a\("(?P<pub>[^"]+)","(?P<seed>[^"]+)"\)\),c=encodeURIComponent\("(?P<name>[^"]+)"\)', - Network accessline 102
"Accept": "application/json, text/javascript, */*; q=0.01", "Content-Type": "application/json;charset=UTF-8", "Referer": "https://www.gov.cn/", - Network accessline 103
"Content-Type": "application/json;charset=UTF-8", "Referer": "https://www.gov.cn/", "athenaappname": self.app_name, - Network accessline 104
"Referer": "https://www.gov.cn/",
scripts/mcp_server.py
- Executable scriptline 1
#!/usr/bin/env python3
scripts/mee_law_crawler.py
- Executable scriptline 1
#!/usr/bin/env python3 - Network accessline 5
Source: https://www.mee.gov.cn/ywgz/fgbz/ - Network accessline 12
python mee_law_crawler.py --category 法律 --size 100 python mee_law_crawler.py --category "生态环境损害赔偿制度" --size 30 python mee_law_crawler.py --info "https://www.mee.gov.cn/ywgz/fgbz/fl/202603/t20260313_1146496.shtml" - Network accessline 13
python mee_law_crawler.py --category "生态环境损害赔偿制度" --size 30 python mee_law_crawler.py --info "https://www.mee.gov.cn/ywgz/fgbz/fl/202603/t20260313_1146496.shtml" """ - Network accessline 14
python mee_law_crawler.py --info "https://www.mee.gov.cn/ywgz/fgbz/fl/202603/t20260313_1146496.shtml" - Network accessline 46
BASE_URL = "https://www.mee.gov.cn"
scripts/mod_law_crawler.py
- Executable scriptline 1
#!/usr/bin/env python3 - Network accessline 5
Source: http://www.mod.gov.cn/gfbw/fgwx/index.html - Network accessline 12
python mod_law_crawler.py --category 法律法规 --size 20 python mod_law_crawler.py --search "军队" --size 50 python mod_law_crawler.py --info "http://www.mod.gov.cn/gfbw/fgwx/flfg/16448581.html" - Network accessline 13
python mod_law_crawler.py --search "军队" --size 50 python mod_law_crawler.py --info "http://www.mod.gov.cn/gfbw/fgwx/flfg/16448581.html" """ - Network accessline 14
python mod_law_crawler.py --info "http://www.mod.gov.cn/gfbw/fgwx/flfg/16448581.html" - Network accessline 46
BASE_URL = "http://www.mod.gov.cn" - Network accessline 330
" python mod_law_crawler.py --category 法律法规 --size 20\n" " python mod_law_crawler.py --search '军队' --size 50\n" " python mod_law_crawler.py --info 'http://www.mod.gov.cn/gfbw/fgwx/flfg/16448581.html'\n" - Network accessline 331
" python mod_law_crawler.py --search '军队' --size 50\n" " python mod_law_crawler.py --info 'http://www.mod.gov.cn/gfbw/fgwx/flfg/16448581.html'\n" ), - Network accessline 332
" python mod_law_crawler.py --info 'http://www.mod.gov.cn/gfbw/fgwx/flfg/16448581.html'\n"
scripts/moj_law_crawler.py
- Executable scriptline 1
#!/usr/bin/env python3 - Network accessline 5
Source: https://xzfg.moj.gov.cn/search2.html - Network accessline 11
python moj_law_crawler.py --search "行政复议" --range content --size 50 python moj_law_crawler.py --search "行政处罚" --status effective --size 100 python moj_law_crawler.py --info "https://xzfg.moj.gov.cn/detail?xxx" - Network accessline 12
python moj_law_crawler.py --search "行政处罚" --status effective --size 100 python moj_law_crawler.py --info "https://xzfg.moj.gov.cn/detail?xxx" """ - Network accessline 13
python moj_law_crawler.py --info "https://xzfg.moj.gov.cn/detail?xxx" - Network accessline 45
BASE_URL = "https://xzfg.moj.gov.cn"
scripts/party_law_crawler.py
- Executable scriptline 1
#!/usr/bin/env python3 - Network accessline 5
Source: https://www.12371.cn/special/dnfg/ - Network accessline 13
python party_law_crawler.py --search "纪律" --size 20 python party_law_crawler.py --category 条例 --size 50 python party_law_crawler.py --info "https://www.12371.cn/2022/01/23/ARTI1642937162249109.shtml" - Network accessline 14
python party_law_crawler.py --category 条例 --size 50 python party_law_crawler.py --info "https://www.12371.cn/2022/01/23/ARTI1642937162249109.shtml" """ - Network accessline 15
python party_law_crawler.py --info "https://www.12371.cn/2022/01/23/ARTI1642937162249109.shtml" - Network accessline 47
BASE_URL = "https://www.12371.cn" - Network accessline 311
" python party_law_crawler.py --search '纪律'\n" " python party_law_crawler.py --category 条例 --size 50\n" " python party_law_crawler.py --info 'https://www.12371.cn/2022/01/23/ARTI...shtml'\n" - Network accessline 312
" python party_law_crawler.py --category 条例 --size 50\n" " python party_law_crawler.py --info 'https://www.12371.cn/2022/01/23/ARTI...shtml'\n" ), - Network accessline 313
" python party_law_crawler.py --info 'https://www.12371.cn/2022/01/23/ARTI...shtml'\n"
scripts/region_classifier.py
- Executable scriptline 1
#!/usr/bin/env python3
scripts/tax_law_crawler.py
- Executable scriptline 1
#!/usr/bin/env python3 - Network accessline 5
Source: https://fgk.chinatax.gov.cn/ - Network accessline 6
API: POST https://www.chinatax.gov.cn/getFileListByCodeId - Network accessline 15
python tax_law_crawler.py --category 财税文件 --size 50 python tax_law_crawler.py --category 法律 --size 100 python tax_law_crawler.py --info "https://fgk.chinatax.gov.cn/zcfgk/c102416/c5250687/content.html" - Network accessline 16
python tax_law_crawler.py --category 法律 --size 100 python tax_law_crawler.py --info "https://fgk.chinatax.gov.cn/zcfgk/c102416/c5250687/content.html" """ - Network accessline 17
python tax_law_crawler.py --info "https://fgk.chinatax.gov.cn/zcfgk/c102416/c5250687/content.html" - Network accessline 50
BASE_URL = "https://fgk.chinatax.gov.cn" - Network accessline 51
API_URL = "https://www.chinatax.gov.cn/getFileListByCodeId" - Network accessline 128
session = requests.Session() - Network accessline 194
url = item.get("url", "") if url and not url.startswith("http"): url = urljoin("http://www.chinatax.gov.cn", url) - Network accessline 196
url = urljoin("http://www.chinatax.gov.cn", url) - Network accessline 416
" python tax_law_crawler.py --category 财税文件 --size 50\n" " python tax_law_crawler.py --category 法律 --size 100\n" " python tax_law_crawler.py --info 'https://fgk.chinatax.gov.cn/zcfgk/c102416/c5250687/content.html' - Network accessline 417
" python tax_law_crawler.py --category 法律 --size 100\n" " python tax_law_crawler.py --info 'https://fgk.chinatax.gov.cn/zcfgk/c102416/c5250687/content.html'\n" ), - Network accessline 418
" python tax_law_crawler.py --info 'https://fgk.chinatax.gov.cn/zcfgk/c102416/c5250687/content.html'\n"
scripts/treaty_crawler.py
- Executable scriptline 1
#!/usr/bin/env python3 - Network accessline 6
python treaty_crawler.py --search "上海合作组织" --size 20 python treaty_crawler.py --collections 双边 --size 50 --download python treaty_crawler.py --info "https://treaty.mfa.gov.cn/web/detail.jsp?treatyid=..." - Network accessline 7
python treaty_crawler.py --collections 双边 --size 50 --download python treaty_crawler.py --info "https://treaty.mfa.gov.cn/web/detail.jsp?treatyid=..." """ - Network accessline 8
python treaty_crawler.py --info "https://treaty.mfa.gov.cn/web/detail.jsp?treatyid=..." - Network accessline 42
BASE_URL = "https://treaty.mfa.gov.cn/web/"
tests/conftest.py
- Executable scriptline 1
Executable file
tests/fixtures/court/__init__.py
- Executable scriptline 1
Executable file
tests/fixtures/court/data.py
- Executable scriptline 1
Executable file
tests/fixtures/gov_policy/__init__.py
- Executable scriptline 1
Executable file
tests/fixtures/gov_policy/data.py
- Executable scriptline 1
Executable file - Network accessline 11
{ "title": "测试<em>法规</em>一关于加强<em>营商</em>环境建设的意见", "piclinksurl": "https://www.gov.cn/gongbao/content/2024/content_12345.htm", - Network accessline 12
"title": "测试<em>法规</em>一关于加强<em>营商</em>环境建设的意见", "piclinksurl": "https://www.gov.cn/gongbao/content/2024/content_12345.htm", "code": "gf001", - Network accessline 13
"piclinksurl": "https://www.gov.cn/gongbao/content/2024/content_12345.htm", - Network accessline 21
{ "title": "测试政策二进一步推进放管服改革", "piclinksurl": "https://www.gov.cn/gongbao/content/2024/content_67890.htm", - Network accessline 22
"title": "测试政策二进一步推进放管服改革", "piclinksurl": "https://www.gov.cn/gongbao/content/2024/content_67890.htm", "code": "gf002", - Network accessline 23
"piclinksurl": "https://www.gov.cn/gongbao/content/2024/content_67890.htm",
tests/fixtures/mee/__init__.py
- Executable scriptline 1
Executable file
tests/fixtures/mee/data.py
- Executable scriptline 1
Executable file
tests/fixtures/mod/__init__.py
- Executable scriptline 1
Executable file
tests/fixtures/mod/data.py
- Executable scriptline 1
Executable file
tests/fixtures/moj/__init__.py
- Executable scriptline 1
Executable file
tests/fixtures/moj/data.py
- Executable scriptline 1
Executable file
tests/fixtures/party/__init__.py
- Executable scriptline 1
Executable file
tests/fixtures/party/data.py
- Executable scriptline 1
Executable file
tests/fixtures/tax/__init__.py
- Executable scriptline 1
Executable file
tests/fixtures/tax/data.py
- Executable scriptline 1
Executable file - Network accessline 41
"subTitleHtml": "", "publishedTimeStr": "2023-12-01", "url": "http://www.chinatax.gov.cn/zcfgk/c100010/c5250999/content.html", - Network accessline 42
"publishedTimeStr": "2023-12-01", "url": "http://www.chinatax.gov.cn/zcfgk/c100010/c5250999/content.html", "domainMetaList": [], - Network accessline 43
"url": "http://www.chinatax.gov.cn/zcfgk/c100010/c5250999/content.html",
tests/test_article_search.py
- Executable scriptline 1
#!/usr/bin/env python3
tests/test_cache.py
- Executable scriptline 1
Executable file
tests/test_common.py
- Executable scriptline 1
#!/usr/bin/env python3 - Network accessline 113
resp = http_request("GET", "https://example.com") - Network accessline 122
with self.assertRaises(RuntimeError) as ctx: http_request("GET", "https://example.com/api/secret") - Network accessline 123
http_request("GET", "https://example.com/api/secret") - Network accessline 133
with self.assertRaises(RuntimeError) as ctx: http_request("GET", "https://example.com/notfound") - Network accessline 134
http_request("GET", "https://example.com/notfound") - Network accessline 144
with mock.patch("time.sleep"): with self.assertRaises(RuntimeError) as ctx: http_request("GET", "https://example.com") - Network accessline 145
with self.assertRaises(RuntimeError) as ctx: http_request("GET", "https://example.com") self.assertIn("429", str(ctx.exception)) - Network accessline 146
http_request("GET", "https://example.com") - Network accessline 155
with mock.patch("time.sleep"): with self.assertRaises(RuntimeError) as ctx: http_request("GET", "https://example.com") - Network accessline 156
with self.assertRaises(RuntimeError) as ctx: http_request("GET", "https://example.com") self.assertIn("503", str(ctx.exception)) - Network accessline 157
http_request("GET", "https://example.com") - Network accessline 167
with self.assertRaises(RuntimeError) as ctx: http_request("GET", "https://example.com") - Network accessline 168
http_request("GET", "https://example.com") - Network accessline 180
resp = http_request( "GET", "https://example.com", allowed_statuses={403} - Network accessline 181
"GET", "https://example.com", allowed_statuses={403} - Network accessline 192
[Credential-related source omitted] - Network accessline 193
[Credential-related source omitted] - Network accessline 214
with mock.patch("requests.request") as mock_global: resp = http_request( "GET", "https://example.com", session=session - Network accessline 215
resp = http_request( "GET", "https://example.com", session=session ) - Network accessline 216
"GET", "https://example.com", session=session - Network accessline 230
with mock.patch.object(session, "request", return_value=mock_resp): resp = http_request( "GET", "https://example.com", session=session - Network accessline 231
resp = http_request( "GET", "https://example.com", session=session ) - Network accessline 232
"GET", "https://example.com", session=session - Access to secretsline 246
[Credential-related source omitted] - Access to secretsline 257
[Credential-related source omitted]
tests/test_court_law_crawler.py
- Executable scriptline 1
Executable file - Network accessline 101
first = records[0] assert "测试关于审理建设工程" in first["title"] assert first["url"].startswith("https://www.court.gov.cn/fabu/xiangqing/") - Network accessline 102
assert "测试关于审理建设工程" in first["title"] assert first["url"].startswith("https://www.court.gov.cn/fabu/xiangqing/") assert first["source"] == "court_law" - Network accessline 103
assert first["url"].startswith("https://www.court.gov.cn/fabu/xiangqing/") - Network accessline 109
records, _ = parse_list_page(LIST_HTML_PAGE1_INTERP) for r in records: assert r["url"].startswith("https://www.court.gov.cn") - Network accessline 111
assert r["url"].startswith("https://www.court.gov.cn") - Network accessline 145
result = fetch_detail("https://www.court.gov.cn/fabu/xiangqing/504221.html") - Network accessline 159
result = fetch_detail("https://www.court.gov.cn/fabu/xiangqing/504299.html") - Network accessline 185
def test_save_results(self, tmp_path): records = [ {"source": "court_law", "title": "测试司法解释", "url": "https://www.court.gov.cn/fabu/xiangqing/504221.html", "category": "司法解释"} - Network accessline 186
records = [ {"source": "court_law", "title": "测试司法解释", "url": "https://www.court.gov.cn/fabu/xiangqing/504221.html", "category": "司法解释"} ] - Network accessline 187
{"source": "court_law", "title": "测试司法解释", "url": "https://www.court.gov.cn/fabu/xiangqing/504221.html", "category": "司法解释"}
tests/test_download.py
- Executable scriptline 1
#!/usr/bin/env python3 - Network accessline 161
def side_effect(bbbs, fmt): if bbbs == "id1": return "https://example.com/1.doc" - Network accessline 162
if bbbs == "id1": return "https://example.com/1.doc" raise RuntimeError("no url") - Network accessline 163
return "https://example.com/1.doc" - Network accessline 190
} results = dl.collect_search_urls(data) self.assertEqual(results[0]["url"], "https://example.com/1.doc") - Network accessline 191
results = dl.collect_search_urls(data) self.assertEqual(results[0]["url"], "https://example.com/1.doc") self.assertIsNone(results[0]["error"]) - Network accessline 192
self.assertEqual(results[0]["url"], "https://example.com/1.doc") - Network accessline 291
xml_parts = ['<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'] xml_parts.append( '<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">' - Network accessline 292
xml_parts.append( '<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">' ) - Network accessline 293
'<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">'
tests/test_gov_policy_library.py
- Executable scriptline 1
Executable file - Network accessline 145
search_policies("test") url = mock_http.call_args[0][1] assert url.startswith("https://sousuo.www.gov.cn/search-gov/data") - Network accessline 147
assert url.startswith("https://sousuo.www.gov.cn/search-gov/data") - Network accessline 166
assert "测试" in first["title"] assert "<em>" not in first["title"] # highlight tags cleaned assert first["url"] == "https://www.gov.cn/gongbao/content/2024/content_12345.htm" - Network accessline 167
assert "<em>" not in first["title"] # highlight tags cleaned assert first["url"] == "https://www.gov.cn/gongbao/content/2024/content_12345.htm" assert first["pub_time"] == "2024-03-15" - Network accessline 168
assert first["url"] == "https://www.gov.cn/gongbao/content/2024/content_12345.htm" - Network accessline 227
result = fetch_detail_page("https://www.gov.cn/test.htm") - Network accessline 242
result = fetch_detail_page("https://www.gov.cn/test.htm") - Network accessline 244
assert result["url"] == "https://www.gov.cn/test.htm" - Network accessline 254
fetch_detail_page("https://www.gov.cn/test.htm") - Network accessline 256
fetch_detail_page("https://www.gov.cn/test.htm") - Network accessline 291
"source": "gov_policy_library", "title": "测试法规一", "url": "https://www.gov.cn/test1", - Network accessline 292
"title": "测试法规一", "url": "https://www.gov.cn/test1", "department": "国务院", - Network accessline 293
"url": "https://www.gov.cn/test1", - Network accessline 299
"source": "gov_policy_library", "title": "测试法规二", "url": "https://www.gov.cn/test2", - Network accessline 300
"title": "测试法规二", "url": "https://www.gov.cn/test2", "department": "国家发展改革委", - Network accessline 301
"url": "https://www.gov.cn/test2",
tests/test_gov_rules_crawler.py
- Executable scriptline 1
Executable file - Network accessline 16
def make_item(title="测试管理办法", url="https://www.gov.cn/zhengce/xxgk/gjgzk/1.htm"): - Network accessline 68
assert record["category"] == "部门规章" assert record["detail_url"] == ( "https://www.gov.cn/zhengce/xxgk/gjgzk/1.htm" - Network accessline 69
assert record["detail_url"] == ( "https://www.gov.cn/zhengce/xxgk/gjgzk/1.htm" ) - Network accessline 70
"https://www.gov.cn/zhengce/xxgk/gjgzk/1.htm" - Network accessline 127
class FakeAuth: base_url = "https://example.invalid" - Network accessline 128
base_url = "https://example.invalid"
tests/test_live_sources.py
- Executable scriptline 1
Executable file
tests/test_mcp_tools.py
- Executable scriptline 1
Executable file - Network accessline 118
mcp_server.gov_policy_library, "fetch_detail_page", return_value={"title": "T"} ) as fd: result = mcp_server.get_law_detail("gov_policy", "http://x") - Network accessline 119
) as fd: result = mcp_server.get_law_detail("gov_policy", "http://x") fd.assert_called_once_with("http://x") - Network accessline 120
result = mcp_server.get_law_detail("gov_policy", "http://x") - Network accessline 121
fd.assert_called_once_with("http://x") - Network accessline 131
def test_unknown_source(self): result = mcp_server.get_law_detail("nope", "http://x") - Network accessline 132
result = mcp_server.get_law_detail("nope", "http://x")
tests/test_mee_law_crawler.py
- Executable scriptline 1
Executable file - Network accessline 51
def test_gz_has_separate_base_url(self): assert CATEGORY_URLS["gz"] != f"https://www.mee.gov.cn/ywgz/fgbz/gz/" - Network accessline 52
assert CATEGORY_URLS["gz"] != f"https://www.mee.gov.cn/ywgz/fgbz/gz/" - Network accessline 63
assert "测试环境保护法" in first["title"] assert first["category"] == "fl" assert first["url"].startswith("https://www.mee.gov.cn") - Network accessline 64
assert first["category"] == "fl" assert first["url"].startswith("https://www.mee.gov.cn") assert first["source"] == "mee_law" - Network accessline 65
assert first["url"].startswith("https://www.mee.gov.cn") - Network accessline 106
result = fetch_detail("https://www.mee.gov.cn/ywgz/fgbz/fl/t20260313_1146496.shtml") - Network accessline 119
result = fetch_detail("https://www.mee.gov.cn/ywgz/fgbz/fl/t20260313_1146496.shtml") - Network accessline 143
def test_save_results(self, tmp_path): records = [ {"source": "mee_law", "title": "测试环境保护法", "url": "https://www.mee.gov.cn/ywgz/fgbz/fl/t20260313_1146496.shtml", "category": "fl"} - Network accessline 144
records = [ {"source": "mee_law", "title": "测试环境保护法", "url": "https://www.mee.gov.cn/ywgz/fgbz/fl/t20260313_1146496.shtml", "category": "fl"} ] - Network accessline 145
{"source": "mee_law", "title": "测试环境保护法", "url": "https://www.mee.gov.cn/ywgz/fgbz/fl/t20260313_1146496.shtml", "category": "fl"}
tests/test_mod_law_crawler.py
- Executable scriptline 1
Executable file - Network accessline 88
records = parse_category_page(INDEX_HTML_WITH_RELATIVE) assert len(records) == 1 assert records[0]["url"].startswith("http://www.mod.gov.cn") - Network accessline 90
assert records[0]["url"].startswith("http://www.mod.gov.cn") - Network accessline 134
result = fetch_detail("http://www.mod.gov.cn/gfbw/fgwx/flfg/16448581.html") - Network accessline 149
result = fetch_detail("http://www.mod.gov.cn/article.html") - Network accessline 165
def test_save_results_all_files(self, tmp_path): records = [ {"source": "mod_law", "title": "测试法规", "url": "http://www.mod.gov.cn/gfbw/fgwx/flfg/1.html", "category": "flfg"} - Network accessline 166
records = [ {"source": "mod_law", "title": "测试法规", "url": "http://www.mod.gov.cn/gfbw/fgwx/flfg/1.html", "category": "flfg"} ] - Network accessline 167
{"source": "mod_law", "title": "测试法规", "url": "http://www.mod.gov.cn/gfbw/fgwx/flfg/1.html", "category": "flfg"}
tests/test_moj_law_crawler.py
- Executable scriptline 1
Executable file - Network accessline 116
assert first["effective_date"] == "2024-05-01" assert first["status"] == "现行有效" assert first["detail_url"].startswith("https://xzfg.moj.gov.cn/detail?bbh=1") - Network accessline 117
assert first["status"] == "现行有效" assert first["detail_url"].startswith("https://xzfg.moj.gov.cn/detail?bbh=1") assert first["source"] == "moj_law" - Network accessline 118
assert first["detail_url"].startswith("https://xzfg.moj.gov.cn/detail?bbh=1") - Network accessline 160
result = fetch_detail("https://xzfg.moj.gov.cn/detail?bbh=1001") - Network accessline 174
result = fetch_detail("https://xzfg.moj.gov.cn/detail?bbh=9999") - Network accessline 175
assert result["url"] == "https://xzfg.moj.gov.cn/detail?bbh=9999" - Network accessline 192
"source": "moj_law", "title": "测试法规一", "detail_url": "https://xzfg.moj.gov.cn/detail?bbh=1001", - Network accessline 193
"title": "测试法规一", "detail_url": "https://xzfg.moj.gov.cn/detail?bbh=1001", "publish_date": "2024-03-01", - Network accessline 194
"detail_url": "https://xzfg.moj.gov.cn/detail?bbh=1001",
tests/test_new_sources_contract.py
- Executable scriptline 1
Executable file
tests/test_party_law_crawler.py
- Executable scriptline 1
Executable file - Network accessline 76
first = records[0] assert "测试纪律处分条例" in first["title"] assert first["url"].startswith("https://www.12371.cn/2024/03/15/ARTI") - Network accessline 77
assert "测试纪律处分条例" in first["title"] assert first["url"].startswith("https://www.12371.cn/2024/03/15/ARTI") assert first["source"] == "party_law" - Network accessline 78
assert first["url"].startswith("https://www.12371.cn/2024/03/15/ARTI") - Network accessline 84
records = parse_category_page(LIST_HTML_TIAOLI) for r in records: assert r["url"].startswith("https://www.12371.cn") - Network accessline 86
assert r["url"].startswith("https://www.12371.cn") - Network accessline 150
result = fetch_detail("https://www.12371.cn/2024/03/15/ARTI123.shtml") - Network accessline 164
result = fetch_detail("https://www.12371.cn/2024/06/15/ARTI999.shtml") - Network accessline 187
def test_save_results_creates_all_files(self, tmp_path): records = [ {"source": "party_law", "title": "测试条例一", "url": "https://www.12371.cn/2024/01/ARTI001.shtml", "category": "tl"} - Network accessline 188
records = [ {"source": "party_law", "title": "测试条例一", "url": "https://www.12371.cn/2024/01/ARTI001.shtml", "category": "tl"} ] - Network accessline 189
{"source": "party_law", "title": "测试条例一", "url": "https://www.12371.cn/2024/01/ARTI001.shtml", "category": "tl"}
tests/test_region_classifier.py
- Executable scriptline 1
#!/usr/bin/env python3
tests/test_tax_law_crawler.py
- Executable scriptline 1
Executable file - Network accessline 244
result = fetch_detail("https://fgk.chinatax.gov.cn/zcfgk/c100009/c5250687/content.html") - Network accessline 257
result = fetch_detail("https://fgk.chinatax.gov.cn/minimal") - Network accessline 258
assert result["url"] == "https://fgk.chinatax.gov.cn/minimal" - Network accessline 284
def test_save_results(self, tmp_path): records = [ {"source": "tax_law", "title": "测试增值税条例", "url": "https://fgk.chinatax.gov.cn/zcfgk/c100009/content.html", "sub_title": "", "publish_time": "2024-01-01", "document_numbe - Network accessline 285
records = [ {"source": "tax_law", "title": "测试增值税条例", "url": "https://fgk.chinatax.gov.cn/zcfgk/c100009/content.html", "sub_title": "", "publish_time": "2024-01-01", "document_number": "财政部令第50号", "issuer": "财政部", "effective_dat - Network accessline 286
{"source": "tax_law", "title": "测试增值税条例", "url": "https://fgk.chinatax.gov.cn/zcfgk/c100009/content.html", "sub_title": "", "publish_time": "2024-01-01", "document_number": "财政部令第50号", "issuer": "财政部", "effective_date": "2024-07-01"}
How the signals fit together
Facts from a static read of the files at the pinned commit. They describe what the code does, not why.
Some files could not be read; the facts below still hold.
Declared and executed: 1 fact
- Contacts schemas.openxmlformats.org, which SKILL.md, the README and the plugin manifest do not mentionscripts/common/docx_utils.py:16High confidence
Signal confidence: 359 facts
- Network access in code of documentationCHANGELOG.md:89Low confidence
- Network access in code of documentationCHANGELOG.md:90Low confidence
- Network access in code of documentationCHANGELOG.md:134Low confidence
- Network access in code of documentationCHANGELOG.md:135Low confidence
- Network access in code of documentationCHANGELOG.md:153Low confidence
- Network access in code of documentationCHANGELOG.md:154Low confidence
- Network access in code of documentationCHANGELOG.md:170Low confidence
- Network access in code of documentationCHANGELOG.md:171Low confidence
- Network access in code of documentationCHANGELOG.md:189Low confidence
- Network access in code of documentationCHANGELOG.md:190Low confidence
- Network access in code of documentationCHANGELOG.md:209Low confidence
- Network access in code of documentationCHANGELOG.md:210Low confidence
- Network access in prose of documentationCHANGELOG.md:287Low confidence
- Network access in prose of documentationCHANGELOG.md:288Low confidence
- Network access in prose of documentationREADME.md:3Low confidence
- Network access in prose of documentationREADME.md:121Low confidence
- Network access in prose of documentationREADME.md:127Low confidence
- Network access in prose of documentationREADME.md:407Low confidence
- Network access in prose of documentationREADME.md:408Low confidence
- Network access in prose of documentationREADME.md:440Low confidence
- Network access in prose of documentationREADME.md:441Low confidence
- Network access in prose of documentationREADME.md:442Low confidence
- Network access in prose of documentationREADME.md:443Low confidence
- Network access in code of documentationREADME.md:455Low confidence
- Network access in code of documentationREADME.md:456Low confidence
- Network access in code of documentationREADME.md:457Low confidence
- Network access in code of documentationreferences/api_reference.md:6Low confidence
- Network access in code of documentationreferences/api_reference.md:7Low confidence
- Network access in code of documentationreferences/api_reference.md:8Low confidence
- Network access in code of documentationreferences/api_reference.md:9Low confidence
- Network access in code of documentationreferences/api_reference.md:10Low confidence
- Network access in prose of documentationreferences/api_reference.md:15Low confidence
- Network access in code of documentationreferences/api_reference.md:144Low confidence
- Network access in code of documentationreferences/api_reference.md:145Low confidence
- Network access in code of documentationreferences/api_reference.md:146Low confidence
- Network access in code of documentationreferences/api_reference.md:147Low confidence
- Network access in code of documentationreferences/api_reference.md:192Low confidence
- Network access in code of documentationreferences/api_reference.md:199Low confidence
- Network access in code of documentationreferences/api_reference.md:200Low confidence
- Network access in code of documentationreferences/api_reference.md:203Low confidence
- Network access in code of documentationreferences/api_reference.md:204Low confidence
- Network access in prose of documentationreferences/api_reference.md:221Low confidence
- Network access in prose of documentationreferences/api_reference.md:227Low confidence
- Network access in code of documentationreferences/api_reference.md:259Low confidence
- Network access in code of documentationreferences/api_reference.md:260Low confidence
- Network access in code of documentationreferences/api_reference.md:262Low confidence
- Network access in code of documentationreferences/api_reference.md:263Low confidence
- Network access in code of documentationreferences/api_reference.md:264Low confidence
- Network access in code of documentationreferences/api_reference.md:274Low confidence
- Network access in code of documentationreferences/api_reference.md:275Low confidence
and 309 more
Works with
| Agent | Status | Evidence | Install to |
|---|---|---|---|
| Claude Code | Compatible | Standard SKILL.md SKILL.md | .claude/skills/<skill-name>/ |
| Codex | Compatible | Standard SKILL.md SKILL.md | .agents/skills/<skill-name>/ |
| Cursor | Compatible | Standard SKILL.md SKILL.md | .cursor/skills/<skill-name>/ |
| Gemini CLI | Compatible | Standard SKILL.md SKILL.md | .gemini/skills/<skill-name>/ |
| GitHub Copilot | Compatible | Standard SKILL.md SKILL.md | .github/skills/<skill-name>/ |
| OpenCode | Compatible | Standard SKILL.md SKILL.md | .opencode/skills/<skill-name>/ |
- Native The repository ships a manifest, folder or frontmatter field for this agent.
- Compatible A standard SKILL.md that this agent can read.
- Unknown No evidence either way.
Derived automatically from paths, manifests and frontmatter. Not tested on each agent.