cadpilot: Instructions file for Codex

AGENTS.md

cadpilot AGENTS.md is an instructions file for Codex, OpenCode from LBurny/cadpilot. It costs 23,210 tokens per session, scanned A, original, MIT.

A workspace guide for CADPilot, an MCP server that lets AI clients control FreeCAD, a computer-aided design application, remotely.

In plain words
What is it for?
Use it when working on the CADPilot server, its FreeCAD add-on, XML-RPC communication, tools, or development setup.
Why use it?
It explains how the Python server and FreeCAD add-on fit together, reducing confusion when building, running, or installing the project.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; mentions Claude Code; mentions OpenCode.

This is LBurny/cadpilot's own configuration. It tells Codex and OpenCode how to work on cadpilot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cadpilot configures →

Reuse

Borrowing it

Nothing to install: this file belongs to LBurny/cadpilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/LBurny/cadpilot/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/LBurny/cadpilot

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for cadpilot AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lburny/cadpilot/agents-md/github.svg)](https://agentmods.dev/instructions/lburny/cadpilot/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/lburny/cadpilot/agents-md"><img src="https://agentmods.dev/badge/instructions/lburny/cadpilot/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cadpilot AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/lburny/cadpilot/agents-md"><img src="https://agentmods.dev/badge/instructions/lburny/cadpilot/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23,210 This file is loaded in full into every session.
When invoked 23,210 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.23210 $0.23210
Opus 5.5 $0.09284 $0.09284
Sonnet 5.5 $0.04642 $0.04642
Haiku 4.5 $0.02321 $0.02321

Measured 29d ago against content hash 5244dd8215aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cadpilot AGENTS.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 29d 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.

AGENTS.md · 205 lines

How it starts

The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CADPilot — Workspace Guide

Purpose

MCP (Model Context Protocol) server that lets AI clients (Claude Desktop, LangChain, etc.) control FreeCAD remotely. Two main components communicate over XML-RPC:

  1. MCP server (src/cadpilot/) — Python package run via uvx cadpilot or uv run cadpilot. Speaks MCP to the AI client and XML-RPC to FreeCAD.
  2. FreeCAD addon (addon/CADPilot/) — Installed into FreeCAD's Mod/ directory. Hosts the XML-RPC server inside the FreeCAD process and dispatches all document/GUI work onto the main thread.

Directory Layout

src/cadpilot/          # MCP server package (published to PyPI)
  server.py               # FastMCP tool definitions & CLI entry point (main())
  freecad_client.py       # XML-RPC client proxy to FreeCAD addon
  operations/core.py      # Tool operation implementations (one function per tool)
  operations/__init__.py  # Re-exports all operations
  responses.py            # ToolResponse type alias, text/json helpers + screenshot file delivery
  server_state.py         # ServerState dataclass (connection, host, text-only/auto-audit flags)
  session_state.py        # ModelingSession/Step dataclasses, JSON persistence, current-session registry
  assembly_state.py       # AssemblySession/AssemblyStep dataclasses, JSON persistence (~/.cadpilot/assembly/), precomputed-undo rollback
  operations/assembly.py  # assembly_session tool: spec validation → RPC assembly_op → session recording
  pattern_store.py        # Pattern memory (reusable workflows), keyword retrieval
  guidance.py             # Lightweight next-step suggestions & risk heuristics (incl. primitive_without_sketch / absolute_placement / assembly-mode steer)
  diagnostics.py          # diagnose tool: cross-platform fault probing that works with FreeCAD down (no FreeCAD import)
  prompt_text.py          # ASSET_CREATION_STRATEGY prompt template
  tool_docs.py            # Long per-operation reference docs served by the operation_help tool

addon/CADPilot/             # FreeCAD workbench addon (copied to FreeCAD's Mod/ dir)
  InitGui.py              # Workbench registration, toolbar/menu, auto-start
  Init.py                 # Path setup
  rpc_server/
    rpc_server.py         # FreeCADRPC class — XML-RPC handler, server start/stop
    gui_dispatch.py       # dispatch_to_gui() — queues work onto the GUI thread
    commands.py           # FreeCAD Command classes for toolbar buttons
    object_factory.py     # create_object_gui() — object creation logic
    property_mapper.py    # set_object_property() — recursive property assignment
    serialize.py          # serialize_object() — object → dict for RPC responses
    view_manager.py       # save_active_screenshot() — camera/view screenshot logic
    geometry_query.py     # Read-only Shape queries — measure/topology/interference
    assembly_ops.py       # Anchor-based assembly — anchors (auto/explicit), assemble (mates), verify_assembly
    joint_ops.py          # Persistent-joint assembly — FreeCAD 1.1 Assembly WB lifecycle (Link wrap, joints, preSolve+solve, rollback, verify+gap profile)
    trim_ops.py           # Declarative priority trimming — non-destructive baked cut in loser-link frame
    feature_ops.py        # Parametric feature creation (boolean/fillet/sketch/pad/...) + selectors
    sketcher_ops.py       # Constrained-sketch builder (geometry/constraints/solver diagnostics)
    ip_filter.py          # FilteredXMLRPCServer — IP/CIDR allowlist
    settings.py           # JSON settings persistence (auto-start, remote, allowed IPs)
    step_journal.py       # Pure step model: StepRecord, planned/done arithmetic, review helpers
    step_engine.py        # FreeCAD half of the journal — apply_op, per-step transactions, undo
    step_panel.py         # CADPilot Steps dock — review loop UI (status dots, param editor)
    dbglog.py             # Ring-buffer debug log + rotating file (readable while GUI is wedged)
    request_log.py        # Tags log records with the RPC request that caused them

examples/                 # Showcase models (.FCStd) and their PNG renders
tests/                    # pytest suite for the MCP server side (fake XML-RPC connection) and tests/live_complex_verify.py — the ACCUMULATING live regression corpus: complex real-scenario builds (parametric flange, enclosure, hinge assembly, journal truth, session semantics, async) asserting analytic volumes against a RUNNING FreeCAD; stress rounds ADD cases here instead of writing throwaway probes (run: .venv/Scripts/python.exe tests/live_complex_verify.py)
evaluations/              # mcp-builder Phase 4: read-only QA pairs + run notes

Read the full file on GitHub · 205 lines

Changes

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.

  1. 29d ago Changed · +4 lines · +4,517 tokens per session 5244dd8215aa
  2. 1mo ago Changed · -30 lines · +3,797 tokens per session 4274f4e8fdf5
  3. 1mo ago Changed · +19 lines · +5,908 tokens per session 8db07347a65c
  4. 1mo ago Changed · +19 lines · +4,516 tokens per session 41d5ace68b29
  5. 2mo ago First seen · 193 lines · 4,472 tokens per session scan A bebec94d6c06

Subscribe to this mod's changes

cadpilot AGENTS.md is an instructions file published in the GitHub repository LBurny/cadpilot (26 stars, last pushed 1mo ago), licensed MIT. It adds 23,210 tokens to every session, about $0.0928 per session on Opus 5.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.

Related

cadpilot AGENTS.md compared with instructions from other repositories

cadpilot AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cadpilot AGENTS.mdLBurny/cadpilotInstructions file261mo agoMITA23,210Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode