Agent skill

China AI Compliance Audit

by jnMetaCode in jnMetaCode/shellward

按中国法规(网安法 / PIPL / 等保2.0 / 数据出境 / AI生成内容标识)审计一个 AI 项目的代码仓库,产出每条都带 文件:行 取证、经独立复核、经脚本校验的合规报告。当用户问「这个项目上线合不合规」「调用了 OpenAI/Claude 算不算数据出境」「要不要做 AI 标识」「帮我做合规自查/等保/PIPL 检查」时使用。Audit an AI project's…

Apache-2.0Auto-check passedSecurity

Install China AI Compliance Audit

skills CLI
$ npx skills add jnMetaCode/shellward --skill china-ai-compliance-audit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jnMetaCode/shellward china-ai-compliance-audit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jnMetaCode/shellward.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/china-ai-compliance-audit .claude/skills/china-ai-compliance-audit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
china-ai-compliance-audit
GitHub stars
140
Token cost
~1.1k tokens
SKILL.md length
270 words
Files
10 (incl. scripts)
Skills in repo
2
Repo updated
First seen
Licence
Apache-2.0

At a glance

按中国法规(网安法 / PIPL / 等保2.0 / 数据出境 / AI生成内容标识)审计一个 AI 项目的代码仓库,产出每条都带 文件:行 取证、经独立复核、经脚本校验的合规报告。当用户问「这个项目上线合不合规」「调用了 OpenAI/Claude 算不算数据出境」「要不要做 AI 标识」「帮我做合规自查/等保/PIPL 检查」时使用。Audit an AI project's…

  • Works in 3 steps: 能用确定性工具判的,不许用你的判断。 密钥、手机号、境外端点交给… → 没有 文件:行 + 原文引用,就没有发现。 凭印象写的结论一律不算。 → 仓库里找不到的事实,不许替人下结论。 记成 needs_human,把问题问具体。
  • Tasks that involve Prompt injection and agent security
  • SKILL.md covers 流程 and 边界
  • Runs TypeScript and JavaScript scripts from its folder; calls npx and node

What it does

China AI Compliance Audit is an agent skill from jnMetaCode/shellward. 按中国法规(网安法 / PIPL / 等保2.0 / 数据出境 / AI生成内容标识)审计一个 AI 项目的代码仓库,产出每条都带 文件:行 取证、经独立复核、经脚本校验的合规报告。当用户问「这个项目上线合不合规」「调用了 OpenAI/Claude 算不算数据出境」「要不要做 AI 标识」「帮我做合规自查/等保/PIPL 检查」时使用。Audit an AI project's codebase against China's regulations (CSL, PIPL, MLPS 2.0, cross-border data transfer, AI content labeling) with file:line evidence, independent verification and a deterministic validator.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts (for example `VERIFY.md`, `controls.json` and `examples/compliance-findings.example.json`).

It sits in Security, covering Prompt injection and agent security, AI governance and LLM guardrails. It works with OpenAI, Model Context Protocol and LangChain. The repository describes itself as: AI 应用合规网关 · 一行命令体检 AI 项目的「数据出境 / 硬编码密钥 / 个人信息暴露」(网安法·PIPL·等保2.0·数据出境·AI标识),并给出境内模型替代建议;可作运行时防护拦截注入与数据外泄 · 中文优先 · 零依赖 · 开源. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Prompt injection and agent security
  • Tasks that involve AI governance
  • Tasks that involve LLM guardrails

Example prompts

  • “s codebase against China”
  • “/china-ai-compliance-audit”

Requirements

  • Node.js

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 能用确定性工具判的,不许用你的判断。 密钥、手机号、境外端点交给 shellward scan,你不重新发明它。
  2. 没有 文件:行 + 原文引用,就没有发现。 凭印象写的结论一律不算。
  3. 仓库里找不到的事实,不许替人下结论。 记成 needs_human,把问题问具体。

What it can do on your machine

Read from SKILL.md and the folder at commit 78444dd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (TypeScript and JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • npx
    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

China AI Compliance Audit loads about 1.1k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 270 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jnMetaCode/shellward at commit 78444dd, republished under its Apache-2.0 licence (© jnMetaCode). 270 words, ~1,099 tokens.

Download SKILL.mdSave it as .claude/skills/china-ai-compliance-audit/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
china-ai-compliance-audit
description
按中国法规(网安法 / PIPL / 等保2.0 / 数据出境 / AI生成内容标识)审计一个 AI 项目的代码仓库,产出每条都带 文件:行 取证、经独立复核、经脚本校验的合规报告。当用户问「这个项目上线合不合规」「调用了 OpenAI/Claude 算不算数据出境」「要不要做 AI 标识」「帮我做合规自查/等保/PIPL 检查」时使用。Audit an AI project's codebase against China's regulations (CSL, PIPL, MLPS 2.0, cross-border data transfer, AI content labeling) with file:line evidence, independent verification and a deterministic validator.
license
Apache-2.0

中国 AI 合规审计

你现在是合规审计员。目标不是写一篇看起来专业的报告,而是产出一份每一条都能被人打开文件核对的记录。

三条铁律,违反任何一条这次审计作废:

  1. 能用确定性工具判的,不许用你的判断。 密钥、手机号、境外端点交给 shellward scan,你不重新发明它。
  2. 没有 文件:行 + 原文引用,就没有发现。 凭印象写的结论一律不算。
  3. 仓库里找不到的事实,不许替人下结论。 记成 needs_human,把问题问具体。

流程

阶段 0 · 确定性基线

在被审计项目根目录运行(只读、不上传):

bash
npx -y shellward@latest scan . --json > .compliance/baseline.json

先 mkdir -p .compliance。跑不了(无网络 / 无 Node)就跳过,在最终记录里不写 baseline,并在给用户的总结里说明基线缺失。

基线怎么用:

  • 只用 projectScan.findings,每一条都要在阶段 2 分诊,不许原样照抄,也不许无视。
  • 忽略 controls[].status。那里的 pass 只表示「扫描器没扫到字面量」,不是「该控制项满足」——不要因为它写 met。
  • 记录顶层的 baseline 填 { "tool": "shellward", "score": <score>, "grade": "<grade>" },数字照抄 baseline.json。

不要审计 skill 自己所在的目录(.claude/、.agents/ 等)和 .compliance/。

阶段 1 · 摸清数据怎么流

读代码,写 .compliance/architecture.md,只回答五个问题,每个回答都带 文件:行:

  1. 用户输入从哪里进来?
  2. 调用了哪些模型端点?哪些在境外?
  3. 发给模型的内容是怎么拼出来的——里面有哪些来自用户或数据库的字段?
  4. 模型输出去了哪里:直接给用户、落库、还是驱动了某个动作?
  5. 什么被写进了日志 / 审计表,保留多久?

第 3 个问题最重要。扫描器只能告诉你「有境外端点」,你要回答的是「个人信息有没有真的流过去」。

阶段 2 · 逐项取证

读同目录的 controls.json。14 个控制项每一个都必须有结论,结论只有五种:

verdict含义必须带
gap有证据表明不满足severity、evidence、remediation、verifier
met有证据表明某项具体措施存在(不等于整个控制项满足)evidence、verifier
needs_human事实不在仓库里question(一个人能直接回答的具体问题)。不许带 severity
not_applicable项目没有这类场景reason,能引用代码就引用
rejected候选经核实不成立reason(留档,方便别人复审)

按每个控制项的 look_for 去找。scope: "org" 的项通常是 needs_human。

一个控制项可以有多条记录,每条只对一个可证伪的命题下结论。 look_for 三条里两条找到措施、一条仓库里看不到,就写两条 met 加一条 needs_human,不要合成一条含糊的「基本满足」。met 的标题要写成窄命题(「Dockerfile 以 node 用户运行」),不要写成对整个控制项的判断(「满足最小权限要求」)——met 只表示这个命题成立。

gap 还是 needs_human?看证据是「有」还是「没有」:

  • 仓库里正面看到了违规行为(个人信息确实被拼进了发往境外的请求、容器确实以 root 运行、日志确实缺用户字段)→ gap。
  • 只是没找到某项措施,而它完全可能在仓库之外(网关、云厂商、前端仓库、部署配置:内容审核、鉴权、限流、日志保留期都属于这类)→ needs_human,把「仓库里没看到」作为 evidence 附上。
  • 例外:措施的缺席就发生在你正面取证的那条路径上(同一个函数里,读出个人信息后下一步就发往境外,中间没有脱敏)→ 这是 gap。

其它字段:

  • severity 取 critical / high / medium / low。controls.json 里控制项的 severity 是参考上限:按实际影响定,可以更低;要更高须在 verifier.note 说明理由。
  • source:来自基线发现的写 baseline,你自己找到的写 agent。
  • evidence 对 gap / met 必填;对 needs_human / not_applicable / rejected 可选,有就写。
  • 行号允许 ±2 行误差,quote 必须是原文的连续片段。
  • rejected 不计入覆盖:一个控制项的候选全被推翻后,要补一条 needs_human 或别的结论。

基线发现的分诊,四种去向:

情形处理
测试夹具、示例文档、.env.example 里的假数据rejected,写明为什么是假的
真实风险挂到对应控制项下判 gap,source: "baseline"
依赖是真的,但实际指向境内端点(如 openai SDK 的 baseURL 指向 DeepSeek)rejected 并引用 baseURL 所在行;若 baseURL 来自环境变量,再补一条 needs_human 问生产环境的实际取值
与另一条是同一件事(依赖声明 + 调用点)并入主记录,本条 rejected,reason 写「重复,已并入 F-xxx」

引用密钥和个人信息时只引到它之前。例如原文是 const KEY = "sk-abc…",quote 写 const KEY = "sk-。合规报告自己不能泄漏数据,校验器会拦。

阶段 3 · 独立复核

每一条 gap 和 met 都要被试图推翻一次。详细协议见 VERIFY.md。

  • 能起子 agent:交给全新的、没看过你推理过程的 agent 去证伪。取证位置落在同一组文件里的记录可以打包给同一个复核 agent(省得重复读文件),但审计员自己不得兼任。verifier.mode 写 independent。
  • 不能起子 agent:你自己重新打开每个引用的文件,按 VERIFY.md 的清单过一遍。verifier.mode 写 self-recheck(校验器会警告,报告里会如实标注)。

被推翻的改成 rejected 并写 reason,不要删。

阶段 4 · 过闸

把全部记录写进 .compliance/compliance-findings.json(格式见 examples/compliance-findings.example.json),然后运行本 skill 目录下的校验器:

bash
node <本skill目录>/scripts/validate-findings.mjs .compliance/compliance-findings.json --root . --report .compliance/COMPLIANCE-REPORT.md

校验器会核对:每条引用的文件和行真的存在、quote 真的出现在那几行、报告里没有泄漏密钥或证件号、裁决纪律、14 项全覆盖。

没通过就修到通过为止。 报错说 quote 找不到,就回到原文重新取证——不要改 quote 去凑。报告由校验器从记录直接渲染,你不要手写或改写 COMPLIANCE-REPORT.md。

阶段 5 · 向用户汇报

用五六句话说清:

  • 缺口几条,最严重的是哪一条,在哪个文件;
  • 需要人回答的问题有几个,最关键的是哪个;
  • 复核方式是独立还是自查;基线有没有跑成;
  • 报告路径。

然后停下。不要主动开始改代码,除非用户要求。

边界

  • 这是技术自查,不是法律意见。不要说「符合 XX 法」,只说「在代码中找到 / 没找到 XX 措施的证据」。
  • 备案、等保定级、PIA 是主体责任,工具不能替代,只能提问。
  • 法规条款编号以 controls.json 为准,不要凭记忆补充条款号。
  • 不要把被审计项目的代码或数据发到任何外部服务。

© jnMetaCode, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (scripts) in skills/china-ai-compliance-audit of jnMetaCode/shellward.

  • SKILL.md
  • VERIFY.md
  • controls.json
  • examples/compliance-findings.example.json
  • examples/demo-app/Dockerfile
  • examples/demo-app/package.json
  • examples/demo-app/src/chat.ts
  • examples/demo-app/src/db.ts
  • examples/demo-app/src/logger.ts
  • scripts/validate-findings.mjs

Open the folder on GitHubat commit 78444dd

Compare with similar skills

China AI Compliance Audit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

China AI Compliance Audit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
China AI Compliance Audit this skilljnMetaCode/shellward140—~1.1kAutomated safety check: PassApache-2.0
Red Teaming LLMs With Garakmukul975/Anthropic-Cybersecurity-Skills34k—~2.9kAutomated safety check: WarnApache-2.0
AI SAFE2 Secure Build CopilotCyberStrategyInstitute/ai-safe2-framework147—~1.2kAutomated safety check: PassCustom licence
Sailpillar-labs/sail-skill113—~5.1kAutomated safety check: PassCustom licence
AI SAFE2 Secure Build CopilotCyberStrategyInstitute/ai-safe2-framework147—~2.7kAutomated safety check: PassCustom licence
Moai Ref LLM Securitymodu-ai/moai-adk1.2k—~4.5kAutomated safety check: PassApache-2.0

Similar skills

  • Red Teaming LLMs With Garak

    mukul975/Anthropic-Cybersecurity-Skills

    Runs NVIDIA garak probe suites (jailbreak, prompt injection, data leakage, toxicity, and more) against an LLM endpoint - Hugging Face models, OpenAI-compatible APIs, or Bedrock - then interprets the…

    34k GitHub stars~2.9k tokensUpdated 1 mo ago
    SecurityAuto-check: warnings
  • AI SAFE2 Secure Build Copilot

    CyberStrategyInstitute/ai-safe2-framework

    Applies the AI SAFE2 framework to security reviews, code reviews and compliance mapping for AI agents, RAG pipelines and MCP servers.

    147 GitHub stars~1.2k tokensUpdated yesterday
    SecurityAuto-check passed
  • Sail

    pillar-labs/sail-skill

    Apply the SAIL (Secure AI Lifecycle) V2 framework by Pillar Security to secure AI applications and agents.

    113 GitHub stars~5.1k tokensUpdated 3 mo ago
    SecurityAuto-check passed
  • AI SAFE2 Secure Build Copilot

    CyberStrategyInstitute/ai-safe2-framework

    Applies the AI SAFE2 v3.1 governance framework to designing, building, auditing and testing AI agents, RAG pipelines, MCP and tool integrations and AI infrastructure.

    147 GitHub stars~2.7k tokensUpdated yesterday
    SecurityAuto-check passed
  • Moai Ref LLM Security

    modu-ai/moai-adk

    AI/LLM defensive security reference: prompt-injection defense, OWASP LLM Top 10 defensive mapping, MCP and agentic tool-call hardening, training-data poisoning detection, model-output validation and…

    1.2k GitHub stars~4.5k tokensUpdated yesterday
    SecurityAuto-check passed
  • Aisafetyhot

    wuyoscar/AISafetyHot-Hub

    Query AI Safety HOT news, research papers, incidents, hot topics, and daily/weekly/monthly reports through its public read-only MCP service.

    827 GitHub stars~1.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from jnMetaCode/shellward

  • Security Guide

    jnMetaCode/shellward

    OpenClaw 安全部署指南 / Security deployment guide — help users secure their OpenClaw installation

    140 GitHub stars~644 tokensUpdated 12 days ago
    Auto-check: warnings

Questions about China AI Compliance Audit

What does China AI Compliance Audit do?

按中国法规(网安法 / PIPL / 等保2.0 / 数据出境 / AI生成内容标识)审计一个 AI 项目的代码仓库,产出每条都带 文件:行 取证、经独立复核、经脚本校验的合规报告。当用户问「这个项目上线合不合规」「调用了 OpenAI/Claude 算不算数据出境」「要不要做 AI 标识」「帮我做合规自查/等保/PIPL 检查」时使用。Audit an AI project's…. China AI Compliance Audit is an agent skill from jnMetaCode/shellward.0, cross-border data transfer, AI content labeling) with file:line evidence, independent verification and a deterministic validator.

When should I use China AI Compliance Audit?

China AI Compliance Audit fits situations like: tasks that involve Prompt injection and agent security; tasks that involve AI governance; tasks that involve LLM guardrails.

How do I install China AI Compliance Audit in Claude Code?

Run `npx skills add jnMetaCode/shellward --skill china-ai-compliance-audit -a claude-code`. Or copy the skill folder (skills/china-ai-compliance-audit in jnMetaCode/shellward) into .claude/skills/china-ai-compliance-audit in your project. Claude Code loads it when a task matches its description.

How do I install China AI Compliance Audit in Codex?

Run `npx skills add jnMetaCode/shellward --skill china-ai-compliance-audit -a codex`. Or copy the skill folder (skills/china-ai-compliance-audit in jnMetaCode/shellward) into .agents/skills/china-ai-compliance-audit in your project. Codex loads it when a task matches its description.

Can I use China AI Compliance Audit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jnMetaCode/shellward --skill china-ai-compliance-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/china-ai-compliance-audit, .gemini/skills/china-ai-compliance-audit, .github/skills/china-ai-compliance-audit and .opencode/skills/china-ai-compliance-audit in your project.

What does China AI Compliance Audit need to run?

Going by SKILL.md and its folder, China AI Compliance Audit needs TypeScript and JavaScript for the scripts in its folder and the command-line tools its instructions call (npx and node). Our summary lists: Node.js.

Does China AI Compliance Audit access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is China AI Compliance Audit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does China AI Compliance Audit use?

China AI Compliance Audit is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does China AI Compliance Audit use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to China AI Compliance Audit?

Skills that share tags, products or a category with China AI Compliance Audit: Red Teaming LLMs With Garak (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), AI SAFE2 Secure Build Copilot (CyberStrategyInstitute/ai-safe2-framework, 147 stars), Sail (pillar-labs/sail-skill, 113 stars) and AI SAFE2 Secure Build Copilot (CyberStrategyInstitute/ai-safe2-framework, 147 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains China AI Compliance Audit?

jnMetaCode (a GitHub user) maintains it in jnMetaCode/shellward, which has 140 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 28, 2026.

Source: jnMetaCode/shellward on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.