Files
Luong NGUYEN 232591b2a8 docs: sync to Claude Code v2.1.302 (#194)
* docs: sync to Claude Code v2.1.302

Release changes (v2.1.301-2.1.302): fork subagents on by default in claude -p, the Agent SDK, desktop and VS Code (CLAUDE_CODE_FORK_SUBAGENT=0 turns them off); claude -p / SDK sessions with no permission mode start in default on third-party providers, with telemetry off or on a fresh install; at most 12 prompt/agent hooks of one event run at once; new CLAUDE_CODE_AUTO_MODE_MODEL and CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS; /config Idle compaction row; vim % motion; tool_decision OTel attributes; fable/best fallback; 64-argument limit; hook ask prompts name their plugin or skill; PowerShell finds plugin bin/; mod Input rows. Also: standalone Claude Design closes Dec 14, 2026; Sonnet 4.5 retires Nov 30, 2026; managed Code Review GA; npm install marked deprecated per the official README.

Verified drift fixes (each checked against code.claude.com): hook handler JSON shapes, prompt-hook response schema, exec/HTTP/mcp_tool hook fields; GitHub MCP URL (api.githubcopilot.com) and token; nonexistent @modelcontextprotocol/server-database; plugin layout, marketplace, userConfig, strictKnownMarketplaces, blockedMarketplaces and enabledPlugins shapes; nonexistent deniedPlugins, autoCheckpoint, planning.*/extendedThinking.* keys; invented 09 settings schema; claude -p JSON output jq paths; subagent forks via subagent_type "fork" not context: fork; --agents priority; MCP default scope; command descriptions; rewind menu has six options; broken nested code fence in 07-plugins. Shipped hook scripts: pre-commit.sh reads stdin and only gates git commit; validate-prompt.sh uses hookSpecificOutput; session-end.sh no longer reads /dev/tty. Fixes mirrored into vi/ja/zh/uk where the same claim existed.

Learning skills: quiz Lesson 05 Q2 option B (GitHub MCP URL; Correct letter unchanged), explanations for L02 Q2, L04 Q6/Q9, L09 Q1, L07 Q2 wording; self-assessment wording in paired files; lesson-quiz 1.6.2, self-assessment 2.5.5.

* fix(hooks): parse pre-commit.sh hook input with sed instead of jq

* fix(mcp): restore DATABASE_URL expansion and align MCP env var setup

* fix(mcp): align QUICK_REFERENCE GitHub token and Example 2 DATABASE_URL setup
2026-10-19 09:56:39 +02:00
..

name, description, tags
name description tags
DevOps 自动化插件 为部署、监控和故障处理提供自动化工作流 plugins, devops, automation

DevOps 自动化插件

完整的 DevOps 自动化工作流,覆盖部署、监控和事故响应。

功能

✅ 自动化部署 ✅ 回滚流程 ✅ 系统健康监控 ✅ 事故响应工作流 ✅ Kubernetes 集成

安装

claude --plugin-dir ./07-plugins/devops-automation

包含内容

Slash 命令

  • /deploy - 部署到生产或预发环境
  • /rollback - 回滚到上一个版本
  • /status - 检查系统健康
  • /incident - 处理生产事故

子 agents

  • deployment-specialist - 部署操作
  • incident-commander - 事故协调
  • alert-analyzer - 系统健康分析

MCP 服务器

  • Kubernetes 集成

脚本

  • deploy.sh - 部署自动化
  • rollback.sh - 回滚自动化
  • health-check.sh - 健康检查工具

Hooks

  • pre-deploy.js - 部署前验证
  • post-deploy.js - 部署后任务

使用

部署到预发环境

/deploy staging

部署到生产环境

/deploy production

回滚

/rollback production

检查状态

/status

处理事故

/incident

要求

  • Claude Code 2.1+
  • Kubernetes CLI(kubectl)
  • 已配置集群访问

配置

设置 Kubernetes 配置:

export KUBECONFIG=~/.kube/config

示例工作流

用户:/deploy production

Claude:
1. 运行 pre-deploy hook(验证 kubectl 和集群连接)
2. 将部署委派给 deployment-specialist subagent
3. 运行 deploy.sh 脚本
4. 通过 Kubernetes MCP 监控部署进度
5. 运行 post-deploy hook(等待 pods 就绪,执行 smoke tests)
6. 提供部署总结

结果:
✅ 部署完成
📦 版本:v2.1.0
🚀 Pods:3/3 已就绪
⏱️  用时:2m 34s

最后更新: 2026 年 10 月 18 日 Claude Code 版本: 2.1.302 来源: