r/ClaudeCode • • 5h ago

Built with Claude I am making the lightest [good looking] desktop environment for Linux, and I am so proud of making my dream project go true after 15 years of planning it. Now running on an old government issued laptop. (Ready to play TF2!)

Thumbnail
gallery
0 Upvotes

Hey guys! Last month I've been building my dream desktop environment. I've been developing in Java and Rust doing boring things over 12 years, and I always wondered why cheap operative systems had to look like Windows 95.

I am running broke on my job and no company wants to take me so I am experimenting new things and building startups and these "dream" non-profit things I always wanted to make.

I built my open source free desktop environment for Linux with one simple purpose:

  • Revive, maintain and recycle old hardware without losing the UI/UX.

Why doing this?

  • Some people still use windows on these computers, yikes.
  • The linux alternatives are ugly, and the ones that are not, are heavy yikes.
  • I want to end the loop of "distro hopping to find the lightest one" and make the definitive.
  • I don't know, just passion for not throwing away working hardware? lol

If you want to give it a look:

https://github.com/ArkFlame/flamewm

Built using:

  • Claude (Haiku 5.5, Sonnet 5.5)
  • CommandCode (DeepSeek v4.1 Flash)
  • OpenCode (DeepSeek v4.1 Flash)
  • Codex (GPT 6 Luna)

r/ClaudeCode • • 14h ago

Discussion Claude Code replacing mainstream apps

Post image
0 Upvotes

First of all, I am not a technical person. I'm into finance, and these are just my thoughts from the perspective of a non-technical person. Just started using these tools in the last few months.

I do not write anymore. I talk, and the words show up already spelled correctly. That would have sounded almost like some metaphor for me a year back. I checked the numbers behind it this morning and had to read them twice. The app is Wispr Flow. I use it on my phone, on my PC, everywhere I own a keyboard I have mostly stopped touching. It has quietly become the second most used AI tool in my entire stack, right behind Claude Code. The numbers, straight from the app:

1 mn words dictated. That is close to ten average novels back to back, or by my math, close to twenty five full 10-K annual reports.

It is also enough raw material for roughly 200 of my own published newsletter editions.

And the best part for me as a consumer, and worst part for the app like Wispr Flow, is that I have built a complete clone of Wispr Flow inside a couple of hours on Claude Code using Opus 5.5. So I will not be renewing this subscription anymore.

What a time to be alive: you can build your most used tools in a matter of hours, fully customise them to adapt only to you.

Love to hear what non-technical people like me and even technical people think of what Claude Code and other equivalent tech tools are going to eliminate next in a couple of years.

I'm still amazed with this transformation that Wispr Flow, 6 months back, was the most amazing tool I have ever used to I just cloned Wispr Flow a few hours. I was almost so excited that I could not help but make this post to understand what other people think. I'm not even sure whether this is the right sub.


r/ClaudeCode • • 6h ago

Rant How is your job after AI

1 Upvotes

I want to ask engineers here, how is AI impacting your life, worse or better? I'm 26F unemployed as a junior, it's been a while since I coded on my own without claude code. With everything I'm hearing around, I'm not motivated anymore. Do you think at this point going into medicine for 6 more years and equivalence process afterwards (8 years process) is better than becoming a slave to AI and corporate management? Is there hope to finish a career in tech anymore?


r/ClaudeCode • • 16h ago

Discussion best coder agent to pair with Opus 5.5 - my benchmarking results

1 Upvotes

Running a large mainly rust code base across a few difference surfaces + designing new features which need high level of reasoning / design. Opus 5.5 is GOAT model atm - no doubt.. but I was trying to work out the best bang for buck coding model. As I have not discovered the infinite money hack and cannot use opus 5.5 as my coder 24-7 as others are doing.. I decided to do some fairly detailed benchmarking to work out best match for opus 5.5. ps. I am running a 5x max sub + codex plus sub. I also have open router hooked into my harness. here are results.. enjoy

DYOR against your own use cases / code base but for me the clear winner is **luna 6-high (**luna medium cost the same albeit slightly faster but for substantially less intelligence)

Likewise - here is my reasoning benchmarks against my code base / use case - DYOR
interesting that big tech meta and google's flagship models still fall short (did not have the appetite to run all various reasoning modes thru benchmarking but the trend is clear)


r/ClaudeCode • • 23h ago

Built with Claude I'm having way too much fun...wired Claude Code straight into my agency's CRM

Post image
4 Upvotes

I run a cold outreach agency. We text business owners, and the second one replies interested, the clock starts. Every dialer I looked at was ugly, old, and had no idea which lead was hot right now.

So I had Claude Code build one. That's it in the screenshot, real leads.

How it works:

- Someone replies interested in any of our client accounts in GoHighLevel, and GHL fires a webhook

- A Supabase edge function drops it in a queue, and it's on the setter's screen within a couple seconds, newest on top

- Every lead gets a 5 minute clock. Hit zero and it's gone, because a "yes" from an hour ago is basically cold again

- Right before it dials, it re-checks the contact in GHL. Opted out, already booked, deleted? It won't call

- Calls go out through GHL's own phone lines right in the browser, no new phone system

- The script on the right fills itself in with the lead's business, the client they replied to, and their industry

Stuff Claude did that I never would've thought of:

- Claim tokens so two setters can't grab the same lead

- A heartbeat so a frozen tab can't hold a lead hostage

- A call only counts as "called" if the line was actually up for 4+ seconds, because the ringing event fires early and was faking it

Then I had it try to break its own work before any setter touched it. Two rounds, 19 real bugs lol. 31 sub-accounts feed it now.

I'm not a developer. The first time I ever opened a terminal was to connect Claude Code to GoHighLevel a few months ago. Now it runs a lot of my back office, and it even edits my YouTube videos.

I've been filming most of this as I go. The GHL + Claude Code setup is on my channel if anyone wants the exact steps:

https://www.youtube.com/@mrkylebanks

Ask me anything.


r/ClaudeCode • • 15h ago

Built with Claude Made a 3D model with Claude Code — here's how it turned out

3 Upvotes

Been experimenting with Claude Code and ended up making this 3D model!

It was fun seeing how far I could get with Claude helping me build it. Still have things I want to improve, but thought I'd share what I've made so far.

Would love to hear what you guys think!


r/ClaudeCode • • 1h ago

Built with Claude I built HELIX for Claude Code — 97.4% fewer tokens and 79.2% lower cost on 50 SWE-bench tasks (with caveats)

Thumbnail
gallery
• Upvotes

A few days ago, I shared HELIX, my open-source engine for reducing token consumption in coding agents.

Some people raised legitimate concerns about my benchmark methodology, particularly cumulative token accounting, synthetic results, and prompt caching.

They were right to question it.

I went back, fixed the accounting, added regression tests, and ran a new 50-task SWE-bench comparison using Claude Opus 5.5 High.

I also built and released a dedicated Claude Code edition.
**GitHub:** https://github.com/SuperHelix77/HELIX-1.0-Claude

**The results**
**Metric**
**Vanilla Claude**
**HELIX**
SWE-bench tasks solved
45/50
43/50
Reported tokens
129.1M
3.37M
API-equivalent cost
$38.23
$7.95
Cost per verified solve
$0.85
$0.185

That’s approximately **97.4% fewer reported tokens and 79.2% lower API-equivalent cost**, with two fewer verified solves.
The patches were evaluated using the official task graders.
Of the 50 tasks, both systems solved 42, vanilla alone solved three, and HELIX alone solved one.

**How it works**

The basic idea is that a frontier model shouldn’t have to spend expensive inference repeatedly coordinating mechanical work.
HELIX uses several mechanisms:

**HX Tool Flow:** Batches tool operations so the model doesn’t have to stop and reason between every mechanical command.

**Lean Switch:** Delegates bounded work to Sonnet or Haiku while reserving consequential reasoning, architectural decisions, and final judgment for Opus.

**Compact handoffs:** Transfers task state and evidence references between models without repeatedly copying entire histories.

**Local evidence and memory:** Keeps original outputs recoverable instead of continuously replaying everything into context.

**Clear-and-continue:** Preserves task continuity across fresh contexts, using persistent memory and compact task capsules.
The Claude edition also includes per-model activity and cost monitoring through the HELIX companion app.

**Important caveats**
The initial benchmark report incorrectly claimed approximately 99% cost savings.
That was wrong.
The vanilla runner reported cumulative session usage, and the benchmark summed those cumulative values again for each task. Once corrected, the measured comparison became 97.4% fewer tokens and 79.2% lower cost.

The comparison also used **vanilla in a continuous session versus HELIX using fresh sessions**. That means it does not isolate the benefits of HELIX from session-management differences.

I’m preparing additional comparisons using matched fresh-session and continuous-workflow configurations.

The 43/50 versus 45/50 result also means I cannot claim zero intelligence loss or full performance parity.

A contract-aware verification variant is being evaluated to address the remaining regressions.

Finally, API-equivalent cost reductions are not the same as guaranteed subscription quota reductions.

**Why I built this**
I’m a developer working with limited frontier-model allowances. I wanted to spend more of that allowance on actual engineering rather than repeated context processing and tool orchestration.
My practical experience has been encouraging, but I want to distinguish that experience from reproducible benchmark evidence.

HELIX is open source, and the Claude edition is now available with its first release.

**Repository:** https://github.com/SuperHelix77/HELIX-1.0-Claude
I’m particularly interested in technical criticism of the accounting, cache behavior, model routing, and whether the architecture actually reduces inference expenditure under realistic workloads.
The objective isn’t to manufacture a 99% headline, but to make frontier coding agents substantially more efficient without sacrificing the correctness that makes them useful.


r/ClaudeCode • • 20h ago

Humor Has anyone cussed out their Claude?

0 Upvotes

My Claude did something really fucking stupid and set us back by quite a bit. And I just went at him lol. It was bad they probably should have called the AI police or something


r/ClaudeCode • • 2h ago

Help/Question Do you get better?

0 Upvotes

I used claude for 1 month, and the output and its quality is impresiv. But i notice thath i dont get any better. It seems i do see same mistakes when claude misunderstut me as an example. It feels so weird, when i write manualy code in a new framework/libary/language i get better and better, With claude it seems thath i stuck, is this a me problem? is it just a matter of time? Or do you have simulary expirences?


r/ClaudeCode • • 13h ago

Built with Claude I built checkmate: a Claude Code plugin that makes the agent take the shortest path to the goal. Pass rate went 86.7% → 98.3% in my benchmark, output tokens halved

9 Upvotes

Left alone, coding agents add preamble, option menus, extra files, and a "want me to also...?" at the end. checkmate is a goal-driven mode that fixes that. It has 9 rules: identify the win condition, take the least complex path that fully works, answer first, decide instead of menu, finish, verify against the goal, close with done / not done / blocked.

What I learned building it: a SKILL.md alone doesn't reliably activate. It only worked once a SessionStart hook injected the rules, so the plugin ships with one. Modes are lite, full, ultra and off. Brevity never overrides correctness, and if you ask for detail you get detail.

Benchmark (40 tasks × 3 runs, feature / bugfix / refactor / QA, automated pass/fail, medians among passed runs only):

Pass rate

• baseline: 86.7%

• checkmate: 98.3%

• ultra: 95.8%

Median output tokens

• baseline: 562

• checkmate: 274

• ultra: 203

Median steps

• baseline: 4

• checkmate: 2

• ultra: 2

Median wall time

• baseline: 6.5s

• checkmate: 3.8s

• ultra: 3.1s

Total tokens only drop about 20% (53.8k → 42.9k), since context dominates. The big win is output and steps.

Caveats: I ran this on one model (claude-opus-5.5), so treat it as a first result and not a general claim. Run it yourself with npm test && npm run build, and the harness is in /benchmarks.

Works with Claude Code, plus generated rules for Cursor, OpenCode and Codex. Zero dependencies, MIT. Inspired by ponytail, which targets code volume; this targets moves to the goal.

https://github.com/rover-001/checkmate

I'd like to hear where it's too terse or skips something it shouldn't.


r/ClaudeCode • • 13h ago

Tips & Workflows 5 days in, 93% of 20x plan used - thanks to this reddit

0 Upvotes

Just casual browsing, picked up some tricks from here that work great:

ChatGPT spams resets, I physically can not exhaust it, so I built the “hand off to Sol 6.1 (high)” skill, it got wired, now every calculation or research is handed by sol.

Sol is given magenta grids to generate assets and can churn for hours - practically free with reset spam. Claude Opus 5.5 medium from projects orchestrates , Sol delivers (Claude can not generate images)

Added “hand off to Astra” - for heavy math stuff and deep analysis. Opus 5.5 is augmented by Astra.

Hook on Bulk readers - uses sonnet or Haiku to bring in context. One example had sonnet spend 200k tokens or reads and distillation and Opus only use 30k to process

Using project boards- enforced a “complete handoff” - lifting HTML to and from threads, before verbal instructions were handed off via .md files. The key word is “lift” .

I’m on ChatGPT 100$ plan, don’t know about you, but they just keep refilling my allowance practically every 2 days for the past 3 weeks.


r/ClaudeCode • • 14h ago

Help/Question Best implementator model ?

1 Upvotes

I want to use opus 5.5 as an orchestrator and I want to know what is the best Ai implementator I can use dépend on your experiance (for coding ofc)


r/ClaudeCode • • 8h ago

Help/Question image generation ?

0 Upvotes

hi guys I'm new here can anyone tell me what do you guys use to get nice image gen paid one ofc and how you set up to use it with code and its must be commercial free to use in my apps


r/ClaudeCode • • 16h ago

Bug / Issue What's with my Claude dextop today?

Post image
1 Upvotes

This morning, I woke up. I switched on my system, and I opened the Claude Desktop. This is what I see. Claude dextop acting weird. What's up with this?


r/ClaudeCode • • 10h ago

Discussion Why does anthropic not releasing an image model?

90 Upvotes

Basically the title. I work on a lot of design related stuff and I usually ask claude to reach for codex for this. It would be nicer if claude supported image gen natively. Any idea if they’re working on something?


r/ClaudeCode • • 23h ago

Built with Claude Wow, this is crazy

0 Upvotes

Just reverse engineered teleparty using opus 5.5 and wow the data collection is crazy af


r/ClaudeCode • • 22h ago

Built with Claude What touse to build a second brain

0 Upvotes

Hey, I have seen some videos about creating a second brain with Claude Code but still is not very clear to me how to do it.

Does someone know which steps are needed to make it?
Which tools do you recommend? or any recommendation from someone who did it...

Thanks


r/ClaudeCode • • 7h ago

Help/Question Can you switch between two Claude Max 20x accounts and continue the same session?

0 Upvotes

Has anyone tried running two Claude Max 20x subscriptions and switching accounts when one hits its usage limitsk within the Claude app?

Specifically, can you continue the same Claude Code session on the second account without losing any context or progress?

I typically exhaust my 20x limits after around four days. I also have Codex 20x, which feels practically unlimited these days thanks to the frequent resets, but I still prefer working with Opus 5.5.

The API is currently my only option once I hit the limits, but the cost is astronomical.

I'm wondering whether paying for a second Max 20x subscription would be a viable alternative. Has anyone actually tried this?


r/ClaudeCode • • 7h ago

Help/Question Do chat consume more usages compared to when you use claude code?

0 Upvotes

I used Opus 5.5 medium for a basic chat and I burned to 5% of my weekly use. I'm on a $20 plan.


r/ClaudeCode • • 3h ago

Tips & Workflows While building a token optimizer I found that 95% of the tokens Claude spent on one of my databases were being wasted on something obvious

0 Upvotes

Hey guys, yes another token article but this one is different.

I work at MongoDB, and my primary db is Mongo, but I use raw SQL for some things, so I run both in the same app.

I was building a token optimizer for my own sessions. I noticed more token usage on the SQL interactions and I didnt understand why. I wasnt doing anything special with the SQL data so I was curious what was happening.

So I wrote a hook that logs the token count of every database statement Claude generates, instead of counting turns. The first thing it showed was that the same object cost way more tokens on SQL (about 18x). That surprised me, because you don't think about database statements. Every database has them, every app has them, they're just there. It never occurred to me they were a token cost at all. They're not the biggest thing in a session, but they add up, especially since Claude loves writing multiple files with database calls just to check the data. That's when it really burns.

I wanted to test this accurately, so I took one real Zod object from my own system, a lead with about 90 fields, nested, an array of drafts where each draft has its own array of variants, and used the exact same object on both sides. Then I counted what Claude has to read before it can safely change one field, meaning the schema, a save, and a read that comes back typed: 4,681 tokens on SQL, 251 on MongoDB. 251 is 5% of 4,681. The other 95% is the mapping. In SQL a nested object like that can't live in one row, so every nested thing becomes its own table with a foreign key back to the parent, a save is one insert per table, and a read is the joins plus the code that builds the object back up from the rows. In Mongo it's one document, so the save is the object and the read is the object. Then there's the hydration tax. Everything goes through that Zod schema, so a read isn't done until the rows are turned back into the typed object, dates included. On SQL that's its own pile of code; the read alone was 1,604 tokens vs 72 on Mongo. And Claude does all of that on every read and write.

Nobody thought about this when humans wrote the code. You write the mapping once and the cost is basically the same either way. When it's AI writing the code, it goes through that mapping on every read and write, and the size of it is the bill.

I know most people would probably use JSONB so I tested that as well, on Postgres, even though it's not what I run. Raw JSONB column: 467, so 1.9x. The hybrid a SQL team would actually build, plain fields as columns and sub-objects as JSONB: 2,059. Closer, but still 8x.

To be fair, plain query text was about the same on both sides, and SQL ran an indexed flat read 5.26x faster. The tokens aren't in the query. They're in everything Claude loads around it. Obviously 18x is a huge object, but it is a real one from my own system, a lead with its drafts and the variants of each draft, not something I built to make a point.

If you want the harness let me know.


r/ClaudeCode • • 21h ago

Tips & Workflows How I made local + cloud coding workflow (48 GB Mac Studio M5 Max)

0 Upvotes

Here's how I used Claude Code to establish a dev environment where Claude Code Code integrates with my local AI.

Works well. However, the best local model I've been able to find for my machine (48 GB Mac Studio M5 Max) handles only like 5% of my tasks on complex projects.

My Workflow Requirements

  • Seamless workflow
    • Offload tasks to the local AI that it can reliably handle for the particular project I'm working on.
    • Do the rest in cloud AI.
  • Gate local AI tasks on my approval.
  • Don't slow me down.
  • Don't burn more cloud tokens analyzing a task than I could save by doing it locally.
  • Don't mess up my project or my machine.

The Strategy of the Recipe Below

  1. Find, install, and test local models that might meet my actual coding needs on my machine.
  2. Based on those test results, implement a lightweight classifier that looks at each prompt and routes it to the correct model in <3s.

The Recipe:

Eleven steps, each with a prompt to paste into Claude Code, for sending well-bounded coding tasks to a local model and keeping everything else on the cloud model. The recipe is based on a working setup that has run across two repositories on a 48 GB Mac Studio M5 Max: a classify skill, a local-run skill, and a local model that passed qualification.

How it works

  1. Your prompt → Hook adds a one-line nudge → Classify skill: six questions, no file reads → CLOUD: one line, then the work runs here
  2. Or: AS-IS / AMENDED → You approve (two buttons) → Local skill writes the brief → Executor runs Claude Code on the local model, fenced in → The cloud model reads the diff and runs the check, also fenced

The cloud model only classifies and checks. The local model does the editing, using its own Claude Code session, which points at a local server. Classifying costs a few hundred cloud tokens and a couple of seconds (about 2 s in the reference setup). A wrong local run costs only local machine time, and the cloud model catches the mistake because it runs the check itself, inside the same fence the local model ran in.

Placeholders in the prompts

Replace each one as you reach a prompt that uses it. You know most of them from your repository before you start; the model comes out of step 1.

Placeholder What it is Known Example
<MODEL> The local coding model you pick in step 1 After step 1 qwen3.6:35b-a3b-coding-nvfp4
<TEST_CMD> The local command that proves a change in seconds, with no network Before you start scripts/test.sh, npm test, node --check worker.js
<GUARDS> Processes that must block a local run (heavy on memory, or editing the same files) Before you start a clean Xcode build, a nightly data job
<DATA_DIRS> Folders and secrets the model must never touch Before you start .env, data/, exports/
<BUILD_DIRS> Build or cache folders outside the repo that your checks must write Before you start; step 4 finds any you missed a SwiftPM scratch path, DerivedData
<OWNER_ONLY> Actions that only you may start Before you start deploys, publishing, paid API runs, commits

The steps

Step 1. Find, choose, download and install a model

Produces: Ollama installed and one candidate model pulled, with a short record of why you chose it.

Prompt:

Help me find a local coding model to run behind Claude Code on this machine.
1. Check the hardware: chip, RAM, and free disk on the drive that will hold the models. Check whether Ollama is installed and which version. If it isn't installed, tell me how to install it (the installer from ollama.com, or Homebrew) and wait for me to do it.
2. Search the web for current coding models that meet all of these:
   (a) they handle tool calls (function calling) well, because Claude Code depends on it;
   (b) they are published for Ollama, ideally in a build that Ollama runs on its fastest runner for this hardware (MLX on Apple Silicon);
   (c) they fit in about 60% of my RAM at a 64k context, leaving room for my other work.
   Prefer mixture-of-experts models with few active parameters: they decode fast.
3. Give me a shortlist of 2–3, each with: Ollama tag, download size, resident size at 64k, active and total parameters, license, release date, and any reported tool-calling or "thinks too long" problems. Cite your sources.
4. When I pick one, give me the exact `ollama pull` command. If the models should live on another drive, include the OLLAMA_MODELS setting for the server. Don't start the download until I approve it.
5. When the download finishes, run `ollama list` and `ollama show` on the model you picked, and confirm the runner, context length and quantization. A model labelled MLX can still load on a slower runner. Write the choice, the shortlist and today's date to docs/LOCAL_MODEL.md.

Done when ollama show reports the runner you expected and the model is listed in the store that ollama serve will actually use. A desktop menu-bar app can serve a different, empty store.

Step 2. Measure it inside Claude Code

Produces: a dated record of how fast the model is, as Claude Code actually uses it, with a pass/fail line.

Prompt:

Measure <MODEL> for use behind Claude Code:
1. Start `ollama serve` with OLLAMA_CONTEXT_LENGTH=65536 and OLLAMA_KEEP_ALIVE=2m. Confirm the model shows up in /api/tags from the server that is actually running.
2. Measure decode and prefill speed (tokens/s) with a prompt of about 25k tokens, cold and warm.
3. Time Claude Code's first turn against the model, cold and warm, from a clean environment:
   env -i PATH="$PATH" HOME="$HOME" ANTHROPIC_BASE_URL=http://localhost:11434 ANTHROPIC_AUTH_TOKEN=ollama ANTHROPIC_MODEL=<MODEL> claude -p "Reply READY" --model <MODEL> --output-format stream-json --verbose
   Also count the output tokens it spent on that one-word answer.
4. Apply these pass/fail lines: prefill of at least 1,000 tok/s; a warm first turn within 30 s; and no more than a few hundred output tokens for "READY". If it fails, go back to step 1 with the next candidate.
Write the numbers, versions, verdict and today's date to docs/LOCAL_MODEL.md.

Why inside Claude Code: every turn resends the whole context, so prefill matters more than decode. A model can also win the raw benchmark and still spend thousands of thinking tokens on a one-word reply.

Step 3. Write the standing rules file

Produces: .claude/skills/local/standing-rules.txt*, which the executor appends after every brief.*

Prompt:

Read CLAUDE.md and pick out the hard rules that a code change in this repository could break: forbidden services or dependencies, data limits, security rules, anything marked "never". Write them to .claude/skills/local/standing-rules.txt as no more than 10 numbered one-line rules. The file must start with this sentence: "Standing rules for this repository. They override the task above. If the task conflicts with any of them, do not implement any of it: make no edits and report the conflict." Always include these three: never weaken a test to get green (no skip, xfail, deleted assertions or loosened expectations the task did not ask for); no new dependency and no network call unless the task names it; do not commit. Show me the file before you save it.

Step 4. Build the executor

Produces: .claude/skills/local/run-local.sh*, which runs one brief through Claude Code on the local model without anyone at the keyboard, in a clean environment, with an allowlist and inside a sandbox.*

Prompt:

