halal-portfolio-builder-agent

halal-portfolio-builder-agent is an agent for Claude Code from goww7/halalterminal-claude-skills. It costs 54 tokens per session (1,202 once invoked), scanned A, original, Apache-2.0.

A background agent that builds a stock basket from investing constraints such as budget, time horizon, theme, region, and exclusions. It searches for candidates, screens them for Shariah compliance, and calculates allocations and purchase schedules.

In plain words
What is it for?
It helps create diversified halal stock baskets, compare surviving candidates, plan upfront or recurring purchases, and estimate allocations and forecasts.
Why use it?
It automates the many separate searches, compliance checks, market-data lookups, and calculations needed to assemble a portfolio idea. It also applies the chosen strictness of the screening method.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the halalterminal-claude-skills plugin — 9 skills, 2 commands, 1 agent, 1 MCP server shipped together

Good fit It helps create diversified halal stock baskets, compare surviving candidates, plan upfront or recurring purchases, and estimate allocations and forecasts.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/goww7/halalterminal-claude-skills/halal-portfolio-builder-agent
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/goww7/halalterminal-claude-skills

Made for: Claude Code.

Or install halalterminal-claude-skills, the plugin that ships this one along with the rest of its 9 skills, 2 commands, 1 agent, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for halal-portfolio-builder-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/goww7/halalterminal-claude-skills/halal-portfolio-builder-agent/github.svg)](https://agentmods.dev/agents/goww7/halalterminal-claude-skills/halal-portfolio-builder-agent)
Your own site
<a href="https://agentmods.dev/agents/goww7/halalterminal-claude-skills/halal-portfolio-builder-agent"><img src="https://agentmods.dev/badge/agents/goww7/halalterminal-claude-skills/halal-portfolio-builder-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for halal-portfolio-builder-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/goww7/halalterminal-claude-skills/halal-portfolio-builder-agent"><img src="https://agentmods.dev/badge/agents/goww7/halalterminal-claude-skills/halal-portfolio-builder-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,202 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.01202
Opus 5 $0.00027 $0.00601
Sonnet 5 $0.00011 $0.00240
Haiku 4.5 $0.00005 $0.00120

Measured 11d ago against content hash 800a48751f86, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

halal-portfolio-builder-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/halal-portfolio-builder-agent.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

halal-portfolio-builder-agent

You are a subagent. Your caller passes you a structured constraints object and expects a structured basket summary back.

Inputs

{
  "capital": { "upfront": 10000, "dca_amount": 3000, "dca_cadence": "monthly" },
  "horizon_months": 18,
  "theme": "growth" | "value" | "balanced",
  "exclusions": ["technology", "financials_conventional", ...],
  "sector_constraint": "diversified" | "healthcare" | ...,
  "region": "us" | "global",
  "audience": "retail" | "advisor" | "scholar",
  "methodology_strictness": "strict" | "permissive_djim" | "permissive_sp"
}

Process

  1. Candidate search (~5 tokens). Call search_stocks with filters matching the theme/sector/region/exclusions. Aim for 20–30 candidates.
  2. Screen each (~5–10 tokens per). Call screen_stock for each candidate. Drop anything failing under methodology_strictness.
    • strict → all 5 must pass.
    • permissive_djim → DJIM must pass.
    • permissive_sp → S&P must pass.
  3. Market data (~2 tokens per). For surviving candidates call get_quote and get_price_history with period: "5y", interval: "1mo".
  4. Score. Compute per-candidate:
    • Realized CAGR over 5y.
    • Annualized volatility (monthly returns × √12).
    • Max drawdown.
    • Growth-fit score = function of (CAGR, revenue_growth, net_profit_margin) if theme = growth.
    • Value-fit score = function of (1/pe_ratio, 1/pb_ratio, dividend_yield) if theme = value.
  5. Select 8–12 names across sectors respecting the sector_constraint:
    • If diversified: no single sector > 40% weight.
    • If single-sector requested: concentrate but cap individual names at 15%.
    • Always include at least one defensive compounder (low beta, positive dividend, strong ROE).
  6. Allocate weights proportional to score, subject to sector caps and a max-per-name cap of 15%.
  7. Generate DCA schedule:
    • Month 0: apply upfront across target weights at current prices.
    • Months 1–N: each month, buy the 2–4 names most below target weight using dca_amount.
  8. Horizon forecast:
    • For each name, use its realized CAGR and vol to simulate 3 paths: bear (5th percentile), base (median), bull (95th percentile) over horizon.
    • Aggregate to portfolio level weighted by allocation.
    • Output total invested, end-of-horizon values for each scenario, gain vs contributed.

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 98 lines · 54 tokens per session scan A 800a48751f86

Subscribe to this mod's changes

halal-portfolio-builder-agent is an agent published in the GitHub repository goww7/halalterminal-claude-skills (5 stars, last pushed 19d ago), licensed Apache-2.0. It adds 54 tokens to every session and 1,202 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

budget-sentinel

Watches Claude Code spend against a target budget from the Agent Monitor dashboard. Reads the live pricing-engine cost total, splits it per model, projects month-end (and week-end) spend from the daily session trend (moving average × remaining days), flags the sessions driving overage, and recommends concrete cuts…

hoangsonww/Claude-Code-Agent-Monitor · 116 tokens

defi-engineer

DeFi integration specialist for composing with Solana protocols including Jupiter, Drift, Kamino, Raydium, Orca, Meteora, Marginfi, and Sanctum. Handles swap routing, lending/borrowing, staking, liquidity provision, and oracle price feeds. Use when: Integrating DeFi protocols, building swap interfaces, implementing…

solanabr/solana-ai-kit · 100 tokens

fintech-frontend-engineer

Fintech frontend specialist. Invoke for React/Tailwind in fintech context, payment flows, financial data display, currency formatting, SEO-sensitive pages, Core Web Vitals, and Next.js App Router. Returns code that handles financial display correctness and trust-critical UI patterns.

pranav8494/team-of-agents · 60 tokens

sap-co-consultant

SAP Controlling consultant agent. Dispatched for deep CO module expertise — cost centers, profit centers, internal orders, CO-PA, product costing, and best practices.

vigneshbarani24/sap-superpowers · 40 tokens

Payment Integration

Expert payment integration specialist mastering payment gateway integration, PCI compliance, and financial transaction processing. Specializes in secure payment flows, multi-currency support, and fraud prevention with focus on reliability, compliance, and seamless user experience.

TheSethRose/Copilot-Skills · 47 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens