pnpm

作者: sanity-io

具有严格依赖解析的Node.js包管理器。在运行pnpm特定命令、配置工作区或管理依赖时使用…

npx skills add https://github.com/sanity-io/next-sanity --skill pnpm

pnpm is a fast, disk space efficient package manager. It uses a content-addressable store to deduplicate packages across all projects on a machine, saving significant disk space. pnpm enforces strict dependency resolution by default, preventing phantom dependencies. Configuration should preferably be placed in pnpm-workspace.yaml for pnpm-specific settings.

Important: When working with pnpm projects, agents should check for pnpm-workspace.yaml and .npmrc files to understand workspace structure and configuration. Always use --frozen-lockfile in CI environments.

The skill is based on pnpm 10.x, generated at 2026-01-28.

Core

TopicDescriptionReference
CLI CommandsInstall, add, remove, update, run, exec, dlx, and workspace commandscore-cli
Configurationpnpm-workspace.yaml, .npmrc settings, and package.json fieldscore-config
WorkspacesMonorepo support with filtering, workspace protocol, and shared lockfilecore-workspaces
StoreContent-addressable storage, hard links, and disk efficiencycore-store

Features

TopicDescriptionReference
CatalogsCentralized dependency version management for workspacesfeatures-catalogs
OverridesForce specific versions of dependencies including transitivefeatures-overrides
PatchesModify third-party packages with custom fixesfeatures-patches
AliasesInstall packages under custom names using npm: protocolfeatures-aliases
HooksCustomize resolution with .pnpmfile.cjs hooksfeatures-hooks
Peer DependenciesAuto-install, strict mode, and dependency rulesfeatures-peer-deps

Best Practices

TopicDescriptionReference
CI/CD SetupGitHub Actions, GitLab CI, Docker, and caching strategiesbest-practices-ci
MigrationMigrating from npm/Yarn, handling phantom deps, monorepo migrationbest-practices-migration
PerformanceInstall optimizations, store caching, workspace parallelizationbest-practices-performance

来自 sanity-io 的更多技能

sanity-migration
sanity-io
规划、实施并审查从其他CMS和内容系统迁移至Sanity的过程。适用于从AEM、Adobe Experience Manager、Contentful、Strapi、Webflow、WordPress、Payload、Drupal、Markdown/MDX/frontmatter文件、WXR/XML导出、CMS API、数据库转储、静态HTML进行迁移或平台重构,或设计数据提取、转换、Portable Text转换、资产迁移、重定向、验证及切换工作流时使用。
officialdevelopmentdatabase
create-agent-with-sanity-context
sanity-io
通过Agent Context构建对Sanity内容的结构化访问的AI代理。用于设置由Sanity驱动的聊天机器人、将AI助手连接到Sanity…
official
dial-your-context
sanity-io
交互式会话,用于为Sanity Agent Context MCP创建指令字段内容。当用户提到调整代理上下文、改进……时,使用此技能。
official
optimize-agent-prompt
sanity-io
通过引导式对话调整你的Sanity Agent Context代理。将探索数据转化为可用于生产的指令,并构建系统提示词……
official
shape-your-agent
sanity-io
交互式会话,用于为基于Sanity Agent Context MCP的AI代理编写系统提示。当用户希望定义代理个性时使用此技能…
official
content-experimentation-best-practices
sanity-io
结构化指导,用于设计、执行和分析内容实验,以提升转化率和参与度。涵盖假设框架、指标选择、样本量计算以及A/B和多变量实验中的统计显著性检验。包含关于p值、置信区间、功效分析和贝叶斯方法的详细资源,用于解读结果。提供CMS集成模式,用于在字段级别管理变体并连接外部...
official
content-modeling-best-practices
sanity-io
结构化内容建模指南,涵盖模式设计、可复用性及多渠道交付。核心原则包括:将内容视为数据而非页面、维护单一事实来源、面向未来渠道设计、优化编辑工作流。提供引用与嵌入对象的选择框架、关注点分离及内容复用模式。包含扁平化、层级化及分面分类法的分类学指导。适用于...
official
portable-text-conversion
sanity-io
将HTML和Markdown内容转换为适用于Sanity的Portable Text块。在从旧版CMS迁移内容、将HTML或Markdown导入Sanity时使用。
official