Borrowing it
Nothing to install: this file belongs to codesknight/AutoCAD-MCP. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/codesknight/AutoCAD-MCP/main/CLAUDE.mdgit clone --depth 1 https://github.com/codesknight/AutoCAD-MCPWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/codesknight/autocad-mcp/claude-md)<a href="https://agentmods.dev/instructions/codesknight/autocad-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/codesknight/autocad-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00796 | $0.00796 |
| Opus 5 | $0.00398 | $0.00398 |
| Sonnet 5 | $0.00159 | $0.00159 |
| Haiku 4.5 | $0.00080 | $0.00080 |
Grade A, and why
AutoCAD-MCP CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
项目约定
毕设项目:AutoCAD MCP 服务,参考并改进自 daobataotie/CAD-MCP(分析见 docs/references/cad-mcp-analysis.md,架构方案见 docs/design/architecture.md)。
日志规则(重要,必须遵守)
每次对本项目做出实质性修改(新增/修改功能、调整架构、修复 bug、更新依赖等)之后,必须在 docs/logs/devlog.md 追加一条记录:
- 找到今天日期对应的
## YYYY-MM-DD分节,没有就新建一个(日期用当天真实日期,不要用相对时间)。 - 用简短要点写清楚"改了什么、为什么改",而不是逐行代码变更。
- 不要覆盖或删除历史条目,只追加。
架构原则
- 三层结构:
server.py(MCP 入口)→tools/(MCP 工具,参数校验)→cad/(COM 自动化,不依赖 mcp 包)。新增能力时严格按这个分层放代码,不要在tools/里直接写 COM 调用。 - 不要自己写自然语言解析层(不要重蹈参考项目
nlp_processor.py的覆辙)。MCP 客户端本身负责自然语言理解,工具函数只接收结构化参数。 - AutoCAD COM ProgID 从
src/autocad_mcp/config.json读取(当前为AutoCAD.Application.25.1),不要硬编码"AutoCAD.Application"——本机注册表里这个通用 ProgID 并未注册。 - 坐标传给 COM 方法前必须用
cad/geometry.py里的to_variant_point转成 VARIANT 数组。
环境
- conda 环境名:
autocad-mcp(Python 3.11)。命令行直接调用建议用"/c/Users/LiuYanhong/.conda/envs/autocad-mcp/python.exe" script.py(Windows 上conda run在遇到中文/非 ASCII 输出时会因为控制台 GBK 编码而报UnicodeEncodeError,用 env 内的 python.exe 直连可绕开)。 - 集成测试(
tests/test_connection.py等)需要真实打开的 AutoCAD 实例,连不上时应pytest.skip而不是报错失败。
⚠️ 安全注意事项
用户的 AutoCAD 里经常开着真实的工程图纸(不是空白测试文件)。GetActiveObject 连接的是当前活动实例的当前活动文档——任何写操作(画线、保存等)都会直接作用在用户正在编辑的真实图纸上。
- 写操作类的手动验证脚本,跑之前先打印
conn.document.Name确认(或者要求用户新建一个空白图纸再测试),不要默认往当前活动文档里写测试数据。 - 如果不小心在真实图纸上执行了测试性质的绘制,立刻用
document.SendCommand("_.undo\n1\n")撤销,并明确告知用户改了什么、已撤销。 - 涉及
save_drawing(另存为/覆盖保存)等不可逆操作时,默认写到新文件路径,不要覆盖用户原文件,除非用户明确要求。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 31 lines · 796 tokens per session scan A eeb244e67168
AutoCAD-MCP CLAUDE.md is an instructions file published in the GitHub repository codesknight/AutoCAD-MCP (1 stars, last pushed 1mo ago), licensed MIT. It adds 796 tokens to every session, about $0.0040 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.