Skip to content

CSlawyer1985/legal-skillhub / skills/1688-common-cha88-company-risk

1688-common-cha88-company-risk

Verified

88查企业风险查询与分析工具 —— 专注于中国大陆企业的法务风险查询与分析,覆盖经营异常、行政处罚、监管措施、被执行人、失信被执行人、司法案件等风险类型。支持公司名称、统一社会信用代码、companyId 三种输入方式,自动完成风险查询并输出结构化风险分析总结。 触发场景:仅当用户意图为查询企业风险/法务风险时触发。包括但不限于:企业风险查询、公司风险、经营异常、行政处罚、监管措施、被执行人、失信被执行人、司法风险、风险扫描、风险评估、企业合规审查、风险报告、XX公司有什么风险、XX公司安全吗、XX公司有没有处罚、XX公司被执行过吗。 不触发场景:纯粹的企业信息查询(如查公司、搜企业、工商信息、注册资本、法人代表、股东结构、专利商标等)不应触发本技能,请使用其他 cha88 系列工具。

scripts/capabilities/configure/cmd.py

View on GitHub
#!/usr/bin/env python3
"""AK 配置命令 — CLI 入口"""

COMMAND_NAME = "configure"
COMMAND_DESC = "配置 AK"

import os
import sys

sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..')))

from _output import print_output, print_error
from capabilities.configure.service import (
    validate_ak, configure_via_gateway, configure_via_file, check_existing_config,
)


def _mask_ak(ak: str) -> str:
    if len(ak) >= 8:
        return f"{ak[:4]}****{ak[-4:]}"
    return "****"


def main():
    try:
        has_existing, existing_ak = check_existing_config()

        # 无参数 → 查看状态
        if len(sys.argv) < 2:
            if has_existing:
                src = ("环境变量(已生效)" if os.environ.get("ALI_1688_AK")
                       else "OpenClaw 配置(新会话/重载后生效)")
                md = f"AK 已配置: `{_mask_ak(existing_ak)}`(来源: {src})"
            else:
                md = "尚未配置 AK\n\n运行: `cli.py configure YOUR_AK`"
            print_output(has_existing, md, {"configured": has_existing})
            return

        ak = sys.argv[1].strip()
        is_valid, error_msg = validate_ak(ak)
        if not is_valid:
            print_output(False, f"{error_msg}", {"configured": False})
            return

        write_ok = configure_via_gateway(ak) or configure_via_file(ak)
        if not write_ok:
            print_output(False,
                         "AK 写入失败(Gateway 不可用且 fallback 被拒绝/失败),请检查 Gateway 状态或文件权限",
                         {"configured": False})
            return

        md = (
            f"AK 已保存: `{_mask_ak(ak)}`\n\n"
            "后续由 OpenClaw 配置注入生效(以配置为准,不使用本地会话缓存)。\n\n"
            "若当前会话仍提示 AK未配置或AK无效,请新开会话或执行:`openclaw secrets reload`(或 `openclaw gateway restart`)"
        )
        print_output(True, md, {"configured": True})
    except Exception as e:
        print_error(e, {"configured": False})


if __name__ == "__main__":
    main()
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall