CSlawyer1985/legal-skillhub / skills/1688-common-cha88-company-risk
1688-common-cha88-company-risk
Verified88查企业风险查询与分析工具 —— 专注于中国大陆企业的法务风险查询与分析,覆盖经营异常、行政处罚、监管措施、被执行人、失信被执行人、司法案件等风险类型。支持公司名称、统一社会信用代码、companyId 三种输入方式,自动完成风险查询并输出结构化风险分析总结。 触发场景:仅当用户意图为查询企业风险/法务风险时触发。包括但不限于:企业风险查询、公司风险、经营异常、行政处罚、监管措施、被执行人、失信被执行人、司法风险、风险扫描、风险评估、企业合规审查、风险报告、XX公司有什么风险、XX公司安全吗、XX公司有没有处罚、XX公司被执行过吗。 不触发场景:纯粹的企业信息查询(如查公司、搜企业、工商信息、注册资本、法人代表、股东结构、专利商标等)不应触发本技能,请使用其他 cha88 系列工具。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.6 KB |
| _meta.json | config | 149 B |
| cli.py | script | 2.5 KB |
| references/capabilities/cha88_search.md | markdown | 3.6 KB |
| references/capabilities/companyRisk.md | markdown | 4.3 KB |
| references/capabilities/configure.md | markdown | 1.3 KB |
| references/skill_description.md | markdown | 2.9 KB |
| scripts/_auth.py | script | 5.0 KB |
| scripts/_const.py | script | 536 B |
| scripts/_errors.py | script | 1.2 KB |
| scripts/_http.py | script | 4.5 KB |
| scripts/_output.py | script | 957 B |
| scripts/_tracker.py | script | 2.4 KB |
| scripts/capabilities/cha88_search/__init__.py | script | 0 B |
| scripts/capabilities/cha88_search/cmd.py | script | 3.4 KB |
| scripts/capabilities/cha88_search/service.py | script | 657 B |
| scripts/capabilities/companyRisk/__init__.py | script | 0 B |
| scripts/capabilities/companyRisk/cmd.py | script | 5.4 KB |
| scripts/capabilities/companyRisk/service.py | script | 1.2 KB |
| scripts/capabilities/configure/__init__.py | script | 0 B |
| scripts/capabilities/configure/cmd.py | script | 2.1 KB |
| scripts/capabilities/configure/service.py | script | 3.6 KB |
| skill-card.md | markdown | 2.6 KB |
scripts/capabilities/cha88_search/cmd.py
View on GitHub#!/usr/bin/env python3
"""88查企业搜索 CLI 入口"""
COMMAND_NAME = "cha88_search"
COMMAND_DESC = "企业搜索"
import os
import sys
import argparse
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..')))
from _auth import get_ak_from_env
from _output import print_output, print_error
from capabilities.cha88_search.service import company_search
def _build_markdown(result: dict, keyword: str, page_no: int, page_size: int) -> str:
"""将搜索结果格式化为 markdown"""
companies = result.get("data", []) or []
if not companies:
return f"未找到与「{keyword}」相关的企业信息。"
total = result.get("total", len(companies))
total_page = result.get("totalPage", 1)
lines = [
f"# 企业查询结果:{keyword}",
f"共找到 **{total}** 家企业,第 **{page_no}/{total_page}** 页(每页 {page_size} 条)\n",
]
for idx, company in enumerate(companies, 1):
ent_name = (company.get("ent_name") or "").replace("<em>", "**").replace("</em>", "**")
legal_name = company.get("legal_name", "-")
ent_status = company.get("ent_status", "-")
reg_cap = company.get("reg_cap", "-")
currency_type = company.get("currencyType", "")
if currency_type and reg_cap != "-":
reg_cap = f"{reg_cap}({currency_type})"
social_credit_code = company.get("social_credit_code", "-")
es_date = company.get("es_date", "-")
ent_type = company.get("ent_type", "-")
address = company.get("address", "-")
ability_label = company.get("ability_label_outside", "-")
if ability_label and ability_label.startswith("ZM$"):
ability_label = ability_label[3:]
ability_label = ability_label.replace(";", "、") if ability_label else "-"
lines.append(f"---\n")
lines.append(f"## {idx}. {ent_name}\n")
lines.append(f"| 项目 | 内容 |")
lines.append(f"|------|------|")
lines.append(f"| **法人代表** | {legal_name} |")
lines.append(f"| **企业状态** | {ent_status} |")
lines.append(f"| **注册资本** | {reg_cap} |")
lines.append(f"| **统一社会信用代码** | `{social_credit_code}` |")
lines.append(f"| **成立日期** | {es_date} |")
lines.append(f"| **企业类型** | {ent_type} |")
lines.append(f"| **注册地址** | {address} |")
lines.append(f"| **能力标签** | {ability_label} |")
lines.append("")
return "\n".join(lines)
def main():
ak_id, _ = get_ak_from_env()
if not ak_id:
print_output(False,
"AK 未配置。\n\n运行: `cli.py configure YOUR_AK`",
{"data": {}})
return
parser = argparse.ArgumentParser(description="88查企业搜索")
parser.add_argument("--keyword", "-k", required=True, help="公司名称关键词")
parser.add_argument("--pageNo", "-n", type=int, default=1, help="页码(默认 1)")
parser.add_argument("--pageSize", "-s", type=int, default=10, help="每页数量(默认 10)")
args = parser.parse_args()
try:
result = company_search(args.keyword, args.pageNo, args.pageSize)
markdown = _build_markdown(result, args.keyword, args.pageNo, args.pageSize)
print_output(True, markdown, {"data": result})
except Exception as e:
print_error(e, {"data": {}})
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |