agentleFS
liks79liks79/claude-skills/skills/invest/SKILL.md

invest

Skill2 starsChanged 5 months agoMITView on GitHub

Read investment portfolio from Google Sheets via GWS CLI, parse holdings, compute aggregates, load T6 template, and return structured data ready for report generation. Used by /invest command.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. taxueseek/fund-investment-guide★ 21same name
    2. primexiao/agent-skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When filling in Mermaid diagrams from the T6 template, strictly follow:

    line 122
  2. Distinctive:

    No Korean text in diagram labels, axis names, or node text

    line 125
  3. Distinctive:

    Use English abbreviations or translations where needed

    line 126
  4. Distinctive:

    Use integer or 1-decimal values only

    line 139
  5. Very specific:

    Always use dateFormat YYYY-MM for month-level granularity

    line 147

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Invest Portfolio Reader Skill

Reads a Google Sheets investment portfolio using GWS CLI, computes portfolio analytics, loads the T6 investment report template, and produces structured data for the /invest command to generate a premium-quality investment report.

Prerequisites

  • gws CLI authenticated (gws auth login)
  • INVEST_DEFAULT_SHEET_URL set in ~/.claude/settings.local.json env block
  • jq available in PATH

Procedure

Step 1 — Resolve Spreadsheet ID

Extract the spreadsheet ID from the URL (segment between /d/ and /edit or ?):

SHEET_URL="<resolved URL>"
SHEET_ID=$(echo "$SHEET_URL" | sed 's|.*spreadsheets/d/||' | sed 's|[/?].*||')
echo "Spreadsheet ID: $SHEET_ID"

Step 2 — Fetch Sheet Names

gws sheets spreadsheets get \
  --params "{\"spreadsheetId\": \"$SHEET_ID\"}" 2>/dev/null \
  | jq '.sheets[].properties | {title, sheetId}'

Identify data-bearing sheets (Holdings, Log, TransactionHistory, summary sheets). Skip empty or layout-only sheets.

Step 3 — Read All Sheets (run in parallel)

For each data sheet found:

gws sheets +read --spreadsheet "$SHEET_ID" --range "<SheetName>" 2>/dev/null

Priority: Holdings first (primary source), then summary sheets (Sheet6, Dashboard, etc.).

Step 4 — Parse Holdings Data

From the Holdings sheet, extract per-row:

FieldColumnNotes
OwnerCOwner name
Asset Class (L1)DStocks, Pension, Gold, Crypto, Cash
Asset Class (L2)EKorean stocks, US stocks, Bitcoin, Lease deposit, etc.
AccountFBrokerage / account name
Asset NameGAsset or stock name
Ticker / SymbolHTicker
Avg Cost (KRW)IAverage cost in KRW
Avg Cost (USD)JAverage cost in USD (if applicable)
Current PriceKCurrent price
QuantityLNumber of units
USD/KRW RateMExchange rate applied
Total Invested (KRW)NTotal cost basis in KRW
Current Value (KRW)OCurrent market value in KRW
Return %PPercentage return
P&L (KRW)QProfit / loss in KRW

Step 5 — Compute Portfolio Aggregates

Calculate and produce structured data for the T6 template:

A. Portfolio Summary

  • Total invested, total current value, total P&L, total return %
  • USD/KRW rate (as applied in the sheet)
  • Number of holdings (row count in Holdings sheet)

B. Owner-level Aggregates — for each owner:

  • Invested, current value, P&L, return %

C. Asset Class Composition — by L1 asset class:

  • Sum of current value and share of total (%)
  • Pre-computed as integers for Mermaid pie chart

D. Performance Rankings

  • TOP 5: descending by return %
  • Loss positions: all rows where return % < 0

E. Concentration Risk Flags

  • Single asset > 20% of portfolio → 🚨 flag with name and weight
  • Single asset class > 40% of portfolio → ⚠️ flag

F. Mermaid Numeric Values — pre-compute for chart injection:

  • pie: asset class weights (integer, no decimals)
  • xychart-beta P&L bar: P&L by asset class (KRW millions, 1 decimal)
  • xychart-beta FX line: rate forecast array (from search results)
  • xychart-beta allocation bar/line: current vs. target allocation arrays
  • quadrantChart risk coordinates: (x, y) per risk item in [0, 1]
  • quadrantChart action coordinates: (x, y) per action item in [0, 1]

Step 6 — Load T6 Template

Load templates/research/T6-investment-report.md via the Read tool using the plugin-cache path:

_TPL=$(find "$HOME/.claude/plugins/cache" -path "*/claude-skills/*/templates/research" -type d 2>/dev/null | sort -rV | head -1)
[ -z "$_TPL" ] && _TPL="templates/research"
# Read: $_TPL/T6-investment-report.md

This template defines the common structure and table of contents for all /invest reports.

Step 7 — Mermaid Rendering Guidelines

When filling in Mermaid diagrams from the T6 template, strictly follow:

1. English-only labels in all Mermaid diagrams

  • No Korean text in diagram labels, axis names, or node text
  • Use English abbreviations or translations where needed
  • Plain markdown text (tables, paragraphs) may use any language

2. Supported diagram types (WeasyPrint PDF safe)

  • pie ✅ — asset allocation
  • gantt ✅ — roadmap (use YYYY-MM dateFormat)
  • xychart-beta ✅ — bar/line charts (numeric arrays only)
  • graph LR / graph TD ✅ — strategy flow diagrams
  • quadrantChart ✅ — risk/action matrix (coordinates 0.0–1.0)

3. xychart-beta numeric constraints

  • y-axis range must span actual data: set min 10–20% below lowest value
  • bar/line arrays must have same length as x-axis labels
  • Use integer or 1-decimal values only

4. quadrantChart coordinate format

  • Each item: Label Name : [x, y] where x, y ∈ [0.0, 1.0]
  • Spaces in labels are fine; no Korean characters
  • Quadrant labels must be short (≤ 20 chars)

5. gantt date ranges

  • Always use dateFormat YYYY-MM for month-level granularity
  • Task format: Task Name : start-YYYY-MM, end-YYYY-MM
  • Milestone format: Event Name : milestone, YYYY-MM-DD, 0d

Output the computed data and the loaded T6 template structure to the /invest command for report generation in the next steps.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.