# jagres0039/hermes-market-skills architecture

> Architecture diagram of the GitHub repository jagres0039/hermes-market-skills, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jagres0039/hermes-market-skills
- Repository: https://github.com/jagres0039/hermes-market-skills

## Overview

Hermes Market Skills provides three independent command-line market-analysis skills for crypto, Indonesian equities, and forex/commodities. A user or Hermes agent selects a skill and symbol; the CLI retrieves asset data and produces price, technical-analysis, news, or recommendation output. Recommendations combine shared signal scoring with asset-specific context; crypto and forex also support SMC and walk-forward backtests. Shared helpers cover charting, news, sentiment, macro context, Telegram ingestion, and optional LLM summaries. The README documents these capabilities, but some implementation wiring was not sampled, so uncertain call relationships are omitted.

Main entry points: [`skills/crypto/analyze.py`](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/crypto/analyze.py) (Crypto CLI), [`skills/forex_comm/analyze.py`](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/forex_comm/analyze.py) (Forex CLI), [`skills/saham_idn/analyze.py`](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/saham_idn/analyze.py) (IDX stock CLI), [`skills/_shared/news_aggregator.py`](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/news_aggregator.py) (News aggregation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_asset_skills["Asset Skills"]
  node_crypto_cli["Crypto CLI<br/>[analyze.py]"]
  node_crypto_recommend["Crypto recommendations<br/>[recommend.py]"]
  node_saham_cli["IDX stock CLI<br/>[analyze.py]"]
  node_saham_recommend["IDX recommendations<br/>[recommend.py]"]
  node_forex_cli["Forex CLI<br/>[analyze.py]"]
  node_forex_recommend["Forex recommendations<br/>[recommend.py]"]
end

subgraph group_shared_analysis["Shared Analysis"]
  node_ta["Technical analysis<br/>[ta.py]"]
  node_signals["Signal engine<br/>[signals.py]"]
  node_smc["SMC detectors<br/>[smc.py]"]
  node_backtest["Backtest engine<br/>[backtest.py]"]
  node_news["News aggregation<br/>[news_aggregator.py]"]
  node_sentiment["Sentiment scoring<br/>[sentiment.py]"]
  node_macro["Macro context<br/>[macro.py]"]
  node_telegram["Telegram ingestion<br/>[telegram_news.py]"]
  node_chart["Chart generation<br/>[chart.py]"]
  node_narrative["LLM summary<br/>[llm_summary.py]"]
end

subgraph group_data_adapters["Data Adapters"]
  node_crypto_feeds["Crypto feeds<br/>[feeds.py]"]
  node_saham_feeds["IDX stock feeds<br/>[feeds.py]"]
  node_forex_feeds["Forex feeds<br/>[feeds.py]"]
end

subgraph group_integrations["External Integrations"]
  node_crypto_services["Crypto data services"]
  node_market_services["Market data services"]
  node_news_services["News sources"]
  node_llm_service["Hermes LLM endpoint"]
end

node_user(("User / Hermes"))

node_user -->|"invokes"| node_crypto_cli
node_user -->|"invokes"| node_saham_cli
node_user -->|"invokes"| node_forex_cli
node_crypto_cli -->|"requests data"| node_crypto_feeds
node_crypto_cli -->|"evaluates"| node_crypto_recommend
node_crypto_cli -->|"computes indicators"| node_ta
node_crypto_cli -->|"runs backtest"| node_backtest
node_crypto_recommend -->|"scores context"| node_signals
node_crypto_recommend -->|"computes overlay"| node_smc
node_saham_cli -->|"requests data"| node_saham_feeds
node_saham_cli -->|"evaluates"| node_saham_recommend
node_saham_cli -->|"computes indicators"| node_ta
node_saham_recommend -->|"scores context"| node_signals
node_saham_recommend -->|"reads IHSG context"| node_macro
node_forex_cli -->|"requests data"| node_forex_feeds
node_forex_cli -->|"evaluates"| node_forex_recommend
node_forex_cli -->|"computes indicators"| node_ta
node_forex_cli -->|"runs backtest"| node_backtest
node_forex_recommend -->|"scores context"| node_signals
node_forex_recommend -->|"computes overlay"| node_smc
node_crypto_feeds -->|"fetches market data"| node_crypto_services
node_saham_feeds -->|"fetches market data"| node_market_services
node_forex_feeds -->|"fetches market data"| node_market_services
node_crypto_recommend -->|"fetches headlines"| node_news
node_saham_recommend -->|"fetches headlines"| node_news
node_forex_recommend -->|"fetches headlines"| node_news
node_news -->|"scores sentiment"| node_sentiment
node_news -.->|"optionally ingests"| node_telegram
node_telegram -.->|"reads channels"| node_news_services
node_crypto_cli -->|"generates chart"| node_chart
node_saham_cli -->|"generates chart"| node_chart
node_forex_cli -->|"generates chart"| node_chart
node_crypto_cli -.->|"optionally summarizes"| node_narrative
node_saham_cli -.->|"optionally summarizes"| node_narrative
node_forex_cli -.->|"optionally summarizes"| node_narrative
node_narrative -.->|"requests completion"| node_llm_service

click node_crypto_cli "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/crypto/analyze.py"
click node_crypto_feeds "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/crypto/feeds.py"
click node_crypto_recommend "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/crypto/recommend.py"
click node_saham_cli "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/saham_idn/analyze.py"
click node_saham_feeds "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/saham_idn/feeds.py"
click node_saham_recommend "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/saham_idn/recommend.py"
click node_forex_cli "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/forex_comm/analyze.py"
click node_forex_feeds "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/forex_comm/feeds.py"
click node_forex_recommend "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/forex_comm/recommend.py"
click node_ta "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/ta.py"
click node_signals "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/signals.py"
click node_smc "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/smc.py"
click node_backtest "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/backtest.py"
click node_news "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/news_aggregator.py"
click node_sentiment "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/sentiment.py"
click node_macro "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/macro.py"
click node_telegram "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/telegram_news.py"
click node_chart "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/chart.py"
click node_narrative "https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/llm_summary.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_crypto_cli,node_crypto_recommend,node_saham_cli,node_saham_recommend,node_forex_cli,node_forex_recommend,node_user toneBlue
class node_ta,node_signals,node_smc,node_backtest,node_news,node_sentiment,node_macro,node_telegram,node_chart,node_narrative toneAmber
class node_crypto_feeds,node_saham_feeds,node_forex_feeds toneMint
class node_crypto_services,node_market_services,node_news_services,node_llm_service toneRose
```

## Components

### Asset Skills

- [Crypto CLI](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/crypto/analyze.py): `skills/crypto/analyze.py`
- [Crypto recommendations](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/crypto/recommend.py): `skills/crypto/recommend.py`
- [IDX stock CLI](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/saham_idn/analyze.py): `skills/saham_idn/analyze.py`
- [IDX recommendations](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/saham_idn/recommend.py): `skills/saham_idn/recommend.py`
- [Forex CLI](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/forex_comm/analyze.py): `skills/forex_comm/analyze.py`
- [Forex recommendations](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/forex_comm/recommend.py): `skills/forex_comm/recommend.py`

### Shared Analysis

- [Technical analysis](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/ta.py): `skills/_shared/ta.py`
- [Signal engine](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/signals.py): `skills/_shared/signals.py`
- [SMC detectors](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/smc.py): `skills/_shared/smc.py`
- [Backtest engine](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/backtest.py): `skills/_shared/backtest.py`
- [News aggregation](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/news_aggregator.py): `skills/_shared/news_aggregator.py`
- [Sentiment scoring](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/sentiment.py): `skills/_shared/sentiment.py`
- [Macro context](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/macro.py): `skills/_shared/macro.py`
- [Telegram ingestion](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/telegram_news.py): `skills/_shared/telegram_news.py`
- [Chart generation](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/chart.py): `skills/_shared/chart.py`
- [LLM summary](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/_shared/llm_summary.py): `skills/_shared/llm_summary.py`

### Data Adapters

- [Crypto feeds](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/crypto/feeds.py): `skills/crypto/feeds.py`
- [IDX stock feeds](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/saham_idn/feeds.py): `skills/saham_idn/feeds.py`
- [Forex feeds](https://github.com/jagres0039/hermes-market-skills/blob/main/skills/forex_comm/feeds.py): `skills/forex_comm/feeds.py`

### External Integrations

- **Crypto data services**
- **Market data services**
- **News sources**
- **Hermes LLM endpoint**

### Other components

- **User / Hermes**

## Connections

- User / Hermes → Crypto CLI: invokes
- User / Hermes → IDX stock CLI: invokes
- User / Hermes → Forex CLI: invokes
- Crypto CLI → Crypto feeds: requests data
- Crypto CLI → Crypto recommendations: evaluates
- Crypto CLI → Technical analysis: computes indicators
- Crypto CLI → Backtest engine: runs backtest
- Crypto recommendations → Signal engine: scores context
- Crypto recommendations → SMC detectors: computes overlay
- IDX stock CLI → IDX stock feeds: requests data
- IDX stock CLI → IDX recommendations: evaluates
- IDX stock CLI → Technical analysis: computes indicators
- IDX recommendations → Signal engine: scores context
- IDX recommendations → Macro context: reads IHSG context
- Forex CLI → Forex feeds: requests data
- Forex CLI → Forex recommendations: evaluates
- Forex CLI → Technical analysis: computes indicators
- Forex CLI → Backtest engine: runs backtest
- Forex recommendations → Signal engine: scores context
- Forex recommendations → SMC detectors: computes overlay
- Crypto feeds → Crypto data services: fetches market data
- IDX stock feeds → Market data services: fetches market data
- Forex feeds → Market data services: fetches market data
- Crypto recommendations → News aggregation: fetches headlines
- IDX recommendations → News aggregation: fetches headlines
- Forex recommendations → News aggregation: fetches headlines
- News aggregation → Sentiment scoring: scores sentiment
- News aggregation → Telegram ingestion: optionally ingests
- Telegram ingestion → News sources: reads channels
- Crypto CLI → Chart generation: generates chart
- IDX stock CLI → Chart generation: generates chart
- Forex CLI → Chart generation: generates chart
- Crypto CLI → LLM summary: optionally summarizes
- IDX stock CLI → LLM summary: optionally summarizes
- Forex CLI → LLM summary: optionally summarizes
- LLM summary → Hermes LLM endpoint: requests completion
