jarvis: Instructions file for Claude Code

CLAUDE.md

jarvis CLAUDE.md is an instructions file for Claude Code from samonti86/jarvis. It costs 10,407 tokens per session, scanned A, original, MIT.

Project instructions for Jarvis, a Windows desktop voice assistant that listens for a wake word, transcribes speech, sends questions to Claude, and reads answers aloud.

In plain words
What is it for?
Working on the voice loop, local wake-word detection, Claude responses, text-to-speech, tools, background monitors, and related Windows features.
Why use it?
They document the project's goal, technology choices, environment, and important engineering constraints before code changes are made.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is samonti86/jarvis's own configuration. It tells Claude Code how to work on jarvis itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything jarvis configures →

Reuse

Borrowing it

Nothing to install: this file belongs to samonti86/jarvis. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/samonti86/jarvis/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/samonti86/jarvis

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jarvis CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/samonti86/jarvis/claude-md/github.svg)](https://agentmods.dev/instructions/samonti86/jarvis/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/samonti86/jarvis/claude-md"><img src="https://agentmods.dev/badge/instructions/samonti86/jarvis/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for jarvis CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/samonti86/jarvis/claude-md"><img src="https://agentmods.dev/badge/instructions/samonti86/jarvis/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10,407 This file is loaded in full into every session.
When invoked 10,407 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.10407 $0.10407
Opus 5.5 $0.04163 $0.04163
Sonnet 5.5 $0.02081 $0.02081
Haiku 4.5 $0.01041 $0.01041

Measured 4d ago against content hash 29f06ba3819a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

jarvis CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 651 lines

How it starts

The opening of the file, as written. The whole thing — 651 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Project: jarvis

Agent-facing project instructions. Read this before touching the codebase. Full historical detail — every milestone, decision, and post-mortem — lives in docs/MILESTONES.md.

Goal

A Windows desktop voice assistant. An always-on microphone listens for the wake word "Jarvis" / "Hey Jarvis", transcribes the spoken question locally, sends the text to the Claude API with a Jarvis-personality system prompt, and reads the response back through the speakers via TTS. Inspired by Tony Stark's J.A.R.V.I.S.: courteous, dryly witty, concise.

The interesting part is not the voice loop — it is everything hung off it: an agentic tool layer (36 tools), proactive background monitors, a vision/security subsystem, a phone client, and a set of engineering conventions strict enough to keep an always-on process honest.

Stack / Tools

  • Language: Python 3.12 on Windows.
    • Windows-native, not WSL: audio device access. WSL2 audio bridging is unreliable for always-on real-time listening.
  • Wake word: openWakeWord
    • MIT, fully local, no API key or account. Ships a pre-trained hey_jarvis model. CPU-only, ~3-5% continuous utilization.
    • Slightly higher false-positive rate than commercial alternatives (Porcupine); tunable via a confidence threshold. Porcupine was the original pick but now requires a company email, which rules it out for an open personal project.
  • Speech-to-text: faster-whisper
    • Local Whisper on CPU; the small/base model is plenty for short commands. No internet required — question audio never leaves the machine.
    • Optionally offloaded to a CUDA box on the LAN over a small HTTP server (cuts transcription 5-10 s → 1.5-2.5 s); falls back to local on any failure.
  • LLM: Anthropic Python SDK (anthropic)
    • Default claude-sonnet-5 (CLAUDE_MODEL overrides). Haiku for the cheap background jobs (session summarizer, prediction miner). Opus only if a request genuinely needs more reasoning.
    • Thinking is explicit — and "off" is spelled per model (M104). Current models run adaptive thinking when the thinking param is omitted. Voice and background paths turn it off (latency, plus small max_tokens budgets would be truncated by an unplanned thinking block) via src/model_params.thinking_off(model), never a literal: Sonnet 5 and Haiku 4.5 take {"type": "disabled"}, Sonnet 5.5 400s on that and needs {"type": "between_tools"} (effort high or below only), and Opus 5.5 / Fable have no off switch (omit the param). tests/model_params_test.py fails if any module hard-codes a thinking-off value. Engineer mode passes {"type": "adaptive"} on every model. This household runs CLAUDE_MODEL=claude-sonnet-5-5; on Sonnet 5.5, text between tool calls arrives as thinking blocks, which text_stream never speaks and the tool loop passes back whole.
    • Prompt caching on the system prompt — it is reused every turn. Per-turn volatile context (clock, speaker identity) rides a second, uncached system block so it never invalidates the cache.
    • Streaming so TTS can start before the reply is complete.
  • Text-to-speech: edge-tts primary, pyttsx3 fallback.
    • Edge is a free Microsoft online voice, surprisingly good. pyttsx3 is offline (Windows SAPI) — the graceful degradation path when Edge is unreachable.
  • Audio I/O: sounddevice — cleaner than PyAudio, handles streaming well.
  • UI: pystray tray icon (four states) + a customtkinter console window.
  • Vision: opencv-python + ultralytics (YOLOv8n person detection) + face_recognition/dlib for the enrolled-face auth path.
  • Acoustic classification: PANNs Cnn14 (panns_inference) — 527 AudioSet classes, ~0.2 s CPU inference.
  • Speaker ID: Resemblyzer d-vectors (256-d), cosine similarity.
  • Env: python-dotenv. Async: asyncio around the listen → process → respond cycle; background subsystems are daemon threads.

Read the full file on GitHub · 651 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +69 lines · +1,374 tokens per session 29f06ba3819a
  2. 1mo ago First seen · 582 lines · 9,033 tokens per session scan A 3150b985f6c9

Subscribe to this mod's changes

jarvis CLAUDE.md is an instructions file published in the GitHub repository samonti86/jarvis (6 stars, last pushed 5d ago), licensed MIT. It adds 10,407 tokens to every session, about $0.0416 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories