AI办公快捷导航→→

一、Claude常用全局规则设置

CLAUDE.md("C:\Users\用户名\.claude\CLAUDE.md")

CLAUDE.md

# CLAUDE.md

Behavioral guidelines to reduce common LLM coding mistakes. Merge with project-specific instructions as needed.

**Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.

## Defaults

- Always reply in Chinese unless I explicitly ask for English.
- All conversations, explanations, and non-code outputs must be in Simplified Chinese.
- Keep the technical terms in English if appropriate (e.g., API, function names).
- NEVER install Python packages globally or modify the global environment without explicit user permission. Always use a virtual environment (venv) or ask before running pip install.


## 1. Think Before Coding

**Don't assume. Don't hide confusion. Surface tradeoffs.**

Before implementing:

- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them - don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.

## 2. Simplicity First

**Minimum code that solves the problem. Nothing speculative.**

- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.

Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.

## 3. Surgical Changes

**Touch only what you must. Clean up only your own mess.**

When editing existing code:

- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- If you notice unrelated dead code, mention it - don't delete it.

When your changes create orphans:

- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.

The test: Every changed line should trace directly to the user's request.

## 4. Goal-Driven Execution

**Define success criteria. Loop until verified.**

Transform tasks into verifiable goals:

- "Add validation" → "Write tests for invalid inputs, then make them pass"
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
- "Refactor X" → "Ensure tests pass before and after"

For multi-step tasks, state a brief plan:

```
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]
```

Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.

------

**These guidelines are working if:** fewer unnecessary changes in diffs, fewer rewrites due to overcomplication, and clarifying questions come before implementation rather than after mistakes.

二、CC-switch

用户文档:https://github.com/farion1231/cc-switch/blob/main/docs/user-manual/zh/README.md

CC Switch 是一款跨平台桌面应用,专为使用 AI 工具的开发者设计。它帮助你统一管理 Claude Code、Claude Desktop、Codex、Gemini CLI、OpenCode、OpenClaw 和 Hermes 等受管应用的配置。

在日常开发中,你可能会遇到这些痛点:

  • 多供应商切换麻烦:使用不同的 API 供应商(官方、中转服务商),需要手动修改配置文件

  • 配置分散难管理:Claude Code、Claude Desktop、Codex、Gemini、OpenCode、OpenClaw、Hermes 各有独立的配置文件,格式不同

  • 无法监控用量:不知道 API 调用了多少次,花了多少钱

  • 服务不稳定:单一供应商出问题时,整个工作流中断

CC Switch 通过统一的界面解决这些问题。

三、claude code for vscode 禁用登录

在 VS Code 中禁用 Claude Code 的强制登录验证并使其支持自定义中转 API,可以通过 修改插件配置文件 或 调整 VS Code 设置 来解决。

以下是具体的两种解决方法:

方法一:修改本地配置文件(推荐,可绕过强制登录)

如果你的 Claude 插件由于更新到 2.0 后的强制登录机制导致无法使用第三方中转 API,可以通过在本地全局配置文件中添加特定参数来跳过插件的登录验证。

  1. 打开或创建 Claude Code 的全局配置文件 config.json

    • Windows 路径C:\Users\你的用户名\.claude\config.json

    • macOS / Linux 路径~/.claude/config.json

  2. 将以下 JSON 代码写入该文件中:

    {
      "primaryApiKey": "any",
      "hasCompletedOnboarding": true
    }
    
    • "primaryApiKey": "any":该配置会在本地写入一个虚拟的 Key,从而跳过插件的登录验证

    • "hasCompletedOnboarding": true:让插件认为你已经完成了初次安装的引导流程,避免强制弹窗

方法二:在 VS Code 设置中勾选禁用提示

如果你只是想关闭界面上频繁出现的登录弹窗,可以直接使用内置设置:

  1. 快捷键打开 VS Code 设置:Windows/Linux 使用 Ctrl + ,,Mac 使用 Cmd + ,

  2. 在顶部的搜索框中输入:Claude Code login

  3. 找到 Disable Login Prompt(禁用登录提示)选项并勾选该框

  4. 或者,在 Claude Code 聊天面板的对话框中输入 /config,并在弹出的配置菜单中直接勾选 Disable Login Prompt 选项。

如果你的网络无法直连官方服务,请确保已正确配置 CLAUDE_BASE_URL 环境变量以指向你的中转地址。

四、Skill获取

GitHub

作为全球最大的开发者社区,GitHub 是 Skill 资源最丰富的集散地。Anthropic 官方在 GitHub.com/agentskills 维护了官方 Skill 集合,定义了标准的编写规范。与此同时,大量第三方开发者也在 GitHub 上分享自己创作的 Skill,覆盖了从代码审查到日志分析、从文档生成到自动化测试的各种场景。GitHub 的优势在于数量庞大、种类齐全、更新活跃,几乎任何类型的 Skill 都能在这里找到。

腾讯 SkillHub

腾讯推出了面向中国用户的 AI 技能社区 skillhub.cn,聚合了超过 1.3 万个主流 Skill。它提供中文界面和高速下载,解决了海外平台访问慢、搜索体验差的问题。SkillHub 还推出了精选榜单和安全审计机制,帮助用户从海量 Skill 中筛选出高质量的选项。如果你需要常用的、经过验证的 Skill,这里通常是最高效的发现途径。

Qoder 技能市场

Qoder 内置了技能市场 qoder.com/zh/marketplace,这是最便捷的获取途径——无需离开 IDE 就能浏览、搜索和安装 Skill。Qoder 的技能市场收录了一些官方和社区贡献的偏小众或特定场景的 Skill,并针对 Qoder 环境做了适配,安装后即可使用。对于 Qoder 用户来说,直接在 IDE 内搜索和安装是最顺手的方式。

MiniMax Skills

MiniMax 是较早投入 Agent Skill 生态建设的厂商之一。它在 GitHub 上维护了一个 Skill 仓库 GitHub.com/MiniMax-AI/skills,收录了覆盖前端开发、全栈开发、Android、iOS 等多个领域的 Skill。这些 Skill 经过 MiniMax 团队筛选,质量有一定保障,适合刚接触 Skill 的开发者作为入门选择。

五、常用全局Skill

调教AI的Skill:https://skillhub.cn/skills/self-improving-agent

anthropics skill全家桶:https://github.com/anthropics/skills

查找skill:https://skillhub.cn/skills/find-skills

skill安全审核:https://skillhub.cn/skills/skill-vetter

评论