install-anti-slop
它能做什么
它指导 AI 把随附的 lint 插件复制到代码仓库中,并将其接入项目现有的 Oxlint 配置。适用于希望进行更严格代码质量检查的开发者。
适用场景
- ✓当你想为 TypeScript 或 JavaScript 项目添加 anti-slop lint 规则时。
- ✓当你想把现有的 anti-slop 配置迁移到新的代码仓库时。
- ✓当你想用这些规则配置 Oxlint,同时保留当前设置时。
技能链接
https://github.com/trycompai/crm/blob/release/.agents/skills/install-anti-slop/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在我的 TypeScript 项目中安装 anti-slop lint 规则,并保留我当前的 lint 设置。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会检查项目的包管理器和现有 lint 配置,复制插件,安装兼容的包,并把规则接入其中。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Install anti-slop
Install the bundled Oxlint plugin into the current repository and integrate it with the repository's existing lint setup. Preserve unrelated work and adapt to the project's package manager and configuration style.
Procedure
Inspect the repository before changing it:
- Read its agent instructions.
- Check
git statusand preserve unrelated changes. - Identify the package manager from
packageManagerand lockfiles. - Find Oxlint configuration (
oxlint.config.*,.oxlintrc*, or a Vite+ config). - Check whether anti-slop files or rules already exist. Do not overwrite them without reviewing the diff.
Copy the bundled plugin from this skill. Run from the target repository:
node <skill-directory>/scripts/install.mjsThis creates
tools/oxlint/anti-slop/. Pass another relative destination as the first argument when the repository has an established tooling layout. The script refuses to replace an existing destination; only use--forceafter backing up and reviewing existing files.Install current compatible dependencies rather than trusting versions remembered by the agent:
- Query
npm view oxlint versionandnpm view @oxlint/plugins version. - Install the same current version of both packages with the repository's package manager.
oxlintis a development dependency. The copied source imports@oxlint/plugins, so install it as a development dependency for a local-only plugin.- Do not replace the package manager or rewrite unrelated dependency ranges.
- Query
Register the plugin and enable all rules. For
oxlint.config.tsor.oxlintrc.json, add:jsPlugins: [ { name: "anti-slop", specifier: "./tools/oxlint/anti-slop/index.ts" }, ],For Vite+, add that same entry to
lint.jsPlugins. Merge it with existing entries instead of replacing them.Enable these rules at
"error":{ "anti-slop/no-chained-type-assertions": "error", "anti-slop/no-conditional-empty-object-spread": "error", "anti-slop/no-known-value-widening": "error", "anti-slop/no-object-parameters": "error", "anti-slop/no-runtime-typeof": "error", "anti-slop/no-shape-in-symbol-names": "error", "anti-slop/no-unknown-parameters": "error", "anti-slop/no-unknown-type-aliases": "error", "anti-slop/no-unsafe-dictionary-type": "error", "anti-slop/no-widen-then-assert": "error" }Run the repository's lint command and typecheck. If findings appear, report them and fix them only when the user asked for migration/cleanup. Do not suppress rules, weaken rule severity, add unsafe casts, or mechanically launder types to make lint pass.
Review the final diff and clearly report:
- copied path,
- dependency versions installed,
- configuration changed,
- checks run and any remaining findings.
Migration guidance
When replacing an older local copy, compare its rules and diagnostics before overwriting. Keep project-specific rules in their own plugin; anti-slop is intentionally generic. Prefer inference, as const, satisfies, named owner contracts, and boundary parsing when resolving findings.
常见问题
它会覆盖我现有的文件吗?
它拒绝替换已存在的目标文件,只有在备份并经过审核之后,才会强制覆盖。
它使用哪个 linter?
它使用 Oxlint,并安装其当前兼容版本及其插件包。
它需要特定的包管理器吗?
不需要。它会根据设置文件和锁文件找出项目的包管理器,并适配使用。
详情
作者的原始描述
Install and configure the anti-slop Oxlint plugin in a local TypeScript or JavaScript repository. Use whenever a user asks to add anti-slop lint rules, copy the anti-slop plugin, configure opinionated Oxlint rules, or migrate an existing local anti-slop setup.
repo: trycompai/crm
热度
- GitHub 星标
- 12k
- 排名
- #11519
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
ai-elements
12k帮你的智能体用现成的组件构建 AI 聊天界面,包括对话、消息、工具显示和提示输入框。
ai-sdk
12k帮你的智能体使用 Vercel AI SDK 构建 AI 功能,包括文本生成、流式输出、工具调用和智能体。
better-accessibility
12k帮你的智能体让界面可以通过键盘和屏幕阅读器使用,涵盖焦点、标签、ARIA 和表单。
better-auth-best-practices
12k帮你的智能体按照官方文档步骤,在 TypeScript 应用中设置 Better Auth,实现登录、会话、OAuth 和插件。