weigui-weekly-report
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 "weigui-weekly-report" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-a4fcd890e9cd59fd205cbdc9ee91b2d7bb96407a57cd51efb0f6134874df22ef. Verify the upstream source and version against https://skillhub.cn/skills/user_160536ff/weekly-report-companies-violations 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
Tool for producing, filtering, and interpreting weekly reports of listed-company violations. Operates only on the "Dong Xiaoyu Violation Case Database" and its linked data, selects cases from a continuous 7-calendar-day window by LatestInfoPublDate (announcement/publication date), and summarizes this week's penalized entities, violation items, penalties, and legal bases. Outputs can be delivered as Word, JSON, or Markdown weekly reports.
Introduction source: third_party · user_160536ff · 2.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- For each case, the following keys are retained: `case_penalties[]` It must be demonstrated that “non-compliance” retains the facts of the violation, the determination of the breach and the determination of responsibility, and that “non-compliance” is not repeated, starting with the content of the decision to impose a specific penalty, such as “under/under the provisions of ...”. Name of the subject and the case `company.short_name` or `company.full_name` When consistent, the object's identity is shown as a “listed company”. Besides, the object's identity only from the end. `violation_matters.text` by name of the subject of the penalty; displaying “-” when no position/identity exists, not allowed `PartyType` , subject ' s basic information, penalty sections or associated company fields. If a case is all `penalty_term=null` In this case, the “case penalties” table hides the “terms of punishment”; no time for publication, date of punishment or expiry date, but the original penalty is not semantic `BeginDate/EndDate` Compute the duration of the penalty. `detail_level=full` There shall be no character cut-off for violations or penalties; the paragraph shall end in its entirety at the semantic border and shall not be left with words/terms such as “...”. Word Weekly, delivered to the outside world, uses the "Tung Xiaoxii's Case Book" as a display name. The footer shows the “Casebook of Tung Xiaojun Violations”; the first page shows a fixed statistical caliber “Statistical caliber: a database of cases of Tung Xiaojun Violations” https://www.dxy-aiagent.com/website/weigui”。 Word's first page shows only the number of violations, the number of companies involved and the number of targets for sanctions, the quality indicators such as “full/partial” and the data source limitations or dynamic database tips. Word exports only weekly overviews and case details, not data quality and mouth
- Testing
- Not tested
Browse files
Frontmatter
name: weigui-weekly-report
description: 生成、筛选或解读上市公司违规案例周报,只使用董小屿违规案例库及其关联数据,并按 LatestInfoPublDate(公告日期/发布时间)选取连续 7 个自然日。用户要求“违规案例周报”“最近一周违规处罚案例”“本周处罚对象、违规事项、处罚情况或法规依据汇总”,或要求输出可交付 Word、JSON、Markdown 时使用。违规案例周报
使用 weigui_weekly_report 获取周报。不得改用公告库、iFind、网络搜索或其他案例数据源。
鉴权与执行前提
- 生成全量周报时必须通过
scripts/fetch-weekly-pages.py调用 MCP;不得在模型对话中逐页调用工具并累积完整响应。 - 远程服务地址默认为
https://www.dxy-aiagent.com/mcp/weigui/mcp,也可通过WEIGUI_MCP_URL指定。远程地址必须在运行进程中设置WEIGUI_TOKEN;本地localhost/127.0.0.1服务可不设 Token。 - Token 只从环境变量读取。不得把真实 Token 放入命令参数、Skill 文件、清单、日志、压缩包或回复正文;个人 Token 从
https://www.dxy-aiagent.com/mcp-hub.html获取。
工作流
- 确定
report_end_date。- 用户说“最近 7 天”且未指定日期:省略该参数,使用北京时间当天。
- 用户要完整自然周:传入该周周日。
- 时间范围固定为结束日及向前 6 日,共 7 个自然日。
- 为本次“日期 + 筛选条件”创建独立
BATCH_DIR;不同统计期或不同筛选不得共用同一个目录。 - 在 Skill 根目录运行离线上下文分页器。它固定使用
quality=all、detail_level=full、format=json,默认每页 10 案:
python3 scripts/fetch-weekly-pages.py BATCH_DIR --report-end-date YYYY-MM-DD
未指定结束日时省略 --report-end-date。用户明确给出筛选时,按需重复追加 --bankuai、--trigger-institution、--violation-type;不得自行增加筛选。
4. 脚本完成后只读取其单行摘要及轻量 manifest.json,检查 status=complete、统计区间、筛选、页数、总数和 source_degraded;不要把 page-*.json 或 merged.json 全文载入模型上下文。
5. 用户要机器数据时交付 report.json;用户要 Word 时按“生成 Word”执行;其他周报请求交付 report.md。
强制分批与续跑
案例全文较长。scripts/fetch-weekly-pages.py 在独立进程中直接接收 MCP 响应并写盘,原始分页内容不会进入模型对话;这是避免上下文压缩的强制机制。
- 禁止用会话内 MCP 工具逐页拉取全量
detail_level=full数据,禁止并行拉取后再放入模型上下文,也禁止让模型手工维护分页清单。 - 脚本每次只请求一页,固定
limit<=10;响应通过校验后先原子写入page-0001.json、page-0002.json……,再原子更新manifest.json。清单包含固定查询参数、report_id、统计区间、total、last_page、完成页、文件 SHA-256 和case_id。 - 每页必须校验页码、查询身份、统计区间、筛选、
total、limit、last_page、全局统计、稳定覆盖字段、预期行数和case_id。若查询期间数据变化导致分页漂移,脚本必须失败,不得输出不完整周报。 - 任务中断或上下文压缩后,使用完全相同的命令和
BATCH_DIR重跑。脚本先核验清单、文件校验和及已完成页,只从第一个未完成页继续;未显式指定结束日的首次查询会把实际window_end固定到清单,跨日续跑也不改变统计期。 - 若要把批量大小降为 5,使用新的空目录并传
--limit 5,从第 1 页重新开始。同一清单的日期、筛选和limit不允许改变。 - 全部页完成后,分页器自动调用确定性合并器和渲染器,生成:
merged.json:保留内部校验字段,只供 Word/Markdown/JSON 渲染器使用,不直接对外交付;report.json:移除内部证据与处理字段后的交付 JSON;report.md:由全量合并数据确定性生成的交付 Markdown。
- 需要单独重跑合并时使用:
python3 scripts/merge-weekly-pages.py --manifest BATCH_DIR/manifest.json BATCH_DIR/merged.json BATCH_DIR/page-*.json
- 合并器以真实第 1 页为基准,不受命令行文件顺序影响;它校验清单、文件 SHA-256、分页覆盖及唯一案例数,按
case_id防御性去重,并按publish_time DESC, case_id DESC排序。输出采用原子替换,任何验证失败都不得生成最终文档。
生成 JSON 与 Markdown
- JSON 对外交付
BATCH_DIR/report.json,不要交付含内部校验字段的merged.json。 - Markdown 对外交付
BATCH_DIR/report.md。它由scripts/build-weekly-markdown.py从merged.json一次性确定性生成,不由模型拼接分页片段。 partial、review_required、缺失字段、冲突字段和整体降级状态在 Markdown/JSON 中明确保留;Word 按既定版式隐藏这些技术质量字段。
生成 Word
- 按“强制分批与续跑”取得
BATCH_DIR/merged.json;先核验清单状态为complete,保留coverage、quality和missing_fields供内部校验,不把这些字段写入 Word。 - 运行技能自带的确定性渲染器:
python3 scripts/build-weekly-word.py DATA_JSON OUTPUT_DOCX
- 若当前 Python 缺少
python-docx,使用工作区提供的文档运行时;不得为此改写模板或降级为纯文本。 - 渲染器固定使用 Skill 随附的
assets/fonts/NotoSansSC-Regular.otf(SIL Open Font License 1.1)。隔离版 LibreOffice 不会可靠读取SAL_FONTPATH,用 PDF/PNG 做视觉检查时必须通过 Skill 的字体配置包装器调用文档渲染器:
python3 scripts/render-weekly-word.py OUTPUT_DOCX \
--renderer /absolute/path/to/render_docx.py \
--output-dir RENDER_DIR --emit-pdf
- 渲染后必须逐页检查全部页面:
- 首页仅有日期、统计口径及三项数量指标;
- 案例索引无质量列,且公司简称可跳转到对应案例;
- 公司作为处罚对象时身份为“上市公司”;
- 无处罚期限的案例不显示处罚期限列;
- 每案结尾无质量状态;
- 页脚为“董小屿违规案例库”;
- 中文不是方框或缺字,无文字截断、表格溢出、重叠或意外空白页;
- 零案例周报只保留封面与概览,不生成空的“案例明细”页。
- 将最终
.docx作为交付物返回。模板的颜色、字体、页眉页脚、表格几何、内部书签和分页规则均由scripts/build-weekly-word.py固化,不要临时重写。
强制口径
- 仅使用董小屿违规案例库的案例主记录、处罚对象明细、公司主数据映射、代码字典及由这些记录生成的结构化缓存。
- 将
LatestInfoPublDate表述为“公告日期/发布时间”,不要解释为公告库的公告日期。 - 一条案例主记录计为一起案例;处罚对象明细不得重复增加案例数。
- 公司简称、名称和板块以董小屿数据库的公司主数据映射为准。
- 触发机构以董小屿数据库的处罚机构字段解码结果为准。
- 法规依据只还原案例记录已有内容,不补写、不判断现行有效性。
null、空数组和missing_fields表示原字段未取得,不得推断成“没有”或自行补齐。partial和review_required案例不得静默删除;在 Markdown/JSON 中明确标注,在 Word 中保留为内部校验但不展示质量字段。- 对外统一将数据来源表述为“董小屿违规案例库”或“董小屿数据库”。不得展示、转述或暗示底层数据供应方、内部库名、表名、连接信息及工具返回的内部来源标签;Word、Markdown、JSON 摘要、错误提示和免责表述均须遵守。机器 JSON 中如保留内部技术字段,仅供内部校验,不得原样对外交付。
输出要求
每个案例至少保留以下键:
company
trigger_institution / trigger_institutions
violation_matters
penalty_situation
case_penalties
legal_basis
quality
case_penalties[] 必须展示:
object_name
object_identity
violation_types
penalty_types
penalty_term(仅案例明确载明处罚期限时展示)
- “违规事项”保留违规事实、违规认定和责任认定;以“根据/依据《……》……规定,决定/作出如下处分”等引出具体处罚决定的内容起,归入“处罚情况”,不得重复摘入“违规事项”。
- 处罚对象名称与本案例
company.short_name或company.full_name一致时,对象身份固定显示“上市公司”。除此之外,对象身份只从最终展示的violation_matters.text中按处罚对象姓名查找;未出现职务/身份时显示“——”,不得用PartyType、主体基本信息、处罚段或关联公司字段补写。 - 若某案例全部
penalty_term=null,该案例的“案例处罚情况”表隐藏“处罚期限”列;不得用发布时间、处罚日期或仅有日期起止值、但处罚原文没有期限语义的BeginDate/EndDate推算处罚期限。 detail_level=full时不得对违规事项或处罚情况作字符数截断;段落必须在语义边界完整结束,不得残留“经”“……的”等吞字/断句。- 对外交付的 Word 周报使用“董小屿违规案例库”作为展示名称。页脚显示“董小屿违规案例库”;首页统计口径固定显示“统计口径:董小屿违规案例库 https://www.dxy-aiagent.com/website/weigui”。
- Word 首页仅展示违规案例数、涉及公司数和处罚对象数,不展示“完整/部分”等质量指标,也不展示数据源限制或动态入库提示。
- Word 仅输出“周报概览”和“案例明细”,不输出“数据质量与口径说明”第三部分;
coverage和quality仍保留在机器数据及内部校验中。 - Word 的“案例索引”不展示“质量”列;公司简称必须设置为内部超链接,点击后跳转到该案例在“案例明细”中的案例标题,股票代码保留为公司简称下一行的普通文本。
- Word 每个案例下方不展示质量状态、完整度、缺失字段或复核提示;
quality只保留在机器数据和内部校验中。
详细字段来源、质量状态和展示规则见 references/schema.md。仅在需要解释字段、排查缺失或重组多页结果时读取。Word 渲染器要求的 JSON 结构也以该文件和工具返回结构为准。
失败处理
- 工具技术失败:说明“董小屿违规案例库本次查询失败”,建议重试;不得回答“最近 7 天无案例”。
source_degraded=true:可以交付主表结果;该状态仅用于内部校验和机器数据,不在对外交付的 Word 周报中展示结构化缓存、降级生成、质量状态、完整度或缺失/复核等技术提示。- 工具不可用:优先提示启用项目中的
weiguiMCP;不要切换到其他数据源替代。
Current listing version
2.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Areas to improve
-
缺少 When to Use 显式章节 Reported severity: Minor
description 已覆盖使用场景,但未独立成节,不利于快速查阅。
Recommendation: 建议在 SKILL.md 中增加独立的 'When to Use' 章节,明确列出适用场景。
Highlights
- 聚焦上市公司违规案例周报生成,解决监管信息聚合刚需
- 基于董小屿违规案例库,数据来源明确且专业
- 支持多种交付格式(Word/JSON/Markdown),满足不同用户场景
Highlights
- 触发词完整覆盖用户常见表述(违规案例周报、最近一周处罚案例等)
- 明确限定数据来源与时间口径,边界清晰,误触风险低
Areas to improve
-
description 写错位置 Reported severity: Minor
顶层 frontmatter 与 skill_body 内部均含 description,内容重复。
Recommendation: 建议保留顶层 frontmatter 的 description,skill_body 内部可简化为引用或省略。
-
文档较长 Reported severity: Minor
SKILL.md 约450行,接近但未超500行限制。
Recommendation: 建议将部分技术细节(如字段来源)下沉至 references/schema.md,保持主文件简洁。
Highlights
- 工作流清晰,含强制分批、续跑、合并等完整机制
- 提供端到端 bash 示例,执行路径明确
- frontmatter 完整,结构规范
Highlights
- 工具来源明确,参数设计合理,覆盖分页漂移等关键异常
- 强制分批与原子写入机制保障数据完整性
- 失败处理清晰,不静默降级或切换数据源
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.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- www.dxy-aiagent.com
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.