kr-portfolio-monitor
Skill2 starsChanged 12 days agoMITView on GitHub
Scan a Korean domestic stock portfolio using kiwoom-mcp tools to retrieve live positions, current prices, and 30-day chart data, then compute SMA20 deviation and RSI14 for each holding and produce a dated markdown snapshot table with flagged positions and next-step recommendations. Use when the user wants a quick health check across multiple KRX positions at once rather than a deep single-stock memo.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- kr-analyst-report-discoverSkill
- kr-analyst-report-fetchSkill
- kr-analyst-report-insightSkill
- kr-analyst-report-watchSkill
- kr-article-readabilitySkill
- kr-chatgpt-reviewSkill
- kr-daily-market-newsSkill
- kr-earnings-reviewSkill
- kr-finance-slide-claritySkill
- kr-foreign-analystSkill
- kr-market-leadersSkill
- kr-market-sentimentSkill
- kr-naver-bloggerSkill
- kr-naver-blog-publishSkill
- kr-naver-browseSkill
- kr-naver-insightSkill
- kr-order-backlog-analysisSkill
- kr-portfolio-guardSkill
- kr-research-siteSkill
- kr-sector-analysisSkill
- kr-sector-auditSkill
- kr-sector-compareSkill
- kr-sector-data-packSkill
- kr-sector-planSkill
- kr-sector-updateSkill
- kr-stock-analysisSkill
- kr-stock-chartSkill
- kr-stock-dart-analysisSkill
- kr-stock-data-packSkill
- kr-stock-planSkill
- kr-stock-updateSkill
- kr-strategy-backtestSkill
- kr-trade-flow-analysisSkill
- kr-web-browseSkill
- telegram-report-senderSkill
- us-daily-market-newsSkill
- us-earnings-reviewSkill
- us-sec-analysisSkill
- us-stock-analysisSkill
- us-strategy-backtestSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 9 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill to produce a dated portfolio snapshot across domestic KRX positions in a single pass.
- Very specific: line 12
Check whether kiwoom-mcp is configured before anything else.
- Distinctive: line 13
Keep the scope explicit: Kiwoom REST API coverage in this workflow is domestic KRX holdings only.
- Distinctive: line 16
Write a dated markdown table.
- Very specific: line 18
If the workspace is writable, write the snapshot to analysis-example/kr/portfolio-snapshot.md and update it on each run.
- Very specific: line 25
Call get_account_balance to get the full list of current holdings: ticker, name, quantity, average cost, current price, and unrealized P&L.
- Very specific: line 36
Write the answer and file.
- Distinctive: line 39
Read references/workflow.md for the detailed step-by-step checklist.
- Very specific: line 40
Read references/output-format.md for the exact table and section templates.
- Very specific: line 41
Read references/mcp-setup.md for kiwoom-mcp installation and .mcp.json configuration.
- Distinctive: line 55
When kiwoom-mcp is not configured or not reachable:
- Very specific: line 57
Use scripts/portfolio-snapshot.js in the kr-stock-analysis skill directory.
- Distinctive: line 68
Never use stale prices. All price and P&L data must come from live MCP tool calls or live Yahoo Finance fetches in the same session.
- Distinctive: line 72
Do not compute a weighted portfolio return — the account balance response provides unrealized P&L directly per position.
- Distinctive: line 73
If any single ticker lookup fails, note the failure in the table row and continue with the remaining positions.
- Very specific: line 74
Do not provide a buy or sell recommendation.
- Distinctive: line 75
Keep the snapshot file as a rolling single-file update.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Korean Portfolio Monitor
Use this skill to produce a dated portfolio snapshot across domestic KRX positions in a single pass. It replaces reading accounts and price data one ticker at a time by using kiwoom-mcp tools to retrieve everything in a structured flow.
Quick Start
- Check whether
kiwoom-mcpis configured before anything else. If MCP is unavailable, fall back toscripts/portfolio-snapshot.jswith a manual JSON input. - Keep the scope explicit: Kiwoom REST API coverage in this workflow is domestic KRX holdings only. Do not present overseas stocks as included.
- Pull live data: balance, current prices, and 30 days of daily bars per position.
- Compute SMA20 deviation and RSI14 for each holding from the daily bar data.
- Write a dated markdown table. Flag positions where RSI14 > 70 or RSI14 < 30 or SMA20 deviation exceeds ±5%.
- State an explicit "as of" date and time in the output.
- If the workspace is writable, write the snapshot to
analysis-example/kr/portfolio-snapshot.mdand update it on each run.
Workflow
- Check MCP connectivity.
Verify that kiwoom-mcp tools are reachable. If any tool call fails with a connection error, stop and instruct the user to configure kiwoom-mcp using
references/mcp-setup.md, then fall back toscripts/portfolio-snapshot.jswith manual input. If the user asks for overseas holdings, stop and clarify that this skill only covers domestic KRX positions exposed by Kiwoom REST API. - Retrieve account balance.
Call
get_account_balanceto get the full list of current holdings: ticker, name, quantity, average cost, current price, and unrealized P&L. - Retrieve market data for each position.
For each holding returned in step 2, call
get_stock_pricefor current price, PER, and PBR. Callget_daily_chartwith a 30-day window to get OHLCV bars. - Compute technical indicators.
From the 30-day bar data compute:
- SMA20: simple mean of the last 20 closing prices
- SMA20 deviation: (current price − SMA20) / SMA20 × 100%
- RSI14: standard 14-period Wilder RSI using the closing prices Label each position: RSI > 70 = 과매수, RSI < 30 = 과매도, otherwise 정상. Flag SMA20 deviation beyond ±5% as well.
- Build the portfolio snapshot. Assemble the markdown table and the "주의 포지션" section. Sort positions by unrealized P&L descending.
- Write the answer and file.
Output the snapshot as the primary chat reply. If the workspace is writable, write or update
analysis-example/kr/portfolio-snapshot.md.
Read references/workflow.md for the detailed step-by-step checklist.
Read references/output-format.md for the exact table and section templates.
Read references/mcp-setup.md for kiwoom-mcp installation and .mcp.json configuration.
MCP Tool Reference
These tools are provided by the kiwoom MCP server (java-jaydev/kiwoom-mcp):
| Tool | Purpose |
get_account_balance | Returns all held positions with quantity, average cost, current price, and unrealized P&L |
get_stock_price | Returns current price, PER, PBR, and market cap for a single ticker |
get_daily_chart | Returns OHLCV daily bars for a single ticker over a given period |
Fallback: No MCP
When kiwoom-mcp is not configured or not reachable:
- Use
scripts/portfolio-snapshot.jsin thekr-stock-analysisskill directory. - Provide holdings via
--input portfolio.json(seeexamples/kr/portfolio-sample.jsonfor format). - The script fetches prices and chart data from Yahoo Finance and computes the same indicators.
node skills/kr-stock-analysis/scripts/portfolio-snapshot.js \
--input examples/kr/portfolio-sample.jsonOperating Rules
- Never use stale prices. All price and P&L data must come from live MCP tool calls or live Yahoo Finance fetches in the same session.
- State the data retrieval timestamp in the output header.
- State that live Kiwoom coverage is limited to domestic KRX holdings when that could affect interpretation.
- Separate live MCP data from any manually entered data when both are present.
- Do not compute a weighted portfolio return — the account balance response provides unrealized P&L directly per position.
- If any single ticker lookup fails, note the failure in the table row and continue with the remaining positions.
- Do not provide a buy or sell recommendation. The snapshot flags technical conditions only. Link to
/kr-stock-analysisor/kr-stock-updatefor deeper analysis. - Keep the snapshot file as a rolling single-file update. Do not create a new file per run.
Source Priority
- kiwoom-mcp live data (account balance, price, chart)
- Yahoo Finance via portfolio-snapshot.js fallback (when MCP unavailable)
- Manually provided JSON for offline or testing scenarios
Minimum Output Standard
- Snapshot date and retrieval time
- Scope note when live Kiwoom data is used: domestic KRX holdings only
- Markdown table with: ticker, name, current price, 1-day change, SMA20 deviation, RSI14, unrealized P&L, return %, status flag
- Highlighted "주의 포지션" section listing any flagged holdings with the specific condition
- "다음 단계" section linking flagged positions to
/kr-stock-analysisor/kr-stock-update - Total portfolio unrealized P&L and overall return summary line
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

