Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

polaris-datainsight-doc-extract北极星数据洞察文档摘录

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

989

周安装

40

GitHub Stars

2

下载量

310
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:polaris-datainsight-doc-extract(北极星数据洞察文档摘录)
来源仓库:https://github.com/jacob-g-park/polaris-datainsight-doc-extract
仓库路径:skills/polaris-datainsight-doc-extract
安装命令:
npx skills add https://github.com/jacob-g-park/polaris-datainsight-doc-extract --skill polaris-datainsight-doc-extract
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jacob-g-park/polaris-datainsight-doc-extract --skill polaris-datainsight-doc-extract

简介

polaris-datainsight-doc-extract 用于辅助数据整理、表格分析和指标计算,适合在 Codex、Claude、Cursor、Gemini CLI 中需要清洗字段或生成统计口径时使用。

  • 适用于 CSV/Excel 数据处理、异常检测和图表准备,支持数据驱动决策。
  • 通过 GitHub 仓库安装,使用 npx skills add 命令添加技能,需确认数据来源和时间范围。
  • 使用时需避免将样本数据当作全量事实,涉及敏感数据时应先确认脱敏边界和导出权限。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Polaris AI DataInsight — Doc Extract Skill

Use the Polaris AI DataInsight Doc Extract API to extract text, images, tables, charts, shapes, equations, and more from Word, PowerPoint, Excel, HWP, and HWPX files, returning everything as a structured unifiedSchema JSON. A single API call gives you the full document structure without any manual parsing.


When to Use This Skill

  • The user wants to extract text, tables, charts, or images from DOCX, PPTX, XLSX, HWP, or HWPX files
  • The user needs to understand a document's structure (page count, element types, position data, etc.)
  • The extracted data will be used in a RAG pipeline, data analysis workflow, or automation task
  • Table data needs to be converted to CSV, or chart data needs to be broken down into series and labels
  • The user needs to parse special elements like headers, footers, equations, or shapes

What This Skill Does

  1. Authentication — Authenticates with the Polaris DataInsight API via the x-po-di-apikey header.
  2. Upload and extract — Sends the file as a multipart/form-data POST request and extracts the full document structure.
  3. Parse ZIP response — The API returns a ZIP file; extract it and load the unifiedSchema JSON inside.
  4. Deliver structured data — Returns a JSON organized by page and element type (text, table, chart, image, shape, equation, etc.).
  5. Support multiple usage patterns — Handles full text extraction, table-to-CSV conversion, RAG chunk generation, and more.

How to Use

Prerequisites

Get an API Key: Sign up at https://datainsight.polarisoffice.com and generate your API key.

Authentication: Include the API key as a header on every request.

Header: x-po-di-apikey: $POLARIS_DATAINSIGHT_API_KEY

Set the environment variable:

export POLARIS_DATAINSIGHT_API_KEY="your-api-key-here"

Limits

ItemLimit
Supported formatsHWP, HWPX, DOCX, PPTX, XLSX
Max file size25 MB
Timeout10 minutes
Rate limit10 requests per minute

Basic Usage

Endpoint:

POST https://datainsight-api.polarisoffice.com/api/v1/datainsight/doc-extract

Extract a document with Python:

import requests
import json
import zipfile
import io

def extract_document(file_path: str, api_key: str) -> dict:
    with open(file_path, "rb") as f:
        response = requests.post(
            "https://datainsight-api.polarisoffice.com/api/v1/datainsight/doc-extract",
            headers={"x-po-di-apikey": api_key},
            files={"file": f}
        )

    if response.status_code != 200:
        raise Exception(f"API error: {response.status_code} - {response.text}")

    # Response is a ZIP file
    zip_buffer = io.BytesIO(response.content)
    with zipfile.ZipFile(zip_buffer) as z:
        json_files = [name for name in z.namelist() if name.endswith('.json')]
        if json_files:
            with z.open(json_files[0]) as jf:
                return json.load(jf)

    raise Exception("No JSON found in ZIP")

# Example usage
import os
api_key = os.environ["POLARIS_DATAINSIGHT_API_KEY"]
schema = extract_document("report.docx", api_key)
print(f"Extracted {schema['totalPages']} pages")

Extract with curl:

curl -X POST "https://datainsight-api.polarisoffice.com/api/v1/datainsight/doc-extract" \
  -H "x-po-di-apikey: $POLARIS_DATAINSIGHT_API_KEY" \
  -F "file=@example.docx" \
  --output result.zip

unzip result.zip -d result/
cat result/*.json | python -m json.tool

Advanced Usage

Response Structure (unifiedSchema)

Root:

{
  "docName": "sample.docx",
  "totalPages": 3,
  "pages": [ ... ]
}

Page (pages[]):

{
  "pageNum": 1,
  "pageWidth": 595.3,
  "pageHeight": 842.0,
  "extractionSummary": {
    "text": 5, "image": 2, "table": 1, "chart": 1
  },
  "elements": [ ... ]
}

Element types (elements[].type):

typeDescription
textText block
imageImage
tableTable
chartChart
shapeShape
equationEquation
header / footerHeader / Footer

Common element structure:

{
  "type": "text",
  "id": "te1",
  "boundaryBox": { "left": 40, "top": 80, "right": 300, "bottom": 120 },
  "content": { "text": "Body content here" }
}

Table content:

{
  "content": {
    "html": "<table>...</table>",
    "csv": "Header1,Header2\nValue1,Value2",
    "json": [
      {
        "metrics": { "rowaddr": 0, "coladdr": 0, "rowspan": 1, "colspan": 1 },
        "para": [{ "content": [{ "text": "Cell content" }] }]
      }
    ]
  }
}

Chart content:

{
  "content": {
    "chart_type": "column",
    "title": "Annual Sales Comparison",
    "x_axis_labels": ["Q1", "Q2", "Q3", "Q4"],
    "series_names": ["2023", "2024"],
    "series_values": [[100, 200, 150, 300], [120, 220, 180, 320]],
    "csv": "Quarter,2023,2024\nQ1,100,120\nQ2,200,220"
  }
}

Usage Patterns

Extract all text:

def get_all_text(schema: dict) -> str:
    texts = []
    for page in schema.get("pages", []):
        for el in page.get("elements", []):
            if el["type"] == "text" and el.get("content", {}).get("text"):
                texts.append(el["content"]["text"])
    return "\n".join(texts)

Extract tables as CSV:

def get_tables_as_csv(schema: dict) -> list:
    tables = []
    for page in schema.get("pages", []):
        for el in page.get("elements", []):
            if el["type"] == "table":
                csv_data = el.get("content", {}).get("csv", "")
                if csv_data:
                    tables.append(csv_data)
    return tables

Generate RAG chunks:

def make_rag_chunks(schema: dict) -> list:
    chunks = []
    doc_name = schema.get("docName", "")
    for page in schema.get("pages", []):
        for el in page.get("elements", []):
            text = el.get("content", {}).get("text") or el.get("content", {}).get("csv") or ""
            if text.strip():
                chunks.append({
                    "source": doc_name,
                    "page": page["pageNum"],
                    "type": el["type"],
                    "text": text.strip()
                })
    return chunks

Example

User: "Extract all table data from this DOCX report as CSV."

Output:

import os
schema = extract_document("report.docx", os.environ["POLARIS_DATAINSIGHT_API_KEY"])
tables = get_tables_as_csv(schema)
for i, csv_data in enumerate(tables):
    print(f"=== Table {i+1} ===")
    print(csv_data)
=== Table 1 ===
Quarter,Revenue,Cost
Q1,1200,800
Q2,1500,900

=== Table 2 ===
Item,Amount
Labor,500
Operations,300

Inspired by: Polaris Office DataInsight API documentation and workflow.


Tips

  • The response is always a ZIP file. Do not try to parse response.content directly as JSON — use zipfile.ZipFile to extract it first.
  • content.csv is available for both table and chart elements, making it the most convenient format for data extraction.
  • The rate limit is 10 requests per minute. When processing multiple files, add a delay (e.g., time.sleep(6)) between calls.
  • Use boundaryBox to determine where each element sits on the page — useful for layout analysis.
  • Always store the API key in an environment variable (POLARIS_DATAINSIGHT_API_KEY) and never hardcode it.

Common Use Cases

  • Document search systems: Extract full text and store it in a vector database for semantic search
  • Automated report analysis: Collect table and chart data from PPTX/DOCX reports for analysis
  • HWP digitization: Convert HWP/HWPX documents into structured, machine-readable data
  • RAG pipeline setup: Split documents into chunks for use in LLM-based Q&A systems
  • Data migration: Move table and chart data from legacy Office documents into a database

License & Terms

  • Skill Definition: This SKILL.md file is provided under the Apache 2.0 license.
  • Service Access: Usage of the DataInsight API requires a valid subscription or license key.
  • Restrictions: Unauthorized redistribution of the API endpoints or bypassing authentication is strictly prohibited.
  • Support: For licensing inquiries, visit https://datainsight.polarisoffice.com.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.99%
按下载量换算115

Claude

29.31%
按下载量换算91

Cursor

20.21%
按下载量换算63

Gemini CLI

9.98%
按下载量换算31

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills