jarvis CLAUDE.md

jarvis CLAUDE.md is an instructions file for Claude Code from samonti86/jarvis. It costs 9,033 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.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/samonti86/jarvis/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 9,033 This file is loaded in full into every session.
When invoked 9,033 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.09033 $0.09033
Opus 5 $0.04516 $0.04516
Sonnet 5 $0.01807 $0.01807
Haiku 4.5 $0.00903 $0.00903

Measured 6d ago against content hash 3150b985f6c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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 · 582 lines

How it starts

The opening of the file, as written. The whole thing — 582 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. Sonnet 5 runs adaptive thinking when the thinking param is omitted. Voice and background paths pass thinking={"type": "disabled"} (latency, plus small max_tokens budgets would be truncated by an unplanned thinking block); engineer mode passes {"type": "adaptive"}.
    • 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 · 582 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. 6d 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 (5 stars, last pushed 14d ago), licensed MIT. It adds 9,033 tokens to every session, about $0.0452 per session on Opus 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.