kunlun-m-general

kunlun-m-general is a skill for Codex from LoRexxar/Kunlun-M. It costs 85 tokens per session (1,227 once invoked), scanned A, original, MIT.

A scripted workflow for Kunlun-M, a static security scanner that examines source code without running it. It supports PHP, JavaScript, Solidity smart contracts, and Chrome extensions, and can create scanner rules and tamper settings.

In plain words
What is it for?
Use it to scan supported source code, generate source or sink rules, create tamper settings, and optionally synchronize them with Kunlun-M's database.
Why use it?
It provides repeatable commands for scanning code, adding rules for missed issues, and adapting scans to reduce false alarms.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Codex; built for openclaw.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M scan -t ./Kunlun-M/tests -lan php -d.

Good fit Use it to scan supported source code, generate source or sink rules, create tamper settings, and optionally synchronize them with Kunlun-M's database.

Compare 6 skills from other repositories ↓
About the project

Kunlun-M is a static security-analysis tool that examines source code for vulnerabilities using semantic analysis based on abstract syntax trees. Security researchers and developers use it with PHP, JavaScript or Node.js, Python, Go, Java, and C or C++ projects, with additional basic scanning for Chrome extensions. Its catalogue skill connects the analysis workflow with coding agents.

LoRexxar/Kunlun-M · 2,415 stars · on GitHub

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/LoRexxar/Kunlun-M
agentmods
npx agentmods add skills/lorexxar/kunlun-m/kunlun-m-general

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kunlun-m-general

README.md
[![agentmods](https://agentmods.dev/badge/skills/lorexxar/kunlun-m/kunlun-m-general/github.svg)](https://agentmods.dev/skills/lorexxar/kunlun-m/kunlun-m-general)
Your own site
<a href="https://agentmods.dev/skills/lorexxar/kunlun-m/kunlun-m-general"><img src="https://agentmods.dev/badge/skills/lorexxar/kunlun-m/kunlun-m-general/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kunlun-m-general

Your own site · 80×15
<a href="https://agentmods.dev/skills/lorexxar/kunlun-m/kunlun-m-general"><img src="https://agentmods.dev/badge/skills/lorexxar/kunlun-m/kunlun-m-general.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,227 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.01227
Opus 5 $0.00043 $0.00613
Sonnet 5 $0.00017 $0.00245
Haiku 4.5 $0.00009 $0.00123

Measured 12d ago against content hash 61f75a84d0ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

kunlun-m-general scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/bootstrap_kunlunm.py, scripts/install_platform.py, scripts/kunlun_ops.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/kunlun-m-general/SKILL.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kunlun-M 通用 Skill(脚本落地版)

本 skill 只包含可直接执行的脚本与最小流程,优先用脚本完成动作,不在 SKILL.md 里展开原理解释。

0. 一键准备环境(没有 Kunlun-M 时)

python skills/kunlun-m-general/scripts/bootstrap_kunlunm.py --repo-dir ./Kunlun-M

默认行为:优先 git clone,失败回退 zip;然后执行 pip install、复制 settings.py、初始化 DB、load rules/tamper。

1. 用脚本执行日常动作(推荐)

约定:--repo-root 指向 Kunlun-M 目录(里面有 kunlun.py)。

扫描

python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M scan -t <target> -lan php -b vendor,node_modules -d

生成 rule(漏报补齐)

python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M gen-rule -lan php --name "<rule_name>" --match "<regex>"
python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M scan -t <target> -lan php -r <id>

生成 tamper(误报治理/框架适配)

python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M gen-tamper --name <proj> --controlled "$_GET,$_POST"
python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M scan -t <target> -lan php -tp <proj>

同步到数据库(可选:仅 Web 管理需要)

python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M sync --rule --tamper

2. 最小概念(只留决策点)

  • 规则(rule)≈ sink(危险点):要扫哪些危险函数/语句就生成/调整 rule,然后用 scan -r <id> 回归
  • 污点策略(tamper)≈ source + repair:要定义输入源或净化函数就生成/调整 tamper,然后用 scan -tp <name> 回归

更详细的概念与场景说明见:concepts.md

3. 测试命令(冒烟验证)

在本仓库根目录执行(或把 --repo-root 指向你的 Kunlun-M 目录):

python skills/kunlun-m-general/scripts/bootstrap_kunlunm.py --repo-dir ./Kunlun-M --force
python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M gen-rule -lan php --name "Skill Smoke Rule" --match "echo|print" --force
python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M gen-tamper --name skill_smoke --controlled "$_GET,$_POST" --force
python skills/kunlun-m-general/scripts/kunlun_ops.py --repo-root ./Kunlun-M scan -t ./Kunlun-M/tests -lan php -d

Read the full file on GitHub · 90 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 90 lines · 85 tokens per session scan A 61f75a84d0ca

Subscribe to this mod's changes

kunlun-m-general is a skill published in the GitHub repository LoRexxar/Kunlun-M (2,415 stars, last pushed yesterday), licensed MIT. It adds 85 tokens to every session and 1,227 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens