# Qibook Company Profile

> >

- **Type:** Skill
- **Install:** `agentstack add skill-chinadaas-department-qibook-skills-qibook-company-profile`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ChinaDaaS-Department](https://agentstack.voostack.com/s/chinadaas-department)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ChinaDaaS-Department](https://github.com/ChinaDaaS-Department)
- **Source:** https://github.com/ChinaDaaS-Department/qibook-skills/tree/master/qibook-company-profile

## Install

```sh
agentstack add skill-chinadaas-department-qibook-skills-qibook-company-profile
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 查企业查老板

基于企百科 API，快速查询企业工商信息和人员关联信息，将结果转为中文 Markdown 后回答用户。

先理解用户想查什么（企业还是人、要哪些信息），再选择正确的查询路径，不要随意升级查询范围。

**不适合深度企业分析（企业画像、信用评估、竞争力分析），这类需求应引导使用 qibook-company-wiki-deepresearch skill。**

***

## When to use

用户不说"工商"、"照面"这些术语也要触发。以下口语都属于本 skill 范围：

- 帮我查一下华为 / 美团的全称是什么 / XX 是哪家公司
- XX 的法人是谁 / 注册资本多少 / 什么时候成立的
- XX 的股东有哪些 / 高管是谁 / 对外投资 / 谁是大股东
- XX 是谁开的 / 这家公司老板是谁
- 查一下张三 / 张三名下有几家公司 / 张三在 XX 公司担任什么
- 查张三在北京的情况

**口语理解优先**：
- "查一下 XX 公司" → 主体识别，返回全称 + 信用代码
- "XX 的老板" / "谁开的" → 查法人代表
- "XX 名下有几家公司" → 查人员关联企业统计
- "XX 的股东" → 查股东及出资信息

***

## Environment check

调用前先校验 `QIBOOK_ACCESS_KEY` 和 `QIBOOK_BASE_URL` 环境变量是否存在。缺失则提示：

```bash
export QIBOOK_ACCESS_KEY=your_key
export QIBOOK_BASE_URL=your_url
```

不要等到跑失败才暴露环境问题。

***

## 功能路由

**重要：根据用户意图选择正确的功能，不要随意升级查询范围。**

### 1. 主体识别

**触发：** 用户给了企业简称/别名想知道全称，或只提到公司名没要求具体信息。

```bash
python3 -m scripts.combined_query --entmark "华为"
```

**只返回企业全称 + 统一社会信用代码，不要额外展开。**

### 2. 查企业详细信息

**触发：** 用户明确要查照面/股东/高管/对外投资等具体信息。

```bash
python3 -m scripts.combined_query --entmark "天津测试有限公司"
```

**用户没指定模块 → 默认只返回照面，提示"还可以进一步查看股东、高管、对外投资"。**

### 3. 查人

**仅人名** → 人员统计汇总：

```bash
python3 -m scripts.combined_query --name "张三"
```

**人名+省份** → 该省份下的统计：

```bash
python3 -m scripts.combined_query --name "张三" --province "天津"
```

**人名+企业** → 担任法人、高管、投资详情：

```bash
python3 -m scripts.combined_query --entmark "天津测试有限公司" --name "张三"
```

### 路由判断

```
用户提问
  ├── 只提到公司名/简称，没要求具体信息 → 功能1（主体识别）
  ├── 明确要查照面/股东/高管/对外投资   → 功能2（查企业）
  ├── 提到人名，没提公司               → 功能3（查人汇总）
  ├── 提到人名+省份                    → 功能3（查人+省份）
  └── 提到人名+公司                    → 功能3（查人+企业详情）
```

***

## 回答规范

1. 使用脚本返回的中文 Markdown 作为数据来源，不要暴露英文字段
2. 数组数据（股东、高管等）用表格展示
3. 空值字段脚本已自动过滤，无需额外处理
4. 某模块数据为空 → 告知"暂无该项信息"
5. 金额字段保留两位小数
6. 查询为空时区分原因（名称不对 / 权限不足 / 网络异常），不要统一说"查询失败"

***

## 脚本说明

| 脚本 | 功能 |
|------|------|
| `scripts/base.py` | API 认证、调用、字段映射(英→中)、空值过滤、Markdown 格式化 |
| `scripts/combined_query.py` | 三个功能的 fetch 函数，根据入参自动判断场景，返回 Markdown 字符串 |
| `scripts/__init__.py` | 统一入口，导出 fetch / fetch_entity_id / fetch_enterprise / fetch_person_summary / fetch_person_detail |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ChinaDaaS-Department](https://github.com/ChinaDaaS-Department)
- **Source:** [ChinaDaaS-Department/qibook-skills](https://github.com/ChinaDaaS-Department/qibook-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-chinadaas-department-qibook-skills-qibook-company-profile
- Seller: https://agentstack.voostack.com/s/chinadaas-department
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
