pnpm
使用可靠指导管理 pnpm 项目
pnpm 项目需要精确的命令、严格的依赖处理和安全的配置选择。此技能为安装、工作区、CI、补丁和迁移任务提供聚焦指导。
安装前请停下并请求确认。
请审查安装计划,并在更改文件前获得用户明确同意。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "pnpm" from https://skillstore.io/skills/antfu-pnpm.md and its manifest at https://skillstore.io/api/skills/antfu-pnpm/manifest. Verify the artifact. Stop and obtain explicit user consent before installing or changing files.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“pnpm”。 为什么 npm 成功安装了这个包树,而 pnpm 却失败了?
预期结果:
该技能解释幽灵依赖行为,识别缺失的直接依赖,并建议添加已声明的依赖,而不是依赖传递包。
正在使用“pnpm”。 我们的仓库应该如何在 CI 中缓存 pnpm 安装?
预期结果:
该技能建议使用稳定的 pnpm 版本、冻结锁文件、按锁文件生成键的存储缓存,并对已更改的工作区进行单独验证。
正在使用“pnpm”。 我们需要为某个依赖打补丁,直到上游修复发布。
预期结果:
该技能概述补丁工作流,提醒你记录原因,并建议在升级该依赖时重新审查补丁。
安全审计
高风险The audit found no prompt injection or data-exfiltration intent. Most static alerts are Markdown syntax, example paths, placeholders, or safe configuration guidance. Confirmed concerns include credential-file inspection, recursive permission changes, third-party registry use, blanket build approval, unpinned execution, and destructive cleanup.
已确认安全问题 (4)
能力复核项 (3)
这些是真实的本地能力,对此技能可能是预期行为,因此需要复核,但不会按已确认恶意行为计分。
风险因素
⚙️ 外部命令 (14)
📁 文件系统访问 (25)
🌐 网络访问 (13)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/antfu-pnpm/audits/5?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/antfu-pnpm?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/antfu-pnpm?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/antfu-pnpm/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/antfu-pnpm.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
antfu. (2026). pnpm security audit report (audit version 5) [Author version 2026.6.22]. Skillstore. https://skillstore.io/skills/antfu-pnpm/audits/5BibTeX 引用
@techreport{antfu-antfu-pnpm-2026,
author = {antfu},
title = {pnpm security audit report (audit version 5)},
institution = {Skillstore},
year = {2026},
number = {5},
url = {https://skillstore.io/skills/antfu-pnpm/audits/5},
note = {Author version 2026.6.22}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "pnpm security audit report (audit version 5)"
version: "2026.6.22"
type: report
authors:
- name: "antfu"
date-released: "2026-07-23"
url: "https://skillstore.io/skills/antfu-pnpm/audits/5"
identifiers:
- type: other
value: "skillstore:antfu-pnpm:audit:5"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 高你能构建什么
设置 Monorepo
为多包仓库规划工作区包、共享依赖版本、过滤器和锁文件行为。
改进 CI 安装
为更快且可靠的构建选择冻结锁文件设置、Corepack 设置、缓存键和存储路径。
解决依赖问题
诊断对等依赖警告、幽灵依赖失败、覆盖、补丁和迁移问题。
试试这些提示
审查我的 pnpm 项目布局。在更改依赖之前,解释工作区结构、重要配置文件和安全的后续步骤。
帮助我诊断这个 pnpm 依赖或对等依赖问题。解释可能的原因、配置选项和最安全的修复方案。
为此仓库设计 pnpm CI 安装策略。涵盖 Corepack、冻结锁文件、缓存、工作区过滤器和失败模式。
创建从 npm 或 Yarn 迁移到 pnpm 的计划。包括依赖清理、工作区转换、锁文件更改和验证步骤。
最佳实践
- 在 CI 中使用冻结锁文件,使依赖解析保持可复现。
- 在可能的情况下,优先使用 pnpm-workspace.yaml 进行 pnpm 专用工作区设置。
- 记录覆盖、包扩展和补丁,以便未来升级时保持清晰。
避免
- 不要依赖仅通过传递包存在的幽灵依赖。
- 不要将注册表令牌或私有 .npmrc 值粘贴到提示或日志中。
- 不要在没有明确版本范围和移除计划的情况下使用宽泛的覆盖或补丁。
常见问题
这个技能用于什么?
它会自动运行 pnpm 命令吗?
它能帮助处理 monorepo 吗?
它能帮助从 npm 或 Yarn 迁移吗?
.npmrc 中的密钥应如何处理?
哪些 AI 工具可以使用它?
开发者详情
作者
antfu许可证
MIT
作者版本
v2026.6.22
Skillstore 修订
r2
引用
89edfdc710d0846129dcee6a929477b04f08052c
维护新鲜度
2026/7/25
使用量
6 次下载 · 219 次浏览