10 suggestions for getting higher R code out of your AI coding agent

Code assessment abilities can be found from many sources. For instance, Sentry has a code assessment talent in its repository. Aimed particularly at its undertaking’s wants, it may be a helpful pattern for comparable abilities. And superpowers is a well-liked set of general-purpose programming abilities that’s billed as “an entire software program improvement methodology in your coding brokers, constructed on high of a set of composable abilities and a few preliminary directions that be sure your agent makes use of them.” I don’t use superpowers, however plenty of different individuals clearly do given its greater than 227,000 GitHub stars and 20,000 forks.

One other tip: A number of consultants recommend utilizing a distinct LLM — possibly even from a distinct supplier — to conduct a code assessment, since every mannequin has its personal strengths and weaknesses.

Don’t neglect common prompting good habits

No matter programming language you’re utilizing, being clear will enhance your outputs. Hold your requests focused, and don’t anticipate the LLM to learn your thoughts.

“Codex handles complicated work higher whenever you break it into smaller, targeted steps,” OpenAI says in its developer docs. “Smaller duties are simpler for Codex to check and so that you can assessment. Should you’re undecided learn how to cut up a job up, ask Codex to suggest a plan.”

“Take time to make your prompts as related as doable, simply as you’ll when serving to a brand new teammate scope a job,” Google advises in its 5 Greatest Practices for Utilizing AI Coding Assistants. “Think about what particulars you must share for an individual to succeed, and supply all these particulars to your AI instrument.”

And, don’t load up your context window to the LLM’s revealed restrict. Efficiency typically degrades as you get near the utmost token restrict.

Benefit from open LLMs, significantly when you have price range and token limits

Open-weight fashions — particularly ones sufficiently small to run on a desktop laptop — might by no means rival frontier LLMs like Claude, GPT, or Gemini. However for lots of R coding, they don’t must.

To see how nicely an LLM can write R code, it ought to have the identical form of harness that Claude Code, Codex, or Posit Assistant offers bigger LLMs. “The harness is the product,” argues Mallory Mejias at Sidecar, an AI schooling firm. “The mannequin is the engine inside it — essential, however more and more interchangeable.” I wouldn’t go that far, since I nonetheless discover the LLM to be a crucial piece of this equation, and fashions differ. However the identical LLM will carry out otherwise relying on the instruments and context it has.

Posit just lately added Google’s open-source Gemma 4 26B to Assistant’s current choices of bigger, closed-source LLMs. “Up till this level, fashions of this dimension — sufficiently small to run comfortably on high-end shopper laptops — have been on our radar however not but succesful sufficient to drive an agent harness like Posit Assistant,” Posit senior software program engineer Simon Sofa wrote on the Posit weblog. “This has modified in the previous couple of months with releases like Gemma 4.” Nonetheless, to make use of it in Posit Assistant in RStudio, you continue to must run it via a Posit AI subscription, not regionally. It makes use of 1/10 the price range that the identical session with Claude Sonnet would devour.

A number of initiatives can use Claude Code to run native LLMs. Ollama, open-source software program for working LLMs regionally, does this with the terminal command ollama launch claude --model , corresponding to:

ollama launch claude --model gemma4:26b

The makers of Unsloth, an open-source framework for working and coaching fashions, say working native LLMs inside Claude Code will be very gradual as a consequence of a cache invalidation challenge. They are saying this may be mounted by including "CLAUDE_CODE_ATTRIBUTION_HEADER" : "0" to ~/.claude/settings.json underneath “env”.

Unsloth may also use Claude Code to run native fashions, but it surely’s considerably extra concerned to put in and arrange than Ollama. See this Unsloth tutorial.

Open-source coding agent Open Code runs LLMs from OpenAI, Anthropic, Google, Kimi, Alibaba’s Qwen, and others. I haven’t warmed as much as it but in contrast with commercially backed CLI instruments I’ve tried, but it surely has 174,000 GitHub stars so clearly plenty of followers.

AI advisor Thomas Wiegold, who switched from Claude to Open Code, stated “OpenCode covers every little thing I want for my every day workflow. It’s quick, the supplier flexibility is genuinely helpful moderately than theoretical, and the TUI is best for prolonged periods…. That stated, I’m not going to fake it’s all clean crusing.” He famous some stability points and a distant code execution vulnerability earlier this 12 months.

Wiegold’s suggestion? “Set up each. Attempt others. Keep versatile.”

In abstract

Massive language fashions stay imperfect and unpredictable instruments, however they’re bettering quickly — as are the harnesses round them. Even frontier LLMs in business coding brokers can ignore directions at instances and in any other case behave in unpleasantly stunning methods. Nonetheless, you’ll vastly enhance your probabilities of producing high quality code if you happen to use coding brokers, take time to set them up with high quality directions, and keep in mind good prompting methods. Good luck!

Coding agent information

Claude Code – Anthropic’s coding agent is accessible within the terminal and as an IDE extension, a desktop app, cell apps, Slack app, and a cloud model that may work instantly in your repos on GitHub. Arguably the primary breakthrough coding agent, it now contains a sublime remote-control possibility the place you can begin a session in your desktop after which proceed it on a cellphone or pill. Whereas designed for Claude LLMs, you should use it to run native LLMs through instruments like Ollama or Unsloth Studio. When utilizing Claude fashions, it tends to supply much less utilization than different distributors’ choices. Anthropic has posted the terminal model’s code on GitHub, with utilization ruled by Anthropic’s business phrases of service. You should use Claude Code through API pay per use or as a part of a Claude subscription.

Codex – OpenAI’s reply to Claude Code is accessible through terminal, app, IDE extension, or cloud, with integrations for GitHub, Slack, and Linear. The CLI instrument is open supply underneath an Apache license, out there on GitHub, and works through API pay per use or as a part of a ChatGPT subscription.

Posit Assistant – The Posit (previously RStudio) coding agent is designed for knowledge work in R and Python, though Posit senior software program engineer Simon Sofa instructed me it might do high-quality for programming work for different makes use of and in different languages. It’s out there for the RStudio IDE (through a Posit AI subscription in RStudio), Positron IDE, and as a stand-alone CLI terminal app, though the CLI instrument at the moment doesn’t really feel as full-featured because the IDE integrations (which will change). As of this writing, you too can use API keys from Anthropic, OpenAI, and Snowflake Cortex and a GitHub Copilot account in Positron. Posit Assistant is being up to date fairly frequenty, Sofa instructed me. Should you examined it a month or two in the past, it has extra capabilities now.

Antigravity CLI – Google’s terminal-based instrument shall be changing the Gemini CLI for unpaid and Google One customers this month. There’s additionally an Antigravity IDE, SDK, and platform for orchestrating a number of brokers. One benefit of Antigravity: Google presents a free plan with entry to Gemini 3.5 Flash, Gemini 3.1 Professional, Gemini 3 Flash, Claude Sonnet 4.6, Claude Opus 4.6, and gpt-oss-120b, and what it describes as “beneficiant” however undefined weekly price limits primarily based on “the diploma now we have capability.”

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles