AI for Hardware
Recorded live · Hardware team
From a chat window to a custom hardware agent
I taught this class live to a team of hardware engineers. It walks up the layers of Claude, from the chat window to Claude Code, with real examples on an Altium project. Then it covers the harness that makes an agent powerful, how to keep your context clean, and how I build a custom AI agent for a hardware team. The written version is below.
1. The layers of Claude
A model is like a brain in a jar. Text goes in, text comes out. It is trained up to a certain date, so on its own it does not know what happened yesterday. Tools fix that. Web search lets it read today's news. The app around the model, with its instructions, tools, skills and subagents, gives the brain a body. Each layer below adds more of that body.
| Layer | Where it runs | What it adds | Hardware example |
|---|---|---|---|
| The model | Anthropic’s servers | Text in, text out. Knows nothing after its training date. | Nothing on its own. It needs a layer around it. |
| Claude.ai | A sandbox in your browser | Projects, system instructions, file uploads, web search, skills and connectors. Cannot open the files on your PC. | Screenshot a schematic and ask what it shows. |
| Claude Desktop | Your PC, in the folder you connect | Reads and writes the files in that folder. Can start subagents. | Connect an Altium project folder and ask what the project is about. |
| Claude Code | Your PC, with your user rights | Runs commands and programs. Built-in coding instructions. | Opens Altium itself, screenshots the design, edits the project, writes the report. |
| Custom team agent | On top of Claude Code | Your team’s own instructions, skills, subagents, tools and MCPs. | A hardware agent built around how your team works. |
Every layer with a model inside it is an AI agent: a model plus the tools that let it act. Pick the layer that fits the job.
2. One Altium question, three layers
Claude.ai. Take a screenshot of a DC current measurement in Altium and ask, "What is on this image?" You get a good explanation, because the model reads images well. But an Altium project folder holds many files, and Claude.ai lives in a sandbox. It cannot open them. You screenshot and copy by hand, ask, then make the changes yourself.
Claude Desktop. Connect the project folder and ask, "What is this project about?" Now it can scan every file in the project, schematic sheets and PCB layouts included, as long as they are not encrypted binary files. All software is moving this way, toward files and APIs that AI can read. Tools that don't will be replaced by tools that do.
Claude Code. It can run Altium.exe itself. So it can open files that need the software to render them, take its own screenshots, and look at the design the way you would. It can analyze the project, spot what might be wrong (misnamed parts, typos, things that could be done better), calculate values like frequencies, write a report, and then make the changes. In the class, it wrote its own scripts and edited the project directly.
Reports matter more than they sound. When the AI session closes, the report stays. The AI can read it next time, and so can you. Once you have a report prompt you like, turn it into a skill, improve it over a few rounds, and share it with your team.
3. Which one should I learn?
If you work in R&D, learn Claude Code. It does everything Claude Desktop and Claude.ai do, and more. It runs commands, it has coding instructions built in, and it reaches your whole PC. I rarely use Claude.ai any more. I ask my questions in Claude Code too.
That power needs care. Claude Code can do anything your user account can do: push to Git, delete files, run programs. By default it has no permissions and asks before it acts. Scope it to your own project folder, know what you allow, and it is safe.
My setup: VS Code or Cursor with the Claude Code extension, on half the screen. Your files on one side, the AI on the other. The extension is free. The Claude subscription is paid.
4. The harness, in five parts
The harness is everything around the model. These five parts turn a generic Claude Code into an agent that works your way.
Subagents. A subagent gets its own context window and does one job. After a change in your project, a review subagent can check just one thing: code quality, PCB quality, or documentation quality. Another one I use is docs-to-text. It turns PDF manuals into text once, so you do not convert them again in every session.
System instructions. Rules the AI follows almost every time, unless the context is very full. Two I like: "Write at a 5th grade reading level," because models are trained to be wordy. And "Never assume, always test."
Hooks. A hook links one action to another, and it always fires. A hook before each prompt can start a subagent or send a notification. A hook after each change can start a review subagent, so nobody has to remember to run the review.
Index files. Put your hardware docs in markdown files, for example how each HIL device and HIL Connect works. Add an index that says what each file covers, and tell the agent in its CLAUDE.md file where the index is. When a task needs one device, the agent reads the index and loads only that file. For big documentation, I like this even better than skills.
MCPs. An MCP connects Claude to another piece of software. Connect Gmail and it can read your email and draft replies. I used one to untangle a long dispute with my internet provider. It found what I had paid and drafted the email. There is also an MCP for Altium. It defines exactly how Claude Code talks to Altium.
5. Skills: write the procedure once
A skill is a standard operating procedure. If a task is digital and repeatable, it can be a skill. The best skills cover tasks that take a lot of time but little judgment. Tasks that need taste, like deciding whether a message is good enough to send, are harder and pay back less today. Skills work in Claude.ai, Claude Desktop and Claude Code.
Skills can do real engineering work. I built one that runs HIL software, runs the tests and changes the model. It works in its own feedback loop, with no human watching.
Making one is easy. After a good session, ask Claude: "Create a SKILL.md file in this folder, based on my prompt, that does exactly this." Accept it, and you have a skill. The AI spent a lot of tokens figuring out the process once. Now it follows the written process, faster and the same way every time. Improve it each time you use it, then share it with the team.
Skills load only when needed. Only a short description, called front matter, sits in the context. A ten page procedure loads only when the AI sees that you need it. That saves context, and it is why skills are so popular.
One warning. Skills can call other skills, subagents and MCPs. Skills that call other skills get messy fast. Mixing skills with subagents is fine.
6. Keep your context clean
Long sessions get worse. As the context fills up, the answers lose quality. In Claude Code, type /context to see how full it is. Claude.ai does not show it and compacts on its own.
Compact. Type /compact and the AI summarizes the whole session, clears the context, and starts fresh from the summary. It can lose detail, but it is the best built-in tool. Use it once you pass 300,000 tokens. Below that it is not worth it: in the class, a 111,000 token session only shrank to 67,000.
Start a fresh session. Copy the last answer, open a new session, and write: "My last session reached the end of its context. This was the last message." Paste it, add your next request, and go. Compacting gives a slightly better result, but this is much faster. I do it about 80% of the time.
Save progress in files. Have the AI write a report.md as it works. When a session passes 300,000 tokens, close it and open a new one. Nothing is lost, because the progress lives in the file.
And use projects, with separate sessions inside them, instead of one endless chat for everything.
7. Local, cloud and remote sessions
Local sessions run on your PC. That is where hardware work belongs.
Cloud sessions run on Anthropic's servers, always on Linux. You upload your project, and the agent cannot reach any folder outside it. Windows programs like Altium do not run there. For hardware work, that makes the cloud a poor fit.
The cloud shines for software teams that build web apps. Every cloud session becomes a Git branch, and the finished work comes back as a merge request. If your team already works that way, it is a perfect match.
Remote sessions let you drive a session from your phone or another laptop. Turn on remote control on your PC, then send prompts from your phone. Your PC must stay on. The answers are just as good. Only the keyboard is somewhere else.
8. Privacy and security, in short
On a Team or Enterprise plan, your data travels to Anthropic over an encrypted connection. By contract, it is not used to train models, and deleted chats are purged within 30 days. I know of no public record of team or enterprise data being used for training.
For security, Claude Code starts with no permissions. It asks before it acts, unless you choose to allow more. Claude.ai and Claude Desktop run code in a sandbox, away from your system.
The full picture, with the provider comparison table and a one afternoon checklist, is in the AI Security & Privacy training.
9. How I build a custom hardware agent
Claude Code is generic. Anthropic built it for every developer at every company, so it cannot know your team's tools, parts or procedures. A custom agent adds that layer: your team's instructions, skills, subagents, tools and MCPs. In the class, I called the hardware version HARDWAN.
Start where the time goes. Everything can be done with AI. The question is where it pays off. First I find where your team loses the most time, for example making Altium designs or checking them before manufacturing. I skip low return work like email, where you still have to check every message.
Train it against known answers. I take finished projects where we already know the right result. I hide the result, give the agent the goal and the files, and compare what it makes with the real thing. We agree on the criteria up front, such as failures found, drawing quality, time spent and tokens used. The first round may match about half. Then I change the agent's files (skills, docs, rules, tools and instructions) and run it again. Each round gets closer. Often it ends up better than the reference.
That is how I built Testan, which writes test coverage for HIL projects. Its reference was the test coverage engineers had already written. For Salesan, a sales agent, the reference was what the sales reps expected.
Hardware is easier to judge than sales. Technical work has an objective answer. It compiles or it doesn't. It works or it doesn't. That keeps the training loop clean.
Build for the team, then let each person add on. I usually customize down to the team level. Each engineer can then add their own skills on top.
Keep it improving. I add skills like /update and /self-improve, so the agent can maintain itself on a schedule. It is still best when a human checks it, for example every 3 months.
Make it easy to use. Adoption is the biggest problem I see. A powerful agent nobody uses is worth nothing. That is also why I build one agent per team, not one for the whole company. A finance team needs completely different tools than a hardware team.
Want an agent like this built for your team? That is what I install. It starts with the free AI audit, where we find where your team loses the most time. The software version of this class is AI for R&D.