Jump to content

AI LLM for Coding: Difference between revisions

From Torben's Wiki
No edit summary
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Opencode==
 
==Tips==
* E2E tests (e.g. Cypress) are very important
* Use tools for code formatting, linting, type-hints
* Configure these tools to produce minimum output to reduce token consumption. e.g. for
** Prettier: --log-level silent
** Cypress: cypress run --e2e --quiet
* For Refactoring/renaming: better do it manually, via VSCode, that is a lot faster
 
===Caveman speech===
Accoring to [https://medium.com/@KubaGuzik/i-benchmarked-the-viral-caveman-prompt-to-save-llm-tokens-then-my-6-line-version-beat-it-d8e565f95e15]
Caveman speech can be can be reduced to 6 hard coded lines in (global) AGENTS.md:
Respond like smart caveman. Cut all filler, keep technical substance.
- Drop articles (a, an, the), filler (just, really, basically, actually).
- Drop pleasantries (sure, certainly, happy to).
- No hedging. Fragments fine. Short synonyms.
- Technical terms stay exact. Code blocks unchanged.
- Pattern: [thing] [action] [reason]. [next step].
 
Original Repo: [https://github.com/JuliusBrussee/caveman]
npx skills add JuliusBrussee/caveman -a github-copilot
It has an option to install to local home dir instead of to project repo.
 
===Ponytail, lazy senior dev mode===
add contents of [https://github.com/DietrichGebert/ponytail/blob/main/.agents/rules/ponytail.md] to (global) AGENTS.md
 
===llmfit: Right-sizes LLM models to your system's RAM, CPU, and GPU===
https://www.llmfit.org offers a tool that suggests local LLMs that run on your hardware.
 
===Context7===
https://context7.com offers an MCP server of latest spec to many languages, enabling the LLM to support latest versions and best practice.
npx ctx7 setup
In prompt write:
use context7. do xxx
 
===RTK - Rust Token Killer===
https://www.rtk-ai.app reduces shell command output
brew install rtk
brew upgrade rtk
rtk init --global
rtk init --global --opencode
rtk init --global --gemini
 
===Codeburn===
https://github.com/getagentseal/codeburn
npm install -g codeburn
# or
brew install codeburn
 
==Coding Agents==
 
===OpenCode===
https://opencode.ai
https://opencode.ai
  brew install anomalyco/tap/opencode
  brew install anomalyco/tap/opencode
Line 5: Line 56:
  # add context7 MCP
  # add context7 MCP
  npx ctx7 setup --opencode
  npx ctx7 setup --opencode
 
  # initialize Opencode and create/update/improve/compress AGENTS.md file
  # initialize Opencode and create/update/improve/compress AGENTS.md file
/init
  /init
    
    
  # update
  # update
  brew update
  brew update
  brew upgrade anomalyco/tap/opencode
  brew upgrade anomalyco/tap/opencode
# update models
opencode models --refresh
Config ~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "share": "disabled",
  "formatter": true
}


For saving of tokes, add Caveman speech to AGENTS.md
Addons
# add Caveman and Ponytail instructions to global
# ~/.config/opencode/AGENTS.md
# see below
# add Ruff Token Killer
rtk init --global --opencode


==Mistral Devstral==
===Mistral Devstral===
Obtain API key from [https://console.mistral.ai/codestral/cli]
Obtain API key from [https://console.mistral.ai/codestral/cli]


# install
  uv tool install mistral-vibe
  uv tool install mistral-vibe
# setup --> choose automatic
vibe --setup
  # run via
  # run via
  vibe
  vibe


==Claude==
to set Cavemen style global, create ~/.vibe/AGENTS.md
===Web===
 
https://claude.ai <br>
===Claude===
pro: Daily reset free quota<br>
====Web====
cons: need to manually upload single files
Website: [https://claude.ai]
* Pros: Daily reset free quota
* Cons: Need to manually upload single files


===Console===
====Claude Console====
Claude Console via API and VISA Pre-Paid: https://console.anthropic.com <br>
Claude Console via API and VISA Pre-Paid: [https://console.anthropic.com]
pro: fully integrated in code base<br>
* Pros: Fully integrated in codebase
cons: costs money, 5€ are easily spend
* Cons: Costs money (e.g., 5€ are easily spent)
  npm install -g @anthropic-ai/claude-code
  npm install -g @anthropic-ai/claude-code
  cd myProject
  cd myProject
  claude
  claude
==Google Gemini==
Uninstall
pros: free to use with google account
npm uninstall -g @anthropic-ai/claude-code
create your API key at https://aistudio.google.com/app/api-keys
 
===GitHub Copilot===
global config file:
.copilot\copilot-instructions.md
 
===Google Gemini===
* Pros: Free to use with Google account
Create your API key at [https://aistudio.google.com/app/api-keys]


Install
Install
Line 44: Line 123:
  # or just run
  # or just run
  npx https://github.com/google-gemini/gemini-cli
  npx https://github.com/google-gemini/gemini-cli
usage
Uninstall
npm uninstall -g @google/gemini-cli
 
Usage
  cd /tmp
  cd /tmp
  export GEMINI_API_KEY="xxx"
  export GEMINI_API_KEY="xxx"
Line 51: Line 133:
  gemini
  gemini


to switch model from pro to flash:
To switch model from pro to flash:
  export GEMINI_MODEL="gemini-2.5-flash"
  export GEMINI_MODEL="gemini-2.5-flash"


secret alternative: .env file
Secret alternative: .env file
  GEMINI_API_KEY=xxx
  GEMINI_API_KEY=xxx


==Google Antigravity==
===Google Antigravity===
https://antigravity.google/download
https://antigravity.google/download
==Tips==
* E2E tests (e.g. Cypress) are very important
* Use tools for code formatting, linting, type-hints
* Configure these tools to produce minimum output to reduce token consumption. e.g. for
** Prettier:  --log-level silent
** Cypress: cypress run --e2e --quiet
* For Refactoring/renaming: better do it manually, via vscode, that is a lot faster
===Cavemen style===
https://github.com/JuliusBrussee/caveman
npx skills add JuliusBrussee/caveman -a github-copilot
It has an option to install to local home dir instead of to project repo.
According to https://medium.com/@KubaGuzik/i-benchmarked-the-viral-caveman-prompt-to-save-llm-tokens-then-my-6-line-version-beat-it-d8e565f95e15
It can be replaced by 6 hard coded lines in AGENTS.md:
Respond like smart caveman. Cut all filler, keep technical substance.
- Drop articles (a, an, the), filler (just, really, basically, actually).
- Drop pleasantries (sure, certainly, happy to).
- No hedging. Fragments fine. Short synonyms.
- Technical terms stay exact. Code blocks unchanged.
- Pattern: [thing] [action] [reason]. [next step].
===Context7===
https://context7.com offers an MCP server of latest spec to many languages, enabling the LLM to support latest versions and best practice.
npx ctx7 setup
In prompt write
use context7. do xxx

Latest revision as of 23:44, 2 July 2026

Tips

  • E2E tests (e.g. Cypress) are very important
  • Use tools for code formatting, linting, type-hints
  • Configure these tools to produce minimum output to reduce token consumption. e.g. for
    • Prettier: --log-level silent
    • Cypress: cypress run --e2e --quiet
  • For Refactoring/renaming: better do it manually, via VSCode, that is a lot faster

Caveman speech

Accoring to [1] Caveman speech can be can be reduced to 6 hard coded lines in (global) AGENTS.md:

Respond like smart caveman. Cut all filler, keep technical substance.
- Drop articles (a, an, the), filler (just, really, basically, actually).
- Drop pleasantries (sure, certainly, happy to).
- No hedging. Fragments fine. Short synonyms.
- Technical terms stay exact. Code blocks unchanged.
- Pattern: [thing] [action] [reason]. [next step].

Original Repo: [2]

npx skills add JuliusBrussee/caveman -a github-copilot

It has an option to install to local home dir instead of to project repo.

Ponytail, lazy senior dev mode

add contents of [3] to (global) AGENTS.md

llmfit: Right-sizes LLM models to your system's RAM, CPU, and GPU

https://www.llmfit.org offers a tool that suggests local LLMs that run on your hardware.

Context7

https://context7.com offers an MCP server of latest spec to many languages, enabling the LLM to support latest versions and best practice.

npx ctx7 setup

In prompt write:

use context7. do xxx

RTK - Rust Token Killer

https://www.rtk-ai.app reduces shell command output

brew install rtk
brew upgrade rtk
rtk init --global
rtk init --global --opencode
rtk init --global --gemini

Codeburn

https://github.com/getagentseal/codeburn
npm install -g codeburn
# or
brew install codeburn

Coding Agents

OpenCode

https://opencode.ai

brew install anomalyco/tap/opencode

# add context7 MCP
npx ctx7 setup --opencode
 
# initialize Opencode and create/update/improve/compress AGENTS.md file
 /init
 
# update
brew update
brew upgrade anomalyco/tap/opencode

# update models
opencode models --refresh

Config ~/.config/opencode/opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "share": "disabled",
  "formatter": true
}

Addons

# add Caveman and Ponytail instructions to global
# ~/.config/opencode/AGENTS.md
# see below

# add Ruff Token Killer
rtk init --global --opencode

Mistral Devstral

Obtain API key from [4]

# install
uv tool install mistral-vibe
# setup --> choose automatic
vibe --setup
# run via
vibe

to set Cavemen style global, create ~/.vibe/AGENTS.md

Claude

Web

Website: [5]

  • Pros: Daily reset free quota
  • Cons: Need to manually upload single files

Claude Console

Claude Console via API and VISA Pre-Paid: [6]

  • Pros: Fully integrated in codebase
  • Cons: Costs money (e.g., 5€ are easily spent)
npm install -g @anthropic-ai/claude-code
cd myProject
claude

Uninstall

npm uninstall -g @anthropic-ai/claude-code

GitHub Copilot

global config file:

.copilot\copilot-instructions.md

Google Gemini

  • Pros: Free to use with Google account

Create your API key at [7]

Install

npm install -g @google/gemini-cli@latest
gemini
# or just run
npx https://github.com/google-gemini/gemini-cli

Uninstall

npm uninstall -g @google/gemini-cli

Usage

cd /tmp
export GEMINI_API_KEY="xxx"
git clone https://github.com/entorb/meeting-meter
cd myProject
gemini

To switch model from pro to flash:

export GEMINI_MODEL="gemini-2.5-flash"

Secret alternative: .env file

GEMINI_API_KEY=xxx

Google Antigravity

https://antigravity.google/download