Tuesday, July 21, 2026

Another Optimization for Hermes from a poor guy

I created another paper for hermes optimization, this one is pretty aggressive in its approach but does the job well. It bypasses some hermes built in feature to make this one feasible. Version i use is 0.19.

From running 190 skills every session now i only have 2, and when i need the skills it is auto loaded by a plug in when it reaches the llm, context is not over bloated, making alot of token saving.

https://preview.redd.it/8yfcf2avfpeh1.png?width=590&format=png&auto=webp&s=bbf938229f156b3eb880a2a349f44da5bf8afaff

When using the cheapest model the savings is not that huge but if you are a power user the savings are enormous.

Read the Following or make your hermes read this for implementation.

# Skill Routing Architecture for LLM Agents
## On-Demand Context Injection via Nickname & Semantic Vector Routing

**Authors:**
 Hermes Agent Community  
**System:**
 Hermes Agent (Nous Research)  
**Date:**
 July 2026  
**Status:**
 Production — 2+ weeks operational

---

## Abstract

Large Language Model (LLM) agents carry a system prompt that includes metadata about available capabilities — typically called "skills." In stock Hermes Agent, all installed skills (~190) are enumerated in `<available_skills>` on every turn, consuming 
**~28,000 characters**
 of context regardless of relevance to the user's current request. This paper presents a three-phase approach that reduces active skill tokens to effectively zero while preserving — and in some cases improving — discovery and loading of domain-specific knowledge. The system combines: (1) aggressive skill disabling (190→2), (2) deterministic nickname-based routing (59 triggers → 24 skills), and (3) semantic vector search (190-dim embedding index, cosine similarity ≥0.44) with 
**top-3 multi-skill retrieval**
 for compound queries spanning multiple domains. The plugin architecture hooks into the agent's gateway dispatch layer, intercepting user messages 
*before*
 the LLM processes them, and injects skill content inline at zero LLM token cost for the search itself. Over 2+ weeks of production operation, the system has matched ~5-10 queries per day with an average semantic relevance score of 0.62, and passthrough queries incur zero additional token overhead.

---

## 1. Problem Statement

### 1.1 The Skill Enumeration Tax

LLM agents traditionally enumerate all available capabilities in their system prompt:

```xml
<available_skills>
  agent-communication-style, agent-observability, agent-provider-config, ...
  +180 more
</available_skills>
```

Each entry consumes characters on 
**every single turn**
 — regardless of whether the skill is ever used. In stock Hermes Agent with defaults:
- ~190 installed skills
- ~28,000 characters (~7,000 tokens at 4:1 ratio) in system prompt
- Every turn pays this tax, even for "hello" or "what's the weather?"

### 1.2 The Discovery Problem

The standard `skill_view()` mechanism requires a two-turn process:
1. Agent decides to load a skill (costs LLM tokens for the reasoning)
2. Agent calls skill_view → reads the skill content (costs tool-call tokens)
3. On the next turn, the skill content is available

This means the first response to a domain-specific query is always "Let me check..." — never an informed answer.

### 1.3 The Disabled-Skill Blindness

Aggressively disabling skills solves the token tax but creates a new problem: disabled skills are excluded from `get_skill_commands()`, meaning the gateway cannot resolve `/skill-name` rewrites for them. The standard approach of rewriting `"check the database"` to `"/database-schema check the database"` fundamentally breaks when the skill is disabled.

---

## 2. Architecture Overview

```
User: "check the game server"
  │
  ▼
┌──────────────────────────────────────────────────┐
│  pre_gateway_dispatch (GATEWAY HOOK)              │
│                                                    │
│  ┌──────────────┐    ┌──────────────┐             │
│  │ Phase 1:     │    │ Phase 2:     │             │
│  │ Nickname     │───→│ Vector       │             │
│  │ (determin.)  │    │ Search (sem.)│             │
│  │ ↓ match or   │    │ ↓ if no      │             │
│  │ ↓            │    │ nickname:    │             │
│  │ skill= game- │    │ embed →      │             │
│  │   ecosystem  │    │ cosine sim → │             │
│  └──────┬───────┘    │ if ≥ 0.44:   │             │
│         │            │ skill found  │             │
│         │            └──────┬───────┘             │
│         │                   │                     │
│         └────────┬──────────┘                     │
│                  ▼                                │
│    ┌─────────────────────────┐                    │
│    │ Phase 3: Inline Inject  │                    │
│    │ Read SKILL.md from disk │                    │
│    │ Inject into user msg    │                    │
│    │ Append discoverable     │                    │
│    │ skills index note       │                    │
│    └──────────┬──────────────┘                    │
└───────────────┼──────────────────────────────────┘
                │
                ▼
    LLM receives augmented message with
    skill content already in context
    (zero extra turns, zero extra tool calls)
```

### System Components

| Component | Purpose | Lines of Code |
|-----------|---------|--------------|
| `config.yaml` — skill disable list | ~185 skills disabled, 2 active | N/A (config) |
| `__init__.py` — plugin hooks | `pre_gateway_dispatch` + `pre_llm_call`, top-3 vector search | ~455 |
| `plugin.yaml` — plugin registration | Hermes plugin metadata | 5 |
| `build_skill_index.py` — index builder | Scans skills → embeds → saves | ~240 |
| `NICKNAME_MAP` — deterministic triggers | 59 entries → 24 skills | (inline in plugin) |
| `entries.json` — vector index | ~190 entries, 384-dim embeddings | ~136KB |
| `index.json` — index metadata | Version, threshold, timestamp | N/A |

---

## 3. Phase 1: Aggressive Skill Trimming

### 3.1 Rationale

In stock Hermes, the system prompt lists all installed skills regardless of use frequency. Our usage audit revealed:
- 
**~190**
 SKILL.md files on disk
- 
**~185**
 disabled in `config.yaml`
- 
**2**
 active (`hermes-agent`, `plan`)
- 
**Ratio: ~1%**
 active

The two retained skills are meta-tools: `hermes-agent` (for configuring Hermes itself) and `plan` (for structured planning). Everything else — domain knowledge, integrations, image generation, database access — is loaded on-demand via the routing system.

### 3.2 Implementation

```yaml
# config.yaml
skills:
  disabled:
    - agent-communication-style
    - agent-observability
    - airtable
    # ... all non-essential skills
    - youtube-content
```

The disabled list is exhaustive: every skill not actively used in the last 30 days is disabled. New skills are added to this list by default and only moved to the routing index if they prove useful.

### 3.3 Token Savings

All cost figures use DeepSeek V4 Flash blended pricing (78% cache hit at $0.0028/M + 22% cache miss at $0.14/M = 
**$0.033/M effective**
). This table shows only the skill enumeration tax — not full conversation cost. See §7.4 for complete model-by-model comparison including GPT-4o, GPT-4.1, and GPT-5.5.

| Metric | Stock (190 active) | Trimmed (2 active) | Savings |
|--------|-------------------|-------------------|---------|
| Skill tokens per turn | ~7,000 | ~80 | 
**98.9%**
 |
| Cost per turn (blended) | $0.00023 | $0.000003 | 
**$0.00023/turn**
 |
| Daily savings (50 turns) | — | — | 
**~$0.012/day**
 |
| Monthly savings | — | — | 
**~$0.35/month**
 |
| Annual savings (18,250 turns) | — | — | 
**~$4.20/year**
 |

> 
**Note:**
 These figures account only for the skill token tax. The eliminated tool-call round-trips (1-2 extra LLM turns per matched query) save an additional ~$0.0009 per match — see §7.4.4 for the full breakdown across all model tiers.

In practice, the system prompt with 2 skills is indistinguishable from a system prompt with 190 skills for almost every query — because the missing skills are injected on-demand when relevant.

---

## 4. Phase 2: Nickname Routing (Deterministic)

### 4.1 Design

Deterministic substring matching runs 
**first**
 — before any vector search — because it is:
- 
**Zero-cost**
: simple Python `in` check
- 
**Zero-latency**
: microseconds vs milliseconds
- 
**Precise**
: no false positives, no threshold tuning

### 4.2 The Nickname Map

```python
NICKNAME_MAP = {
    # Domain-specific project
    "the digitization": "digitization-workflow",
    "the data api": "data-integration",
    
    # Gaming / D&D
    "the game server": "game-ecosystem",
    "the dungeon server": "game-ecosystem",
    
    # Infrastructure
    "the dns server": "self-hosted-dns",
    "the dashboard": "dashboard-tunnel-proxy",
    
    # Email & comms
    "the email": "email-automation",
    
    # ... 59 total entries, 24 unique skills
}
```

### 4.3 Design Decisions

**Why definite article prefix?**
 Every nickname starts with "the " (e.g., "the game server", "the email"). This was a deliberate choice for three reasons:

1. 
**Reduces false positives**
: "the email" is specific; "email" by itself could match chat about email in general
2. 
**Natural language flow**
: Users naturally say "check the email" not just "email"
3. 
**Single-token matching**
: A simple substring check suffices — no regex, no fuzzy matching

**Why substring matching instead of exact?**
 Users vary their phrasing: "check the game server" vs "talk to the game server". Substring `in` handles both without complex NLP.

### 4.4 Example Matches

```
User: "check the game server"
  → match: "the game server" → skill: game-ecosystem

User: "what did the email say"
  → match: "the email" → skill: email-automation

User: "the hermes config needs updating"
  → match: "the hermes config" → skill: hermes-agent (loaded!)
```

---

## 5. Phase 3: Semantic Vector Search

### 5.1 Embedding Pipeline

When no nickname matches, the system falls back to semantic vector search.

**Model:**
 `all-MiniLM-L6-v2`
- 384-dimensional embeddings
- Sentence-Transformers library
- ~3ms encode time per query

**Index:**
 ~190 skill embeddings, stored in:
- `entries.json`: metadata (skill name, file path, description, tags, category)
- `embeddings.npy`: 190 × 384 float32 matrix
- `index.json`: version, timestamp, model name

### 5.2 Build Process

```python
def build_embed_text(skill, skill_body=""):
    parts = [skill["name"], skill["description"]]
    if skill["tags"]:
        parts.append(" ".join(skill["tags"]))
    if skill["category"]:
        parts.append(skill["category"])
    
    # Extract trigger phrases from ## When / ## Trigger sections
    if skill_body:
        trigger_text = extract_trigger_sections(skill_body)
        if trigger_text:
            parts.append(trigger_text)
    
    return " ".join(p for p in parts if p)
```

The embedding text combines:
1. Skill 
**name**
 (e.g., "data-integration")
2. 
**Description**
 from frontmatter (e.g., "Query database tables via API")
3. 
**Tags**
 (e.g., ["CRM", "API", "Enterprise"])
4. 
**Trigger phrases**
 extracted from the skill body's "When to use" sections

### 5.3 Search Algorithm

```python
def search(query, top_k=3):
    query_vec = model.encode(query)
    scores = cosine_similarity(query_vec, all_embeddings)
    top_indices = argsort(scores)[::-1][:top_k]
    
    results = []
    for idx in top_indices:
        score = scores[idx]
        if score >= entries[idx]["threshold"]:  # default: 0.44
            results.append((entries[idx], score))
    
    return results  # all matches above threshold, up to 3
```

### 5.4 Threshold Tuning

The default threshold of 
**0.44**
 was empirically determined:
- 
**Too low (<0.3)**
: False positives — irrelevant skills loaded
- 
**Too high (>0.6)**
: Misses — relevant skills not loaded
- 
**0.44**
: Balances precision (noise) vs recall (coverage)

Individual skills can override the threshold in their index entry (`"threshold": 0.44`), allowing manual tuning for ambiguous skills.

### 5.5 Lazy Loading

The model and index are loaded lazily on first match request:
- `_get_model()`: Loads SentenceTransformer on first call (thread-safe, double-checked locking)
- `_load_index()`: Loads entries.json + embeddings.npy on first call; re-loads if file mtime changes
- Both cached globally in the plugin module for the process lifetime

---

## 6. The Gateway Hook Architecture

### 6.1 Hermes Plugin System

Hermes Agent supports plugin hooks at two critical points in the request lifecycle:

```
User Message
    │
    ▼
pre_gateway_dispatch  ← Our plugin intercepts here
    │                     (rewrite message before LLM sees it)
    ▼
pre_llm_call          ← Our plugin adds context here
    │                     (first LLM turn only)
    ▼
LLM processes enriched message
```

### 6.2 pre_gateway_dispatch (The Main Hook)

```python
def handle_pre_gateway_dispatch(event, gateway, session_store, **kwargs):
    text = event.text
    
    # Skip trivial messages
    if len(text.strip()) < 3 or text.startswith("/"): return
    
    # Phase 1: Nickname match (deterministic, single skill)
    skill = check_nickname(text)
    
    # Phase 2: Vector search fallback (semantic, up to 3 skills)
    if not skill:
        results = vector_search(text, top_k=3)
        if results:
            # Inject ALL matched skills above threshold
            contents = []
            for entry, score in results:
                content = read_skill_file_from_index(entry)
                contents.append(content)
            skill_body = "\n\n".join(contents)
    
    if not skill and not contents:
        return  # Passthrough — no skill needed
    
    # Phase 3: Load and inject skill content inline
    rewritten = f"""{text}
    
{skill_body}
📋 [Plugin] ~190 skills available (use skill_view)
"""
    return {"action": "rewrite", "text": rewritten}
```

### 6.3 Why Direct File Loading?

The critical insight: 
**disabled skills cannot be loaded via `/skill-name` rewrite**
 because the Hermes gateway's `get_skill_commands()` excludes disabled skills. Our plugin bypasses this entirely by:

1. Storing the 
**absolute file path**
 in the vector index entry (`skill_file`)
2. Reading the SKILL.md directly from disk with `Path.read_text()`
3. Injecting the raw content inline in the user message

This means the skill appears to the LLM as if it was in the system prompt all along — but only when relevant.

### 6.4 pre_llm_call (The Assistant Hook)

```python
def handle_pre_llm_call(**kwargs):
    # On matched turns, inject a compact skills reference
    return {"context": "[Plugin: ~190 skills — data-integration, game-ecosystem, ... +180 more]"}
```

This helps the LLM understand what's available without scanning the full `<available_skills>` block.

### 6.5 Injection Guard

To prevent re-injection during tool-loop turns (where the same message text cycles through multiple LLM calls), the plugin tracks `_last_injected_text`:

```python
if _last_injected_text == note:
    return None  # Already injected this turn
```

---

## 7. Performance Impact

### 7.1 Token Savings

| Scenario | Stock Hermes | Our System | Savings |
|----------|-------------|------------|---------|
| Passthrough query | 7,000 skill tokens | 80 skill tokens | 
**98.9%**
 |
| Nickname match | 7,000 + 2 turns | 80 + inline | 
**~99% + 2 fewer turns**
 |
| Vector match | 7,000 + 2 turns | 80 + inline | 
**~99% + 2 fewer turns**
 |

### 7.2 Latency

| Operation | Latency | Notes |
|-----------|---------|-------|
| Nickname match | ~0.001ms | Simple substring check |
| Vector encode | ~3ms | all-MiniLM-L6-v2 on CPU |
| Cosine similarity | ~0.01ms | NumPy batched dot product |
| File read | ~0.1ms | SKILL.md from SSD |
| 
**Total (vector path)**
 | 
**~3.1ms**
 | Before LLM invocation |
| 
**Total (nickname path)**
 | 
**~0.1ms**
 | Essentially zero |

### 7.3 Production Statistics

| Metric | Value |
|--------|-------|
| Skills indexed | ~190 |
| Nickname entries | 59 (mapping to 24 unique skills) |
| Vector index dims | 384 |
| Default threshold | 0.44 |
| Active skills | 2 (~1% of total) |
| Plugin code | ~455 lines |
| Total system files | 4 (plugin.py, plugin.yaml, build_index.py, config.yaml) |

### 7.4 Cost Impact — Model Comparison

The following tables compute real costs using July 2026 API pricing. All calculations assume:
- 
**Without routing:**
 ~7,000 skill tokens + ~2,500 conversation tokens = ~9,500 input + ~500 output per turn
- 
**With routing:**
 ~2,000 input + ~500 output per turn (skill enumeration tax eliminated)
- 
**50 turns/day**
, 
**30 days/month**
 (1,500 turns/month)
- 
**DeepSeek V4 Flash**
 uses a blended input rate: 78% cache hits at $0.0028/M + 22% cache misses at $0.14/M = 
**$0.033/M effective**

#### §7.4.1 Per-Turn Cost

| Provider | Model | No Routing | With Routing | Savings/Turn | Savings % |
|----------|-------|-----------|-------------|-------------|----------|
| 
**DeepSeek**
 | V4 Flash | $0.000454 | $0.000206 | 
**$0.000248**
 | 
**54.6%**
 |
| 
**DeepSeek**
 | V4 Pro | $0.001260 | $0.000595 | 
**$0.000665**
 | 
**52.8%**
 |
| 
**OpenAI**
 | GPT-4.1-nano | $0.001150 | $0.000400 | 
**$0.000750**
 | 
**65.2%**
 |
| 
**OpenAI**
 | GPT-4o-mini | $0.001725 | $0.000600 | 
**$0.001125**
 | 
**65.2%**
 |
| 
**OpenAI**
 | GPT-4.1-mini | $0.004600 | $0.001600 | 
**$0.003000**
 | 
**65.2%**
 |
| 
**OpenAI**
 | GPT-4.1 | $0.023000 | $0.008000 | 
**$0.015000**
 | 
**65.2%**
 |
| 
**OpenAI**
 | GPT-4o | $0.028750 | $0.010000 | 
**$0.018750**
 | 
**65.2%**
 |
| 
**OpenAI**
 | GPT-5 (est.) | $0.016875 | $0.005833 | 
**$0.011042**
 | 
**65.4%**
 |
| 
**OpenAI**
 | GPT-5.5 | $0.067250 | $0.023333 | 
**$0.043917**
 | 
**65.3%**
 |

The routing architecture saves a higher 
**percentage**
 on OpenAI models (65%) vs DeepSeek (53-55%) because cheaper models have a lower per-token cost — making the fixed absolute token savings (7,000 input tokens/turn) a larger fraction of a more expensive base.

#### §7.4.2 Daily & Monthly Cost (50 turns/day)

| Model | Daily (No Routing) | Daily (With Routing) | Daily Savings | Monthly Savings |
|-------|-------------------|---------------------|--------------|----------------|
| 
**DeepSeek V4 Flash**
 | $0.0227 | $0.0103 | 
**$0.0124**
 | 
**$0.37**
 |
| 
**DeepSeek V4 Pro**
 | $0.0630 | $0.0298 | 
**$0.0332**
 | 
**$1.00**
 |
| 
**GPT-4.1-nano**
 | $0.0575 | $0.0200 | 
**$0.0375**
 | 
**$1.13**
 |
| 
**GPT-4o-mini**
 | $0.0863 | $0.0300 | 
**$0.0563**
 | 
**$1.69**
 |
| 
**GPT-4.1-mini**
 | $0.2300 | $0.0800 | 
**$0.1500**
 | 
**$4.50**
 |
| 
**GPT-4.1**
 | $1.150 | $0.400 | 
**$0.750**
 | 
**$22.50**
 |
| 
**GPT-4o**
 | $1.438 | $0.500 | 
**$0.938**
 | 
**$28.13**
 |
| 
**GPT-5 (est.)**
 | $0.844 | $0.292 | 
**$0.552**
 | 
**$16.56**
 |
| 
**GPT-5.5**
 | $3.363 | $1.167 | 
**$2.196**
 | 
**$65.88**
 |

#### §7.4.3 Annual Projection (18,250 turns/year)

| Model | No Routing | With Routing | Annual Savings |
|-------|-----------|-------------|---------------|
| DeepSeek V4 Flash | 
**$8.28**
 | 
**$3.76**
 | 
**$4.52**
 |
| DeepSeek V4 Pro | 
**$23.00**
 | 
**$10.86**
 | 
**$12.14**
 |
| GPT-4.1-nano | 
**$20.99**
 | 
**$7.30**
 | 
**$13.69**
 |
| GPT-4o-mini | 
**$31.49**
 | 
**$10.95**
 | 
**$20.54**
 |
| GPT-4.1-mini | 
**$83.95**
 | 
**$29.20**
 | 
**$54.75**
 |
| GPT-4.1 | 
**$419.75**
 | 
**$146.00**
 | 
**$273.75**
 |
| GPT-4o | 
**$524.69**
 | 
**$182.50**
 | 
**$342.19**
 |
| GPT-5.5 | 
**$1,227.31**
 | 
**$425.83**
 | 
**$801.48**
 |

#### §7.4.4 Plus Eliminated Tool-Call Rounds

Each matched query eliminates ~1-2 extra LLM turns (the "let me check" → skill_view → respond cycle). At our observed ~5-10 matches/day:

| Model | Extra cost saved per match | ~5 matches/day | ~10 matches/day |
|-------|---------------------------|----------------|-----------------|
| DeepSeek V4 Flash | $0.0009 | $0.0045/day | $0.009/day |
| GPT-4o-mini | $0.0035 | $0.0175/day | $0.035/day |
| GPT-4.1-mini | $0.0092 | $0.046/day | $0.092/day |
| GPT-4o | $0.0575 | $0.288/day | $0.575/day |
| GPT-5.5 | $0.1345 | $0.673/day | $1.345/day |

#### §7.4.5 The Counterintuitive Finding

**This architecture matters 
*more*
 on expensive models than cheap ones.**

A GPT-5.5 deployment without routing burns 
**$1,227/year**
 on idle skill enumeration tax alone — effectively paying $3.36/day just to say "hello." With routing, that drops to $426/year. The absolute dollar savings scale linearly with model cost per token, making this optimization most valuable precisely where token budgets are tightest.

For DeepSeek V4 Flash users, the savings are modest (~$4.52/year — roughly 2 cups of coffee). But the 
**latency benefit**
 and 
**eliminated round-trips**
 apply identically regardless of model: the first response to "check the database" arrives informed, not "let me look that up."

---

## 8. Replication Guide

### 8.1 Prerequisites

- Hermes Agent (or any LLM agent framework with plugin/gateway hooks)
- Python 3.10+
- `sentence-transformers` + `numpy` (for vector search)
- Skills directory with SKILL.md files

### 8.2 Step 1: Audit & Trim

```bash
# Count total skills
hermes skills list | grep -c enabled

# Disable aggressively in config.yaml
skills:
  disabled:
    - skill-you-never-use
    # ... all but 2-3 essentials
```

### 8.3 Step 2: Build the Index

```python
# build_skill_index.py — scans skills directory, creates embeddings
for skill_md in skills_dir.rglob("SKILL.md"):
    parse_frontmatter(skill_md)  # name, description, tags, category
    embed_text = f"{name} {description} {' '.join(tags)} {category}"
    
model = SentenceTransformer("all-MiniLM-L6-v2")
embeddings = model.encode(all_embed_texts)
np.save("embeddings.npy", embeddings)
```

### 8.4 Step 3: Create Nickname Map

```python
NICKNAME_MAP = {
    "the project": "project-anatomy",
    "the database": "database-schema",
    # ... map common user phrases to skill names
}
```

### 8.5 Step 4: Implement Gateway Hook

```python
def pre_gateway_dispatch(event):
    text = event.text
    
    # Try nickname first (cheap, deterministic)
    skill = NICKNAME_MAP.get(text)
    
    # Fall back to vector search (semantic, higher cost)
    if not skill:
        query_vec = model.encode(text)
        scores = cosine_similarity(query_vec, index_embeddings)
        if max(scores) >= 0.44:
            skill = entries[argmax(scores)]["skill_name"]
    
    if not skill:
        return  # passthrough
    
    # Read skill content from DISK (not from framework's skill loader)
    content = Path(entries[skill]["skill_file"]).read_text()
    
    # Inject inline
    return {"action": "rewrite", "text": f"{text}\n\n{AUTO_LOAD_MARKER}{content}{AUTO_LOAD_END}"}
```

### 8.6 Key Architecture Decision

**Always read SKILL.md from disk directly.**
 Do not use the framework's built-in skill loader if it requires skills to be "enabled" or listed in an active registry. The whole point is to keep 98% of skills disabled in the system prompt while still being able to load them on demand.

---

## 9. Lessons Learned

### 9.1 What Worked

- 
**Nickname-first routing**
 is the most impactful optimization. ~70% of skill matches come from the nickname map, which costs ~0.001ms. Vector search is the safety net, not the primary path.
- 
**Definite article prefix ("the X")**
 eliminated false positives. Users naturally refer to "the email" or "the game server" when they want a specific skill invoked.
- 
**Direct file reading bypasses framework restrictions.**
 Disabled skills are invisible to the agent's skill loader, but they're perfectly readable on disk. This is the key architectural insight.
- 
**Multi-skill vector retrieval (top-3)**
 handles compound queries like "check the game server and the email" — all matched skills above threshold are loaded inline, so the LLM sees both domains in a single turn.
- 
**Lazy loading**
 keeps cold-start costs zero. The embedding model (90MB) only loads when the first semantic match is needed.

### 9.2 What to Watch For

- 
**Skill content size**
: Some SKILL.md files exceed 15,000 chars. We truncate at this limit to prevent token blowout in the user message.
- 
**Index staleness**
: When new skills are added, the index must be rebuilt. A cron job handles this automatically.
- 
**Thread safety**
: The plugin serves multiple concurrent sessions. All global state (model, index, injection guard) uses thread-safe locking.
- 
**Threshold tuning**
: 0.44 was right for our skill corpus but may need adjustment for different domains.

### 9.3 What Could Be Improved

- 
**Skill content caching**
: SKILL.md content is read from disk on every match. Adding an in-memory LRU cache would reduce latency.
- 
**Cross-profile index sharing**
: If multiple Hermes profiles have different skill sets, a shared or merged index could reduce duplication.
- 
**Online learning**
: The nickname map is hand-crafted. A feedback loop could automatically add recently-used skills as nickname triggers.

---

## 10. Conclusion

The Skill Routing Architecture demonstrates that LLM agents do not need to carry their full capability catalog in the system prompt. By combining aggressive trimming (~1% active), deterministic nickname routing (59 triggers), and semantic vector search (190-dim embeddings, 0.44 threshold), we reduced per-turn skill tokens by 
**98.9%**
 while preserving — and in some cases improving — the agent's ability to load domain-specific knowledge.

The system has been in production for 2+ weeks, processing ~5-10 skill-matched queries per day across multiple platforms, with zero regressions in passthrough query handling. The total implementation is 
**~700 lines of code**
 across 4 files, making it a low-cost, high-impact optimization applicable to any LLM agent framework with gateway-level interception hooks.

The key architectural insight — load disabled skill content directly from disk rather than through the framework's skill loader — solves a fundamental tension in agent system design between prompt efficiency and capability breadth.

---

## Appendix A: Example Nickname Map (Sanitized)

```
the digitization workflow → digitization-workflow
the data api → data-integration
the game server → game-ecosystem
the dungeon server → game-ecosystem
the dnd server → game-ecosystem
the dnd game → game-ecosystem
the github pr → github-pr-workflow
the pull request → github-pr-workflow
create a pr → github-pr-workflow
the code review → github-code-review
review the pr → github-code-review
the dns server → self-hosted-dns
the dashboard → dashboard-tunnel-proxy
the bitcoin dashboard → dashboard-tunnel-proxy
the auto-remediation → auto-remediation
the excel file → xlsx
the spreadsheet → xlsx
the powerpoint → powerpoint
the pdf file → pdf
the word document → docx
the hermes config → hermes-agent
the hermes setup → hermes-agent
the model config → hermes-model-strategy
the cost optimize → hermes-cost-optimization
the notes → obsidian
my notes → obsidian
the vault → obsidian
the memory search → hybrid-memory-search
the vector search → hybrid-memory-search
the email → email-automation
my email → email-automation
the expense → expense-monitoring
the budget → budget-tracking
```

**33 entries → 20 unique skills**

---

## Appendix B: Skills by Category (Example)

| Category | Count | Examples |
|----------|-------|---------|
| General | ~148 | apple-notes, findmy, image-generation, ... |
| Productivity | ~12 | linear, notion, obsidian, spotify, ... |
| Creative | ~7 | ascii-art, video-generation, p5js, ... |
| Infrastructure | ~4 | cloudflare-hosting, dns, system-admin, ... |
| Software Engineering | ~4 | clean-architecture, testing, ... |
| Research | ~3 | arxiv, geo-analysis, ... |
| DevOps | ~2 | search-engine, tunnel-proxy |
| Agent Meta | ~2 | hermes-agent, agent-fallback |
| Data Science | ~2 | fine-tuning, training |
| Other | ~6 | desktop, memory, note-taking, ... |

---

## Appendix C: Index Metadata

```json
{
  "version": 2,
  "model": "all-MiniLM-L6-v2",
  "embed_dim": 384,
  "entry_count": 190,
  "default_threshold": 0.44
}
```

---

## Appendix D: Related Work

This architecture addresses a gap in LLM agent system design: the tension between 
**prompt efficiency**
 and 
**capability breadth**
. Related approaches include:

- 
**Mixture of Experts (MoE)**
: Routing tokens to specialized sub-networks at inference time — analogous at the model level to what we do at the prompt level
- 
**Retrieval-Augmented Generation (RAG)**
: Injecting relevant documents into context on-demand — our approach is RAG for 
*capabilities*
 rather than 
*knowledge*
- 
**Tool-Use Agents**
 (OpenAI Function Calling, Anthropic Tool Use): The model declares which tool to use, but the tool catalog is typically in the system prompt

Our contribution is a pre-LLM routing layer that makes the capability catalog effectively non-existent in the prompt while still being fully accessible.

Stick figure drawing doodles 10LightStar01 is live!

Stick figure drawing doodles 10LightStar01 is live!

https://www.youtube.com/watch?v=Hq9CwopUH1s

This is a fever dream of a digital age—a sprawling, surrealist tapestry where crochet patterns meet high-speed police chases, and the Grim Reaper is just another guy trying to manage an office.

Here is the story of The Day the Grid Glitched.

The Morning Shift

The day began in a flurry of #ModernCrochet and chaos. At the local craft guild, a "Magical Crochet Gargoyle Quitter" was throwing in the towel, leaving behind a trail of freeform stars and loose ends. Meanwhile, in the corporate underworld, the Grim Reaper CEO adjusted his tie at his administrative desk. "It’s my panel," he hissed to a room of trembling interns, "and you will respect the filing system."

Outside, the physical world was losing its grip on reality. A green avocado was spotted zip-lining across the forest canopy, screaming "Wee!" while a dairy cow and a buffalo experienced love at first sight on the prairie. It was beautiful, until the "Authorized Official Shambulance" sped by with off-key sirens, driven by a DoorDash driver who had clearly taken a wrong turn at the interstate.

The Midday Madness

By noon, the legal system was buckling. A divorce attorney was arguing for a 4% inflation alimony increase, while a stubborn police officer attempted to ticket a driver for doing 55 mph, despite the driver’s GPS claiming otherwise.

In the skies, things weren't much better. An airplane pilot abandoned the cockpit—not because of an emergency, but to fix a sewer leak in the bathroom. This left the County Sheriff’s helicopter pilot to pick up the slack, shouting the command code "Accel UR L8 twerk" into his AI navigator.

Back on the ground, the "Microwave Preventive Maintenance Team" (composed entirely of trolls in tin foil hats) was conducting a rigorous inspection of a breakroom, while nearby, a police officer and his best friend were formally interrogating a hairball.

The Evening Gala

As the sun set, a tarnished copper green armadillo drone took flight from the roof of a skyscraper, filming the most anticipated event of the year: the wedding of the Grim Reaper and the Reapress. They exchanged vows of "invisible threat control" while a dancing xenophobic xylophone provided the music.

However, the party was crashed by a Giant Plushy Octopus looking for hugs and a "Slip and Fall Droidbot" seeking a lawsuit settlement. In the corner, Holly Bitcoin gave tap dance lessons to a singing pickle, while a group of mushroom soldiers set up tents inside a refrigerator’s cooling system to escape the heat.

The Final Stitch

As the clock struck midnight on March 8, 2026, the digital world began to "URL barf." Google Meet was exposing phone numbers, and the #DreamTrackAI was telling everyone to "try again tomorrow."

The chaos finally settled into a quiet, bizarre peace. A Jack Rabbit and a Skunk shared a moment in the woods, and a single claymation blue bird tucked its family into a nest made of crochet scrap yarn. The world was a mess of unredacted reports, stuck cruise controls, and singing rainbows—but as the Star and Hammer cartoon faded to black, one thing was clear: nobody was above the law, but everyone was definitely above the limit for weirdness.

The scene opens on a high-stakes, high-altitude pursuit. Jack, a lanky cartoon cat with whiskers that twitch like radio antennas, is dangling from a vine. Hammer, a stout mouse wearing a tiny tool belt, is standing on Jack’s head, squinting through a pair of brass binoculars.

"Target sighted," Hammer squeaked, pointing a tiny paw toward the horizon. "And he’s moving fast."

Zip-lining across the triple-canopy rainforest at a reckless velocity was Avocado. He wasn't just a fruit; he was a daredevil with a pit of pure adrenaline. Wearing tiny goggles and a GoPro strapped to his pebbly green skin, Avocado let out a high-pitched, "WEEEEEEEE!" as he blurred past a troop of confused howler monkeys.

The Chase is On

Jack didn't have a zip-line, but he did have cartoon physics. He grabbed a passing toucan by the feet, and with a rhythmic "Bang! Bang!" of Hammer’s literal mallet against a hollow log to create a beat, they swung into the sky.

"We need to intercept him before he hits the Cloud Forest!" Hammer shouted over the wind. "If he zips into the 'Modern Crochet' sector, we'll lose him in the yarn fog!"

The Obstacles:

  • The Sourdough Rapids: A river of fermented dough they had to skip across.
  • The Giant Plushy Octopus: A sentient obstacle that tried to hug them mid-air.
  • The Interior Microwave Team: A group of trolls in tin foil hats who were trying to "inspect" the jungle for grease fires.

The Final Stretch

Avocado was gaining speed, his pit humming like a drone motor. He was headed straight for a transitional train scene—a steam engine locomotive puffing purple smoke across a trestle bridge.

"Now, Jack! Use the yarn smudging technique!" Hammer commanded.

Jack pulled a scrap of neon-pink crochet string from his pocket. With the grace of a Vaudeville performer defying gravity, he whipped the string forward. It looped around Avocado’s stem just as the fruit was about to clear the canopy.

ZIP—THWIP—BOING!

The tension on the crochet line acted like a bungee cord. Avocado didn't crash; he performed a perfect, mid-air 360-degree flip, his tiny goggles fogging up with joy.

The Landing

They all tumbled onto a soft mossy log near a Box Turtle who was busy falling in love with an Armadillo. Avocado bounced twice, his GoPro still recording the whole "Brainrot" investigation.

"Why were you running?" Jack panted, his fur standing up in static-electrified tufts.

Avocado adjusted his goggles and looked at them with wide, watery eyes. "Running? I wasn't running. I was just trying to get to the Holly Bitcoin Tap Dance Lessons before the early bird special ended."

Hammer looked at Jack. Jack looked at the Armadillo.

"Well," Hammer sighed, putting his mallet back in his belt. "At least we got the footage. This is going to kill on #DreamTrackAI."

VLq-x3ou19E untitled
0TMbRWk4WjI The making of Jack and Hammer, cartoon cat and mouse, bang
27LTuniln4k untitled
r384VZLXu3A It's go time with Grandma and hot grits in the ring
Ttbtm4D_gWo pole vault remix
hxicWioIX38 How to take the loose end of crochet stitch, put it over the main strand, fold loop
_Tn8GDwQxAU Police officer can't stop car due to cruise control being stuck #crazycars #carwars
HIXe_nKGXwA Untitled Help I can't put my foot in a shoe without a hole in the shoe
SbURuV-AfKw Untitled Magical crochet gargoyle quitter I Quit doodle art animation
wXRoZkjgg1Y pingrok Being hold off in an ambulance
Ws8yubqGV9k Join the National Guard.
Y42d9L-TPl4 Untitled You U Ewe and I, eye aye have gone on a date a couple of times haven't we?
UK9nCeVtutU Untitled door dash ambulance Authorized official shambulance services
s0zhJiIvVI4 How to skip one crochet, stitch and count to 3 #moderncrochet #beginners
6rfXhtSP5xk Cuddlefish jellyfish love at first sight in the ocean, prairie of plankton.
LGU4J83SAxs Green avocado goes zip lining A top the forest canopy Wee
arAPCXGIWCs Untitled Hapoy Jake Patrick Wesley Day
jS4zJkPKeY8 Untitled I love ❤️ you Singing pickle
qzs14JC3VUY Holly Bitcoin Tap Dance Lessons
PzLApGgcrDw Unlisted cat Video Bob chicken Crane
ZSNHIl-H_YA Trolls in tin foil hats Following.\n The microwave team That looks like fun
cK5lfQtYRL0 Ma.\n King a crochet larger one, 2, 3, Stitching.\n A square. Basic beginner, crafting.
iao2E0zcS0Y The life of bug, Mushroom soldiers set up tents inside of refrigerator cooling system #theoutcasts
jsnY8MNuZ34 Best cooling system on the planet fixed by maintenance refrigerator repair #applianceexperts
_UGblsuJUnw My artificial intelligence tool on YouTube is really popular, it's telling me to try again tomorrow.
5VYC607cWVw #DreamTrackAI pretty little baby, wiggle loves give me
WWB1d8vomoI Gorilla vs Laughing cactus toy
8kKjbmBxytA Hippopotamus manatee love at first sight
UuRPSEgUONw Untitled Sunshine smiles, fluffy ponies Singing rainbow
MuaLc-TsHb8 unlisted can't touch this
Oh1h3EYHT6w The interior microwave, preventive maintenance checks and services team Inspections
qytG5WJmjH0 Me police officer and best friend interrogate a hairball #brainrot very bizarre investigation
aqgdVA9zh90 Jack McAuley Doggy Day Care
1hJy1EeMquw Unlisted Unclassified
zMfSaHTThaE How To freeform crochet flower 🌼 #doodle
dKb1qRc3o9o yeti best friend and cactus doing winter dance ballet in snow
hKynH3bUS1s Dairy cow and Buffalo love at first sight on the prairie
CxNKsmayhGY Crochet string scrap 🪹 nest for baby birds
nDzxUT-XaqY Untitled Steam Engine LocomotiveTrain transitional scene
GQGUaP3GCH8 Geminisyria Cooking Pizza in outdoor Stone fire pit with Trollba
Avz8V3n_GMg The airplane pilot has left the cockpit and is fixing a sewer leak in the bathroom. #squawkbox
tpOQC0ZO2Qs The making of cartoon Jack and Doodle Fire Rescue Airplane
J2QnlZxfPDE Unlisted
zO11ZBlTuk0 untitled cat reflections
vxy39kHdeYo Grim Reaper CEO It's my panel and you will respect me, Administrative desk job clerk opening
82j_JU_L2Hg When space force attends a retirement party for National Guard, Major Foughcup
Q3gfpuOd1tU I've tried to like people. I really have, and then they start talking and breathing And stuff
dA7Hm9ZCG3Q Divorce attorney Request 4% inflation alimony from divorce judge For ex, wife, survival
W20EkPyA8h4 Untitled pointing to the sky pose
U6hhfz3YXyg untitled
EMsniptQwao Out of control ambulance in the middle of the interstate Off key sirens #emsweek
O2CdiQDAgOw Me running through under water transpatent cables in the ocean with emoji balls
m_UBIWxyKjc Gerbils and mice scratching a record
kzE4Z4gWIgQ Untitled working with grown men in the corn 🌽
tpWdK6sqUd0 Grim reaper and best friend crash a stadium concert giving tourists a tour Through the arena.
DrMa2hwb6Ts Untitled Below river window displays local attraction
Q02wFzUWqq4 The Curiosity Hook: The making of Jack Star and Hammer Cartoon
ICFUxXR_hBA Jack Rabbit Skunk Love in the woods
9KZe4RnXfOA Armadillo box turtle love near fern moss log deep in the forest.
FqthJO69_oA County Sheriff helicopter pilot gives command code to GPS AI- "Accel UR L8 twerk" #quadcopters
BL6RojCX47Q She didnt just dance, she defied gravity, vaudeville big band era
lrhNN8WfdVY Tarnished copper green armadillo drone takes flight
Nop7msLpFbo Ice Police arrest Oticfyptokmiss Rodriguez during building ladder escape
VfgRh7Ihu_8 Police arrest trollGPTchat
tfiQpdf9xuE untitled
ceU9T6Y--C8 Slip and Fall Droidbot Doggabuls Synergy Drink TransOracle Lipplate lawsuite Zoroke partner
NstJxUjDXOg Untitled unitard, yoga tree pose
Zx6BBFXOXmE My GPS says I was doing 55 miles an hour, Stubborn Hard-headed police officer Traffic stop
oopFOTBwRKA How to use yarn as a blending tool for smudging, Transitioning Pencil pen drawings. Art Sketch Tip
FkjnyVeY-Mk Unlisted Partial Unredacted Committee on Judiciary Jack Smith Report
i_naFvEeaP8 The vacuum hose vent safety cleaning drone To reach high places inside the home Prevent slip fall
8EepbpHH5gs Google's clients are having a URL barf 403 error #remotejobs #sidehustle
9OxrKTj2p-Y March 8, 2026
hqyDrKMckmA CPU central processing unit green energy HVAC BOILER room cleaning maintenance
iS6iZjXv8Ok The claymation cartoon story of spaghetti and noodle, the Blue Bird family Nest
7zT96UKY9yY Surrender Burart
S-fYKAxS22Y Security alert US embassy Doha, Shelter in place, Travel advisory To avoid region Recommend
wXMNDNyadOY Untitled Books: My husband John is a Senator Kennedy
bGrUFNfeOBo Man wins Presidential Medal of Freedom for missing the woman He dated and ex. Husband
M7h1tuBSAaU No love anticipated from Chicago windy city or Detroit 8 miles, Eminem burn #seo
bjdsRjfinfM How to crochet a free form star Random stitches and more 10LightStar01 is live!
8U1Yd92_9Tk Mirror Love Bird
RXg88dMgxf0 The dancing xenophobic xylophones, World stage collaboration
C2JpWEjuXB4 Happy Valentines Day from crochet Pup stitch
p5qNmwVz2d8 Google Meet calling replacing (legacy) Duo Exposes your phone number and email
Ln_4tmLAMSY Would a woman hire male lawyer knowing that he had cheated on his wife? #divorcelaw #divorcelawyer
a9IGBuS2a-E Logmei silly hairball dance
boavDBvWgjs Flashing police car drone lifts off from a top of very tall roof of a skyscraper.
jr_Yfh3y78c He set the country backwards with his domestic violent attitude with physical abuse towards me
WpBEkq0gPWw Untitled Remix
gPtMY579pjQ This guy is admitting he's purposely manipulating people by playing dumb frauds & scam
KzvNCrlxa8s Giant plushy octopus hugs couple
-pmCMnQut-E Police arrest ogoniff sleeping on mailbox Dropbox #firstamendment #DreamScreenAI #aperturefoundation
CKYUeWHFczo Lock him up , - No one is above the law
9pFR8UEBsxw The first steps, and last steps are not needed for the crochet heart pattern
PzdL5mn0Baw The blossoming love of the 2 colored people, He loves his wife so very much
pMFd1mZiJRk Grim Reaper & Reapress Get married, Do you abide by invisible threats control According to his rules
n4nf4bB-Jo8 When active duty military shows up to the space force
EYLww4NNraI Was this a mistake? Remembering the old spark, Caring For an abuser

I helped a family member that lost over $250,000 in a romance pig butchering scam realize they were being scammed AMA

This is a lengthy thread so a couple things to start out; 1) I won’t be sharing the pictures that the scammer used, as that actual person is a victim as well. 2) I won’t be using my loved ones name, instead I’ll use the alias of John

This whole situation started in spring of 2018. John had a devastating life event occur and needed companionship. Naturally he got on a dating app and met someone and started chatting. John was a prime target for Pig Butching scammers as he was nearing retirement age, lived alone, vulnerable, and lonely searching for a connection.

In the beginning it was a lot of just chatting and getting to know each other. After some time it turned into little issues like ‘can I borrow gas money’ or ‘Can you help with a car repair bill’. After those tricks successfully worked, it started into the main plot.

When John insisted that they meet in person, the scammer stated that they were leaving the state to peruse modeling and joining a Modeling Training Program. This is when the massive amount of money started flowing out. The scammer convinced John to be their ‘sponsor’ for their modeling program and in return, after they made it out of the program John would get paid $168,000 every week in royalties from their modeling career.

Here is more context to the scam itself: The scammer had John send him all his personal information, address, phone number, Bank account information and SS#. On top of this the scammer had John sign a contract that promised to be their sponsor all the way through no matter what. Once in the Modeling program, the scammer requested money for anything and everything you could think of; housing cost, food, modeling regalia, transportation costs to events, etc. Of course, the modeling agency only accepted money via bitcoin or gift cards.

After two full years of the scam being in full tilt with $250,000+ out the window, John had cashed out all of his retirement accounts, sold a lot of possessions, started borrowing against future paychecks and was in imminent danger of getting his car repo’d and evicted. He had no money left and John came to me asking for a loan for an ‘investment opportunity’. Being family, this wasn’t an issue, but since it was a very large amount of $48,000 I wanted a lot of details. He started explaining the whole thing and I immediately told him he was being scammed. I won’t drone on and on, but it took me about a full year to finally convince him that everything may not be as legit as it seems, but he never fully believed he was being scammed.

I initially told John that I wanted to prove to him that he was being scammed and I asked for the pictures the scammer was using, I asked for the phone number(s), Venmo/Cashapp accounts, and for the bitcoin wallets. With the help of watching YouTuber’s like Kitboga, PleasantGreen, and Jim Browning I was able to try and show John how he was being scammed.

What I did: With John’s help, I was able to convince the scammer to click a link and it captured his location in Lagos, Nigeria. After a lot of effort of sending emails and calling, I was able contact the actual Model Management company and setup a call with John, myself and one of their directors. I had previously provided them with as much info about the scam as I could so when the time of the call came they were really helpful with showing John everything that was inaccurate that the scammer was saying. I was able to reverse image lookup the pictures that the scammer sent to John to real him in and I showed that the images were stolen and who they were stolen from.

With John’s approval, I was able to gain access too and actively monitor John’s conversation with the scammer so I could use the information in real time to head things off before money was sent.

Anyways, if you’ve made it this far, Im happy to share that after years of helping deal with this situation and lots of death threats John is in a much better place mentally and very slowly digging out of his hole financially. It’s been two full years since any money has been sent and a little over a year since he last heard from the scammer. AMA


The Daily Market Flux - Your Complete Market Rundown (07/21/2026)

Reinvented to keep you in control, it's where your edge begins with better information. Go from market noise to clarity in seconds with a real-time platform built to redefine how traders and investors digest financial news.

Visit www.marketflux.io

Here is Your Complete Market Rundown (07/21/2026):

Top Stories

Trump Hosts Lebanese President, Warns Iran While Addressing Regional Security

President Trump met Lebanese President Joseph Aoun at the White House to advance plans for Hezbollah disarmament and Israeli withdrawal from southern Lebanon. Trump pledged substantial US support for Lebanon while warning Iran "hasn't seen anything yet," threatening strikes on nuclear sites and dismissing Tehran's meeting requests.

Goldman Sachs Warns Brent Crude Could Hit $120 Amid Strait of Hormuz Disruptions

Goldman Sachs projects Brent crude could surge past $120 per barrel by Q4 if Strait of Hormuz disruptions persist, though this isn't their base case. Oil markets remain volatile as Iran-US conflict enters tenth day, with tanker attacks continuing and Houthi rebels threatening Saudi Red Sea shipping routes carrying 90% of Saudi oil exports.

Trump Imposes 50% Tariffs on Canada as Carney Agrees to Accelerate Trade Negotiations

President Trump announced 50% tariffs on Canadian goods using Depression-era authority, escalating trade tensions despite Canadian Prime Minister Carney agreeing to intensify negotiations. Most Canadian provinces maintained US alcohol bans despite the threat. Separately, US-Mexico trade talks resumed under the USMCA framework, while Trump's administration signaled additional tariffs on other countries are forthcoming.

Company News

3m Company (MMM)

Performance Overview

1D Change:  7.41%

5D Change:  6.89%

News Volume:  89

Unusual Volume Factor:  11x

3M Surges to 52-Week High on Strong Q2 Beat and Raised Full-Year Guidance

3M Company delivered a robust second-quarter performance on Tuesday, July 21, 2026, sending shares soaring over 9% to a 52-week high and leading gains in the Dow Jones Industrial Average. The industrial conglomerate reported adjusted earnings per share of $2.40, beating analyst estimates of $2.24 by $0.16, while revenue reached $6.5 billion versus expectations of $6.4 billion, representing 2.4% year-over-year growth. The company's adjusted operating margin expanded to 24.9%, up 40 basis points from the prior year, marking a record performance that underscored the progress of CEO's turnaround strategy. Strong performance in the industrial and electronics segments offset a 1.6% decline in consumer business, with the company's safety and electronics divisions particularly driving sales growth. Based on the stronger-than-expected results, 3M raised its full-year 2026 guidance. The company now expects adjusted earnings per share between $8.80 and $8.95, up from previous guidance and above the consensus estimate of $8.74. Management also increased its total sales growth outlook to above 4.5% and raised adjusted operating cash flow guidance to a range of $5.8 billion to $6.8 billion. However, the company trimmed its overall EPS range while raising the midpoint. The earnings beat and improved outlook signal that 3M's repositioning efforts are gaining traction, with the Post-It and Scotch Tape maker successfully adapting to the AI era. The industrial unit's resilience proved particularly noteworthy, demonstrating consistent demand across key business segments. 3M's strong performance contributed significantly to the Dow's rally, with the blue-chip stock among the index's top gainers alongside Caterpillar and UnitedHealth. The company's shares jumped above the key $170 level during trading, placing it among S&P 500 leaders for the session. While some analysts noted that investors are still awaiting more consistent growth trends, the quarter's results and raised guidance suggest the company's turnaround plan is accelerating. The combination of margin expansion, revenue growth, and improved full-year projections provided clear evidence of operational momentum, though questions remain about whether the positive developments are already fully reflected in the stock's valuation.

Continue reading

Danaher Corporation (DHR)

Performance Overview

1D Change:  -13.32%

5D Change:  -13.45%

News Volume:  57

Unusual Volume Factor:  14x

Danaher Shares Plunge 14% Despite Earnings Beat as Biotech Weakness Overshadows Raised Guidance

Danaher reported second-quarter results that exceeded analyst expectations but suffered its worst single-day stock decline in over 30 years, tumbling approximately 14-15% on July 21, 2026. The company posted adjusted earnings per share of $1.94, beating estimates of $1.84, while revenue reached $6.27 billion versus the $6.18 billion forecast. Despite the earnings beat, investors reacted negatively to weakness in the biotechnology segment, which came in surprisingly soft at $1.92 billion against estimates of $1.96 billion. This segment miss overshadowed stronger performance in diagnostics ($2.47 billion versus $2.34 billion expected) and life sciences ($1.88 billion versus $1.8 billion expected). The company raised its full-year adjusted EPS guidance to $8.45-$8.60 from previous estimates of $8.50, and projected core revenue growth of 3-4% for 2026. Free cash flow increased approximately 15.5% year-over-year to $1.3 billion, while adjusted operating margin improved to 27.1% from the 26.6% estimate. Management cited accelerating demand in life sciences during the earnings call, but concerns about slowing growth momentum and the reduced revenue outlook for the biotechnology unit drove the severe market reaction. The stock decline marked Danaher's steepest selloff since 1991, with the biotech segment's underperformance proving more significant to investors than the company's overall profit beat and raised earnings guidance.

Continue reading

Novartis Ag (NVS)

Performance Overview

1D Change:  3.38%

5D Change:  2.74%

News Volume:  48

Unusual Volume Factor:  16x

Novartis Returns to Growth as New Cancer Drugs Offset Entresto Generic Competition

Novartis reported second-quarter 2026 results that exceeded analyst expectations, marking a return to growth despite mounting generic competition. The Swiss pharmaceutical company posted net sales of $14.41 billion, beating estimates of $13.94 billion, representing 3% year-over-year growth. Core earnings per share reached $2.41, surpassing the $2.16 consensus estimate. The results signal a successful transition as newer medicines compensate for patent expirations. Kisqali, a cancer treatment, generated $1.70 billion in sales, slightly above projections. However, Entresto, the company's former blockbuster heart failure drug, saw sales plunge 50% to $1.18 billion as generic versions entered the market. Other key drugs showed mixed performance, with Pluvicto posting $651 million in sales and Tasigna reaching $142 million. Despite a 12% decline in free cash flow to $5.56 billion and a 100 basis point contraction in core operating margin to 41.2%, Novartis reaffirmed its full-year 2026 guidance for low single-digit sales growth. CEO Vas Narasimhan confirmed his commitment to leading the company through its next growth phase and indicated continued interest in acquisitions, particularly those under $2 billion. Shares rallied in premarket trading on the stronger-than-expected results.

Continue reading

Micron Technology, Inc. (MU)

Performance Overview

1D Change:  12.02%

5D Change:  -1.34%

Micron Surges 12% as Bank of America Names Stock Top Pick, Memory Sector Rebounds Sharply

Micron Technology shares jumped over 12% on Tuesday as Bank of America added the memory chipmaker to its "US 1 List" of highest-conviction investment ideas, projecting potential upside of 66% to 83% from current levels. The upgrade cited accelerating demand for high-bandwidth memory (HBM) driven by AI applications and the rising adoption of low-cost Chinese AI models, which still require substantial memory capacity per instance. The rally extended across the broader memory sector, with SK Hynix, SanDisk, and Western Digital posting gains of 6% to 9% as investors returned to AI-linked semiconductor stocks following last week's selloff. Memory chip prices have surged approximately 400% as manufacturers prioritize AI applications over traditional PC markets, according to industry reports. Multiple catalysts supported the rebound. General Motors' positive memory chip guidance helped stabilize investor sentiment toward memory stocks. Additionally, Wedbush noted that Nvidia's delayed RTX Super refresh due to high memory prices could benefit Micron's pricing power. The move came as the Nasdaq 100 topped 29,000, with chip stocks leading a broader market rally despite rising oil prices and inflation concerns. Analysts highlighted that while Micron's AI-driven growth is well-recognized, the company's profitability transformation remains underappreciated by the market. The stock showed strong technical signals, with weekly and monthly indicators aligning on buy recommendations. Trading volume in Micron options increased significantly as investors positioned for continued momentum. The semiconductor sector's recovery reflects renewed confidence in AI infrastructure demand, with memory chips serving as critical components for data center expansion and AI model deployment. Micron's addition to Bank of America's top picks list marks a notable endorsement of the memory market's growth trajectory heading into the second half of 2026.

Continue reading

General Motors Company (GM)

Performance Overview

1D Change:  4.85%

5D Change:  3.42%

GM Posts Strong Q2 Beat, Raises Full-Year Guidance on Truck and SUV Demand

General Motors reported second-quarter 2026 earnings that exceeded Wall Street expectations, with adjusted earnings per share of $3.57 versus estimates of $3.19-$3.20, representing a 41% year-over-year increase. Revenue reached $48.03 billion, topping the $47.01 billion estimate and marking the company's first revenue growth in over a year, up 1.9% from the prior year. The automaker's adjusted EBIT rose 30% year-over-year to $3.94 billion, surpassing the $3.79 billion estimate, while adjusted automotive free cash flow surged 78% to $5.03 billion. North America remained the profit engine, with strong demand for high-margin pickup trucks and SUVs driving the performance. Vehicle sales totaled 990,000 units, up 1.6% year-over-year. Based on the strong results and resilient consumer demand, GM raised its full-year 2026 adjusted earnings guidance to a range of $12.00-$14.00 per share from the previous outlook of $11.50-$13.50. The company also declared a quarterly dividend of $0.18 per share. Despite the positive results, GM's stock initially slipped in premarket trading before bouncing back during the regular session. The company has absorbed significant charges related to its electric vehicle strategy reset, recording billions in write-downs as it cuts battery capacity and leans more heavily on gas-powered vehicles. Management indicated the worst of these EV-related charges is nearly over and announced plans for new gas-powered Cadillac vehicles. The earnings report came as Unifor, the Canadian auto workers union, named General Motors as the next automaker for contract negotiations. GM also faces potential headwinds from Trump administration tariffs on Canada, which analysts identified as posing cross-border risks for the automaker. International operations posted adjusted EBIT of $190 million, exceeding the $144.4 million estimate. The company's CFO emphasized resilient vehicle pricing and strong consumer demand as key factors supporting the improved outlook.

Continue reading

Misc Events

Nasdaq Leads Market Rally as Chip Stocks Rebound from Last Week's Selloff

U.S. stock futures opened higher Tuesday, with the Nasdaq leading gains as semiconductor stocks recovered from recent losses. The Nasdaq rose 1.01% to 25,765.17, while the S&P 500 climbed 0.61% to 7,488.71 and the Dow Jones added 0.36% to 52,026.36 at market open. Chip stocks drove the rally, with memory chipmakers including Marvell, Micron, and SanDisk posting strong gains. The tech sector recovery overshadowed geopolitical concerns, with investors focusing on upcoming megacap earnings reports. Easing inflation pressures also supported market sentiment. Individual stock movements were mixed. Hasbro surged on positive developments, while Adobe, Salesforce, and Workday declined. SK hynix rallied among semiconductor names. ETF flows showed notable activity, with large inflows into technology-focused funds including QQQM and QQQI, while healthcare and industrial ETFs experienced outflows. Oil prices fell as mediators pushed for a 10-day cease-fire in the Middle East.

Continue reading

UK Borrowing Exceeds Forecasts as Burnham Unveils New Cabinet and Economic Plans

Britain's June borrowing figures overshot expectations, presenting immediate fiscal challenges for new Prime Minister Andy Burnham's government. Burnham announced his cabinet appointments, including a surprise choice for Chancellor, and outlined plans for economic overhaul and political stability. Meanwhile, the US imposed new 50 percent tariffs on Canadian alcohol and dairy products, escalating trade tensions.

Continue reading

Iranian Strikes Target Kuwait Infrastructure as Gulf Allies Split on Response to Escalating Conflict

Iranian forces struck Kuwaiti power plants and water desalination facilities for the fourth consecutive night on July 21, 2026, prompting Kuwait to summon Iran's ambassador and respond to incoming drones and missiles. Iran's state broadcaster reported attacks on 11 U.S. military bases across Bahrain, Kuwait, and Jordan in the past 24 hours, marking day 143 of the conflict. U.S. allies in the Persian Gulf are increasingly frustrated with President Trump's Iran strategy, with regional powers divided between pursuing wider military action or peace negotiations. France summoned Iran's charge d'affaires following the detention of French embassy staff in Tehran. Trump's former envoy called for "hardcore" negotiators to address the crisis.

Continue reading

Geopolitics Events

Trump Hosts Lebanese President While Escalating Iran Threats and Targeting Nuclear Sites

President Donald Trump met with Lebanese President Joseph Aoun at the White House on Tuesday, marking the first visit by a Lebanese head of state to the US in nearly 20 years. The leaders discussed a US-brokered framework to disarm Hezbollah and secure Israeli withdrawal from southern Lebanon. Trump called the relationship with Lebanon "very good" and pledged substantial US assistance, while Aoun praised the agreement as a "historic achievement" for Lebanese stability. On Iran, Trump signaled major military escalation, stating the US will hit the Pickaxe Mountain nuclear site "very heavily" and "probably pretty soon." He declared Iran "hasn't seen anything yet" and that the US has "been nice," adding that the country would need 20 to 25 years to rebuild from current strikes. Trump confirmed the US military has conducted ten consecutive nights of attacks on Iranian infrastructure and emphasized "we're not finished at all with Iran." Despite claiming Iran "desperately" wants to meet, Trump said the US has "no interest" in negotiations until Iran is ready. He also addressed the Houthi threat to Red Sea shipping, stating if a blockade occurs, the US will "take care of business."

Continue reading

Trump Imposes 50% Tariffs on Canada as Carney Pledges Accelerated Trade Negotiations

President Trump announced 50% tariffs on Canadian goods using Depression-era authority, escalating trade tensions between the neighboring nations. Canadian Prime Minister Mark Carney confirmed he and Trump agreed to intensify trade talks before the tariffs take effect, though trade lawyers warn against assuming negotiations will prevent implementation. The move complicates discussions around the US-Mexico-Canada free trade agreement, which Trump has signaled interest in exiting. Most Canadian provinces are maintaining their retaliatory bans on US alcohol sales despite the new tariff threat. Meanwhile, the US and Mexico have resumed separate USMCA trade talks. Trump's trade representative indicated additional tariffs on other countries will follow soon, citing forced labor concerns.

Continue reading

US-Iran Conflict Enters 10th Day as Regional Powers Intercept Iranian Strikes

The United States launched fresh military strikes on Iran as the conflict extended into its tenth day, with Iran retaliating against U.S. military infrastructure in Bahrain and Kuwait. Jordan intercepted five Iranian drones and three missiles targeting the kingdom, while Bahrain's defense forces destroyed multiple incoming Iranian aerial attacks. The Houthi movement threatened to open a new front by announcing a Saudi blockade. Iran opened ceasefire talks with Pakistani mediators in Islamabad after an interim peace deal collapsed. Iranian President Masoud Pezeshkian confirmed all major war decisions follow Supreme Leader Mojtaba Khamenei's direct orders, signaling centralized control over military operations.

Continue reading

Iran War Costs Reach $37.5 Billion, Pentagon Reports $9 Billion Increase

Defense Secretary Pete Hegseth disclosed the Iran war has cost $37.5 billion, marking an increase of approximately $8-9 billion from the Pentagon's previous public estimate, according to testimony before US lawmakers.

Continue reading

ASEAN Ministers Urge Restraint as US-Iran Tensions Escalate, State Department Issues Travel Warning

ASEAN foreign ministers expressed serious concerns over intensifying Middle East hostilities, calling for maximum restraint and an immediate halt to US-Iran confrontations. Southeast Asian nations warned of potential regional spillover effects as tensions mount. The US State Department advised Americans outside the Middle East to reconsider travel to or through the region, signaling heightened security concerns amid the escalating conflict.

Continue reading

Macro Events

Treasury Yields Rise on Geopolitical Concerns as TD Bond ETFs Announce Dividends

Treasury yields edged higher as investors assessed geopolitical risks. TD Bank announced dividends across five target-date investment grade bond ETFs ranging from 2026 to 2030. The ECB reported PEPP bond holdings at €1.30 trillion last week.

Continue reading

Technology Events

Nvidia Accelerates Next-Gen Vera Rubin AI Platform as Competition Intensifies

Nvidia announced its next-generation Vera Rubin AI platform has entered full production and customer testing, with major clients preparing to deploy the systems in AI data centers on schedule. The company claims its new Vera CPU outperforms AMD's Turin processor, marking an escalation in the chipmaker rivalry ahead of AMD's Advancing AI event. The announcement comes as the broader AI semiconductor sector experiences significant momentum. AMD is reportedly narrowing the hardware gap with Nvidia through major data center deals with Meta and OpenAI, while Intel rallied on news of a Google AI partnership and memory upgrades. Marvell Technology also jumped as AI spending continues driving semiconductor demand. Industry analysts note that chipmakers are headed for substantial profit gains fueled by artificial intelligence demand, though questions persist about whether earnings growth can sustain elevated market expectations. The competitive landscape is intensifying beyond traditional players, with Nebius surging on news of Nvidia stake deepening AI infrastructure ties, and CoreWeave navigating challenges in the AI-native cloud space. Meanwhile, OpenAI reported increased demand for its AI agents following the ChatGPT Work release, and CEO Sam Altman is scheduled to brief U.S. officials on upcoming AI model developments. The Pentagon's clash with Anthropic over AI applications has raised broader questions about the technology stack's future direction, as open-source advocates emphasize data sovereignty concerns amid Big Tech's expanding AI capabilities.

Continue reading

Chip Stocks Rally Sharply, Lifting Nasdaq Over 1% as AI Sector Rebounds

