stock-portfolio — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited stock-portfolio (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Parse $ARGUMENTS to determine the command and execute it as shown below.
python3 /Users/kikuchihiroyuki/stock-skills/.claude/skills/stock-portfolio/scripts/run_portfolio.py <command> [args]Generates a portfolio snapshot including current prices, P/L, and currency conversions.
python3 .../run_portfolio.py snapshotpython3 .../run_portfolio.py buy --symbol <sym> --shares <n> --price <p> [--currency JPY] [--date YYYY-MM-DD] [--memo text] [--yes]Omitting --yes (-y) displays a confirmation preview of the purchase and exits. Specifying --yes skips confirmation and records directly (KIK-444).
python3 .../run_portfolio.py sell --symbol <sym> --shares <n> [--price <sale price>] [--date YYYY-MM-DD] [--yes]Omitting --yes (-y) displays a confirmation preview (cost basis, estimated realized P/L) and exits. Specifying --yes skips confirmation and records directly (KIK-444).
Specifying --price calculates and displays realized P/L, P/L ratio, and estimated after-tax amount, and saves to data/history/trade/*.json (KIK-441).
Aggregates and displays P/L statistics from past sale records (those recorded with --price).
python3 .../run_portfolio.py review [--year 2026] [--symbol NVDA]Output:
Calculates sector/region/currency/size HHI (Herfindahl index) and analyzes portfolio bias. Includes a 4-axis analysis with size composition table (large/mid/small/ETF/unknown) (KIK-438, KIK-469 P2: ETF classification). ETFs are independently classified as sector "ETF" and size "ETF."
python3 .../run_portfolio.py analyzeChecks whether the investment thesis for each holding is still valid. Outputs 3-level alerts across multiple axes: technical (SMA50/200, RSI, Golden Cross/Dead Cross detection) and fundamental (change quality score, shareholder return stability). Small-cap stocks are automatically escalated in sensitivity (KIK-438).
python3 .../run_portfolio.py healthTechnical Analysis (KIK-356/374/438):
Shareholder Return Stability (KIK-403):
Small-Cap Allocation (KIK-438):
[small] badgeETF Health Check (KIK-469 Phase 2):
Alert Levels:
Generates specific adjustment actions (SELL/SWAP/ADD/TRIM_CLASS/FLAG) using 17 rules (P1-P10: per-position, F1-F7: PF-wide) based on health check results + market regime determination.
python3 .../run_portfolio.py adjust [--full]CLI options:
--full: Full analysis mode (includes concentration and correlation analysis. Higher API load)Output:
Regime adjustment: During crash, urgency is raised one level. During bear, small-cap and downtrend rules are elevated.
Analyzes current portfolio structure and presents proposals for reducing concentration risk and adjusting toward target allocation.
python3 .../run_portfolio.py rebalance [options]CLI options:
--strategy defensive|balanced|aggressive (default: balanced)--reduce-sector SECTOR (e.g., Technology)--reduce-currency CURRENCY (e.g., USD)--max-single-ratio RATIO (e.g., 0.15)--max-sector-hhi HHI (e.g., 0.25)--max-region-hhi HHI (e.g., 0.30)--additional-cash AMOUNT (JPY, e.g., 1000000)--min-dividend-yield YIELD (e.g., 0.03)Estimates 12-month expected return for each holding in 3 scenarios (optimistic/base/pessimistic) from analyst target prices or historical return distributions. Includes value trap warnings and TOP/BOTTOM rankings.
python3 .../run_portfolio.py forecastEstimation methods:
[ETF] badge)growth_driver catalyst count × 1.7% to optimistic scenario, subtracts risk catalyst count × 1.7% from pessimistic scenario (max ±10%)Output structure (KIK-390):
Simulates adding, selling, or swapping stocks and displays the impact on the portfolio as a Before/After comparison.
# Add only (traditional)
python3 .../run_portfolio.py what-if --add "SYMBOL:SHARES:PRICE[,...]"
# Swap (sell then buy) (KIK-451)
python3 .../run_portfolio.py what-if --remove "SYMBOL:SHARES[,...]" --add "SYMBOL:SHARES:PRICE[,...]"
# Sell-only simulation (KIK-451)
python3 .../run_portfolio.py what-if --remove "SYMBOL:SHARES[,...]"CLI options:
--add: List of stocks to add (optional). Format: SYMBOL:SHARES:PRICE comma-separated--remove: List of stocks to sell (optional). Format: SYMBOL:SHARES comma-separated (no price needed — calculated at market value)--add or --remove is requiredOutput:
--remove is specified, automatically displays screening appearance count, investment memos, and research history before the simulation (when Neo4j connected)Verifies returns from accumulated screening results and compares against benchmarks (Nikkei 225 / S&P 500).
python3 .../run_portfolio.py backtest [options]CLI options:
--preset PRESET: Screening preset to verify (e.g., alpha, value)--region REGION: Region to verify (e.g., jp, us)--days N: Verifies return N days after retrieval (default: 90)Output:
Simulates future asset growth with compound interest based on the current portfolio. Calculates compound interest using forecast expected returns + dividend reinvestment + monthly accumulation, displayed in 3 scenarios (optimistic/base/pessimistic).
python3 .../run_portfolio.py simulate [options]CLI options:
--years N (simulation years, default: 10)--monthly-add AMOUNT (monthly accumulation, JPY, default: 0)--target AMOUNT (target amount, JPY, e.g., 15000000)--reinvest-dividends (reinvest dividends, default: ON)--no-reinvest-dividends (do not reinvest dividends)Displays the contents of portfolio.csv as-is.
python3 .../run_portfolio.py listFor natural language → skill selection, see .claude/rules/intent-routing.md.
.claude/skills/stock-portfolio/data/portfolio.csvDisplay results in Markdown format.
# Snapshot
python3 .../run_portfolio.py snapshot
# Record purchase
python3 .../run_portfolio.py buy --symbol 7203.T --shares 100 --price 2850 --currency JPY --date 2025-06-15 --memo Toyota
# Record sale
python3 .../run_portfolio.py sell --symbol AAPL --shares 5
# Structural analysis
python3 .../run_portfolio.py analyze
# List holdings
python3 .../run_portfolio.py list
# Health check
python3 .../run_portfolio.py health
# Estimated yield
python3 .../run_portfolio.py forecast
# Rebalancing proposal
python3 .../run_portfolio.py rebalance
python3 .../run_portfolio.py rebalance --strategy defensive
python3 .../run_portfolio.py rebalance --reduce-sector Technology --additional-cash 1000000
# What-If simulation (add only)
python3 .../run_portfolio.py what-if --add "7203.T:100:2850,AAPL:10:250"
# What-If simulation (swap: sell 7203.T → buy 9984.T) (KIK-451)
python3 .../run_portfolio.py what-if --remove "7203.T:100" --add "9984.T:50:7500"
# What-If simulation (sell only) (KIK-451)
python3 .../run_portfolio.py what-if --remove "7203.T:50"
# Adjustment advisor (KIK-496)
python3 .../run_portfolio.py adjust
python3 .../run_portfolio.py adjust --full
# Backtest
python3 .../run_portfolio.py backtest --preset alpha --region jp --days 90When get_context.py output contains the following, integrate with health check results:
When the response includes specific judgments about EXIT/warnings (e.g., "sell recommended," "continue holding"):
💡 Would you like to record this judgment as an investment memo?
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.