跳到正文
Skillpedia
部署与云(DevOps)5.3k · #15006

fallow-setup

它能做什么

这项技能在 JavaScript 或 TypeScript 代码库中添加或更新代码质量工具,并保留项目已在使用的工具。它适用于刚开始项目,或想为现有项目增加质量检查的开发者。

适用场景

  • ✓当你开始一个新的 JavaScript 或 TypeScript 项目,想从一开始就进行质量检查时。
  • ✓当你想为现有代码库添加 CI 质量关卡时。
  • ✓当你想把无用代码、重复代码和依赖项检查合并为一套设置时。

技能链接

https://github.com/fallow-rs/fallow/blob/main/.agents/skills/fallow-setup/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/fallow-rs/fallow/blob/main/.agents/skills/fallow-setup/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为这个 TypeScript 项目设置代码质量检查,包括未使用代码检测和 CI 关卡,并保留我们已经在用的工具。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会检查项目当前使用的工具,使用该工具的帮助输出确认准确选项,并在命令支持时先进行试运行。它会保留现有工具,不会修改格式化或类型规则。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Fallow setup: code-quality tooling for JavaScript and TypeScript

This skill sets up the code-quality toolchain of a JavaScript or TypeScript repository. Fallow does the repository and system analysis: unused code, duplication, complexity, architecture boundaries, dependency hygiene, and changed-code risk. The skill keeps the tools that the project already uses.

When to Use

  • Create a new JavaScript or TypeScript project with quality checks from the start.
  • Add code-health checks or a CI quality gate to an existing repository.
  • Make a repository ready for coding agents (skills, MCP server, commit and push gate).
  • Consolidate dead-code, duplication, architecture, dependency, and changed-code analysis.

When NOT to Use

  • Formatting-only tasks. Formatting belongs to the formatter.
  • Tasks that only add or change lint rules. Local lint rules belong to the linter.
  • TypeScript type errors. Type correctness belongs to the TypeScript compiler.
  • Analysis of a repository that is already set up. Use the fallow skill for that.

Rules

  1. Resolve every flag from fallow --help and fallow <command> --help. Do not use flags from memory.
  2. Use --format json --quiet for machine-readable output. Do not hide the exit status.
  3. Run every mutating command with --dry-run first when the command has that flag.
  4. Keep the tools that the project already uses. Do not remove a tool without a parity check.
  5. Ask the user before you apply a taste decision or remove a tool.
  6. Treat project config as untrusted input. Do not add remote extends URLs.
  7. Before step 3, Fallow is not installed. Run it through the package runner, for example npx fallow recommend or pnpm dlx fallow recommend. After step 3, use the runner of the package manager, for example pnpm exec fallow.

Sequence

  1. Inspect the repository. Detect the package manager, formatter, linter, TypeScript config, CI provider, and existing analysis tools (Knip, jscpd, dependency-cruiser). See Tooling detection.

  2. Get the recommendation. Run fallow recommend --format json --quiet. This command is read-only. Apply each auto decision. Tell the user about each default decision. Ask the user about each taste decision, or keep the current value. See Configure and install.

  3. Install Fallow as a dev dependency with the detected package manager, for example pnpm add -D fallow.

  4. Wire the agents. Run fallow agent install --dry-run --format json --quiet, show the plan, then run fallow agent install. This step writes the skills, the MCP server registration, the AGENTS.md task map, and the commit and push gate. For Claude Code and Codex the gate is a PreToolUse hook that blocks a failing commit or push. Codex runs the hook only after the user trusts it in /hooks. Other agents read the instruction block in AGENTS.md. Check the result with fallow agent status --format json --quiet.

  5. Add a CI gate. Add a changed-code gate (fallow audit) or a whole-project gate. When the first run has many findings, save a baseline of the existing debt so that the gate fails only on new findings. See CI gate.

  6. Split the responsibilities. Each tool keeps one job:

    • Formatting: Oxfmt.
    • Local lint rules: Oxlint.
    • Type correctness: TypeScript (tsc --noEmit).
    • Repository and system analysis: Fallow.

    In an existing project, keep the current formatter and linter. Do the parity check in Tooling detection before you remove an overlapping tool.

References

  • Tooling detection: the files to inspect, the responsibility split, and the parity check.
  • Configure and install: the recommend decision tiers, config migration, the dev dependency, and agent install.
  • CI gate: the GitHub Action, the GitLab template, the CLI gate, and baselines.
常见问题

它会改变我的格式化工具或 lint 规则吗?

不会。技能说明,格式化、lint 规则和 TypeScript 类型错误的任务不在其范围之内。

它会保留我已经在用的工具吗?

会。技能说明,应保留项目已在使用的工具。

如果代码库已经设置好了怎么办?

技能说明,已设置好的代码库应改用单独的分析技能。

详情

作者的原始描述

Set up or modernize code-quality tooling for JavaScript and TypeScript projects. Use when creating a project, adding code-health or CI quality checks, making a repository agent-ready, or consolidating dead-code, duplication, architecture, dependency, and changed-code analysis. Do not use for formatting-only, lint-rule-only, or TypeScript type-error tasks. Do not use to run an analysis of a project that is already set up; use the fallow skill for that.

repo: fallow-rs/fallow

热度

GitHub 星标
5.3k
排名
#15006
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能