portfolio-analysis
Skill0 starsChanged 4 months agoApache-2.0View on GitHub
Measures current holdings against the active Investment Policy Statement's target allocation and reports drift. Use when checking portfolio health, before considering a rebalance, or when the root planner needs current drift to decide whether Action Drafting should run.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- ayushgoel/skillstheir own version, first seen Nov 5, 2026
- cookieMonsterDev/agents-skillstheir own version, first seen Nov 1, 2026
- microsoft/aibast-agents-librarytheir own version, first seen Oct 13, 2026
- rockchen1989/Stock-analyzer-agenttheir own version, first seen Oct 13, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- microsoft/aibast-agents-library★ 8same name
- cookieMonsterDev/agents-skills★ 7same name
- ayushgoel/skills★ 1same name
- rockchen1989/Stock-analyzer-agent★ 0same 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 repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- action-draftingSkill
- equity-researchSkill
- goals-onboardingSkill
- researchSkill
- reviewerSkill
- spending-analysisSkill
- suitabilitySkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
Not a persisted contract like the IPS or Holdings — this is a transient computation, produced and consumed within a single planning cycle, …
- Distinctive: line 59
If no active IPS exists for this user (e.g.
- Distinctive: line 91
No active IPS → skill declines to run, doesn't fabricate a report
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
portfolio-analysis
Purpose
Compares current holdings against the active IPS's target_allocation
bands and produces a drift report — the signal Action Drafting acts on,
and what a user sees when asking "how's my portfolio doing."
When this skill runs
- User asks about portfolio health/drift directly
- Root planner invokes it before considering whether to invoke Action Drafting (drift is the trigger condition, not a standing schedule — see ADR-0004)
- Periodically, if the IPS's
rebalancing_rules.trigger_typeincludescalendar(scheduling mechanism is an orchestrator concern, not specified here)
Inputs
| Field | Source | Required |
HoldingsSnapshot | Firestore, read-only | Yes |
Active InvestmentPolicyStatement | Firestore, read-only | Yes — if none exists, see failure mode below |
Output: Drift Report
Not a persisted contract like the IPS or Holdings — this is a
transient computation, produced and consumed within a single planning
cycle, never written to Firestore on its own. (Contracts in
/schemas are reserved for persisted, audited
artifacts; this isn't one.)
| Field | Description |
asset_class | One row per IPS target_allocation entry |
current_percent | Sum of matching positions' market_value_usd ÷ HoldingsSnapshot.total_value_usd × 100 |
target_percent, min_percent, max_percent | From the IPS |
in_band | true if current_percent is within [min_percent, max_percent] |
drift_amount_percent | Distance outside the band; 0 if in band |
unclassified_value_usd | Total value of holdings whose asset_class doesn't match any IPS band — reported, not silently dropped from totals |
rebalance_recommended | true if any asset class is out of band and the IPS's drift_threshold_percent is exceeded |
Failure mode: no active IPS
If no active IPS exists for this user (e.g. before onboarding completes), this skill declines to run rather than computing drift against nothing meaningful — surfaces "no investment policy set yet," doesn't fabricate a comparison.
Tools / permissions required
- Managed Agent sandbox: reasons over the orchestrator's pre-computed
drift report + IPS + holdings context. Formats a
DriftReporttyped output with a narrative rationale. - Orchestrator (outside sandbox): pre-fetches active IPS + holdings from
Firestore and pre-computes drift via
primitives/portfolio_analysis.py::calculate_driftbefore invoking the Managed Agent. See ADR-0016. - No Firestore write access from the Managed Agent. This skill only reads and reports; it never drafts or executes anything itself.
Registry metadata
- Registered as:
projects/{project}/locations/{location}/skills/private-portfolio-analysis - Skill revision: 0.1.0 (draft — not yet registered)
- Approval scope:
read:holdings,read:ips
Acceptance criteria
current_percentmatches hand-calculated values for a fixed testHoldingsSnapshot+ IPS combination- A holding whose
asset_classmatches no IPS band appears inunclassified_value_usd, and total portfolio value still accounts for it — it's never silently excluded rebalance_recommendedistrueonly when both the out-of-band condition and the IPS'sdrift_threshold_percentcondition hold — tested for boundary cases (exactly at threshold, just under, just over)- No active IPS → skill declines to run, doesn't fabricate a report
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.

