Rules for an AI coding agent to filter out generic AI-generated UI designs, text, and code.
JavaScript accessibilityagent-skillsai-agentsai-coding-agentai-slopanti-slopclaude-codecopywritingdesign-rulesui-design
cli: ship the README and LICENSE in the npm package (#51)
Fajar Hidayat585ce191316d
diff --git a/cli/.gitignore b/cli/.gitignoreindex da6d78d..079cbfe 100644--- a/cli/.gitignore+++ b/cli/.gitignore@@ -1,2 +1,4 @@node_modules/skills/+README.md+LICENSEdiff --git a/cli/package.json b/cli/package.jsonindex ba2f9d6..62f2342 100644--- a/cli/package.json+++ b/cli/package.json@@ -13,6 +13,7 @@"type": "git","url": "git+https://github.com/miqdadbadjuber/anti-slop.git"},+ "bugs": "https://github.com/miqdadbadjuber/anti-slop/issues","keywords": ["ai-slop","design-rules",diff --git a/cli/scripts/sync-skills.mjs b/cli/scripts/sync-skills.mjsindex 809981e..96c25e1 100644--- a/cli/scripts/sync-skills.mjs+++ b/cli/scripts/sync-skills.mjs@@ -40,6 +40,16 @@ fs.cpSync(repoSkills, cliSkills, {filter: (src) => path.basename(src) !== '__pycache__',})+// npm only ships a README and LICENSE found in cli/, so the package page and Socket saw none.+// Relative links point at files that are not in the tarball, so aim them at the repo.+const REPO = 'https://github.com/miqdadbadjuber/anti-slop'+const readme = fs.readFileSync(path.join(repoRoot, 'README.md'), 'utf8')+ .replace(/src="(?:\.\/)?(?!https?:|#)([^"]+)"/g, `src="${REPO}/raw/main/$1"`)+ .replace(/href="(?:\.\/)?(?!https?:|#|mailto:)([^"]+)"/g, `href="${REPO}/blob/main/$1"`)+ .replace(/\]\((?:\.\/)?(?!https?:|#|mailto:)([^)]+)\)/g, `](${REPO}/blob/main/$1)`)+fs.writeFileSync(path.join(__dirname, '..', 'README.md'), readme)+fs.copyFileSync(path.join(repoRoot, 'LICENSE'), path.join(__dirname, '..', 'LICENSE'))+// A Windows checkout hands back CRLF, and a shipped skill would then carry "name: x\r"// into any registry that splits on \n alone. Ship LF whatever the checkout did.const TEXT = new Set(['.md', '.py', '.json', '.txt', '.mjs'])