Claude Code 用户终于可以自动加载本地插件了,做自动化工作流的开发者可以直接用 `claude plugin init` 快速搭建自定义技能,省去手动配置的麻烦。智能体增强让多会话管理更灵活,值得更新。
Anthropic 发布了 Claude Code v2.1.157,主要新增了自动加载 .claude/skills 目录下的插件功能,无需 marketplace。新增了 `claude plugin init <name>` 命令用于快速创建插件骨架,并支持 `/plugin` 参数的自动补全。智能体方面,`settings.json` 中的 agent 字段现在对分发会话生效,并可通过 `--agent <name>` 覆盖。此外,修复了多个关键问题,包括粘贴损坏图片导致崩溃、沙箱网络权限弹窗在自动模式下的误触发、以及终端冻结等问题。性能优化方面,长对话和恢复会话的消息渲染效率得到提升。
v2.1.157
What's changed Plugins in .claude/skills directories are now automatically loaded, no marketplace required Added claude plugin init <name> to scaffold a new plugin in .claude/skills Added autocomplete for /plugin arguments: subcommands, installed plugin names, and plugins from known marketplaces claude agents : the agent field in settings.json is now honored for dispatched sessions, with --agent <name> to override it EnterWorktree can now switch between Claude-managed worktrees mid-session tool_decision telemetry events now include tool_parameters (bash commands, MCP/skill names) when OTEL_LOG_TOOL_DETAILS=1 Worktrees managed by Claude are now left unlocked when the agent finishes, so git worktree remove / prune can clean them up Fixed unprocessable images (zero-byte, corrupt) attached via paste, MCP, or dialog crashing the request instead of becoming a text placeholder Fixed sandbox network permission prompts appearing in auto and bypass-permissions mode when using the desktop app, IDE extensions, or SDK Fixed claude agents completed sessions not retiring when an idle subagent was still parked or had leaked a backgrounded shell Fixed claude agents pressing Esc not cancelling a slow "opening…", leaving the list unresponsive Fixed background agent worktrees under .claude/worktrees/ being orphaned after the 30-day job retention sweep Fixed background sessions re-attached after a sleep/wake not telling the model the correct date Fixed copy-on-select in claude agents not reaching the system clipboard inside tmux with set-clipboard on (regression in 2.1.153) Fixed --resume not reporting background subagents that were running when the previous Claude Code process exited Fixed the --resume session picker leaving its contents on the terminal after exiting in fullscreen mode Fixed --worktree and --worktree --tmux returning to the canonical repo root instead of the current linked worktree Fixed the /model picker showing an incorrect "Newer version available" hint when the selected model is already the newest in its family; the pinned-model row now shows the model's description instead of its raw ID Fixed literal markdown markers (backticks, asterisks) appearing in the in-progress message text in fullscreen mode Fixed the terminal freezing after approving the managed-settings security dialog at startup Fixed a rare duplicate line appearing in scrollback after the terminal UI redraws Fixed right-click paste duplicating the clipboard in the VS Code, Cursor, and Windsurf integrated terminals WSL: fixed image paste ( alt+v keybinding), screenshot paste on Windows 11, and added support for dragging images from Windows Explorer Improved performance of long and resumed conversations by eliminating redundant message-rendering recomputations /terminal-setup now disables GPU acceleration in VS Code/Cursor/Windsurf integrated terminals to prevent garbled-text rendering The Feature of the Week credit-claim status now appears as a notification in the status area instead of a line above the prompt claude agents : slash-command autocomplete in the dispatch input now matches substrings Removed the "bash commands will be sandboxed" startup banner — sandbox status still shows in /status and when a command is blocked Removed the "/ide for …" startup hint toast [IDE] Fixed clicking Stop while a background subagent is running not actually stopping it [VSCode] Fixed the fast mode indicator not appearing on Opus 4.8 Pressing backspace right after a workflow trigger keyword now dismisses the workflow request (same as alt+w) instead of deleting a character Added a "Workflow keyword trigger" setting in /config to stop the word "workflow" in a prompt from triggering a dynamic workflow