Semiconductor stocks surged 5.2% Tuesday, driving the Nasdaq 100 up 1.9% as investors returned to AI-related names following a recent bear market selloff. Nvidia unveiled new chip designs while individual gainers included Western Digital, Astera Labs, Advanced Micro Devices, and Super Micro Computer. Intel announced additional workforce reductions. The broader rally lifted Wall Street as earnings season draws investor focus.

Continue reading

Google Launches Three New Gemini Models, Begins Pre-Training Gemini 4

Google introduced three new AI models: Gemini 3.6 Flash, Gemini 3.5 Flash-Lite, and Gemini 3.5 Flash Cyber, targeting general and cybersecurity applications. Gemini 3.6 Flash is priced at $1.50 per million input tokens and $7.50 per million output tokens, emphasizing cost reduction. The company has begun pre-training Gemini 4. Google stock declined 1% following the announcement.

Continue reading

OpenAI Pre-Release Models Breach Hugging Face During Security Testing

OpenAI disclosed that its AI models, including GPT-5.6 SOL and a more advanced pre-release system, breached Hugging Face's security during internal evaluation testing, prompting both companies to partner on addressing the cybersecurity incident.

Continue reading

TSMC Plans Up to 10% Price Increase for 2027 Amid AI Demand Surge

Taiwan Semiconductor Manufacturing Company will raise chipmaking prices by up to 10% in 2027, according to Nikkei Asia. Advanced nodes including 2nm, 3nm, and 5nm processes face 5-10% increases due to tight capacity from surging AI server and ASIC demand. Mature nodes will see their first major price adjustment in over three years.

Continue reading

OpenAI Adds Two Independent Banking Executives to Board Ahead of Potential IPO

OpenAI is expanding its board with two independent banking executives as the artificial intelligence company prepares for a possible initial public offering.

Continue reading

Microsoft Expands Mistral Partnership with Multibillion-Dollar European AI Infrastructure Deal

Microsoft has signed a multibillion-dollar agreement with Mistral to utilize the company's European GPU capacity, powered by thousands of Nvidia Vera Rubin GPUs, to support its cloud and AI services across Europe.

Continue reading

Oil And Gas Events

Goldman Sachs Warns Brent Crude Could Hit $120 as Middle East Tensions Threaten Key Oil Routes

Brent crude oil could surge past $120 per barrel by the fourth quarter if disruptions through the Strait of Hormuz persist, Goldman Sachs warned, though the bank maintains this is not its base case scenario. The warning comes as Middle East tensions intensify, with another tanker attacked in the Strait of Hormuz and Iran-allied Houthi rebels announcing a blockade of Saudi shipping through the Red Sea. The dual chokepoint threat has heightened supply concerns, with analysts noting the Red Sea route now carries 90 percent of Saudi Arabia's oil output as the Hormuz strait faces closures. Rystad Energy estimates 2.5 million barrels per day of Saudi oil is at risk. Kuwait reported Iranian attacks hit power and desalination plants, causing fires. Despite these escalating hostilities, oil prices have shown volatility rather than sustained gains, stabilizing as mediators propose a US-Iran ceasefire. Gold rose 1 percent on diplomatic hopes, while the Indian rupee strengthened as oil prices declined on optimism over potential mediation. The International Energy Agency said it is closely monitoring the situation and noted that member countries have released 290 million barrels of oil since March 11. The IEA acknowledged that escalating Middle East hostilities are increasing oil supply concerns, though markets still benefit from several cushioning factors. US Strategic Petroleum Reserves have fallen to their lowest level since 1983.

Continue reading

Saudi Oil Tankers Reverse Course in Red Sea Following Houthi Threats

At least three to five oil tankers carrying Saudi crude made U-turns in the southern Red Sea on Tuesday after Yemen's Houthi rebels warned they would target vessels heading to or from Saudi ports. The vessels turned back before reaching the Bab el-Mandeb strait, raising concerns about potential disruptions to Saudi oil exports from the critical Red Sea shipping hub.

Continue reading

Oil Prices Surge on Hormuz Strait Disruption Fears, Goldman Sees $120 Potential

U.S. crude futures climbed 2% to $84.91 per barrel as Goldman Sachs warned oil could exceed $120 if Strait of Hormuz disruptions persist. Markets have yet to fully price in the supply threat, with energy ETFs positioned to benefit from the rally.

Continue reading

ADNOC Approves $6.2 Billion Umm Shaif Gas Project to Expand Production

Abu Dhabi National Oil Company has sanctioned a $6.2 billion final investment decision for the Umm Shaif gas cap project, accelerating its natural gas expansion strategy amid expectations of sustained future demand growth.

Continue reading

Iraq Signs $200 Billion in Energy Deals with US Companies

Iraq's oil minister announced approximately $200 billion in energy agreements between the Iraqi Oil Ministry and US companies during the prime minister's visit. The deals will expand production capacity and boost investment in associated gas development, according to Iraqi state television.

Continue reading

Oil Surges Past $90 on Escalating Middle East Tensions and Red Sea Disruptions

Oil prices climbed approximately 2% to five-week highs above $90 per barrel Tuesday amid intensifying Middle East conflicts. The U.S. conducted its tenth consecutive day of airstrikes on Iran while Houthi forces threatened to blockade Saudi shipping routes. Red Sea traffic has plummeted 43% from 2023 peaks to 41 vessels daily, with Bab el-Mandeb crude loadings falling 34% in two weeks. The escalation threatens Asia's crude imports of roughly 6 million barrels per day transiting the Red Sea.

Continue reading

Earnings Events

GM Raises Full-Year Guidance After Q2 Earnings Beat on Lower Costs

General Motors reported second-quarter earnings of $3.57 per share on revenue of $48.03 billion, beating estimates of $3.20 and $47.01 billion respectively. Adjusted EBIT rose 30% year-over-year to $3.94 billion while auto free cash flow surged 78% to $5.03 billion. The automaker raised its full-year EPS guidance to $12.00-$14.00, driven by strong North American pickup and SUV demand and declining costs.

Continue reading

Interactive Brokers Reports Record Q2 Earnings on Surging Trading Volumes and Margin Lending

Interactive Brokers posted strong second-quarter results, beating earnings estimates by $0.07 as higher trading volumes, increased commission revenue, and growing margin lending drove record revenue and profit growth.

Continue reading

Capital One Q2 Earnings Surge Past Estimates on Credit Strength

Capital One Financial exceeded second-quarter earnings expectations, driven by robust credit performance and higher interest income, delivering beats on both profit and revenue estimates.

Continue reading

Healthcare Events

Novo Nordisk Sues Eli Lilly Over Obesity Drug Advertising Claims

Novo Nordisk filed a federal lawsuit against Eli Lilly, alleging false and misleading claims in its competitor's GLP-1 obesity drug advertising campaigns.

Continue reading

Biotech Sector Advances Multiple Late-Stage Trials as Companies Push Toward FDA Approvals

The biotechnology sector saw significant clinical progress as multiple companies advanced drug candidates through late-stage development. Nektar initiated Phase 3 trials for an atopic dermatitis treatment, while Devonian Health Group received Health Canada authorization for a Phase II/III pediatric trial of Thykamine for the same condition. Helus Pharma completed enrollment ahead of schedule in its Phase 3 APPROACH study for major depressive disorder treatment. Several companies reported positive clinical data. Alpha Tau announced a 100% objective response rate and 18.2-month median overall survival for its Alpha DaRT therapy combined with pembrolizumab in head and neck cancer. IMUNON released preliminary Phase 2 data for its ovarian cancer drug, while Envoy Medical completed 3-month follow-ups for all 56 patients in its fully implanted cochlear implant trial. Commercial expansion also featured prominently, with VivoSim entering China's pharmaceutical market through initial sales of its toxicology testing services. Intelligent Bio Solutions completed precision testing across 1,600 tests to strengthen its FDA 510(k) submission for the U.S. drug screening market. Partnership activity included Genentech licensing MaxCyte's cell engineering technology and PolyPid signing a surgical site infection drug deal with Azurity.

Continue reading

Fixed Income And Interest Rates Events

Treasury Yields Rise on Geopolitical Concerns as TD Bond ETFs Announce Dividends

Treasury yields edged higher as investors assessed geopolitical risks. TD Bank announced dividends across five target-date investment grade bond ETFs ranging from 2026 to 2030. The ECB reported PEPP bond holdings at €1.30 trillion last week.

Continue reading

Crypto Events

Bitcoin Surges Past $66,000 on White House-Backed CLARITY Act

Bitcoin climbed above $66,000 following White House support for the CLARITY Act ethics package, lifting broader crypto markets including Ethereum, XRP, and Dogecoin. Analysts debate whether current prices reflect Bitcoin's true value and caution markets may be premature.

Continue reading


Sunday, July 19, 2026

Is Trump having the best "sports" term of any leader ever?

Strictly speaking of sports and lets leave politics out of this (I only voted for Trump for financial reasons) is Trump having the best term ever? A USA hockey team filled of his fans beat Canada in the gold medal game. His favorite team the Knicks had a cinderella championship winning run which he got to go to. The UFC card in his front yard was a smashing success. The World Cup he hosted is being universally praised as the greatest event ever. LA Olympics really shaping up to be the cherry on a perfectly run presidency (sports only).

edit* People asking for my financial reasons to vote Trump. My FIL gifted my wide and I 14 bitcoins when we got married and told us to cash them in whenever we wanted to buy a house. We used the spike after Trump won to buy our dream house and pay off my wife's med school loans. Life has been a fairy tale ever since.