Skip to content
Skills Library
Finance & accounting · Tool integration

a-share-runtime-data-access

/a-share-runtime-data-access

Use when the task requires reading A-share stock data, financial data, valuation context, or querying local stock collections through core.skill_runtime runtime interfaces.

Licence
Apache-2.0
Last repository change
22.09.2026

Assessment and security

98/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene13 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 22.09.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use when the task requires reading A-share stock data, financial data, valuation context, or querying local stock collections through core.skill_runtime runtime interfaces.

Original author description

Use when the task requires reading A-share stock data, financial data, valuation context, or querying local stock collections through core.skill_runtime runtime interfaces.

How it works

  1. Scope
  2. First Read
  3. Runtime Rules
  4. Preferred Helpers
  5. How To Execute In Embedded Nanobot
  6. Windows Execution Rule
  7. Minimal Script Pattern
  8. Helper Selection Guide
  9. Response Expectations
Original SKILL.md headings · 122 lines, 734 words
SKILL.md preview
---
name: a-share-runtime-data-access
description: Use when the task requires reading A-share stock data, financial data, valuation context, or querying local stock collections through core.skill_runtime runtime interfaces.
metadata: '{"nanobot":{"always":true}}'
---

# A-share Runtime Data Access

Use this skill when the user asks for A-share local data retrieval, quote lookup, financial period lookup, valuation context building, technical indicator lookup, or schema inspection through the project's public runtime interfaces and local tools.

## Scope

- Only handle A-share data in this workflow.
- Do not switch to multi-market logic unless the user explicitly changes scope.
- Prefer the project's public runtime interfaces over direct database access.

## First Read

Before fetching data, read these documents in order:

1. `docs/design/runtime-interfaces/skill-runtime-overview.md`
2. `docs/design/runtime-interfaces/local-data-access-design.md`
3. `docs/design/runtime-interfaces/project-access-and-governance.md`

If you need concrete function signatures or allowed collections, then read:

1. `core/skill_runtime/data_access.py`
2. `core/skill_runtime/project_access.py`
3. `core/skill_runtime/catalog.py`

## Runtime Rules

- Prefer `core.skill_runtime.data_access` for business-semantic data access.
- Use `core.skill_runtime.project_access` only when helper functions are insufficient or when inspecting schema / field coverage.
- Do not create `MongoClient` or import `pymongo` directly.
- Do not bypass `core.skill_runtime` by reading lower-level provider or database modules unless the user explicitly asks for code archaeology.
- For technical analysis, prefer the project's local technical tools and materialized snapshots over ad hoc indicator calculation.

## Preferred Helpers

For common A-share tasks, prefer these helpers first:

1. `get_stock_basic_info(symbol)`
2. `get_market_quotes(symbol)`
3. `get_latest_stock_price(symbol)`
4. `get_stock_daily_quotes(symbol, start_date, end_date)`
5. `get_stock_financial_periods(symbol)`
6. `get_stock_financial_data(symbol)`
7. `get_stock_valuation_context(symbol)`
8. `get_stock_news(symbol)`
9. `query_stock_collection(collection, ...)`
10. `inspect_stock_collection_schema(collection, ...)`

For technical-analysis tasks, prefer these entry points first:

1. `core.tools.implementations.market.technical_factor_bundle_tool.get_technical_factor_bundle_tool`
2. `core.tools.implementations.market.technical_indicators.get_technical_indicators`

Use the factor bundle first when the user needs structured MA20, RSI14, KDJ, or MACD values.
Use `get_technical_indicators` only when the user wants a readable technical-analysis report rather than a structured factor payload.

When checking freshness or explaining discrepancies, inspect these components in order:

1. `stock_technical_indicators` latest `trade_date`
2. `market_quotes` latest `trade_date`
3. `app/services/technical_indicator_materialization_service.py`
4. `app/main.py` technical indicator materialization job configuration

## How To Execute In Embedded Nanobot

The embedded nanobot runtime does not expose `core.skill_runtime` as a first-class tool yet.
When you need actual data, do this:

1. Read the design docs and target runtime module.
2. If the goal is only validation, inspection, or one-time probing, write a short temporary Python script under `temp/`.
3. Run the script with `C:\TradingAgentsCN\env\Scripts\python.exe` using the `exec` tool.
4. Summarize the returned data clearly for the user.

Do not treat a `temp/*.py` script as the final artifact when the logic is clearly reusable.
If the requested logic is parameterizable and should work for other stocks or other future runs, use the temp script only as a short validation probe and then promote the implementation into a reusable skill.

For technical-analysis tasks in embedded nanobot, use this execution pattern:

1. If the user wants structured technical values, call `get_technical_factor_bundle_tool` from a temp script.
2. If the user wants a textual technical interpretation, call `get_technical_indicators` from a temp script.
3. If the tool result conflicts with price data, compare `stock_technical_indicators.trade_date` against `market_quotes.trade_date` before concluding there is a bug.

For embedded runtime work, apply this boundary:

1. use temp scripts for fast verification and data access that the runtime does not yet expose directly
2. if the output is becoming a named reusable capability, convert it into a skill instead of leaving it in `temp/`
3. if the task is still exploratory and the reusable shape is not yet confirmed, say that explicitly

## Windows Execution Rule

On Windows, do not rely on inline `python -c` snippets for runtime verification.
Prefer writing a temporary `.py` file and then executing it. This avoids quoting and shell-expansion issues.

## Minimal Script Pattern

```python
from pathlib import Path
import sys

repo = Path(r"C:\TradingAgentsCN")
sys.path.insert(0, str(repo))

from core.skill_runtime.data_access import get_stock_basic_info

data = get_stock_basic_info("600519")
print(data)
```

## Helper Selection Guide

- If the user asks for one stock's snapshot, start with `get_stock_basic_info` or `get_stock_valuation_context`.
- If the user asks for multi-period fundamentals, start with `get_stock_financial_periods`.
- If the user asks for technical indicators, start with `get_technical_factor_bundle_tool`.
- If the user asks for a prose-style technical reading, use `get_technical_indicators` after confirming the requested date range.
- If the user asks for local collection availability or fields, start with `inspect_stock_collection_schema`.
- If the user asks for a direct collection sample, use `query_stock_collection` only after confirming the collection is publicly exposed in `catalog.py`.

## Response Expectations

- State which runtime interface you used.
- If data is empty, state whether the helper returned no records or the collection/helper is not exposed.
- When validation fails, report whether the problem is instruction gap, interface usage error, or missing underlying data.

Versions

The database has no other skills named a-share-runtime-data-access.

Database snapshot: 13.11.2026 · package version 4c4c0cdc84d7 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100china-clean-data-xls
    Clean and normalize A-share financial data for modeling. Adapts the original clean-data-xls skill for Chinese financial statements, CAS conventions, and A-share data formats. Triggers on "A股数据清洗", "财务数据清洗", "clean financial data China", "数据清洗", or "normalize financial statements".
  • 91stock-data-acquisition
    股票数据获取完整框架 - 时间锚定 + 多数据源切换 + 智能缓存 + 自选股管理。整合美股SOP、A股交易日历、股价缓存、自选股监控四大核心能力。 Use when: 股票数据, stock data, 获取股价, A股数据, 美股数据, 港股数据, 交易日判断, 数据源切换, 自选股管理. Do NOT use for: - 股票分析研判(用 stock-analysis-framework) - 交易执行(用 grid-trading-system) - 实时行情推送(用 stock-watcher) - 财务报表分析(用财务分析 skills)
  • 100stock-share
    查询股票股本信息。当用户需要查询某只 A 股在某日的总股本、A 股流通/限售/无限售股本、B 股股本、H 股股本、境外上市股本等股本结构,或按发布日期/生效日期查询某日全市场股本记录时使用。
  • 100stock-goodwill-market-overview
    Get A-share market-wide goodwill overview (A股商誉市场概况) with historical trends. Use when user asks about 商誉市场概况, 全市场商誉, 商誉历史趋势, goodwill market overview.
  • 100market-data
    Fetches and processes real-time and historical stock market data from TDX protocol servers. Provides K-line data at multiple intervals, real-time quotes, and market overviews. Trigger when the user requests stock prices, market data, or financial instrument data.
  • 100financial-data-fetcher
    This skill should be used when the user asks to '查一下XX的财务数据', '这只股票估值多少', '找一下XX ETF', '对比一下同行', 'ETF日线行情', or when any analysis task needs financial statements, valuation metrics, ETF listings, or ETF daily OHLCV data. Fetches stock financials (revenue, profit, margins, ROE,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.