Skip to main content
提示

这是一个AI代码开发配置笔记,记录了在AI代码开发过程中遇到的各种环境配置、日常笔记、常见问题。不定期更新。

环境配置

Skills&MCP工具配置

参考AI代码开发常用Agent Skills和MCP工具文档中提到的标识为🔥的工具。

VSCode 配置

VS Code Copilot Agent 执行时会询问三类权限:

权限类型配置项说明
终端命令chat.tools.terminal.autoApprove控制哪些shell命令可自动执行
URL 访问chat.tools.urls.autoApprove控制哪些URL可自动访问
文件读写无专用autoApprove配置文件改动以diff形式展示供审查,这是安全设计行为

为了避免 AI 不停询问权限,一些自动允许的权限设置:

~/Library/Application Support/Code/User/settings.json
{
"chat.tools.terminal.autoApprove": {
// 文件/目录操作
"ls": true,
"cat": true,
"cp": true,
"mv": true,
"mkdir": true,
"rm": true,
"find": true,
"grep": true,
"head": true,
"tail": true,
"wc": true,
"tee": true,
"awk": true,
"sed": true,
"uniq": true,
"sort": true,
"tr": true,
"diff": true,
"chmod": true,
"xargs": true,
// 系统/环境
"echo": true,
"pwd": true,
"which": true,
"env": true,
"defaults": true,
"date": true,
"timeout": true,
"test": true,
// 开发工具 - Go,有些风险
"go": true,
"gf": true,
// 开发工具 - Node.js
"node": true,
"npx": true,
"npm install": true,
"yarn": true,
// 开发工具 - Python, 有些风险
"python3": true,
"pip3": true,
// 开发工具 - 其他
"make": true,
"git": true,
"curl": true,
"jq": true,
"brew": true,
"open": true,
// 容器/云原生
"docker": true,
"kubectl": true,
"helm": true,
"kind": true,
"mysql": true,
// 自定义工具
"get_feature_paths": true
},
"chat.tools.urls.autoApprove": {
"https://kubernetes.io": true,
"https://github.com": true,
"https://docs.github.com": true,
"https://*.githubusercontent.com": true,
"https://*.readthedocs.io": true,
"https://*.cambricon.com": true,
"https://*.mthreads.com": true,
"https://*.zhihu.com": true,
"https://*.csdn.net": true,
"https://*.iluvatar.com": true,
"https://*.ray.io": true,
"https://*.npmjs.com": true,
"https://sqlite.org": true,
"https://bundlephobia.com": true,
"https://vitest.dev": true,
"https://*.jsdelivr.net": true,
"https://*.js.org": true,
"https://skills.sh": true,
"https://skillsmp.com": true
}
}

日常笔记

暂无。

常见问题

暂无。