1:安装 Claude code
1: 环境: 先安装nodejs Node.js --- Download Node.js®
/ window + git Git - Install for Windows
2: PowerShell 执行策略限制 :默认
Restricted(受限) 禁止运行任何 .ps1 脚本文件3: 修改权限: 可执行脚本:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
RemoteSigned 是一个安全且常用的设置:允许运行您自己电脑上的本地脚本,远程下载的脚本需要有可信签名才能运行。
-Scope CurrentUser 表示只对当前用户生效,不需要管理员权限。4: 安装 Claude code : npm install -g @anthropic-ai/claude-code
5: 验证安装:
node -v
npm -v
claude --version
2:speckit 命令
/speckit.constitution读取 AGENTS.md ,把里面写好的 Agent 约束、项目规则吸收进constitution.md;