npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

openclaw-global-compliance

v1.0.1

Published

AI-powered global compliance checker, document generator, and risk assessor for GDPR, CCPA, SOC2, ISO27001, and more

Readme

Global Compliance - 全球企业合规 AI 助手

基于 AI 的企业合规检查、文档生成和风险评估系统,帮助企业快速满足全球各国的合规要求。

核心功能

  • 合规检查 - 自动检查企业文档、流程是否符合 GDPR、SOC2、ISO 27001、HIPAA 等标准
  • 文档生成 - 自动生成隐私政策、服务条款、数据处理协议(DPA)等合规文档
  • 法规查询 - 查询不同国家/地区的合规要求和最新法规
  • 风险评估 - 评估企业在不同地区的合规风险并提供建议
  • 合规报告 - 生成专业的合规审计报告

支持的合规标准

数据隐私

  • GDPR (欧盟通用数据保护条例)
  • CCPA (加州消费者隐私法案)
  • PIPL (中国个人信息保护法)
  • LGPD (巴西通用数据保护法)

信息安全

  • ISO 27001 (信息安全管理体系)
  • SOC 2 (服务组织控制)
  • PCI-DSS (支付卡行业数据安全标准)

行业特定

  • HIPAA (医疗保健)
  • GLBA (金融服务)
  • FERPA (教育)

快速开始

安装

# 通过 npm 安装
npm install -g openclaw-global-compliance

# 或使用 ClawHub
clawhub install global-compliance

基本使用

# 检查隐私政策是否符合 GDPR
compliance check --type gdpr --file privacy-policy.md

# 生成隐私政策
compliance generate privacy-policy --region eu --output privacy.md

# 评估合规风险
compliance assess --company-info company.json --regions eu,us,cn

# 查询法规要求
compliance query --standard gdpr --topic "data retention"

命令行工具

1. 合规检查

# 检查文档合规性
compliance check \
  --type gdpr \
  --file privacy-policy.md \
  --output report.json

# 批量检查
compliance check \
  --type "gdpr,ccpa,iso27001" \
  --directory ./docs \
  --format html

2. 文档生成

# 生成隐私政策
compliance generate privacy-policy \
  --company "Acme Inc" \
  --region eu \
  --industry saas \
  --output privacy-policy.md

# 生成服务条款
compliance generate tos \
  --company "Acme Inc" \
  --jurisdiction california \
  --output terms-of-service.md

# 生成 DPA (数据处理协议)
compliance generate dpa \
  --controller "Acme Inc" \
  --processor "Cloud Provider" \
  --output dpa.pdf

3. 风险评估

# 评估整体合规风险
compliance assess \
  --company-info company.json \
  --regions eu,us,cn \
  --output risk-report.pdf

# 特定标准风险评估
compliance assess \
  --standard soc2 \
  --current-controls controls.json \
  --output gap-analysis.md

4. 法规查询

# 查询法规详情
compliance query \
  --standard gdpr \
  --topic "right to be forgotten"

# 比较不同地区要求
compliance query compare \
  --topic "data breach notification" \
  --regions eu,us,cn

使用 AI Agent

作为 OpenClaw Skill,可以通过自然语言交互:

# 使用 OpenClaw CLI
openclaw "帮我检查这份隐私政策是否符合 GDPR 要求"

openclaw "生成一份符合 CCPA 的隐私政策,公司是 SaaS 行业"

openclaw "评估我们公司在欧盟市场的合规风险"

openclaw "GDPR 对于数据保留时间有什么要求?"

项目结构

openclaw-global-compliance/
├── compliance/
│   ├── checkers/         # 合规检查器
│   │   ├── gdpr.ts
│   │   ├── ccpa.ts
│   │   ├── iso27001.ts
│   │   └── index.ts
│   ├── generators/       # 文档生成器
│   │   ├── privacy-policy.ts
│   │   ├── tos.ts
│   │   ├── dpa.ts
│   │   └── index.ts
│   ├── rules/           # 合规规则库
│   │   ├── gdpr-rules.json
│   │   ├── ccpa-rules.json
│   │   └── iso27001-rules.json
│   └── reports/         # 报告生成
│       ├── risk-assessment.ts
│       └── audit-report.ts
├── tools/               # CLI 工具
│   ├── cli.ts          # 主 CLI
│   ├── check.ts        # 检查命令
│   ├── generate.ts     # 生成命令
│   ├── assess.ts       # 评估命令
│   └── query.ts        # 查询命令
├── data/               # 法规数据库
│   ├── gdpr/
│   ├── ccpa/
│   └── iso27001/
├── templates/          # 文档模板
│   ├── privacy-policy/
│   ├── tos/
│   └── dpa/
├── examples/           # 示例
│   ├── check-gdpr.sh
│   ├── generate-privacy.sh
│   └── assess-risk.sh
└── docs/              # 文档
    ├── GDPR.md
    ├── CCPA.md
    ├── ISO27001.md
    └── API.md

API 使用

import { ComplianceChecker, DocumentGenerator, RiskAssessor } from 'openclaw-global-compliance';

// 检查合规性
const checker = new ComplianceChecker('gdpr');
const result = await checker.check({
  documentPath: './privacy-policy.md',
  checkpoints: ['data-collection', 'user-rights', 'data-retention']
});

console.log(result.compliant); // true/false
console.log(result.issues); // 发现的问题列表

// 生成文档
const generator = new DocumentGenerator();
const privacyPolicy = await generator.generate('privacy-policy', {
  company: 'Acme Inc',
  region: 'eu',
  industry: 'saas',
  dataTypes: ['email', 'usage-analytics']
});

// 风险评估
const assessor = new RiskAssessor();
const risk = await assessor.assess({
  companyInfo: {
    name: 'Acme Inc',
    industry: 'saas',
    regions: ['eu', 'us'],
    dataTypes: ['pii', 'financial']
  },
  standards: ['gdpr', 'ccpa', 'soc2']
});

console.log(risk.overallScore); // 0-100
console.log(risk.recommendations); // 建议列表

AI Agent 集成

OpenClaw Skill 定义

{
  "name": "global-compliance",
  "version": "1.0.0",
  "description": "全球企业合规检查、文档生成和风险评估",
  "capabilities": [
    "compliance-check",
    "document-generation",
    "risk-assessment",
    "regulation-query"
  ],
  "tools": [
    {
      "name": "check_compliance",
      "description": "检查文档或流程是否符合特定合规标准",
      "parameters": {
        "standard": "string",
        "content": "string",
        "checkpoints": "array"
      }
    },
    {
      "name": "generate_document",
      "description": "生成合规文档(隐私政策、服务条款等)",
      "parameters": {
        "type": "string",
        "company_info": "object",
        "region": "string"
      }
    },
    {
      "name": "assess_risk",
      "description": "评估企业合规风险",
      "parameters": {
        "company_info": "object",
        "standards": "array",
        "regions": "array"
      }
    },
    {
      "name": "query_regulation",
      "description": "查询法规要求",
      "parameters": {
        "standard": "string",
        "topic": "string"
      }
    }
  ]
}

使用场景

1. 创业公司快速合规

# 生成完整合规文档包
compliance bundle startup \
  --company "Startup Inc" \
  --industry saas \
  --regions eu,us \
  --output ./legal-docs

输出:

  • Privacy Policy (GDPR + CCPA)
  • Terms of Service
  • Cookie Policy
  • Data Processing Agreement
  • User Rights Request Form

2. 定期合规审计

# 检查所有文档
compliance audit \
  --directory ./legal-docs \
  --standards gdpr,ccpa,soc2 \
  --output audit-report-2026.pdf

3. 进入新市场

# 评估进入中国市场的合规要求
compliance market-entry \
  --target-region cn \
  --current-region us \
  --industry fintech \
  --output china-compliance-guide.md

合规检查示例

GDPR 检查点

  • ✅ 数据收集的合法基础
  • ✅ 用户权利说明(访问、删除、修改、移植)
  • ✅ 数据保留期限
  • ✅ 第三方数据共享声明
  • ✅ 国际数据传输机制
  • ✅ 数据安全措施
  • ✅ 未成年人数据保护
  • ✅ 数据泄露通知流程

SOC 2 检查点

  • ✅ 安全策略文档
  • ✅ 访问控制机制
  • ✅ 变更管理流程
  • ✅ 风险评估程序
  • ✅ 监控和日志记录
  • ✅ 事件响应计划
  • ✅ 供应商管理
  • ✅ 业务连续性计划

配置

创建 compliance.config.json

{
  "company": {
    "name": "Acme Inc",
    "industry": "saas",
    "regions": ["eu", "us"],
    "dataTypes": ["pii", "usage-analytics"]
  },
  "standards": ["gdpr", "ccpa", "soc2"],
  "checkOptions": {
    "strictness": "high",
    "language": "en",
    "outputFormat": "markdown"
  },
  "aiProvider": {
    "type": "openai",
    "model": "gpt-4",
    "apiKey": "${OPENAI_API_KEY}"
  }
}

成本

  • 检查文档: 免费(基于规则)
  • AI 辅助分析: ~$0.01-0.05 per 文档(使用 AI API)
  • 文档生成: ~$0.02-0.10 per 文档
  • 风险评估: ~$0.10-0.50 per 评估

技术栈

  • 语言: TypeScript + Node.js
  • AI: OpenAI GPT-4, Claude 3
  • 数据: JSON 规则库 + 向量数据库
  • CLI: Commander.js
  • 文档生成: Markdown + Pandoc (PDF 导出)

路线图

  • [x] GDPR 检查器
  • [x] CCPA 检查器
  • [x] 隐私政策生成器
  • [ ] ISO 27001 检查器
  • [ ] SOC 2 检查器
  • [ ] HIPAA 检查器
  • [ ] 中国 PIPL 支持
  • [ ] 自动更新法规数据
  • [ ] 多语言支持
  • [ ] Web Dashboard

贡献

欢迎提交 Issue 和 Pull Request!

许可证

MIT License


让合规不再困难!