kadlint
Korean ad-compliance linter for cosmetics and health-food marketing copy โ detects prohibited claims with the legal basis, severity, and safer alternatives.

ํ๊ตญ์ด README
Korean law tightly regulates what cosmetics and health-functional-food ads may claim. A face cream may not say it "treats acne" (that is a drug claim under the Cosmetics Act), a probiotic may not promise to "boost immunity" unless that exact functionality was approved, and "No.1" / "100% natural" claims require objective substantiation under the Fair Labeling and Advertising Act. Korea's Ministry of Food and Drug Safety (MFDS) keeps detecting thousands of unlawful online ads in these categories every year โ in 2025 its routine sweeps again flagged large batches of cosmetics and health-food ads for drug-like or unsubstantiated claims, and violations can mean ad bans, sales suspensions, and fines.
kadlint lints Korean marketing copy against a curated dictionary of 299 rules (183 cosmetics, 51 health-food, 65 common) distilled from:
- ํ์ฅํ๋ฒ (Cosmetics Act) and its enforcement rules (๋ณํ5)
- ๊ฑด๊ฐ๊ธฐ๋ฅ์ํ๋ฒ / ์ํํ์๊ด๊ณ ๋ฒ (Health Functional Foods & Food Labeling/Advertising Acts)
- ํ์๊ด๊ณ ๋ฒ (Fair Labeling and Advertising Act)
- MFDS advertising guidelines and enforcement precedents
Every finding comes with the violation category, the legal basis citation, a severity (high / medium / low), an explanation, and safer alternative phrasings.
Install
npm install -g kadlint
npm install kadlint
Requires Node.js >= 18.
CLI
kadlint check ad-copy.txt
kadlint check ./landing-pages --format json --min-severity high
kadlint check - < draft.md
kadlint check banner.html --domain cosmetics,common
ad-copy.txt:1:1 [HIGH] '์ฌ๋๋ฆ ์น๋ฃ' โ ์์ฝํ ์ค์ธ ํํ (cos-113)
๊ทผ๊ฑฐ: ํ์ฅํ๋ฒ ์ 13์กฐ์ 1ํญ์ 1ํธ, ์์ฝ์ฒ ใํ์ฅํ ํ์ยท๊ด๊ณ ๊ด๋ฆฌ ์ง์นจใ
๋์ฒด ํํ: ํผ์งยท๊ฐ์ง ์ผ์ด๋ก ๋งค๋ํ ํผ๋ถ๊ฒฐ / (์ค์ฆ ๋ณด์ ์) ์ฌ๋๋ฆ์ฑ ํผ๋ถ์ ์ฌ์ฉ ์ ํฉ
โ 1๊ฑด ๋ฐ๊ฒฌ (high 1 ยท medium 0 ยท low 0) โ ํ์ผ 1๊ฐ, ๊ท์น 299๊ฐ ๊ฒ์ฌ
- Supported inputs:
.txt, .md, .html (tags stripped, offsets preserved), directories (recursive), - (stdin).
- Exit codes:
0 clean, 1 findings at/above --min-severity, 2 usage error.
- Literal rules match through inserted spaces, middle dots, and hyphens (
์ด ๊ท , ์ดยท๊ท , ์ด-๊ท ), a common evasion tactic; disable with --no-normalize.
API
import { lint, lintFile } from 'kadlint';
const result = lint('์ฌ๋๋ฆ ์น๋ฃ์ ํ์ํ ํฌ๋ฆผ', { domains: ['cosmetics'] });
for (const f of result.findings) {
console.log(f.ruleId, f.severity, f.match, f.legalBasis, f.alternatives);
}
const fileResult = lintFile('landing.html', { minSeverity: 'medium' });
Options: domains (cosmetics | health_food | common), minSeverity, normalize (default true).
When one of a rule's exceptions phrases appears within 80 characters of a match (e.g. an approved functional claim used verbatim), the finding is downgraded to low with an explanatory note.
MCP server
kadlint-mcp exposes a check_ad_copy { text, domain? } tool over stdio so LLM assistants can lint copy while drafting it.
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"kadlint": {
"command": "npx",
"args": ["-y", "kadlint", "kadlint-mcp"]
}
}
}
If installed globally, "command": "kadlint-mcp" suffices:
{
"mcpServers": {
"kadlint": { "command": "kadlint-mcp" }
}
}
Claude Code:
claude mcp add kadlint -- kadlint-mcp
or in .mcp.json:
{
"mcpServers": {
"kadlint": {
"command": "kadlint-mcp",
"args": []
}
}
}
Playground
playground/index.html is a dependency-free static page (GitHub Pages friendly): paste copy, get highlighted matches and rule cards with the legal basis and alternatives.
Rule dictionary
Rules live in data/*.json:
{
"id": "cos-113",
"pattern": "์ฌ๋๋ฆ.{0,8}(๊ฐ์ |์น๋ฃ|์ํ|๋ฐ๋ฉธ|์์ |์ผ์ด|์๋ฐฉ)",
"pattern_type": "regex",
"violation": "์์ฝํ ์ค์ธ ํํ",
"legal_basis": "ํ์ฅํ๋ฒ ์ 13์กฐ์ 1ํญ์ 1ํธ",
"severity": "high",
"message": "โฆwhy this is prohibitedโฆ",
"alternatives": ["ํผ์งยท๊ฐ์ง ์ผ์ด๋ก ๋งค๋ํ ํผ๋ถ๊ฒฐ"],
"exceptions": ["์ฌ๋๋ฆ์ฑ ํผ๋ถ ์ํ ๊ธฐ๋ฅ์ฑํ์ฅํ ์ฌ์ฌ(๋ณด๊ณ ) ํจ๋ฅํจ๊ณผ"]
}
data/_needs_review.json is a backlog of candidate rules that have not been verified yet; it is excluded from the npm package. Contributions welcome โ see CONTRIBUTING.md (no coding required, every rule must cite its legal basis).
Disclaimer
- kadlint is not legal advice. It is a heuristic linter over a hand-curated dictionary.
- A clean result does not guarantee compliance โ false negatives are inherent to pattern matching, and regulations change.
- Final legal responsibility for any advertisement rests with the advertiser. Consult a qualified professional for high-stakes copy.
Roadmap
- v0.2: PyPI mirror (
pip install kadlint), review of the 25 backlog rules in _needs_review.json, and a pipeline for tracking MFDS guideline revisions.
License
MIT ยฉ 2026 Jungkyun Lim