# Package linter

> Package linter is an open-source agent skill for developer tools. Checks and normalizes package.json, tsup and tsconfig setup for monorepo Node packages. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/ruan-cat/monorepo/tree/main/.agents/skills/package-linter
- **Repository:** https://github.com/ruan-cat/monorepo
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** package-linter
- **Collection:** https://github.com/ruan-cat/monorepo
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill guides an agent through validating and tidying the configuration of Node packages inside a pnpm-style monorepo. It covers the package.json of publishable, demo, test and auxiliary workspaces, with a fixed field order, shared author, bugs, publishConfig and files values, and rules for matching exports to the build entries.

The workflow runs through a numbered checklist: identify the package type from its directory, verify required fields, check ordering, align exports with tsup entries, review tsup.config.ts and tsconfig inheritance, confirm the directory layout, and finally register new packages in the root workspace. It also includes templates for ESM, CJS, CLI and Vite plugin builds, plus guidance on choosing whether main and types point to source or dist.

The rules are written for a specific monorepo convention, with Chinese-language descriptions and a shared tsconfig.base.json. Users outside that layout will need to adapt the paths and metadata. The skill contains no scripts and works through reading and editing files.

## When your agent uses it

> 校验和规范化 monorepo 中 Node 包的 package.json、tsup.config.ts、tsconfig.json 配置。在创建新包、修改包配置、审查包规范合规性、初始化新的工作区子包时使用。触发关键词：新建包、创建包、package.json、tsup 配置、包校验、包规范、初始化子包。

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ruan-cat/monorepo/tree/HEAD/.agents/skills/package-linter)
- [License: MIT](https://github.com/ruan-cat/monorepo/tree/HEAD/.agents/skills/package-linter)

## Features

- **Package type detection:** Classifies a package as publishable, config, Vite plugin, demo, test or auxiliary based on its workspace directory.
- **Field ordering and required fields:** Lists the required package.json fields for release packages and the strict order they should appear in.
- **Shared metadata enforcement:** Standardizes author, bugs, license, publishConfig and files values across release packages.
- **Exports and build alignment:** Checks that exports entries match tsup entry points and bin file extensions match the output format.
- **tsup and tsconfig templates:** Provides starter tsup.config.ts and tsconfig.json patterns that extend a shared base configuration.
- **New package checklist:** Walks through creating a new workspace package and registering it in the root package.json.

## Good for

- Check a package.json for missing or misordered fields
- Scaffold a new publishable package in the monorepo
- Review whether a tsup config matches the package exports
- Normalize author, publishConfig and files settings across packages
- Add a workspace dependency reference to the root package.json

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/package-linter` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/package-linter &&
cp -R "$tmp/.agents/skills/package-linter" ~/.claude/skills/package-linter &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/package-linter` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/package-linter` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/package-linter &&
cp -R "$tmp/.agents/skills/package-linter" ~/.agents/skills/package-linter &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/package-linter` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/package-linter` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/package-linter &&
cp -R "$tmp/.agents/skills/package-linter" ~/.cursor/skills/package-linter &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/package-linter` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ruan-cat/monorepo.git --path .agents/skills/package-linter
```

Or copy the folder to `~/.gemini/skills/package-linter` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/package-linter`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ruan-cat/monorepo.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/package-linter &&
cp -R "$tmp/.agents/skills/package-linter" ~/.copilot/skills/package-linter &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/package-linter` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ruan-cat/monorepo.git
```

Then copy `monorepo/.agents/skills/package-linter` into your agent's skills folder as `package-linter`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Package linter trigger?

It is meant for creating new packages, changing package configuration, reviewing compliance, and initializing workspace subpackages, with trigger keywords such as package.json, tsup configuration and package validation.

### Does Package linter run any scripts?

No. The skill contains only its SKILL.md file and works by guiding the agent through reading and editing configuration files.

### Which directories does Package linter apply to?

It covers packages, configs-package, vite-plugins, demos, tests, and auxiliary workspaces such as docs, fork and learn-create-compoents-lib, each with a different naming and private setting.

### Are the instructions in Chinese?

Yes. The SKILL.md and its descriptions are written in Simplified Chinese.

### How do I install Package linter in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/package-linter to use it in all your projects, or to .claude/skills/package-linter in one project.

### Does Package linter run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Package linter?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Package linter?

The closest alternatives to Package linter are Antfu, Init tsconfig, Marco code style, Use pnpm and Skill authoring lifecycle.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Antfu](https://ai-powered.com/skills/antfu): Antfu is an open-source agent skill for developer tools.
- [Init tsconfig](https://ai-powered.com/skills/init-tsconfig): Init tsconfig is an open-source agent skill for developer tools.
- [Marco code style](https://ai-powered.com/skills/marco-code-style): Marco code style is an open-source agent skill for developer tools.
- [Use pnpm](https://ai-powered.com/skills/use-pnpm): Use pnpm is an open-source agent skill for developer tools.
- [Skill authoring lifecycle](https://ai-powered.com/skills/skill-authoring-lifecycle): Skill authoring lifecycle is an open-source agent skill for developer tools.
- [Vue ci](https://ai-powered.com/skills/vue-ci): Vue ci is an open-source agent skill for developer tools.
- [Validate skills](https://ai-powered.com/skills/validate-skills): Validate skills is an open-source agent skill for developer tools.
- [Create docs](https://ai-powered.com/skills/create-docs): Create docs is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/package-linter
