Skip to content
Skills Library
Programming · Tool integration

syncpack-configuration

/syncpack-configuration

Use when setting up or configuring syncpack for a monorepo. Covers configuration files, workspace detection, and custom rule definitions for dependency version management.

Repository
han ↗
Licence
Apache-2.0
Last repository change
08.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 08.09.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use when setting up or configuring syncpack for a monorepo. Covers configuration files, workspace detection, and custom rule definitions for dependency version management.

Original author description

Use when setting up or configuring syncpack for a monorepo. Covers configuration files, workspace detection, and custom rule definitions for dependency version management.

How it works

  1. Configuration File Locations
  2. Basic Configuration
  3. Workspace Detection
  4. Dependency Types
  5. Semver Groups
  6. Version Groups
  7. Formatting Options
  8. Common Patterns
  9. Best Practices
Original SKILL.md headings · 194 lines, 500 words
SKILL.md preview
---
name: syncpack-configuration
user-invocable: false
description: Use when setting up or configuring syncpack for a monorepo. Covers configuration files, workspace detection, and custom rule definitions for dependency version management.
allowed-tools:
  - Read
  - Write
  - Edit
  - Bash
  - Grep
  - Glob
---

# 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 |
| `*` | `*` | Any version |

## Version Groups

Partition dependencies into groups with separate version policies:

```js
export default {
  versionGroups: [
    {
      // Pin specific dependencies
      dependencies: ['typescript'],
      pinVersion: '5.3.3',
    },
    {
      // Ban certain packages
      dependencies: ['moment'],
      isBanned: true,
    },
    {
      // Use workspace version as source of truth
      dependencies: ['@myorg/*'],
      preferVersion: 'highestSemver',
    },
  ],
};
```

## Formatting Options

Control package.json formatting:

```js
export default {
  formatBugs: true,
  formatRepository: true,
  sortAz: [
    'contributors',
    'dependencies',
    'devDependencies',
    'keywords',
  ],
  sortFirst: [
    'name',
    'version',
    'description',
    'main',
  ],
};
```

## Common Patterns

### Single Version Policy

Enforce one version per dependency across all packages:

```js
export default {
  versionGroups: [
    {
      label: 'Use highest version everywhere',
      preferVersion: 'highestSemver',
    },
  ],
};
```

### Allow Development Exceptions

```js
export default {
  versionGroups: [
    {
      label: 'Ignore dev dependencies',
      dependencyTypes: ['dev'],
      isIgnored: true,
    },
    {
      label: 'Consistent versions for production',
      dependencyTypes: ['prod', 'peer'],
      preferVersion: 'highestSemver',
    },
  ],
};
```

### Scoped Package Source of Truth

```js
export default {
  versionGroups: [
    {
      label: 'Internal packages use local version',
      dependencies: ['@myorg/**'],
      dependencyTypes: ['local'],
      preferVersion: 'local',
    },
  ],
};
```

## Best Practices

1. **Start with defaults** - Syncpack works well without configuration
2. **Add rules incrementally** - Only add rules as you encounter issues
3. **Document exceptions** - Use `label` field to explain why rules exist
4. **Commit config file** - Keep version policy in version control
5. **Run in CI** - Use `syncpack list-mismatches --fail-fast` in CI pipelines

Versions

The database has no other skills named syncpack-configuration.

Database snapshot: 13.11.2026 · package version b7aaba0e5f1a (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95syncpack-version-groups
    Use when defining version policies, banning dependencies, pinning versions, or creating partitioned version groups in syncpack. Covers advanced version management patterns.
  • 100monorepo-deps
    End-to-end syncpack + manypkg flow for an npm monorepo: check, fix, update, and maintain `.syncpackrc.json`. Trigger on /monorepo-deps, "update deps", "sync deps", "check deps", "fix syncpackrc", "create syncpackrc", or "my lock file is out of sync". Use syncpack-usage /…
  • 100document-code
    Add and update the documentation website for Syncpack. Use when making user-facing changes to the codebase.
  • 100review-docs
    Review and improve Syncpack documentation for clarity, completeness, and consistency. Use when enhancing docs or validating before publication.
  • 90skif
    Lint the dependencies of JavaScript and TypeScript monorepos with skif: workspace and manifest rules, version and catalog policies, and unused or unlisted dependencies, files and exports, with format-preserving fixes. Use when a repository has a skif.toml or runs skif in CI or…
  • 100nx-workspace-patterns
    Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.