The global-install postinstall automatically adds the package's own MCP server and skill to detected coding agents, modifying user-level agent configuration without a separate request. The inspected behavior supports a warning-level lifecycle risk, but does not establish credential theft or unrelated malicious activity.
Static reason
High-risk behavior combination matched malicious policy.
Trigger
Package postinstall during a global npm install outside CI, unless PCH_NO_AGENT_INSTALL is set.
Impact
Agent settings and skill folders can be modified without a separate explicit agent-install command.
Mechanism
The hook runs the CLI's agent installer, which registers a Patch MCP server and writes Patch skill files for supported agents.
Evidence
package.jsondist/postinstall.cjsdist/cli.js~/.cursor/mcp.json~/.claude/skills/patch/SKILL.md~/.codex/skills/patch/SKILL.md~/.codex/config.tomlClaude Code user settings