Agent skill

Portfolio

by sd0xdev in sd0xdev/sd0x-harness

Portfolio system knowledge base. An agent skill from sd0xdev/sd0x-harness.

MITAuto-check passedDevelopment

Install Portfolio

skills CLI
$ npx skills add sd0xdev/sd0x-harness --skill portfolio -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sd0xdev/sd0x-harness portfolio --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/portfolio .claude/skills/portfolio && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
portfolio
GitHub stars
192
Token cost
~759 tokens
SKILL.md length
163 words
Files
3 (incl. references)
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Portfolio system knowledge base. An agent skill from sd0xdev/sd0x-harness.

  • Works in 2 steps: Check if {PRIMARY_PROVIDER} supports it → If custom build needed: implement…
  • : position queries
  • SKILL.md covers Trigger, When NOT to Use, Core Files and API Overview, plus 6 more sections
  • Calls redis-cli and curl

What it does

Portfolio is an agent skill from sd0xdev/sd0x-harness. Portfolio system knowledge base. Use when: position queries, routing strategy questions, provider integration. Not for: general code exploration (use code-explore), code review (use codex-code-review). Output: domain-specific analysis + recommendations.

Its SKILL.md is about 760 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/api.md` and `references/architecture.md`).

It sits in Development, covering Knowledge bases and Code review. The repository describes itself as: The harness layer for Claude Code — a reference implementation of harness engineering with hook-enforced dual review, state-machine gates that survive context compaction, and… The licence is MIT.

When your agent uses it

  • : position queries
  • Routing strategy questions
  • Provider integration

Example prompts

  • “/portfolio”

Requirements

  • Pre-approved tools (allowed-tools): Read, Grep, Glob

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Check if {PRIMARY_PROVIDER} supports it
  2. If custom build needed: implement PortfolioPositionExtractor + register + configure routing

What it can do on your machine

Read from SKILL.md and the folder at commit a4d4bc1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • redis-cli
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Portfolio loads about 759 tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 66 tokens; SKILL.md has 163 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~759
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sd0xdev/sd0x-harness at commit a4d4bc1, republished under its MIT licence (© sd0xdev). 163 words, ~759 tokens.

Download SKILL.mdSave it as .claude/skills/portfolio/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
portfolio
description
Portfolio system knowledge base. Use when: position queries, routing strategy questions, provider integration. Not for: general code exploration (use code-explore), code review (use codex-code-review). Output: domain-specific analysis + recommendations.
allowed-tools
Read, Grep, Glob
context
fork
agent
Explore

Portfolio Skill

Trigger

  • Keywords: Portfolio, portfolio, position, {PRIMARY_PROVIDER}, protocol, lending, staking, liquidity

When NOT to Use

  • General token queries (not Portfolio positions)
  • Transaction building (use corresponding provider)
  • Non-portfolio related API issues

Core Files

TypeFilePurpose
Controllersrc/entity/portfolio/portfolio.controller.tsREST API
Routersrc/service/portfolio/source-router/*.service.tsRouting orchestration
Clientsrc/service/portfolio/providers/{provider}/*.ts{PRIMARY_PROVIDER} integration
Aggregatorsrc/service/portfolio/aggregation/*.service.tsAggregation computation
DTOsrc/dto/portfolio/position.types.tsPosition model

API Overview

Base: /onchain/v1/portfolio

EndpointMethodPurpose
/positionsPOSTGet portfolio positions
/chainsGETSupported chains list
/protocolsGETSupported protocols list

Output

  • Domain-specific query results with code references
  • Analysis and recommendations based on current architecture

Verification

  • Position data correctly normalized
  • Cache hit/miss working properly
  • Aggregation calculations accurate

Development Guide

Add Protocol Support
  1. Check if {PRIMARY_PROVIDER} supports it
  2. If custom build needed: implement PortfolioPositionExtractor + register + configure routing
Add Data Source
  1. Implement ProviderClient + Adapter
  2. Register with SourceRouter
  3. Configure routing strategy
Debug
bash
redis-cli keys "portfolio:{provider}:*"
redis-cli get "portfolio:{provider}:positions:0x...:v2:..."
curl -X POST /positions -d '{"isForceRefresh": true, ...}'

References

  • references/architecture.md - System architecture + cache strategy
  • references/api.md - API reference + data models
  • @docs/features/portfolio/ - Detailed documentation

Tests

TypeLocation
Unittest/unit/service/portfolio/
Integrationtest/integration/portfolio/

Examples

Input: How to query portfolio positions?
Action: Explain POST /positions API + routing strategy
Input: How does {PRIMARY_PROVIDER} integration work?
Action: Explain {PRIMARY_PROVIDER}Client + {PRIMARY_PROVIDER}Adapter flow

© sd0xdev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/portfolio of sd0xdev/sd0x-harness.

  • SKILL.md
  • references/api.md
  • references/architecture.md

Open the folder on GitHubat commit a4d4bc1

Compare with similar skills

Portfolio next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Portfolio compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Portfolio this skillsd0xdev/sd0x-harness192—~759Automated safety check: PassMIT
Understand Diff AnalysisEgonex-AI/Understand-Anything86k—~1.4kAutomated safety check: PassMIT
Nexus MapperHaaaiawd/Nexus-skills166—~2.5kAutomated safety check: NotesNone
Code Review Graph Buildertirth8205/code-review-graph32k—~295Automated safety check: PassMIT
Nexus QueryHaaaiawd/Nexus-skills166—~1.1kAutomated safety check: PassNone
Psr Coding Style Knowledgedykyi-roman/awesome-claude-code103—~2.3kAutomated safety check: PassMIT

Similar skills

  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    86k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Nexus Mapper

    Haaaiawd/Nexus-skills

    Generate a persistent .nexus-map/ knowledge base that lets any AI session instantly understand a codebase's architecture, systems, dependencies, and change hotspots.

    166 GitHub stars~2.5k tokensUpdated 6 mo ago
    DevelopmentAuto-check: notes
  • Code Review Graph Builder

    tirth8205/code-review-graph

    Builds or incrementally updates the code-review knowledge graph for a repository and reports whether the build succeeded, partly or failed.

    32k GitHub stars~295 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Nexus Query

    Haaaiawd/Nexus-skills

    Precise, instant code structure queries for active development — answer 'who depends on this interface before I refactor it', 'how many modules break if I change this', 'what is the real impact…

    166 GitHub stars~1.1k tokensUpdated 6 mo ago
    DevelopmentAuto-check passed
  • Psr Coding Style Knowledge

    dykyi-roman/awesome-claude-code

    PSR-1 and PSR-12 coding standards knowledge base for PHP 8.4 projects.

    103 GitHub stars~2.3k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Experiment Craft

    EvoScientist/EvoSkills

    A skill your agent uses when the user wants to debug, diagnose, or systematically iterate on an experiment that already exists, or when they need a structured experiment log for tracking runs…

    476 GitHub starsUsed in 3 repos~2k tokens
    DevelopmentAuto-check passed

More from sd0xdev/sd0x-harness

All 89 skills in this repo
  • Adr

    sd0xdev/sd0x-harness

    Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as docs/features/<feature/adr-<NNN-<title.md with a 3-digit zero-padded…

    192 GitHub stars~4.8k tokensUpdated yesterday
    Auto-check passed
  • Load PR Review

    sd0xdev/sd0x-harness

    Load GitHub PR review comments into AI session — analyze, triage, plan.

    192 GitHub stars~4.4k tokensUpdated yesterday
    Auto-check passed
  • Next Step

    sd0xdev/sd0x-harness

    Change-aware next step advisor. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Obsidian CLI

    sd0xdev/sd0x-harness

    Obsidian vault integration via official CLI. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Orchestrate

    sd0xdev/sd0x-harness

    Agent-driven workflow orchestration (v1 report-only). An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • PR Comment

    sd0xdev/sd0x-harness

    Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.

    192 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Questions about Portfolio

What does Portfolio do?

Portfolio system knowledge base. An agent skill from sd0xdev/sd0x-harness. Portfolio is an agent skill from sd0xdev/sd0x-harness. Portfolio system knowledge base.

When should I use Portfolio?

Portfolio fits situations like: : position queries; routing strategy questions; provider integration.

How do I install Portfolio in Claude Code?

Run `npx skills add sd0xdev/sd0x-harness --skill portfolio -a claude-code`. Or copy the skill folder (skills/portfolio in sd0xdev/sd0x-harness) into .claude/skills/portfolio in your project. Claude Code loads it when a task matches its description.

How do I install Portfolio in Codex?

Run `npx skills add sd0xdev/sd0x-harness --skill portfolio -a codex`. Or copy the skill folder (skills/portfolio in sd0xdev/sd0x-harness) into .agents/skills/portfolio in your project. Codex loads it when a task matches its description.

Can I use Portfolio in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sd0xdev/sd0x-harness --skill portfolio -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/portfolio, .gemini/skills/portfolio, .github/skills/portfolio and .opencode/skills/portfolio in your project.

What does Portfolio need to run?

Going by SKILL.md and its folder, Portfolio needs the command-line tools its instructions call (redis-cli and curl). Its frontmatter pre-approves these tools: Read, Grep, Glob.

Does Portfolio access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Portfolio safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Portfolio use?

Portfolio is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Portfolio use?

About 759 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Portfolio?

Skills that share tags, products or a category with Portfolio: Understand Diff Analysis (Egonex-AI/Understand-Anything, 86k stars), Nexus Mapper (Haaaiawd/Nexus-skills, 166 stars), Code Review Graph Builder (tirth8205/code-review-graph, 32k stars) and Nexus Query (Haaaiawd/Nexus-skills, 166 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Portfolio?

sd0xdev (a GitHub user) maintains it in sd0xdev/sd0x-harness, which has 192 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 8, 2026.

Source: sd0xdev/sd0x-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.