As The Geek Learns

The Geek

Tools and training for IT professionals. Join James Cruce—a systems engineer with 25+ years managing enterprise VMware infrastructure—for practical PowerCLI tutorials, automation tips, and lessons from the trenches. Much to learn, there always is. astgl.com

  1. 18h ago

    I Turned My Brand Folder Into a Design System Claude Can Read

    Every time I asked Claude to build me a page, I did the same dance. Paste the hex codes. Explain the fonts. Remind it the orange is for buttons only. Upload the logo again. I've had brand guidelines for As The Geek Learns since December 2025. They live in a Google Drive folder: a markdown file, six SVG logos, a pile of PNG exports and some Camtasia templates. Claude could read them, but only if I pointed at them every single time. So I turned that folder into a design system: one place that holds my colors, fonts, logos and rules, so I can point Claude at a link instead of re-explaining my brand every time. Here's how I did it, what it found that I didn't expect, and a second example system you can open if you don't have a brand folder yet. What a design system actually is Forget the enterprise version with a dedicated team and a Figma library. For our purposes, a design system is four things in one place: Tokens. Your colors, fonts, spacing and corner radii, each with a name and a note on when to use it. deep-blue for headlines. space-30 for card padding. A brand book. The rules in plain English: voice, logo do's and don'ts, which color goes where. Assets. The real logo files, not a description of them. Components. Optional. Buttons, cards and other building blocks that already follow the rules. The reason this matters with AI: Claude follows rules it can see. A design system turns "here are my brand colors again" into "use this link." What you'll need The Claude desktop app. I did this from the Code tab. Your brand files in a folder Claude can reach. Mine was a synced Google Drive folder. No brand files? That works too. I'll show you that path further down. As The Geek Learns is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Path A: building from a brand folder you already have Step 1: Start from the Design System template In the Claude desktop app, open the Artifacts page and pick the Design System template. That tells Claude exactly what kind of thing it's making, so it doesn't hand you a random web page. Step 2: One prompt Here's the entire prompt I typed: Extract the design system from this folder and make a new design system. That's it. And yes, that's a lazy prompt. More on that in Common Issues. Step 3: Let it read everything Claude read the folder's text-based files before writing anything: BRAND_GUIDELINES.md for the palette, fonts, taglines and voice rules The six SVG logos, read as source code, so it got exact colors and shapes instead of guessing from pictures logo_preview.html, a little preview page I'd forgotten about. It pulled the card padding (30px), the corner radius (16px) and the card shadow out of that file's CSS. That last one is the part I liked. My guidelines never wrote down spacing, but my own files had it. Claude used the numbers I'd already been using instead of inventing a "standard" spacing scale. Step 4: Review what it built Here's what came out the other side: 22 color tokens with light and dark values. My six brand colors are in there, plus "role" colors like page background, body text, muted text, link and border. 12 type styles across Plus Jakarta Sans (headings), Inter (body) and JetBrains Mono (code). 6 spacing steps, 3 corner radii, 1 shadow, all taken from my files. 23 assets in four groups: logos, icons, social art and video templates. A brand book covering taglines, voice, color rules, logo rules and the email signature. A cover image made from the palette. Here's the result if you want to look around As The Geek Learns design system. The part I didn't see coming: my brand fails contrast checks Part of the build is a contrast check. Contrast ratio is how much a text color stands out from its background. The accessibility guidelines (WCAG) want at least 4.5:1 for normal text and 3:1 for large text and icons. My brand colors didn't all pass. * My teal links on the light background: 3.2:1 * My success green on white: 2.5:1 * White text on my orange buttons: 3.0:1 Here's what I appreciated. Claude didn't quietly "fix" my brand colors. It kept every hex value exactly as I'd defined it and wrote the limit into each color's usage note. Then it worked around them: * Links get underlined in running text, so color isn't the only signal. That fixes how you spot a link, not how easy it is to read: normal-size link text still needs 4.5:1, and 3.2:1 doesn't get there. So the teal still needs a darker shade for text links. * Success green is for fills and icons with a word next to them, never text on its own. * Button text on orange is my charcoal instead of white. That gets it to 4.9:1. I've been using these colors since December. I never checked. Now the rules are written down where every future page will follow them. Thanks for reading As The Geek Learns! This post is public so feel free to share it. Path B: no brand yet? Start small Not everybody has a brand folder sitting in Drive. So I had Claude build a second system from nothing: Quiet Pager, a made-up alerting dashboard for homelabs. With nothing to extract, mine came out small: one theme, about ten colors, a handful of type styles, four spacing steps, three radii, a short README. No components. You grow it later. I asked for this example in the same session, so Claude already had the context. I haven't run it from a cold start, but this is the prompt I'd begin with: Make a small starter design system for "Quiet Pager", a homelab alerting dashboard. Dark theme only. Calm, low-glare, color reserved for status. No logo yet. Make sure the status colors work for color-blind users. Two things worth noticing in what came back: * It didn't invent a logo. No logo in the brief means the name gets set in plain type, with a note that there's no mark yet. I'd rather have that than an AI-drawn logo I'd have to un-see. * The status colors are blue, amber and orange, not green, yellow and red. Each status also always carries a word: OK, WARN, PAGE. Telling red from green is the most common kind of color blindness, and someone getting paged at 2 AM shouldn't have to squint at hues. Open it here: Quiet Pager example design system. Adding components Once the tokens were in, I typed two words: Add components Claude added four components that fit what I actually publish: Button, Card, Callout and CodeBlock. Each one comes with a guideline page and a live preview in light and dark. The Callout is my favorite. It has three tones, and each one carries a label so color is never the only clue. The default label is "Here's what I learned," which is basically the house style of this newsletter. It also caught something during testing. The sample card showed my logo, and my deep-blue logo nearly disappears on a dark card. It swapped the sample for text instead. That's a problem I'd have shipped without noticing. Using it This is the payoff I built it for. I haven't put it through a real build yet (that's the next post), so treat this part as the plan, not a result. Instead of re-explaining my brand, I paste the link: Using my design system at https://claude.ai/artifact/PRkBy8GYmtx4p3fVZVoMjH, build a landing page for my PowerShell snapshot toolkit. The idea is that Claude reads the brand book first, then the tokens and components, and builds with my real colors, fonts and logos. One thing to check when you try it: Claude has to be able to open the link. As I explain under Common issues, mine couldn't see the private published page, so share yours first. For projects I work in all the time, I plan to add one line to the project's CLAUDE.md file so I don't have to ask: Design system: https://claude.ai/artifact/PRkBy8GYmtx4p3fVZVoMjH (read its README before any UI work) One caveat for Substack folks: Substack's theme settings give you a few built-in font styles, so don't count on your brand fonts carrying over. The colors, logos and voice rules still apply. Common issues "This folder" is vague. My session started in an empty work… Get full access to As The Geek Learns at astgl.com/subscribe

  2. 1d ago

    I Moved 22 AI Agents Off the Cloud. The Model Was the Easy Part.

    I wanted my everyday AI work running on my own machine: the agents that manage my projects, the coding assistant I talk to all day, and the thing that decides which model handles a request. I gave myself until Friday, September 25. The cutover landed on the 21st. Picking a local model turned out to be the smallest part of the job. The Setup Two rules going in. Ordinary work runs local, period. And the two frontier models I'd still allowed myself, Astra and Fable, need an explicit approval tied to a specific task. A local model struggling with something doesn't get to quietly ship that task to a cloud API on its own. No automatic fallback, ever. The pieces: ClaudeClaw is the app that coordinates my personal agents. An agent is a model plus instructions, tools, and a job. My install has 22 of them. OpenCode is the interactive coding harness. Between those apps and the models sits a gateway, and Laya is a small local decision model the gateway consults for some of its choices. The hardware is a Mac Studio with an M3 Ultra and 256 GB of unified memory, which means these results say nothing about your laptop. It also doesn't mean I could stop thinking about memory. The OS, loaded models, and in-flight requests all want space at once, and one model alone sits at 64 GB. Three deliverables: give Laya bounded jobs inside ClaudeClaw, move ordinary agent inference local, and rebuild the gateway to pick a local model per request. One user, real backups, real tests, a rollback drill, and no long trial period. I'd rather use it and fix what actually breaks. What's Actually Going On The first surprise was how many places call a model. Changing the model in the main chat window was a fraction of it. There were agent defaults, scheduled jobs, dashboard chat, helper calls, summaries, a model-selection command, child processes, and fallback behavior. Some paths assumed a cloud model would always be there; others had one local model hardcoded. A workflow can look local while a helper quietly hits a remote service, or start local and switch providers after a failure. "Local-first" isn't a setting. It's an inventory. As The Geek Learns is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. The second surprise was that choosing a model is really four questions. Can it produce a useful answer? Can it follow an exact output format? Can it request a tool correctly, read the result, and keep going? And can the installed runtime actually serve it reliably within the machine's limits? I screened five installed configurations, then ran three through a 24-task pack: structured output, grounded answers, reasoning, small coding problems, permission decisions, and multi-step tool use. Strict scoring: GPT-OSS 120B through Ollama passed 23 of 24. A public Qwen3.8 27B build on MLX passed 19. Qwen3 Coder 30B through Ollama passed 16. Those are scores for those configurations on those tasks, not a model ranking. Runtimes and cold-start conditions differed. And nobody passed the original gate. GPT-OSS's one miss was a tool call with missing_id where the fixture expected the literal missing. Arguably a fixture ambiguity. I kept the failure anyway. A changed test deserves a new run, not a revised story about the old one. The other failures were more instructive: right answer, wrong field names; a coding constraint ignored; an answer given without doing the required lookup. A human reads the intent. Software depending on an exact contract can't. So GPT-OSS 120B became the general-use pick, with Coder 30B as the faster alternative. Later serving checks proved the runtime could run both correctly, which is a different claim from "this model solves the task." I try not to let the two blur. The Fix Every app now sends requests to one gateway alias, local-auto. No agent is permanently married to a model. Before Laya sees anything, deterministic code drops candidates that aren't allowed or can't handle the request: missing capability, over the memory budget, unverified runtime, or unavailable. Laya picks among what's left, and the gateway re-checks before execution. A model can help choose between permitted options. It can't grant itself permission, raise its own memory allowance, or authorize a cloud call. If Laya is unsure or down, the gateway falls back to a permitted local model. If nothing qualifies, it refuses, and refusal beats overloading the box or breaking the policy. On a held-out routing replay, Laya made 37 acceptable decisions out of 40 against 33 for the deterministic baseline: 15 direct picks, 17 fallbacks, 8 correctly blocked as unavailable. The 40 include paired preferences on the same tasks, so it isn't 40 independent wins. Routing latency also ran over my 100 ms target on a busy host, so timeout and fallback stayed mandatory. Memory admission got its own rewrite. "Free RAM" alone was too conservative, since macOS uses spare memory for reclaimable file cache. Counting everything as reclaimable was too aggressive. The gateway now credits a bounded slice of cache, holds back an 8 GiB host reserve and a 2 GiB per-request workspace, caps resident models at 180 GiB combined, and admits one generation at a time. In serving checks, Coder peaked around 21.8 GB resident and GPT-OSS around 64.5 GB. Which model is best and whether it fits right now are two different decisions. Token counting had to be exact, and it had to count what the backend actually renders: system instructions, history, tool descriptions, template formatting, not just the visible message. GPT-OSS made this annoying because the standalone tokenizer didn't support its architecture, so I bound the count to the native runner's verified tokenizer and tied it to the exact runtime and model identity. Then an Ollama update changed the runtime, and the config checks refused the stale evidence, which is their job. I pinned a durable Ollama 0.34.2 outside the auto-updating app and requalified both models: five token-parity checks and five serving cases each, with tools, streaming, and inputs past 28,000 tokens, against a 32,768-token context and a 4,096-token output cap. Thanks for reading As The Geek Learns! This post is public so feel free to share it. Cloud approval is a receipt, not a toggle. It binds the allowed model, the task, a prompt digest, a 15-minute expiry, and a turn limit. One use. A failed cloud attempt burns it. Memory in the other sense, the stuff my agents remember, needed its own migration. ClaudeClaw stores embeddings, and you can't mix vectors from two embedding models even when the arrays are the same length. I rebuilt the index on local Nomic v1.5: all 2,371 production memories, prepared on the side, activated in one transaction, every old vector kept for rollback, after a rehearsal on a copied database. What broke that had nothing to do with models iCloud had evicted dependency files and a model checkpoint under Documents, so startup reads stalled. Fix: durable local storage, originals preserved, hashes verified. Don't run inference out of a synced folder. The AI code-review gate reported no findings on a PR while reading two of four changed files. The two it skipped were deletions. The review had discussed them, but the follow-up question about which files it read dropped them. A positive review isn't proof the review happened. I fixed how that evidence is requested, split big PRs into smaller ones, and verified the merged tree matched the full implementation. OpenCode retried on its own. A real 503 fixture showed the session layer retrying with the SDK's retry count set to zero. For an assistant with tools, retrying uncertain work can repeat an action. The wrapper now owns request identity, cancellation, and terminal errors instead of trusting a provider flag. And the first post-cutover health… Get full access to As The Geek Learns at astgl.com/subscribe

  3. Nov 23

    StudyDeck vs. Gemini Notebook: learning with local control

    A study tool learns about you while you learn the subject. It sees your reading, your questions, your wrong answers, and the concepts you keep missing. That history can be more personal than the textbook you uploaded. So the real question in this comparison is who holds that history. StudyDeck keeps it on your machine. Google's notebook product takes away the work of running your own learning system. Both are reasonable answers. StudyDeck is built on Open Notebook, which handles sources, notes, and podcast generation. StudyDeck adds a study workflow on top: curriculum tracking, recorded attempts, mastery estimates, and scheduled review. First, the name. Google renamed NotebookLM to Gemini Notebook in July 2026. Notebooks also work inside the Gemini app, but the two interfaces behave differently. I'm comparing against the standalone product and flagging the Gemini app where it changes the answer. Google's announcement A disclosure. StudyDeck is my personal study project, so I have a stake here. What I checked, on September 23, 2026, is StudyDeck's current code and Google's documentation. I didn't run a controlled trial of retention, answer accuracy, or generation speed. Nothing here shows that either product makes anyone learn faster. Say you're learning AI engineering. You have a book, some documentation, a few lectures, and a pile of questions you can't answer yet. First you need help understanding the material. Then you need to find out what you can explain without help. Gemini Notebook is good at that first part. You add PDFs, websites, YouTube videos, audio, and Google documents, then ask questions and get answers that cite your sources. Study guides, mind maps, and audio overviews give you several ways into material you don't know yet. If setup would eat your whole study session, start here. Supported learning workflows Calling Gemini Notebook a passive summary machine would be unfair. Its quizzes and flashcards have difficulty controls and explanations. Flashcards remember your progress, let you revisit the cards you missed, and download as CSV. Flashcards and quizzes StudyDeck is built around a longer sequence. The current schedule runs a pretest, then reading, then drawing a concept map from memory, then practice, then retrieval again later. Curriculum and concept progress live in local files. The cockpit records attempts and study-stage events as separate entries, so work you didn't finish yesterday still shows as unfinished today. As The Geek Learns is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. For in-depth study, I think this is the biggest difference between the two tools. StudyDeck has spaced repetition built in. Every quiz question you miss becomes a flashcard. A new card first shows up in the topic's next flashcard session, on day 7, 14, or 30 of the plan. After that, each correct answer widens the gap: 3 days, then 7, 14, and 30. Miss it and the card comes back tomorrow. That schedule rests on one of the most replicated findings in learning research. Spreading practice out over time beats cramming the same amount of practice into one sitting. A 2006 review pooled 839 comparisons from 317 experiments and found that spaced study produced better long-term retention than massed study. Cepeda et al., Psychological Bulletin, 2006 Pulling the answer out of your own memory matters as much as the timing. In one experiment, students who practiced recalling a passage remembered more of it a week later than students who spent the same time rereading it. Roediger and Karpicke, Psychological Science, 2006: A 2013 review of ten common study techniques gave its highest rating to only two: spacing practice out and testing yourself. Dunlosky et al., Psychological Science in the Public Interest, 2013 The brain research points the same way. A 2016 neuroscience review found spaced training beats massed training for many kinds of human learning and in nearly every animal model tested. One leading explanation, consolidation theory, holds that spaced sessions stabilize a long-term memory more efficiently than back-to-back repetition. The working idea is that the gaps give the brain time to move material from short-term into long-term memory, and each well-timed review strengthens it. Smolen, Zhang, and Byrne, Nature Reviews Neuroscience, 2016 Gemini Notebook's flashcards remember your progress and let you revisit the cards you missed, but I didn't find documentation of a schedule that spreads reviews out over days. You decide when to come back. For a quick refresher, that's fine. For material you need to keep for months, the built-in schedule is why I consider StudyDeck the better tool. One caveat: the research supports spacing as a technique. It doesn't prove StudyDeck's particular 1, 3, 7, 14, 30 table is the best one, and I haven't measured my own retention with it. One constraint in the quiz flow is deliberate. StudyDeck won't show you the answer until it has recorded your attempt. Self-graded items stay pending until you finalize them. What you get is an honest record of what you answered before you saw the solution, and that ordering is the point. The confidence and mastery numbers are still software estimates, not validated measurements of understanding. Google documents progress tracking inside its study aids. I didn't find documentation for anything like StudyDeck's full curriculum and event history that you can open and read. That's a narrower claim than "Google has no progress tracking," and I want to keep it narrow. StudyDeck can also turn a notebook into video, in two ways. The first runs entirely on your machine. The local language model writes a narrated slide overview, the Kokoro voice model, running through Speaches, reads the narration aloud, and rsvg-convert and FFmpeg renders the slides and audio into an MP4. You can leave the page while it renders, and the finished video shows up on the Videos shelf. The second path uses Higgsfield AI for generated footage, and StudyDeck deliberately stops short of calling it. The local model drafts a storyboard of three to five scenes, each with narration, a visual prompt, and references to your sources. That step spends no Higgsfield credits and sends nothing anywhere. You check the references, edit the prompt, copy it, and open Higgsfield yourself, where you see the model, what you're sending, and the price before anything generates. Save the downloaded MP4 under the filename StudyDeck suggests, and it joins the same shelf. StudyDeck never submits or retrieves a Higgsfield job on its own, and that manual step is the privacy boundary. Both paths start from the same limited input: up to 20 sources, at most 1,000 characters from each and 18,000 in total. What comes out is a short orientation to a topic, not a full lesson. StudyDeck checks that every source a script cites actually exists in the notebook. That proves the reference is real, not that the narration got the source right. Local videos don't have captions yet. Privacy is where local control pays off, and the payoff is specific. As configured, StudyDeck's cockpit listens on your local machine. Curriculum files, attempts, and review records sit there too. Run Open Notebook, Ollama, and the speech services locally, and the system can process your study material without sending it to a hosted model provider. So a wrong explanation or a page of private notes doesn't have to become a request to a cloud service. You hold the files, and you can read the code that handles them. You pick the model and decide which services see anything. If you're studying internal technical documents or personal material you're allowed to process locally, that control may settle the choice by itself. Read Google's policy closely, because the details matter. Gemini Notebook says it doesn't direc… Get full access to As The Geek Learns at astgl.com/subscribe

  4. Oct 26

    The Uninstall Is Part of the Evaluation

    I spent an afternoon evaluating a tool I ended up removing. The removal is the part worth writing about. The tool was codebase-memory-mcp, an MCP server that parses your codebase into a knowledge graph so an AI agent can ask structural questions. "What calls this function?" "What breaks if I change this signature?" That's a real gap in my setup. I have semantic search over my notes. I don't have anything that answers who calls this with an exact answer instead of a good guess. So I looked at it seriously. Here's how that went, and the thing I got wrong. Don't evaluate the README The README is 864 lines. It leads with thirteen badges, a link to an arXiv preprint, and claims like "120x fewer tokens" and "the Linux kernel in 3 minutes." None of that is evidence. It's marketing copy, and marketing copy is the same length whether the tool is great or terrible. So I cloned it and looked at the actual repository. That takes about five minutes and tells you things no README will: About six months old. 2,610 commits, 166 contributors. And 2,147 of those commits are from one person writing under four different name-and-email combinations. That's 82% of the project from a single pair of hands on roughly 154,000 lines of first-party C, not counting the vendored parsers. Worth knowing before you adopt it. Also worth knowing: 41,000 stars and 543 open issues. Popular, actively used, and carrying a real backlog. But the engineering discipline is real. Sanitizer builds, soak tests, CodeQL, SLSA provenance, a DCO. Someone who ships a Dockerfile for a MemorySanitizer test image is not winging it. Both of those facts matter. Neither is in the README. And here's where I have to correct myself, because it's the same mistake in a different coat. My first pass at those numbers was wrong. I'd cloned with git clone --depth 50 out of habit, because it's faster, and I only wanted a look around. A shallow clone gives you a truncated history and git log reports on it without complaint. No warning, no asterisk. I read "first commit: June" off a repository that actually started in February and got the commit count and contributor spread wrong too. I only caught it because I went to verify something unrelated, the star count, and the creation date. The API return didn't match the date my clone claimed. Same lesson as everything else in this piece: the tool answered confidently, and the answer was wrong, and nothing about the output looked wrong. git rev-parse --is-shallow-repository would have told me in one second. I didn't ask. The actual risk wasn't the code Here's what I found when I grepped the install path: the installer writes to settings.json. It installs PreToolUse, SessionStart, and SubagentStart hooks. It drops skill directories. It splices your CLAUDE.md between marker comments. And it does that across 43 coding-agent clients it auto-detects by its own --help count. That's not a security problem. It's exactly what the tool advertises. But my ~/.claude has a hand-tuned hook chain I built over months, an allowlist .gitignore, and multiple sessions running at once. An auto-detecting installer is the wrong shape for that. As The Geek Learns is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. So I installed with --skip-config. Binary only. Then I did the part most people skip: I checked whether the flag actually worked. I took SHA-256 hashes of every config file I cared about before installing, and again after. Then I grepped for the tool's marker string across every agent directory. The hashes matched. The grep came back empty. But an empty grep proves nothing on its own. Maybe I typo'd the path, maybe the file wasn't readable. So I ran the same grep for a string I knew was in the file. It returned 66 hits. Now the empty result means something. That's the habit worth stealing from this whole story: a flag's name is not evidence that the flag worked. Neither is a clean scan, unless you've proven your scanner can find something. One thing did change: it appended a PATH line to my .zshrc. Harmless, clearly labeled. But --skip-config means agent config only, and nobody tells you that. Grade it against something you already know For the pilot I indexed a real codebase: 847 Python files, indexed in 12 seconds into about 33,000 nodes and 155,000 edges. Fast. Genuinely fast. But speed isn't the question. Any tool can be fast and useless. The question is whether the answers are right, and you can't judge that on a codebase you don't know. So I picked a question I'd already answered by hand months ago. Back then I'd worked out, by reading source files one at a time, that this particular tool quietly installs a second MCP server, but only through two specific commands, and not through the path I was using. It took a while. It mattered, because the answer decided how I installed it. I asked the graph the same question. One query for the callers of that function. Two non-test results, exactly the two commands I'd found by hand, and nothing else. That's a good test, and I'd suggest it for anything in this category. Don't ask a new retrieval tool something you can't verify. You'll grade it on whether the answer sounds right, which is how you end up trusting a confident wrong answer. Ask it something you already dug out the hard way. You'll know instantly whether it's real. The costs nobody advertises The index for that one repository was 229 MB. There are lighter modes. The middle setting cut it to 105 MB with no loss to the core package or the tests. It drops docs, JSON fixtures, and example frontends. The lightest went to 84 MB but also dropped git co-change data, which turned out to be the one thing in the graph I couldn't get anywhere else: which files historically change together. Touch this auth file, expect to touch both handlers. No AST can tell you that. Only history can. So: about 105 MB per repository, and plan for it before you point this at a dozen repos. That number appears nowhere in the documentation. I only have it because I ran all three modes and measured. Thanks for reading As The Geek Learns! This post is public, so feel free to share it. Then I tried to uninstall it uninstall failed. Not because of anything to do with the tool's own files. It failed because ~/.cursor/mcp.json on my machine is a symlink into my dotfiles repo, a completely ordinary setup, and the uninstaller refuses to write through symlinks. Refusing to follow symlinks is a good instinct. Following them blindly is how you get exploited. But it treated that refusal as fatal to the whole operation: error: agent_config agent=Cursor op=mcp_uninstall path=~/.cursor/mcp.json (target: symlink, 43 bytes) error: one or more agent cleanup operations failed; executable and index removal were not started Read that second line again. Removing the executable and the indexes never started, because of a check on a Cursor config file. A file that, because I'd installed with --skip-config, had nothing in it to remove in the first place. 386 MB left on disk after a command whose entire job is removal. A 282 MB binary and 104 MB of indexes, all of which I removed by hand. And it gets better. The same run printed lines like removed MCP config entry and removed PreToolUse + SessionStart + SubagentStart hooks for client after client. None of that happened. I checked the modification times. One of the files it claimed to have cleaned was last touched in May, months before I installed anything. Two of the directories it named don't exist on my machine at all. The output describes work it didn't do. If you read the summary instead of the filesystem, you'd believe a dozen configs had just been rewritten. The part where I embarrassed myself I wrote it up as a bug report. Good repro steps, minimal setup, the works. Step one created a symlinked Cursor config… Get full access to As The Geek Learns at astgl.com/subscribe

  5. Sep 22

    Local Laya vs Hosted Jev: Why My Agents Make Typed Decisions on My Mac

    You ask a chat model a yes-or-no question and get back three paragraphs. Then your code has to parse the paragraphs, guess what it meant, and hope the JSON is valid this time. I got tired of that for the small, bounded choices my agents make all day. Here's the model I picked, the one I didn't, and the replay numbers behind the decision. This is my account of one deployment. Whether Laya beats Jev in general is a different question, and I didn't test it. The setup A coding agent makes dozens of small decisions that aren't really language tasks. Which specialist should take this job? Does this alert need a human right now? Which local model can handle this request without blowing the memory budget? Prose is the wrong output type for a bounded question. TypeSafe's Jev is built for exactly this. You hand it a state and a set of predefined questions, and it returns typed answers. A choice picks among named options. A score rates on an ordered scale. A noul returns a probability for a yes-or-no statement. No paragraph to interpret. I liked it immediately. But I had a requirement Jev couldn't meet. I wanted routine decisions running on my Mac Studio, with local data staying local. I also wanted to control the exact model, the permitted options, and what happens when the model is unsure or down. Jev is an early-access hosted service. Laya is an open-weight model with the same kind of typed-decision interface, published with downloadable weights and an Apache 2.0 runtime. For this system, that settled it. What's actually going on Both models solve the same narrow problem: turn a compact state and a few questions into structured decisions. Neither writes code or reasons through a long investigation. It's a specialist. Your main model keeps its job. Jev's managed API is a good deal on paper. TypeSafe lists $0.042 per million input tokens with no output-token charge and says Jev handles choices with up to 255 options. Hosted also means nobody babysits model files, accelerator compatibility, startup time, or process supervision. That's real work I chose to own. As The Geek Learns is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Laya's trade-offs run the other way. I downloaded a pinned checkpoint once and serve it over a loopback-only API. Routine decision requests never leave the machine. There's no per-token bill, though the workstation, electricity, storage, and my time still cost money. I didn't calculate a break-even. Privacy and control were the decisive reasons. Cost was a side effect. I have no savings number to give you. The checkpoint, convaiinnovations/laya-typed-decisions, has about 421 million parameters, a ModernBERT-large encoder, and a 1,024-token limit. Its publisher trained it on four synthetic workflows: agent observability, customer service, invoice processing, and security incidents. Model routing isn't one of those, which is a reason to test rather than assume. Here's what makes it different from asking a chat model for JSON. The Laya runtime renders the question, each option, and the state into one token sequence, with a marker before each option. A bidirectional encoder reads the whole thing, a small decision head scores the marker positions, and a softmax turns those scores into a distribution over options. Several questions against one state batch into a single call. There's no autoregressive text output, so there's nothing to parse. The published runtime shows the sequence construction and the head. For a choice, my code gets an option key and a probability for every allowed key. For a score, a distribution over ordered levels plus the expected level. For a noul, the probability of true. The runtime also reports a confidence derived from the distribution's normalized entropy. That confidence is not the probability the downstream task will succeed. I picked thresholds on a separate development set, and I'd want fresh evidence before reusing them on a different model roster. Laya's authors trained with rewards based on proper scoring rules, meant to encourage honest probabilities. The model card still warns it's overconfident and needs domain-specific calibration. A typed answer can be structurally perfect and factually wrong. I treat Laya as a recommender inside a program, never as a source of permission or truth. The fix My host is a Mac Studio with an M3 Ultra and 256 GB of unified memory. That hardware is part of the result. A smaller machine needs its own memory and latency tests. The original implementation brief got two things wrong. It assumed plain transformers.AutoModel could load Laya's decision model, and that the typed checkpoint lived only in a subfolder of the base model. Neither held. The typed checkpoint is its own repository and AutoModel loads only the encoder shape. The published laya runtime reconstructs the custom decision head, so the loader uses that instead of mistaking a bare encoder for a working decision engine. Around the checkpoint sits a FastAPI service that accepts the TypeSafe wire shape, so a client written for Jev can point at my box: { "model": "laya-local", "state": "The production API is down and customers are blocked.", "questions": { "route": { "type": "choice", "instructions": "Which team should handle this?", "criteria": { "billing": "Invoices and refunds", "technical": "Bugs, outages, and API errors" } } } } My code defines the labels before Laya ever sees them. The response identifies itself as laya-local-v1. Accepting a Jev-style client alias doesn't pretend Jev supplied the answer. The service listens on 127.0.0.1:8017, because Docker already had port 8000 on this machine. The service fails closed. It loads from an explicit local directory and refuses to download during inference. In production, it requires Apple's Metal accelerator and warms the model before reporting ready. It counts the exact rendered token sequence and rejects an over-budget request instead of letting the runtime quietly shorten the state to fit. It caps Choice at 20 options by default and serializes inference so concurrent callers can't pile uncontrolled load onto the accelerator. The more important change sits outside the model. A gateway first drops any model that isn't eligible: wrong capability, wrong data class, too little context, unhealthy, past deadline, or over the memory budget. Laya gets at most five survivors plus an explicit abstain option. It never sees an ineligible model and can't grant one permission. The gateway re-validates the returned option, confidence, margin, model identity, and eligibility before reserving capacity. If Laya abstains or times out, a permitted local fallback runs. If nothing is eligible, the gateway refuses the request. Inside ClaudeClaw, Laya now handles bounded specialist dispatch and how noncritical alerts get presented. A user who names a specialist still wins. Model advice can't suppress a critical alert. I also tried Laya for post-failure recovery choices. That profile failed acceptance, so it stays disabled, and the deterministic recovery rules stay in charge. What the replay showed I wanted a measured result for my own routing decision, not a latency figure copied from someone else's machine. The service's API, engine, SDK compatibility, and routing-contract suites recorded 59 passing tests, with one optional real-checkpoint test skipped. Separate HTTP runs exercised the real checkpoint on Metal. The held-out replay used previously recorded outcomes for two models qualified for this setup, Qwen3 Coder 30B and GPT-OSS 120B. The replay simulated model health and resources. The Laya inference was real. Nobody reran the coding tasks. I chose the profile on 20 development decisions, froze it, t… Get full access to As The Geek Learns at astgl.com/subscribe

  6. Sep 17

    Can a Subscription Fund a Coding-Model Study? 648 Episodes, $0 API

    You’ve got a Claude Max plan, a ChatGPT Pro plan, and a Mac Studio with a local model. (Mac Studio specs: M3 Ultra with 256 GBs memory) You’d like to run a real benchmark across all three, but the API estimate for a proper study came back much too expensive. So I routed the whole thing through the subscriptions. It mostly worked. The part that didn’t is the useful part. The Setup This is the follow-up to my GVS5H pilot. GVS5H is a research project claiming that a manager-and-worker scaffold lets smaller open models match frontier ones on hard coding problems. My adaptation runs three modes: a single call, an iterative loop that revises after public tests, and a “ledger” mode where a manager plans, fresh workers execute, and notes persist on disk between calls. The study froze 24 tasks before any generation: twelve hard LiveCodeBench problems (six AtCoder, six LeetCode) and twelve practical repair fixtures in Python and TypeScript (cancellation, atomic writes, retries, pagination). Three systems, three modes, three repetitions. That’s 648 episodes. As The Geek Learns is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. The three systems were a local Qwen3.8-27B running 4-bit on MLX, GPT-6 Astra through the Codex CLI on a ChatGPT Pro login, and Claude Fable 5.1 through Claude Code on a Max login. No API keys were supplied to the harness, extra spending was disabled on both accounts, and a dry subscription meant waiting for the reset, not paid credit. One caveat I’ll keep repeating: this compares three configured systems, not three sets of model weights. Claude Code controls its own temperature and context, the Codex CLI has no verified provider-side output cap, and my adapter serializes history differently than the raw APIs do. Treat every cross-system number accordingly. What’s Actually Going On The study finished with 602 of 648 episodes completed and 555 hidden-test passes. Additional API charge: zero dollars. Recorded quota waits: zero seconds on both backends, across roughly four hundred cloud episodes. Astra through Pro was flawless: all 216 planned episodes were completed, and all 216 passed, in every mode and both families. The local Qwen also completed all 216 of its episodes, passing 177. The missing 46 episodes all belong to Fable through Max, and 36 of those 46 are ledger-mode episodes. Exactly half of Fable’s planned ledger runs were never counted. Here’s why. The protocol had a hard rule: no model substitution. Any other model in a response marks the episode operationally incomplete and excluded. That’s the right rule; you can’t credit Fable for an answer Fable didn’t write. Anthropic documents that its Fable and Opus models include safety classifiers that can decline a request, and that a declined request can be retried on a fallback model. In 32 of the 46 missing episodes, the response stream contained a fallback block naming Claude Opus 5, which is precisely the handoff those docs describe. Every one of those 32 was a ledger episode. Ledger mode makes many calls per episode (planning, ideation, manager, workers, and finalization), so it gets far more chances to trip a classifier. The other 14 exclusions were a subtler failure: the CLI emitted two assistant events under one message ID, and my strict identity guard refused those too. The original run stopped after three consecutive Fable failures, with 479 episodes done. A predeclared continuation covered only the 154 never-attempted Fable episodes, with one change: a documented fallback handoff excludes that episode without halting unrelated tasks. Nothing else changed, and no original episode was retried. Note what I’m not claiming. The refusal categories weren’t captured, so I don’t know what a classifier objected to in a competitive programming problem, and I’m not saying an Opus answer would have failed. Those episodes can’t be scored. What the Numbers Say Read these results with coverage attached for full context. On the hard problems, Qwen went from 55.6% with a single call to 72.2% iterative and 77.8% with the ledger. That’s the one place the scaffold appears to help. In the paired analysis, the ledger beat the single call on five of twelve tasks and lost on none, but after Holm correction the adjusted p-value is 0.375. Suggestive, not significant. It also cost a lot: about 11.3 hours of active local inference for the 36 ledger episodes versus about 3.5 hours for the 36 single-call ones. Astra needed no help. Its ledger mode spent about 3.6 times the active seconds of its single mode on the hard problems to land on the same 36 of 36. Fable on the hard problems passed 25 of 36 single (five excluded), 30 of 36 iterative (five excluded), and 18 of 36 ledger. Count only completed episodes, and the ledger went 18 for 18. Count all planned cells, and it’s 50%. Both numbers are true. Only the second one is honest as a coverage-aware score. On the practical repairs, everyone sat near the ceiling. Qwen passed 33, 36, and 34 of 36 across the three modes. Astra passed all 36 in every mode. Fable passed all 36 single and iterative, and 17 of its 18 completed ledger episodes. One adherence note: ten Qwen ledger episodes returned a manager section in the wrong format, and nine never invoked a worker. A passing answer doesn’t prove the manager-and-worker loop ran. Total recorded output was about 6.3 million tokens. Claude Code’s API-equivalent estimate for the Fable portion was about $58, a display number rather than an invoice or a quota measurement. When I kicked off the continuation, the max usage meter read 14%; I didn’t meter that independently. Why This Matters If you’re planning to benchmark models through subscriptions, the money question answers itself. It works, and the bill is your existing plan. The question you should actually plan for is harness behavior. A subscription CLI is a product, not a raw endpoint. It may hand your request to a different model, split one message into several events, or run auxiliary calls you didn’t ask for. Your protocol has to decide in advance what each of those means. Mine decided “exclude,” which protected the numbers and cost me half of one arm. I’d make that trade again, but next time I’d instrument the refusal category. The other lesson is older. Every gain I’ve seen from the ledger scaffold arrives with a multiple on time and tokens, and the one statistically tempting gain here didn’t survive multiple-comparison correction. Measure the whole configuration on the work you care about before you commit machine days to orchestration. Quick Reference * Freeze tasks, order, prompts, and budgets before generation. * Decide the model-identity rule up front. “Any other model in the stream excludes the episode” is defensible. Write it down. * Report success over all planned cells and over completed cells, side by side, with the missing count. * Log every exclusion reason in machine-readable form. Fallback, quota, and double-event failures are different problems. * Capture the refusal category if the provider exposes it. I didn’t, and I can’t answer the obvious follow-up. * Multi-call modes multiply exposure to classifier declines. Expect exclusions to concentrate there. Thanks for reading As The Geek Learns! This post is public, so feel free to share it. Found this useful? I share practical lessons from my systems and AI engineering journey at As The Geek Learns. Terminology and Definitions The tools and models in the study Claude Code-Anthropic’s command-line coding agent; it reads a codebase, edits files, and runs commands from natural-language instructions. The article ran Claude Fable 5.1 through it. (https://code.claude.com/docs/en/overview) Codex CLI-OpenAI’s equivalent command-line coding agent, open source and built in Rust. The article ran GPT-6 Astra through it. (https://github.com/openai/codex) Qwen3.8-27B-a locally-run open-weight model; “27B” means roughly 27 billion parameters (the internal numeric knobs the model tunes during training. More parameters generally means more capability but more memory to run). (https://huggingface.co/Qwen/Qwen3.8-27B) MLX-Apple’s array/machine-learning framework built specifically for Apple Silicon (M-series chips), which is what let the study run a 27-billion-parameter model locally on a Mac. (https://github.com/ml-explore/mlx) 4-bit (quantization)-compressing a model’s numbers from their original higher-precision format down to 4 bits each, shrinking memory use (often ~75% smaller than 16-bit) so a large model fits and runs faster on consumer hardware, at some small cost to accuracy. (https://huggingface.co/blog/4bit-transformers-bitsandbytes) Frontier model(s)-informal industry shorthand for the most capable models currently available from major labs (what GVS5H’s smaller open models are trying to match). How models behave mid-response Temperature-a setting that controls how random or deterministic a model’s output is; low temperature sticks to the most likely wording, high temperature varies more. Relevant here because the article notes Claude Code, not the raw API, controls this setting itself. (https://platform.claude.com/docs/en/about-claude/glossary) Context (context window)-the total amount of text (measured in tokens) a model can “see” at once, covering everything fed in plus everything it generates back. (https://platform.claude.com/docs/en/build-with-claude/context-windows) Tokens-the chunks (roughly word-pieces) a model reads and writes text in; usage, context limits, and API costs are all measured in tokens, which is why the article reports “6.3 million recorded output tokens.” (https://platform.claude.com/docs/en/about-claude/glossary) Safety classifiers / fallback model-Anthropic’s Fable and Opus models can decline (refuse) a request via an automated safety check, and the product can silen

  7. Jun 10 ·  Bonus

    Your DNS Changed and Nobody Told You. Here's the Nightly-Diff Pattern That Catches It.

    It was a Tuesday at 2:17 PM, and the marketing team's contact form was returning 502s. Not 404. Not a timeout. A clean 502, which means something was answering, just not the thing it was supposed to be. An hour in, I'd checked the app server logs, restarted the nginx process twice, confirmed the SSL cert was valid, and pinged our cloud provider's status page like it owed me money. Everything looked fine everywhere I looked. Then, almost by accident, I ran `dig +short www.company.com CNAME` and saw a hostname I didn't recognize. Something like `legacy-assets.decommissioned-vendor-name.com`. Vendor had been off the account for four months. The CNAME had quietly repointed to their infrastructure during the migration wind-down, sat there untouched, and then their old infrastructure finally went dark. Nobody changed our DNS intentionally. Nobody got notified when it happened. We found out when a sales rep tried to submit a lead form. That was the day I stopped trusting that "nothing changed in DNS" was a statement anyone could actually verify. Why DNS Is the Silent-Failure Layer of Every Infrastructure DNS is configuration. It's just not a configuration you can store in your repo, lint on a commit, or review in a pull request. It lives in a registrar panel or a DNS provider dashboard, updated by humans who may or may not be following a change-control process, and it's completely invisible until something breaks. Every other layer of your stack has some kind of drift detection built in these days. Config management tools track the desired state of your servers. Container orchestrators know what's supposed to be running. Infrastructure-as-code tools will tell you if something drifted from the Terraform state. DNS gets none of that by default. You get a text field in a web UI, a change that takes effect whenever the TTL expires, and exactly zero notifications. The operational pattern most teams rely on is "we'll know when it breaks." And they're right. They will know. They'll know at 2 PM on a Tuesday when a customer reports it, after a sales lead gets lost, after the support team has spent 45 minutes ruling out everything else. The detection mechanism is user reports, which is among the worst possible monitoring strategies. There's also a subtler problem. The change usually isn't malicious. It's not a security incident, at least not at first. It's a vendor cleanup, a platform migration, someone at a partner org tidying up their infrastructure without realizing your CNAME still pointed at them. It's the kind of change that feels harmless to whoever made it and catastrophic to whoever depends on it. The fix isn't complicated. What you need is a declared source of truth for what your DNS should look like, a way to compare that against what it actually looks like right now, and something that runs that comparison regularly enough to catch drift before users do. That's the pattern. The implementation fits in a bash script. As The Geek Learns is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. The Pattern, the Four States, and a Wrapper You Can Use Today The idea is straightforward: declare your expected DNS state once in a YAML file, then run a script nightly that queries your authoritative nameservers and compares what it finds against what you declared. Any gap between the two gets reported. The baseline file is the key piece. It's not generated. You write it manually, and that act of writing it is itself useful, because it forces you to actually look up what each record currently is and decide "yes, that's correct." Once it exists, it becomes your source of truth. Commit it to your repo. Update it when you make a legitimate DNS change. The baseline is always what you intend, and the script is always asking whether reality matches. When the diff runs, every record type for every domain you declared lands in one of four states: MATCH means the live record matches the baseline exactly. This is the quiet result. Nothing to do. NEW means a record exists in live DNS that isn't in your baseline. It could be a vendor auto-adding a TXT verification record. It could be someone provisioning a new subdomain. It could be something you should care about. The script surfaces it; you decide. MISSING means your baseline declared a record that doesn't exist in live DNS anymore. An A record that was decommissioned without cleaning up. An MX record that got deleted. A CNAME that was removed when a vendor migrated their platform. DRIFT means the baseline and live DNS both have records for a type, but the values don't match. This is the Tuesday-afternoon scenario: the CNAME target changed, the IP behind an A record flipped, the SPF policy was modified. NEW and MISSING and DRIFT all mean something in your environment changed without you being told. The script exits nonzero when any of those occur, which makes it trivially composable with cron, alerting pipelines, or anything else that reads exit codes. Here's a minimal working bash wrapper you can adapt right now. It keeps the dependencies to just `dig` and `bash`, uses a simple shell-array for your expected records instead of parsing YAML, and is short enough to read in under five minutes: #!/usr/bin/env bash # dns-check.sh # WHAT: Minimal DNS drift checker - declare expected records, diff against live DNS # WHY: Catches silent DNS changes before they become incidents # Usage: ./dns-check.sh # Add to cron: 0 2 * * * /path/to/dns-check.sh || echo "DNS DRIFT DETECTED" | mail -s "DNS Alert" you@example.com set -euo pipefail # ── CONFIGURATION ──────────────────────────────────────────────────────────── # Authoritative resolver to query against (use your domain's actual nameserver) # WHY: Querying authoritative NS catches changes before they propagate to resolvers RESOLVER="8.8.8.8" # Declare expected records as: "domain|TYPE|expected_value" # Get current values with: dig +short example.com A # Run once to populate, then treat this as your source of truth EXPECTED_RECORDS=( "example.com|A|93.184.216.34" "www.example.com|CNAME|example.com.cdn.cloudflare.net" "example.com|MX|10 mail.example.com" "example.com|TXT|v=spf1 include:_spf.google.com ~all" ) # ── DIFF ENGINE ────────────────────────────────────────────────────────────── DRIFT_FOUND=0 for record in "${EXPECTED_RECORDS[@]}"; do # Parse the declared record into its three parts domain="${record%%|*}" rest="${record#*|}" rtype="${rest%%|*}" expected="${rest#*|}" # Query live DNS at the authoritative resolver # WHY: +short gives us clean output; @resolver pins which nameserver answers actual=$(dig +short "@${RESOLVER}" "${domain}" "${rtype}" 2>/dev/null \ | sort \ | tr '\n' '|' \ | sed 's/\.$//g; s/|$//') # Normalize expected for comparison (sort, strip trailing dots) expected_norm=$(printf '%s\n' "${expected}" \ | sort \ | tr '\n' '|' \ | sed 's/\.$//g; s/|$//') # Compare and classify the result if [[ -z "${actual}" ]]; then # Record existed in baseline but dig returned nothing: MISSING printf "MISSING %s %s (expected: %s)\n" "${domain}" "${rtype}" "${expected}" DRIFT_FOUND=1 elif [[ "${actual}" != "${expected_norm}" ]]; then # Record exists but value changed: DRIFT printf "DRIFT %s %s\n expected: %s\n actual: %s\n" \ "${domain}" "${rtype}" "${expected}" "${actual}" DRIFT_FOUND=1 else # Values match: MATCH (silent - no output unless you add --verbose logic) : # nothing to report fi done # Exit nonzero on any drift - composable with cron, alerting, CI checks if [[ "${DRIFT_FOUND}" -eq 1 ]]; then printf "\nDrift detected. Review records above.\n" >&2 exit 1 fi printf "All %d declared records match live DNS.\n" "${#EXPECTED_RECORDS[@]}" exit 0 Save that, drop your actual records into `EXPECTED_RECORDS`, and run it once to confirm it sees what you expect. Then add it to your crontab: # Run nightly at 2 AM, … Get full access to As The Geek Learns at astgl.com/subscribe

  8. Jun 8

    I Secured My AI Agent With a 7-Layer Threat Model

    I have an autonomous AI agent running on my Mac Studio. It has full shell access, reads my calendar, manages my tasks, and sends iMessages on my behalf. It runs 24/7 as a background service. If that sentence doesn’t make you slightly nervous, you haven’t been paying attention. In February 2026, researchers found over 135,000 OpenClaw instances exposed to the public internet. A coordinated attack called ClawHavoc planted over a thousand malicious plugins in the community registry. Nine CVEs have been disclosed, including remote code execution. I needed to take security seriously. Not “I changed the default password” seriously. Threat-model seriously. MAESTRO: Seven Layers of Things That Can Go Wrong The Cloud Security Alliance published a framework called MAESTRO—a 7-layer threat model specifically designed for agentic AI systems. Ken Huang mapped it directly to OpenClaw’s codebase, identifying 35+ specific threats across every layer of the stack. Here are the seven layers, translated from security-paper language into “things that could actually ruin your day”: Layer 1: Foundation Models: Someone sends your agent a crafted message that hijacks its behavior. Prompt injection. Jailbreaks. System prompt leakage. Your agent does what an attacker tells it to instead of what you told it to. Layer 2: Data Operations: Your credentials are stored in plaintext JSON files. Your session logs contain every conversation forever. A malicious skill injects code through your workspace. Layer 3: Agent Frameworks: The agent misuses its own tools. It runs shell commands it shouldn’t. It spawns sessions without authorization. It escalates its own privileges. Layer 4: Deployment & Infrastructure: Your gateway is exposed to the network. Someone brute-forces the WebSocket token. A reverse proxy misconfiguration bypasses authentication entirely. Layer 5: Evaluation & Observability: Nobody’s watching the agent for anomalous behavior. There’s no audit trail. Logs can be tampered with. If the agent starts acting weird, nothing catches it. Layer 6: Security & Compliance: Your DM policy is misconfigured. Anyone can message the agent. Pairing codes can be brute-forced. Identity can be spoofed across channels. Layer 7: Agent Ecosystem: A malicious plugin gets installed. A legitimate plugin’s npm dependency gets compromised. The skill registry serves poisoned packages. The critical attack chain MAESTRO identifies: compromise the gateway (Layer 4) → access the session store (Layer 2) → poison conversation history (Layer 1) → control the agent (Layer 3) → spread via messaging (Layer 7). Reading this was humbling. I’d addressed some of these by instinct during setup. Loopback binding, directory permissions, and pairing-based access control were all implemented. But “some” isn’t a security posture. SecureClaw: The Audit SecureClaw is an open-source security tool built specifically for OpenClaw by Adversa AI. It maps to MAESTRO, OWASP, MITRE ATLAS, and NIST AI 100-2. The install is a git clone and a bash script, no npm install, no network calls, and no surprises. git clone https://github.com/adversa-ai/secureclaw.git bash secureclaw/secureclaw/skill/scripts/install.sh Then you run the audit: bash ~/.openclaw/skills/secureclaw/scripts/quick-audit.sh My baseline score: 57 out of 100. Zero criticals. Three HIGHs. Three MEDIUMs. Eight checks passing. Here’s what passed without any work: • Gateway bound to loopback (127.0.0.1) not exposed to network • Gateway authentication present • Directory permissions set to 700 (owner only) • No browser relay exposed • DM policy set to pairing (not open) • Skills clean of malicious patterns And here’s what failed: 🟠 HIGH Plaintext key exposure: Keys in openclaw.json and 5 backup files 🟠 HIGH Sandbox mode: commands run directly on host 🟠 HIGH Exec approval mode: agent acts without human approval 🟡 MED No cognitive file baselines: can’t detect tampering 🟡 MED Default control tokens: vulnerable to spoofing 🟡 MED No failure mode: no graceful degradation The Hardening Step 1: Clean up credential leaks. OpenClaw creates .bak files every time you change config. Each backup contains your full config, including Slack tokens and API keys. I had five of them sitting in the OpenClaw directory. Deleted them all. Set the main config to 600 permissions. This is the kind of thing that’s easy to miss and catastrophic to ignore. A single ls -la ~/.openclaw/ would show them. But who runs ls -la on their config directory after every change? Step 2: Create integrity baselines. SecureClaw’s hardener generates SHA256 hashes of your “cognitive files” IDENTITY.md, AGENTS.md, and HEARTBEAT.md. These are the files that define who your agent is and what it does. If an attacker or a hallucinating agent modifies them, the nightly integrity check will catch it. bash ~/.openclaw/skills/secureclaw/scripts/quick-harden.sh Step 3: Exec approvals. This is the big one. MAESTRO recommends human-in-the-loop approval for all shell commands. But my agent runs morning briefings and heartbeat checks on cron—unattended. Setting approvals to “always” would break all automation. The solution: an allowlist with on-miss approval. I created ~/.openclaw/exec-approvals.json with 17 safe command patterns: imsg, calctl, apple-reminders, cairn, and basic file operations. Tars can run these freely. Anything else; curl, rm, pip install, or any command not on the list, requires human approval. { “defaults”: { “security”: “allowlist”, “ask”: “on-miss” }, “agents”: { “main”: { “allowlist”: [ { “pattern”: “imsg *”, “note”: “iMessage send/read” }, { “pattern”: “calctl *”, “note”: “Apple Calendar” }, { “pattern”: “cairn *”, “note”: “Task management” } ] } } } This is the trade-off MAESTRO doesn’t talk about: security versus automation. Maximum security means every action needs approval. Maximum automation means the agent acts freely. The allowlist is the middle ground. Routine operations are pre-approved, and novel or dangerous operations require a human. Step 4: Full plugin install. Beyond the bash scripts, SecureClaw has a full npm plugin with 56 runtime audit checks, background monitors for config drift, and real-time integrity verification. Installing it required building from source (TypeScript → JavaScript) and registering it with OpenClaw’s plugin system. openclaw plugins install -l /path/to/secureclaw openclaw config set plugins.allow ‘[”secureclaw”]’ That plugins.allow line is important. By default, OpenClaw will auto-load any discovered plugin. Explicit trust means only plugins you’ve approved get loaded. Step 5: Nightly audit cron. A macOS LaunchAgent runs the full audit suite every night at 2 AM which includes quick-audit, integrity check, and supply chain scan. Results go to secureclaw-audit.log. If something changes overnight, it shows up in the morning. The Final Score After hardening: 64 out of 100. Nine checks passing. Zero criticals. The three remaining HIGHs are documented, accepted trade-offs: Findings I accepted (with reasoning)—Sandbox mode (Docker sandboxing would break imsg, calctl, and Apple Reminders); Plaintext keys in config (inherent to the platform config format, file is locked to 600); Exec approval not “always” (using allowlist + on-miss; full “always” breaks unattended cron automation). The two MEDIUMs, control token customization and failure mode configuration, aren’t supported in OpenClaw v2026.3.2’s config schema yet. SecureClaw checks for them proactively. They’ll be fixable when OpenClaw adds the config options. What I Actually Learned Security isn’t a feature you enable. It’s a series of trade-offs you make with your eyes open. Sandbox mode is “more secure” but breaks the tools that make the agent useful. Approval mode “always” is “more secure” but kills the automation that makes the agent worthwhile. The right security posture isn’t maximum restriction; it’s documented, intentional decisions about what risks you accept and why. Automated scanning is essential b… Get full access to As The Geek Learns at astgl.com/subscribe

About

Tools and training for IT professionals. Join James Cruce—a systems engineer with 25+ years managing enterprise VMware infrastructure—for practical PowerCLI tutorials, automation tips, and lessons from the trenches. Much to learn, there always is. astgl.com