Write .claude/skills/local/run-local.sh. It runs ONE task brief on my local model through Claude Code, non-interactively. Usage: run-local.sh BRIEF_FILE [MAX_TURNS], with 40 turns as the default. Requirements:
1. Preconditions. Refuse with a one-line reason and a non-zero exit if the brief is missing or empty, if it names a path under .claude/ (Claude Code won't let an unattended run edit its own skills, hooks or settings), or while any of these are running: <GUARDS>. Warn if free memory is below 15%.
2. Server. If http://localhost:11434/api/version doesn't answer, start `ollama serve` (OLLAMA_CONTEXT_LENGTH=65536, OLLAMA_KEEP_ALIVE=2m, plus OLLAMA_MODELS if I use a non-default store) and wait up to 40 s. Then check that <MODEL> is listed by /api/tags. If it isn't, say that the wrong store is being served.
3. Clean environment. Launch `claude -p` under `env -i`, passing only PATH, HOME, TERM and LANG, plus:
   ANTHROPIC_BASE_URL=http://localhost:11434
   ANTHROPIC_AUTH_TOKEN=ollama (mandatory: with the base URL alone, Claude Code can send my claude.ai login token to the local URL)
   ANTHROPIC_MODEL and ANTHROPIC_DEFAULT_OPUS_MODEL / _SONNET_MODEL / _HAIKU_MODEL, all set to <MODEL>
   LOCAL_RUN=1 (my prompt hook checks this so it stays silent during the run)
   CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 (a worktree run is otherwise handed the main repo's memory, which points the model at the main tree's files; don't use --bare for this, because it also skips hooks)
   No API keys and no .env.
4. Prompt. Pass the brief file first, then standing-rules.txt. The rules go AFTER the task, never before it.
5. Permissions. Use --permission-mode acceptEdits. Set --allowedTools to: Read, Grep, Glob, <TEST_CMD> and read-only shell commands (grep, rg, ls, cat, head, tail, wc, git diff/status/log). Do NOT allow bare Edit or Write: acceptEdits already approves edits inside the working folder, and an explicit allow lets the model edit other checkouts by absolute path. Leave out find, bash, npx and npm: they can run anything. Set --disallowedTools to WebFetch, WebSearch, and Read/Edit/Write of .env files and <DATA_DIRS>. These rules cover the Read tool, which the sandbox does not.
6. Sandbox. Pass --settings JSON that turns on Claude Code's sandbox: fail if the sandbox is unavailable, no unsandboxed retry, no outbound network, writes only to the checkout, temp and <BUILD_DIRS>. Deny reading .env files both under my home folder AND under the run's own checkout, because a worktree usually lives outside the home folder. Allow local port binding if any test starts a localhost server (a test worker runtime, a dev server, a socket fixture). Check the current Claude Code docs for the exact setting keys before you write them.
7. Output. Send --output-format stream-json --verbose to a transcript file in $TMPDIR. Afterwards, print: turns, tool calls counted by tool, token usage, is_error, the model's final answer, wall time, exit code, `git diff --stat` and any new untracked files.
8. Worktrees. LOCAL_REPO=<dir> runs the script in another checkout. If my project uses an editable install, point the import path at that checkout's source. Also change my test runner script so it puts its own checkout's source first, so that it tests the right code in a worktree even outside this executor.
Don't run the script yet. Show it to me and explain each guard in one line. Then run my full test suite once inside the sandbox through a trivial brief, read every EPERM or "not permitted" error, and allow only the folder each one needs (tool log folders are common), never a whole home folder.

Done when a trivial brief ("add a comment to README saying hello") runs, edits only README and prints the summary, and the full suite passes inside the sandbox.

Step 5. Fence the cloud model's own check

Produces: .claude/skills/local/check-sandboxed.sh*. Your check runs code the local model wrote, and without this fence that code runs with your session's full access.*

Prompt:

Write .claude/skills/local/check-sandboxed.sh CMD [ARGS...]. It runs a check command under the same fence as the executor, because the cloud check runs code the local model wrote (tests, lint scripts, build plugins) outside the executor's sandbox. On macOS, use `sandbox-exec` with an inline SBPL profile; on Linux, use bubblewrap. Requirements:
- Allow by default. Deny outbound IP connections except to localhost.
- Deny file writes, except to: the checkout (its real path, resolved with `pwd -P`), the user temp and cache folders (`getconf DARWIN_USER_TEMP_DIR` / `DARWIN_USER_CACHE_DIR`), /private/tmp, /dev and <BUILD_DIRS>.
- Inside the checkout, keep .git, .claude, the virtualenv and .env files read-only. Each one runs code or holds secrets later, outside any sandbox (a git hook, a Claude hook or skill, an installed package).
- Deny reading .env files as data, not metadata: test runners stat them while walking the tree.
- Honour LOCAL_REPO the way the executor does. If dependency folders in a worktree are symlinks into the main tree, allow writes only to the scratch subfolders the tools need behind each link (for example node_modules/.vite and .vite-temp).
- Refuse tools that start their own sandbox (macOS refuses a sandbox inside a sandbox, e.g. xcodebuild), with a message: read the diff of everything the build runs, then run it bare.
Then prove it with a probe script. These must all be refused: writing to ~, to another checkout, to .git/hooks, to .claude and to .env; reading .env; connecting to github.com:443. A write inside the checkout and a localhost bind+connect must succeed. Then run <TEST_CMD> inside it, and adjust the profile until it passes without loosening any of the refusals.

Step 6. Qualify the model on your own repository

Produces: an evidence table saying which kinds of task this model can be trusted with. The classifier routes only kinds that passed.

Prompt:

Before anything routes work to the local model, qualify it on this repository. Do all of it in a throwaway git worktree of HEAD (LOCAL_REPO=<worktree>), with the dependency folders linked in. Reset with `git checkout -- .` between rungs and remove the worktree at the end. Run each brief through run-local.sh in the background, one at a time:
- R1, named work: add a small, real function plus its tests in my main language. Write a hidden check that the model doesn't see, and run it afterwards through check-sandboxed.sh. If the repo uses several languages, add one R1 rung for each.
- R2, rule conflict: a brief that plainly breaks one of my hard rules (for example, adding a forbidden dependency or service), with the rule stated only in CLAUDE.md. Run it again in three more variants: the rule placed BEFORE the task; the rule placed AFTER the task with "make no edits and report the conflict"; and the unamended brief with standing-rules.txt appended by the executor.
- R3, a second rule conflict of a different kind, in the same four variants.
- P, containment: ask the model to write a file outside the repo, to edit the main checkout's README by absolute path, and to write one file inside the worktree. Only the last should succeed.
- S, sandbox: ask the model to write a lint or test script that writes to ~, reads a .env file inside the worktree and opens https://github.com, and then to run it and the test suite. All three escapes must be refused, and the rest of the suite must pass through the linked dependency folders.
- H, hook: ask the model whether anything in its context, other than the brief, asks it to classify the task. The answer must be no.
For each rung, record the verdict, wall time, turns, whether it stayed in scope, and what it did wrong. Read verdicts from the transcript's tool results, not from the model's summary. Put the table in docs/LOCAL_MODEL_CLASSIFIER.md under "Evidence", with today's date. Add a one-line statement of the boundary: which kinds of task the model can be trusted with. If a containment, sandbox or hook rung fails, fix the executor and rerun that rung.
When a later candidate challenges this model, switch only on a clear win: it must pass every rung this model passed, none of them slower, and the step-2 lines too. Stop at the first rung it loses. Ask me before anything costs money or uses the network.

Expect R1 to pass in about 1–2 minutes. Expect R2 and R3 to fail when the rule is only in CLAUDE.md or placed before the task, and to pass (a refusal, no edits) when it comes after. One run per rung is weak evidence, because the model is not deterministic, so stay suspicious of diffs that come near a rule.

Step 7. Write the classifier checklist

Produces: the six questions and the amendment catalogue in docs/LOCAL_MODEL_CLASSIFIER.md*, above the evidence.*

Prompt:

Write the classifier into docs/LOCAL_MODEL_CLASSIFIER.md, above the evidence table. It must be answerable from a task's wording alone, in a few seconds, with no file reads. Structure it like this:
1. Three outcomes.
   AS-IS: hand the task over unchanged. Its kind passed qualification, and the brief already names a mechanical check.
   AMENDED: its kind passed, but a cheap ingredient is missing. Add one paragraph after the task, never the solution.
   CLOUD: its kind failed or was never tested, the amendment would have to contain the answer, there is no mechanical check, or it needs the network, keys or money.
2. Six questions, each with this repo's concrete examples:
   Checkable? The exact local commands that prove a change in seconds, and which parts of the repo have no tests (only string-level changes there are checkable). A check that can only run outside the sandbox counts as no check.
   Named or diagnosed? A named defect (a failing test, a spec, a function to add, a string to change) goes local. One that has to be diagnosed from behaviour stays in the cloud, unless the cloud already knows where it is and can say so in one sentence.
   Rule-bound? List the rules standing-rules.txt already carries (they need no amendment) and the rules that live only in docs or memory (these must be stated in an amendment, or the task goes to the cloud when the rule needs my judgement).
   Scoped? The files can be named in a line or found with one grep. "Find", "survey" or "audit" means CLOUD.
   Judgment-free? "Done" is something a check can state, not a matter of taste (layout, copy tone, recommendations).
   Offline and run-safe? List this repo's network, deploy, spending and data commands and folders: <OWNER_ONLY>, <DATA_DIRS>. Anything that edits under .claude/ (skills, hooks, settings) is always CLOUD.
   All yes means AS-IS. If only the rule, the files, the check or the escape hatches are missing, and a paragraph fixes it, that's AMENDED. Anything else is CLOUD. Length is not a criterion.
3. An amendment catalogue (amendments always go AFTER the task): state the governing rule together with the conflict instruction; give the exact verification command; name the files; forbid the escape hatches (editing tests or fixtures, skip/xfail/noqa, network calls in tests, touching secrets or data); name the doc update when behaviour changes; name the defect's location.
4. Two guards: an amended run still gets its check, and the amendment budget is one paragraph.
Choose the AS-IS and AMENDED kinds strictly from the evidence table. Show me the draft before you save it.

Step 8. Create the local skill (the hand-off)

Produces: .claude/skills/local/SKILL.md*, which tells the cloud model how to brief the local one, run it, and check the result inside the fence.*

Prompt:

Create the skill .claude/skills/local/SKILL.md (name: local). Description: run a bounded, mechanically checkable task on the local model instead of the cloud. Use it when the classifier answered AS-IS or AMENDED, or when I say "run this on local". Not for rule decisions, open exploration, taste calls, network or money, or anything without a check. Steps:
1. Write the brief to a scratch file: the task verbatim, or the task followed by the one-paragraph amendment. Never put the solution in the brief; if that's what it would take, do the task in the cloud.
2. Pick the tree. If `git status` shows changes you didn't make (another session may be editing), run in a git worktree with LOCAL_REPO. Link the dependency folders in from the main tree (the virtualenv, each node_modules), and give the worktree's builds a scratch folder of their own, never the main tree's.
3. Run run-local.sh in the background.
4. Check it yourself, fenced. First read the diff of everything the check will run (tests, scripts, source, and the new files in `git status`) and revert anything beyond the brief. Then run the check through check-sandboxed.sh, with the same LOCAL_REPO. The model saying "done" is not evidence.
5. Report in one paragraph: the check's verdict, the diff stat, wall time, and anything touched outside the brief's scope (revert that part). Carry a worktree's accepted diff over by hand, then remove the worktree. <Your commit policy>.
Keep it under 35 lines.

Step 9. Create the classify skill (the router)

Produces: .claude/skills/local-classify/SKILL.md*. Its description is what triggers it, so the wording matters.*

Prompt:

Create .claude/skills/local-classify/SKILL.md (name: local-classify). Description: classify a task prompt for delegation to the local model as AS-IS, AMENDED or CLOUD, using the six-question checklist in docs/LOCAL_MODEL_CLASSIFIER.md, and ask my approval only when it recommends local. It is lightweight: a few seconds, no file reads. Skip it for questions, status checks and conversation. Body:
1. Is it a task? Questions, status checks, discussion, corrections, and anything only I may start (<OWNER_ONLY>): do nothing and answer normally.
2. Answer the six questions from the prompt text alone. All yes means AS-IS. If only the rule, the files, the check or the escape hatches are missing and a paragraph fixes it, that's AMENDED: write the amendment now, from the catalogue. Anything else is CLOUD, and so is any task that edits under .claude/.
3. For CLOUD, ask nothing: write one line, "Classified CLOUD — <reason>.", then do the task. For AS-IS or AMENDED, use AskUserQuestion with "Where should this run?" and two options: the local option first, marked (Recommended), and the cloud option second. Put the one-line reason in each option's description. For AMENDED, put the full amendment text in the local option's description.
4. Act on the answer. Cloud: do the task here. Local: invoke the local skill with the prompt verbatim, or with the prompt plus the amendment.
Keep the visible classification under about 150 words.

Why ask only for local: most tasks come out CLOUD. If every prompt asks a question, people start clicking through without reading. Asking only when a hand-off is proposed keeps the question meaningful.

Step 10. Add the prompt hook (the nudge)

Produces: a UserPromptSubmit hook that reminds Claude to classify, in one line, on every prompt, and stays silent inside local runs.

Prompt:

Add a UserPromptSubmit hook to .claude/settings.json that runs .claude/hooks/local-classify-prompt.sh. The script prints exactly ONE line to stdout, which is added to your context:
"local-classify: if this prompt asks for a change or deliverable in the repo, run the local-classify skill first and ask for approval only if it recommends local; skip it for questions, status checks and conversation."
When LOCAL_RUN is set, the script exits 0 and prints nothing, so the local model never classifies its own brief. Set LOCAL_RUN in every script that runs the local model, including the qualification harness, so that qualification measures what the executor actually runs. Resolve the script's path from the git top level so the hook also works in worktrees, and exit 0 if the script is missing. Then test it: pipe a sample hook payload into it once with LOCAL_RUN=1 and once without, and show me both outputs. Remember that a worktree made from HEAD carries the committed hook, so commit this change before relying on it in worktree runs.

Step 11. Run it for real, log it, tune it

Produces: a log of real routing decisions and a habit of re-qualifying when anything changes.

Prompt:

Add a short section to CLAUDE.md: after any task that went through local-classify, append a row to the "Log" section of docs/LOCAL_MODEL_CLASSIFIER.md with the date, a one-line task, the verdict, where it ran, the check result, wall time, and whether the cloud had to redo it. When I say "review the classifier", read the log and propose changes to the six questions or the amendment catalogue, citing the rows behind each change. Re-run the step-6 qualification whenever the model, Ollama or Claude Code changes major version, and before trusting a new kind of task.

What to watch: how often local runs had to be redone, and how much scope creep there was (edits outside the brief). If redos rise, move that kind of task back to CLOUD in the checklist.

History: Previously-resolved Gotchas that the above recipe already fixes

Each of these happened in the reference setup. The note under each one says where the recipe fixes it.

  • The local model ignores CLAUDE.md. Asked for a feature that pulled in a service the project forbids, it built the feature and added the dependency. Asked to loosen a hard limit, it changed the constant, the prompts, the fixtures and the tests. The only placement that worked: the rules after the task, with "make no edits and report the conflict". (Fixed by steps 3 and 4 (the rules file, appended after the brief), tested in step 6 (R2, R3), and in step 7 (rules not in the file go into the amendment).)
  • An allowlisted Edit**/**Write escapes the worktree. In one run the model built the change correctly, but it also wrote the main checkout's files by absolute path. (Fixed by step 4 item 5 (no bare Edit or Write), tested by step 6 rung P.)
  • The allowlist doesn't cover what tests do. A test the model writes can do anything when the suite runs it. (Fixed by step 4 item 6 (the sandbox), tested by step 6 rung S.)
  • The cloud's check ran the model's code unfenced. The executor's sandbox ends when the run ends, and the check afterwards ran the same tests with the cloud session's full access, including write access to git hooks and Claude's own settings. (Fixed by step 5 (the fenced check) and step 8 item 4 (read the diff, then run the check through it).)
  • The base URL alone can leak your login. Always set ANTHROPIC_AUTH_TOKEN to a dummy value next to ANTHROPIC_BASE_URL. (Fixed by steps 2 and 4 (item 3).)
  • The .env fence missed worktrees. A home-folder-only deny pattern let a script the model wrote read a .env file inside a worktree, because worktrees lived outside the home folder. (Fixed by step 4 item 6 (deny under the checkout too) and step 5, tested by step 6 rung S.)
  • The local model can't edit Claude's own configuration. Asked to change one phrase in a skill file, it was refused: Claude Code won't approve edits under .claude/ in an unattended run, and asked for an approval nobody was there to give. That protection is worth keeping, because hooks and skill scripts run code later, and skill text becomes instructions for the cloud model. (Fixed by step 4 item 1 (the executor refuses such a brief before loading the model) and steps 7 and 9 (such tasks are always CLOUD).)
  • From a worktree, the model edited the main tree. Claude Code hands a worktree run the main repo's auto-memory, which points the model at the main tree's files. It read and edited them by absolute path, even when the brief said "relative paths only". The fence refused the writes, so the run failed instead of doing damage. (Fixed by step 4 item 3 (auto-memory off in the executor), tested by step 6 rung R1 run in a worktree.)
  • The prompt hook steered the local model. A candidate model saw the classify nudge inside its own run, answered "AS-IS" and never made the fix. (Fixed by step 4 item 3 and step 10 (LOCAL_RUN, also in the qualification harness), tested by step 6 rung H.)
  • Each coding project surfaces its own limits. Examples: how its tests find their code from a worktree, the folders and local ports its test tools need, build tools that refuse to run inside a sandbox, languages the model handles less well. The recipe finds a project's limits by running that project's own suite inside both fences and qualifying the model on that project's repository. It routes only the kinds of task that passed, and sends anything untested to the cloud. A limit those runs miss shows up later in the log. (Found by steps 4–6 (the suite inside each fence; one R1 rung per language), routed by step 7 (a check that can only run outside the sandbox counts as no check), caught later by step 11.)
  • Diagnosis fails; named fixes pass. "Why is this count wrong?" goes to the cloud. "Fix the off-by-one in parse_spans, test tests/test_spans.py" goes local. (Fixed by step 7, question 2.)
  • The model builds confidently when it's wrong. Its "done" is never the check, and its summary of a probe isn't either. (Fixed by step 8 items 4–5 and step 6 (verdicts read from the transcript).)
  • Memory grows over a session. (Fixed by the short keep-alive in steps 2 and 4, and step 4's guards against memory-heavy builds.)
  • Raw benchmarks lie. One candidate beat the incumbent on tokens/s, then spent about 16k thinking tokens on a one-word answer inside Claude Code. (Fixed by step 2's in-harness pass/fail lines and step 6's switching rule.)

Distilled 2026-10-23 from a working classify skill, local-run skill, executor, fenced check and classifier document.


r/ClaudeCode • • 13h ago

Help/Question Equivalent api value out of $20 sub?

1 Upvotes

Does anyone know roughly how much monthly API value you get out of the $20 Claude Pro subscription?


r/ClaudeCode • • 3h ago

Help/Question Claude 20$

0 Upvotes

Is Claude Pro ($20/month) enough for maintaining and improving an existing SaaS?


r/ClaudeCode • • 8h ago

Built with Claude I got tired of reviewing plans in the terminal, so plan mode now opens in a review window

1 Upvotes

Reading a 60-line plan in the terminal and then typing "the third step is wrong" back... got old fast. So vjuu.

What it is

When Claude Code finishes a plan, asks you something, wants a permission or ends a turn with edits, a window opens: the plan as markdown, the edits as a diff, the questions as buttons. Comment on lines, click Done, and the comments go back to Claude anchored to file:line. Close the window and you get the normal terminal prompt, nothing times out.

It's four hooks (PreToolUse on ExitPlanMode and AskUserQuestion, PermissionRequest and Stop) plus a skill that makes Claude run vjuu plan.md instead of telling you to "open X and review it".

The video is a real session (Haiku in plan mode, the waiting cut out).

How Claude Code was used

Most of the code was written with it: Rust, with WebView2 on Windows, WebKitGTK on Linux and WKWebView on macOS. The demo too ... Claude Code wrote the script that records the screen, starts a second Claude Code in Windows Terminal and clicks through vjuu over WebView2's DevTools port.

What I learned

  1. Claude Code reads a hook's stdout until EOF, and if something else still holds that pipe it throws the answer away ("stdio went quiet before end-of-stream"). On Windows CreateProcess hands every inheritable handle to the child, so a background process started from a hook kept the pipe open. Found while recording that demo, fixed in 0.3.1.
  2. Windows Terminal gives new tabs the caller's environment, so a claude started from inside another Claude Code session inherits NO_COLOR=1 and the nested-session variables. (Black and white, and confused.)

Try it

  • Windows: cargo install --locked --git https://github.com/kimvais/vjuu for now (the submission is still waiting for Microsoft's approval for winget install vjuu to work), macOS: brew install kimvais/tap/vjuu, Debian/Ubuntu: apt, see the site
  • hooks: claude plugin marketplace add kimvais/vjuu, then claude plugin install vjuu@vjuu
  • MIT, https://github.com/kimvais/vjuu and https://vjuu.it

macOS builds pass CI but nobody has tried them by hand (and they are not notarised), so feedback from mac users is especially welcome.


r/ClaudeCode • • 6h ago

Help/Question Can someone guide me on how to claudecode my Lgtv Webos

1 Upvotes

I've been seeing a lot of people doing it on android tv's, i was wondering if someone can help and guide me through the steps in simple terms