[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77VM3YXSHE3JM186RM4Y93K":3,"skill-same:01M77VM3YXSHE3JM186RM4Y93K":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M77VM3YXSHE3JM186RM4Y93K","stockbuddy",null,"Multi-market stock analysis and portfolio execution assistant for CN, HK, and US equities. Provides technical + basic valuation analysis, portfolio review, account-aware position tracking, cash balances by market\u002Fcurrency, and execution-aware suggestions that respect lot size, odd-lot support, and trading constraints. Use when the user asks for stock analysis, portfolio analysis, buy\u002Fsell advice, watchlist management, position management, account cash tracking, rebalancing, or practical trading actions for a stock code or company name.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fs\u002Fstockbuddy\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: stockbuddy\ndescription: Multi-market stock analysis and portfolio execution assistant for CN, HK, and US equities. Provides technical + basic valuation analysis, portfolio review, account-aware position tracking, cash balances by market\u002Fcurrency, and execution-aware suggestions that respect lot size, odd-lot support, and trading constraints. Use when the user asks for stock analysis, portfolio analysis, buy\u002Fsell advice, watchlist management, position management, account cash tracking, rebalancing, or practical trading actions for a stock code or company name.\n---\n\n# StockBuddy\n\n## Overview\n\nStockBuddy is a stock analysis and portfolio execution support skill for A-share, Hong Kong, and US equities. It outputs quantified scores and clear action labels (Strong Buy \u002F Buy \u002F Hold \u002F Sell \u002F Strong Sell). By default, responses are **decision-first**: give the concise conclusion, score\u002Fconfidence, event-adjusted second-pass suggestion, and practical order ideas before expanding into a long-form report.\n\n**Core rule: separate durable facts from derived values.**\n- **Persist durable facts**: share count, cost basis, account, available cash, market\u002Fcurrency, lot size, odd-lot support, and other user-confirmed trading constraints\n- **Compute in real time**: latest price, market value, position weight, unrealized P&L, executable buy\u002Fsell size, and whether partial selling is actually possible\n- Do **not** write latest price, position weight, or unrealized P&L back into durable storage\n\nFive core scenarios:\n1. **Single-stock analysis** — analyze one stock and produce an action recommendation\n2. **Batch portfolio analysis** — analyze current positions and summarize stock-level and portfolio-level status\n3. **Position management** — add, update, remove, and inspect positions\n4. **Account and allocation management** — track account, cash, market\u002Fcurrency, and execution constraints\n5. **Watchlist management** — add, remove, and inspect watched stocks while storing basic stock metadata and trading rules\n\n## Execution-Aware Advice Rules\n\nBefore giving execution-ready trading advice, confirm whether the durable constraints are sufficient.\n\n**Required durable facts for execution-aware advice:**\n- account context\n- market \u002F currency\n- available cash for the account\n- lot size\n- odd-lot support when relevant\n\n**If these are incomplete:**\n- still give a directional view when possible\n- label it as **directional only** or **non-execution-ready**\n- ask only for the missing durable facts\n- do not invent quantity, allocation, or partial-sell actions that may be impossible in the real market setup\n\n**Special rule for buy advice:**\n- If available cash is unknown, do not provide quantity, allocation, or order-size advice.\n- Ask for the account plus available cash first.\n\n**Special rule for sell\u002Ftrim advice:**\n- If lot size or odd-lot support is unknown, avoid suggesting partial sells as if they are definitely executable.\n- If the user holds only one lot and odd-lot selling is not supported, suggest only executable actions such as hold or sell the full lot.\n\n## Environment Setup\n\nOnly install dependencies when they are actually missing, or when a script fails with a missing-package error:\n\n```bash\nbash {{SKILL_DIR}}\u002Fscripts\u002Finstall_deps.sh\n```\n\nRequired dependencies: `numpy`, `pandas`, built-in Python `sqlite3`.\nNo `yfinance` dependency is required; the current implementation mainly uses Tencent Finance data.\n\n## Core Workflow\n\n### Scenario 1: Analyze a Single Stock\n\nTrigger examples: \"analyze Tencent\", \"can I buy this stock\", \"look at BYD\", \"analyze this ticker\"\n\n**Steps:**\n\n1. **Normalize the stock code**\n   - Hong Kong stocks: normalize to `XXXX.HK`\n   - A-shares: normalize to `SH600519` \u002F `SZ000001`\n   - US stocks: normalize to `AAPL` \u002F `TSLA`\n   - If the user provides only a company name, infer the market from context first; ask for confirmation only if the mapping is ambiguous\n\n2. **Run the analysis script**\n   ```bash\n   python3 {{SKILL_DIR}}\u002Fscripts\u002Fanalyze_stock.py \u003CCODE> --period 6mo\n   ```\n   Optional period values: `1mo` \u002F `3mo` \u002F `6mo` (default) \u002F `1y` \u002F `2y` \u002F `5y`\n\n   **Data and caching behavior**:\n   - Raw daily K-line data, watchlist data, and portfolio data are stored in `~\u002F.stockbuddy\u002Fstockbuddy.db` (SQLite)\n   - Positions are linked through `watchlist_id`\n   - Analysis results are cached separately in SQLite with a default TTL of 10 minutes\n   - Cache cleanup runs automatically and total cached analysis rows are capped\n   - If the user explicitly asks to \"refresh data\" or \"reanalyze\", add `--no-cache`\n   - To clear analysis cache: `--clear-cache`\n\n3. **Interpret and present the result**\n   - The script returns JSON analysis data\n   - **For default single-stock requests**, use the **default query template** in `references\u002Foutput_templates.md`\n   - The default response must include: stock basics, data-driven action recommendation (with score and confidence), important events, event-adjusted second-pass suggestion, and practical order ideas\n   - **Default order style = balanced**. Only switch when the user explicitly asks for a conservative or aggressive version\n   - **Only produce the full report when explicitly requested** with phrases like \"full report\", \"detailed analysis\", or \"complete analysis\"\n   - **The top natural-language summary is mandatory** in both short and long versions: 2-4 sentences covering regime, main recommendation, confidence, support\u002Frisk points, and whether the stock is actionable today\n   - **Only expand into a more open-ended explanation when the user asks for detail** such as \"explain why\", \"show the reasoning\", \"how about short-term\", or \"what stop-loss\u002Fstop-profit should I use\"\n   - Final output must be normal Markdown, not wrapped in code fences; prefer short paragraphs, bullet points, and card-style formatting over wide tables unless the user explicitly wants a detailed report\n\n### Scenario 2: Batch Portfolio Analysis\n\nTrigger examples: \"analyze my portfolio\", \"look at my holdings\", \"how are my positions doing\"\n\nDefault output should still be **decision-first**: for each position, give the action label, score\u002Fconfidence, important events, event-adjusted second suggestion, and a compact practical order version. Do not expand every holding into a full long report unless the user explicitly wants a detailed version.\n\n**Steps:**\n\n1. **Check portfolio data**\n   ```bash\n   python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py list\n   ```\n   Portfolio data is stored in the `positions` table in `~\u002F.stockbuddy\u002Fstockbuddy.db`.\n\n2. **If the portfolio is empty** → guide the user to add positions first (see Scenario 3)\n\n3. **Run batch analysis**\n   ```bash\n   python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py analyze\n   ```\n\n4. **Interpret and present the result**\n   - Format the result using the \"Portfolio Batch Analysis Report\" section in `references\u002Foutput_templates.md`\n   - Output normal Markdown, not code fences\n   - It may use standard Markdown tables mixed with lists when helpful, but keep it readable on chat surfaces\n   - Include stock-level recommendations and portfolio-level P&L summary\n   - Prefer **real-time computed fields** in the output: latest price, market value, unrealized P&L, position weight, and executable action constraints such as whole-lot vs odd-lot behavior\n   - Do **not** write latest price, position weight, or unrealized P&L back into durable storage; the database should only hold stable user-confirmed facts and trading rules\n\n### Scenario 3: Position Management\n\nTrigger examples: \"add a Tencent position\", \"I bought 100 shares of BYD\", \"remove Alibaba from my holdings\"\n\n| Action | Command |\n|------|------|\n| Add position | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py add \u003CCODE> --price \u003CBUY_PRICE> --shares \u003CSHARES> [--date \u003CDATE>] [--note \u003CNOTE>] [--account \u003CACCOUNT_NAME_OR_ID>]` |\n| List positions | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py list` |\n| Update position | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py update \u003CCODE> [--price \u003CPRICE>] [--shares \u003CSHARES>] [--note \u003CNOTE>] [--account \u003CACCOUNT_NAME_OR_ID>]` |\n| Remove position | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py remove \u003CCODE>` |\n| List accounts | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py account-list` |\n| Create\u002Fupdate account | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py account-upsert \u003CACCOUNT_NAME> [--market \u003CMARKET>] [--currency \u003CCURRENCY>] [--cash \u003CTOTAL_CASH>] [--available-cash \u003CAVAILABLE_CASH>] [--note \u003CNOTE>]` |\n| Set trading rule | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py rule-set \u003CCODE> [--lot-size \u003CLOT_SIZE>] [--tick-size \u003CTICK_SIZE>] [--odd-lot]` |\n\nWhen adding a position, ensure the stock exists in the watchlist and is linked through `positions.watchlist_id -> watchlist.id`. If the user does not provide a date, default to the current date. If the user provides natural-language trade info such as \"I bought 100 shares of Tencent last week at 350\", extract price, share count, date, and account info where possible, then execute the appropriate command.\n\n**After the first successful position record, proactively guide the user to fill the missing durable facts needed for execution-aware advice.** Do not stop at only code \u002F shares \u002F cost if important constraints are still unknown.\n\nAsk for or help the user confirm these fields, in this priority order:\n1. **Account context** — which account this belongs to, and its market \u002F currency\n2. **Cash** — total cash or available cash in that account\n3. **Lot rule** — lot size for the stock\n4. **Odd-lot support** — whether the broker supports odd-lot selling \u002F buying\n5. **Trade date** — if omitted and relevant for later review\n6. **Notes** — optional thesis, time horizon, or special constraints\n\nIf some fields are already known, only ask for the missing ones. Keep the follow-up compact: confirm what was captured, state what is still missing, and ask for the missing durable facts in one short message.\n\nIf the user gives only partial follow-up info, update what is available and continue asking only for the remaining missing fields. Once enough execution constraints are known, stop prompting and proceed normally.\n\n### Scenario 4: Account and Allocation Management\n\nTrigger examples: \"my HK account has 3000 HKD cash\", \"track available cash\", \"record this under my US account\", \"how concentrated is my portfolio\"\n\n**Rules:**\n- Keep cash, account, market, and currency as durable facts\n- Keep position weights, market value, and unrealized P&L as computed fields\n- If the user has multiple markets or currencies, treat them as separate account contexts unless the user explicitly wants cross-account aggregation\n- Use account information to improve practical trading advice: whether the user can afford a new lot, whether a rebalance is even possible, and whether the trade would increase concentration too much\n\n### Scenario 5: Watchlist Management\n\nTrigger examples: \"watch Tencent\", \"add Apple to my watchlist\", \"remove Moutai from watchlist\"\n\n| Action | Command |\n|------|------|\n| List watchlist | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py watch-list` |\n| Add watch item | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py watch-add \u003CCODE>` |\n| Remove watch item | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py watch-remove \u003CCODE>` |\n\n## Analysis Methodology\n\nThe scoring system combines technicals (roughly 60% weight) and basic valuation (roughly 40% weight). Final score range is approximately -10 to +10:\n\n| Score Range | Recommendation |\n|----------|----------|\n| ≥ 5 | 🟢🟢 Strong Buy |\n| 2 ~ 4 | 🟢 Buy |\n| -1 ~ 1 | 🟡 Hold \u002F Watch |\n| -4 ~ -2 | 🔴 Sell |\n| ≤ -5 | 🔴🔴 Strong Sell |\n\nOnly read `references\u002Ftechnical_indicators.md` when the user asks for detailed scoring logic, indicator interpretation, or when you need help calibrating a more detailed explanation.\n\nWhen deciding the final output format, choosing between default query vs full report, or generating practical order suggestions, prefer `references\u002Foutput_templates.md`. It defines the default query template, atomic templates, full-report composition rules, and the conservative \u002F balanced \u002F aggressive order-price generation rules (balanced is the default).\n\n## Important Notes\n\n- All analysis is for reference only and is **not investment advice**\n- The primary data source is **Tencent Finance**, which may have delays, gaps, or field limitations\n- Hong Kong stocks do not have the same daily price-limit structure as A-shares and therefore carry higher intraday volatility risk\n- Every final analysis output **must** include a risk disclaimer\n- Technical analysis can fail during extreme market conditions\n- Encourage the user to combine macro conditions, sector trends, and company fundamentals in final decision-making\n- Only store user-confirmed durable facts in the database; latest price, market value, unrealized P&L, and position weight should be fetched or calculated at analysis time\n\n## Resource Files\n\n| File | Purpose |\n|------|------|\n| `scripts\u002Fanalyze_stock.py` | Core analysis script for market data retrieval, technical indicators, and valuation scoring |\n| `scripts\u002Fportfolio_manager.py` | Portfolio\u002Faccount\u002Fwatchlist management and batch analysis entry point |\n| `scripts\u002Finstall_deps.sh` | Dependency installation script |\n| `references\u002Ftechnical_indicators.md` | Detailed technical indicator and scoring reference |\n| `references\u002Foutput_templates.md` | Output template controller: default query template, atomic templates, full-report rules, and practical order generation rules |\n| `references\u002Fdata-source-roadmap.md` | Data-source roadmap for primary\u002Ffallback\u002Fevent-layer evolution; read only when extending data sources or event coverage |\n","# StockBuddy\n\n## Overview\n\nStockBuddy is a stock analysis and portfolio execution support skill for A-share, Hong Kong, and US equities. It outputs quantified scores and clear action labels (Strong Buy \u002F Buy \u002F Hold \u002F Sell \u002F Strong Sell). By default, responses are **decision-first**: give the concise conclusion, score\u002Fconfidence, event-adjusted second-pass suggestion, and practical order ideas before expanding into a long-form report.\n\n**Core rule: separate durable facts from derived values.**\n- **Persist durable facts**: share count, cost basis, account, available cash, market\u002Fcurrency, lot size, odd-lot support, and other user-confirmed trading constraints\n- **Compute in real time**: latest price, market value, position weight, unrealized P&L, executable buy\u002Fsell size, and whether partial selling is actually possible\n- Do **not** write latest price, position weight, or unrealized P&L back into durable storage\n\nFive core scenarios:\n1. **Single-stock analysis** — analyze one stock and produce an action recommendation\n2. **Batch portfolio analysis** — analyze current positions and summarize stock-level and portfolio-level status\n3. **Position management** — add, update, remove, and inspect positions\n4. **Account and allocation management** — track account, cash, market\u002Fcurrency, and execution constraints\n5. **Watchlist management** — add, remove, and inspect watched stocks while storing basic stock metadata and trading rules\n\n## Execution-Aware Advice Rules\n\nBefore giving execution-ready trading advice, confirm whether the durable constraints are sufficient.\n\n**Required durable facts for execution-aware advice:**\n- account context\n- market \u002F currency\n- available cash for the account\n- lot size\n- odd-lot support when relevant\n\n**If these are incomplete:**\n- still give a directional view when possible\n- label it as **directional only** or **non-execution-ready**\n- ask only for the missing durable facts\n- do not invent quantity, allocation, or partial-sell actions that may be impossible in the real market setup\n\n**Special rule for buy advice:**\n- If available cash is unknown, do not provide quantity, allocation, or order-size advice.\n- Ask for the account plus available cash first.\n\n**Special rule for sell\u002Ftrim advice:**\n- If lot size or odd-lot support is unknown, avoid suggesting partial sells as if they are definitely executable.\n- If the user holds only one lot and odd-lot selling is not supported, suggest only executable actions such as hold or sell the full lot.\n\n## Environment Setup\n\nOnly install dependencies when they are actually missing, or when a script fails with a missing-package error:\n\n```bash\nbash {{SKILL_DIR}}\u002Fscripts\u002Finstall_deps.sh\n```\n\nRequired dependencies: `numpy`, `pandas`, built-in Python `sqlite3`.\nNo `yfinance` dependency is required; the current implementation mainly uses Tencent Finance data.\n\n## Core Workflow\n\n### Scenario 1: Analyze a Single Stock\n\nTrigger examples: \"analyze Tencent\", \"can I buy this stock\", \"look at BYD\", \"analyze this ticker\"\n\n**Steps:**\n\n1. **Normalize the stock code**\n   - Hong Kong stocks: normalize to `XXXX.HK`\n   - A-shares: normalize to `SH600519` \u002F `SZ000001`\n   - US stocks: normalize to `AAPL` \u002F `TSLA`\n   - If the user provides only a company name, infer the market from context first; ask for confirmation only if the mapping is ambiguous\n\n2. **Run the analysis script**\n   ```bash\n   python3 {{SKILL_DIR}}\u002Fscripts\u002Fanalyze_stock.py \u003CCODE> --period 6mo\n   ```\n   Optional period values: `1mo` \u002F `3mo` \u002F `6mo` (default) \u002F `1y` \u002F `2y` \u002F `5y`\n\n   **Data and caching behavior**:\n   - Raw daily K-line data, watchlist data, and portfolio data are stored in `~\u002F.stockbuddy\u002Fstockbuddy.db` (SQLite)\n   - Positions are linked through `watchlist_id`\n   - Analysis results are cached separately in SQLite with a default TTL of 10 minutes\n   - Cache cleanup runs automatically and total cached analysis rows are capped\n   - If the user explicitly asks to \"refresh data\" or \"reanalyze\", add `--no-cache`\n   - To clear analysis cache: `--clear-cache`\n\n3. **Interpret and present the result**\n   - The script returns JSON analysis data\n   - **For default single-stock requests**, use the **default query template** in `references\u002Foutput_templates.md`\n   - The default response must include: stock basics, data-driven action recommendation (with score and confidence), important events, event-adjusted second-pass suggestion, and practical order ideas\n   - **Default order style = balanced**. Only switch when the user explicitly asks for a conservative or aggressive version\n   - **Only produce the full report when explicitly requested** with phrases like \"full report\", \"detailed analysis\", or \"complete analysis\"\n   - **The top natural-language summary is mandatory** in both short and long versions: 2-4 sentences covering regime, main recommendation, confidence, support\u002Frisk points, and whether the stock is actionable today\n   - **Only expand into a more open-ended explanation when the user asks for detail** such as \"explain why\", \"show the reasoning\", \"how about short-term\", or \"what stop-loss\u002Fstop-profit should I use\"\n   - Final output must be normal Markdown, not wrapped in code fences; prefer short paragraphs, bullet points, and card-style formatting over wide tables unless the user explicitly wants a detailed report\n\n### Scenario 2: Batch Portfolio Analysis\n\nTrigger examples: \"analyze my portfolio\", \"look at my holdings\", \"how are my positions doing\"\n\nDefault output should still be **decision-first**: for each position, give the action label, score\u002Fconfidence, important events, event-adjusted second suggestion, and a compact practical order version. Do not expand every holding into a full long report unless the user explicitly wants a detailed version.\n\n**Steps:**\n\n1. **Check portfolio data**\n   ```bash\n   python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py list\n   ```\n   Portfolio data is stored in the `positions` table in `~\u002F.stockbuddy\u002Fstockbuddy.db`.\n\n2. **If the portfolio is empty** → guide the user to add positions first (see Scenario 3)\n\n3. **Run batch analysis**\n   ```bash\n   python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py analyze\n   ```\n\n4. **Interpret and present the result**\n   - Format the result using the \"Portfolio Batch Analysis Report\" section in `references\u002Foutput_templates.md`\n   - Output normal Markdown, not code fences\n   - It may use standard Markdown tables mixed with lists when helpful, but keep it readable on chat surfaces\n   - Include stock-level recommendations and portfolio-level P&L summary\n   - Prefer **real-time computed fields** in the output: latest price, market value, unrealized P&L, position weight, and executable action constraints such as whole-lot vs odd-lot behavior\n   - Do **not** write latest price, position weight, or unrealized P&L back into durable storage; the database should only hold stable user-confirmed facts and trading rules\n\n### Scenario 3: Position Management\n\nTrigger examples: \"add a Tencent position\", \"I bought 100 shares of BYD\", \"remove Alibaba from my holdings\"\n\n| Action | Command |\n|------|------|\n| Add position | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py add \u003CCODE> --price \u003CBUY_PRICE> --shares \u003CSHARES> [--date \u003CDATE>] [--note \u003CNOTE>] [--account \u003CACCOUNT_NAME_OR_ID>]` |\n| List positions | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py list` |\n| Update position | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py update \u003CCODE> [--price \u003CPRICE>] [--shares \u003CSHARES>] [--note \u003CNOTE>] [--account \u003CACCOUNT_NAME_OR_ID>]` |\n| Remove position | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py remove \u003CCODE>` |\n| List accounts | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py account-list` |\n| Create\u002Fupdate account | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py account-upsert \u003CACCOUNT_NAME> [--market \u003CMARKET>] [--currency \u003CCURRENCY>] [--cash \u003CTOTAL_CASH>] [--available-cash \u003CAVAILABLE_CASH>] [--note \u003CNOTE>]` |\n| Set trading rule | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py rule-set \u003CCODE> [--lot-size \u003CLOT_SIZE>] [--tick-size \u003CTICK_SIZE>] [--odd-lot]` |\n\nWhen adding a position, ensure the stock exists in the watchlist and is linked through `positions.watchlist_id -> watchlist.id`. If the user does not provide a date, default to the current date. If the user provides natural-language trade info such as \"I bought 100 shares of Tencent last week at 350\", extract price, share count, date, and account info where possible, then execute the appropriate command.\n\n**After the first successful position record, proactively guide the user to fill the missing durable facts needed for execution-aware advice.** Do not stop at only code \u002F shares \u002F cost if important constraints are still unknown.\n\nAsk for or help the user confirm these fields, in this priority order:\n1. **Account context** — which account this belongs to, and its market \u002F currency\n2. **Cash** — total cash or available cash in that account\n3. **Lot rule** — lot size for the stock\n4. **Odd-lot support** — whether the broker supports odd-lot selling \u002F buying\n5. **Trade date** — if omitted and relevant for later review\n6. **Notes** — optional thesis, time horizon, or special constraints\n\nIf some fields are already known, only ask for the missing ones. Keep the follow-up compact: confirm what was captured, state what is still missing, and ask for the missing durable facts in one short message.\n\nIf the user gives only partial follow-up info, update what is available and continue asking only for the remaining missing fields. Once enough execution constraints are known, stop prompting and proceed normally.\n\n### Scenario 4: Account and Allocation Management\n\nTrigger examples: \"my HK account has 3000 HKD cash\", \"track available cash\", \"record this under my US account\", \"how concentrated is my portfolio\"\n\n**Rules:**\n- Keep cash, account, market, and currency as durable facts\n- Keep position weights, market value, and unrealized P&L as computed fields\n- If the user has multiple markets or currencies, treat them as separate account contexts unless the user explicitly wants cross-account aggregation\n- Use account information to improve practical trading advice: whether the user can afford a new lot, whether a rebalance is even possible, and whether the trade would increase concentration too much\n\n### Scenario 5: Watchlist Management\n\nTrigger examples: \"watch Tencent\", \"add Apple to my watchlist\", \"remove Moutai from watchlist\"\n\n| Action | Command |\n|------|------|\n| List watchlist | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py watch-list` |\n| Add watch item | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py watch-add \u003CCODE>` |\n| Remove watch item | `python3 {{SKILL_DIR}}\u002Fscripts\u002Fportfolio_manager.py watch-remove \u003CCODE>` |\n\n## Analysis Methodology\n\nThe scoring system combines technicals (roughly 60% weight) and basic valuation (roughly 40% weight). Final score range is approximately -10 to +10:\n\n| Score Range | Recommendation |\n|----------|----------|\n| ≥ 5 | 🟢🟢 Strong Buy |\n| 2 ~ 4 | 🟢 Buy |\n| -1 ~ 1 | 🟡 Hold \u002F Watch |\n| -4 ~ -2 | 🔴 Sell |\n| ≤ -5 | 🔴🔴 Strong Sell |\n\nOnly read `references\u002Ftechnical_indicators.md` when the user asks for detailed scoring logic, indicator interpretation, or when you need help calibrating a more detailed explanation.\n\nWhen deciding the final output format, choosing between default query vs full report, or generating practical order suggestions, prefer `references\u002Foutput_templates.md`. It defines the default query template, atomic templates, full-report composition rules, and the conservative \u002F balanced \u002F aggressive order-price generation rules (balanced is the default).\n\n## Important Notes\n\n- All analysis is for reference only and is **not investment advice**\n- The primary data source is **Tencent Finance**, which may have delays, gaps, or field limitations\n- Hong Kong stocks do not have the same daily price-limit structure as A-shares and therefore carry higher intraday volatility risk\n- Every final analysis output **must** include a risk disclaimer\n- Technical analysis can fail during extreme market conditions\n- Encourage the user to combine macro conditions, sector trends, and company fundamentals in final decision-making\n- Only store user-confirmed durable facts in the database; latest price, market value, unrealized P&L, and position weight should be fetched or calculated at analysis time\n\n## Resource Files\n\n| File | Purpose |\n|------|------|\n| `scripts\u002Fanalyze_stock.py` | Core analysis script for market data retrieval, technical indicators, and valuation scoring |\n| `scripts\u002Fportfolio_manager.py` | Portfolio\u002Faccount\u002Fwatchlist management and batch analysis entry point |\n| `scripts\u002Finstall_deps.sh` | Dependency installation script |\n| `references\u002Ftechnical_indicators.md` | Detailed technical indicator and scoring reference |\n| `references\u002Foutput_templates.md` | Output template controller: default query template, atomic templates, full-report rules, and practical order generation rules |\n| `references\u002Fdata-source-roadmap.md` | Data-source roadmap for primary\u002Ffallback\u002Fevent-layer evolution; read only when extending data sources or event coverage |\n",{"name":5,"description":7},"master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fs\u002Fstockbuddy",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill stockbuddy",{"tool":39,"command":40},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill stockbuddy",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill stockbuddy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fs\u002Fstockbuddy\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]