Use when setting up or configuring syncpack for a monorepo. Covers configuration files, workspace detection, and custom rule definitions for dependency version management.
View on GitHubTheBushidoCollective/han
jutsu-syncpack
January 24, 2026
Select agents to install to:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-syncpack/skills/syncpack-configuration/SKILL.md -a claude-code --skill syncpack-configurationInstallation paths:
.claude/skills/syncpack-configuration/# Syncpack Configuration
Syncpack is a tool for managing consistent dependency versions across JavaScript/TypeScript monorepos. This skill covers configuration best practices.
## Configuration File Locations
Syncpack searches for configuration in these locations (in order):
1. `syncpack.config.js` / `.cjs` / `.mjs` / `.ts`
2. `syncpack.config.json` / `.yaml` / `.yml`
3. `.syncpackrc` / `.syncpackrc.json` / `.syncpackrc.yaml` / `.syncpackrc.yml`
## Basic Configuration
```js
// syncpack.config.js
export default {
// Glob patterns to find package.json files
source: [
'package.json',
'packages/*/package.json',
'apps/*/package.json',
],
};
```
## Workspace Detection
Syncpack automatically detects workspaces:
- **npm/Yarn**: Reads `workspaces` from `./package.json`
- **pnpm**: Reads `packages` from `./pnpm-workspace.yaml`
- **Lerna**: Reads `packages` from `./lerna.json`
Override with explicit `source` patterns when needed.
## Dependency Types
Control which dependency types to check:
```js
export default {
dependencyTypes: [
'dev', // devDependencies
'local', // workspace: protocol dependencies
'overrides', // npm overrides / yarn resolutions
'peer', // peerDependencies
'pnpmOverrides', // pnpm overrides
'prod', // dependencies
'resolutions', // yarn resolutions
],
};
```
## Semver Groups
Define rules for semver range consistency:
```js
export default {
semverGroups: [
{
// Require exact versions for React
dependencies: ['react', 'react-dom'],
range: '', // exact version
},
{
// Allow caret ranges for dev tools
dependencyTypes: ['dev'],
range: '^',
},
],
};
```
### Range Options
| Range | Example | Meaning |
|-------|---------|---------|
| `''` | `1.2.3` | Exact version |
| `^` | `^1.2.3` | Compatible with |
| `~` | `~1.2.3` | Approximately equivalent |
| `>=` | `>=1.2.3` | Greater than or equal |
| `*` | `*