Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Pstack Architect

ASecurity

Design caller-first, type-safe interfaces and contracts with pre-implementation checkpoints before writing internal code. Use when adding new strategy modules, broker adapters, risk gates, or multi-agent bridges.

38 stars
0 votes
0 copies
0 views
Added 9/28/2026
businesspythongo

Security Analysis

A100/100

Scanned 9/28/2026

$npx -y skills add IgorGanapolsky/trading --skill pstack-architect --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pstack Architect?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Pstack Architect
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/igorganapolsky-pstack-architect/badge)](https://www.skillsdirectory.com/skills/igorganapolsky-pstack-architect)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Files
SKILL.md
---
name: pstack-architect
description: "Design caller-first, type-safe interfaces and contracts with pre-implementation checkpoints before writing internal code. Use when adding new strategy modules, broker adapters, risk gates, or multi-agent bridges."
---

# pstack: /architect (Caller-First Interface Design)

The `/architect` skill implements caller-first system design from the **pstack** engineering playbook. It prohibits writing internal implementation code before the caller ergonomics, type boundaries, failure modes, and verification checkpoints are explicitly specified and reviewed.

---

## Operating Invariants

1. **Caller Ergonomics First**: Write the consumer's call site first. If the caller code looks clunky, verbose, or fragile, the architecture is flawed.
2. **Type Safety & Immutability**: Use frozen `@dataclass`, strict `typing`, and runtime validation for inputs and state.
3. **Explicit Error Boundaries**: Never return raw ambiguous types (e.g. `None` or bare dictionaries). Return Result/Option patterns or raise typed exceptions.
4. **Design Checkpoint Approval**: Summarize the contract and get checkpoint alignment before filling out implementation bodies.

---

## Architectural Design Steps

### Step 1: Write Caller Usage Code
Construct the ideal caller snippet:
```python
# How the strategy caller should look:
decision = risk_engine.evaluate_spread(
    ticker="SPY",
    short_delta=0.15,
    max_risk_dollars=500.0,
    account_equity=100_000.0,
)

if not decision.is_permitted:
    logger.warning("Trade rejected: %s", decision.rejection_reason)
    return

order_spec = decision.order_spec  # Invariant: non-null when is_permitted is True
```

### Step 2: Define Data Contracts
Specify immutable domain models:
```python
from dataclasses import dataclass
from datetime import datetime
from typing import Literal

@dataclass(frozen=True)
class SpreadOrderSpec:
    symbol: str
    expiration: str
    short_strike: float
    long_strike: float
    contracts: int
    limit_price: float

@dataclass(frozen=True)
class RiskDecision:
    is_permitted: bool
    rejection_reason: str | None = None
    order_spec: SpreadOrderSpec | None = None
    evaluated_at: datetime = ...
```

### Step 3: Define Interface Signature & Invariants
```python
class RiskEngineProtocol(Protocol):
    def evaluate_spread(
        self,
        ticker: str,
        short_delta: float,
        max_risk_dollars: float,
        account_equity: float,
    ) -> RiskDecision:
        """Evaluate spread against portfolio kill switch and position limits.
        
        Invariants:
        - Must reject if live_blocked is True and TRADING_ENV is live.
        - Must reject if position size exceeds max_risk_dollars.
        - Must be side-effect free.
        """
        ...
```

### Step 4: Verification Checkpoints
Define how the implementation will be tested before writing it:
1. Unit test: Valid parameters generate permitted `RiskDecision`.
2. Unit test: Sizing violation returns rejection with reason.
3. Unit test: Kill switch active returns immediate rejection without network calls.
4. Dry-run test: Execution against paper simulator produces valid order spec.

Attribution

IgorGanapolskyIgorGanapolsky
View sourceSee grades on GitHubMore from IgorGanapolsky →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Email Composer

Draft professional emails for various contexts including business, technical, and customer communication. Use when the user needs help writing emails or composing professional messages.

304952 votes

Solution Architect

Designs system architecture, component specifications, and technical integration strategy. Use when: designing solutions, system architecture, technology stack, or integration approaches.

192 votes

Akorchak:Venture Assessment

Generate a comprehensive VC investment assessment report for a company

72 votes

Telegram Compose

Compose rich, readable Telegram messages using HTML formatting via direct Telegram API. Use when: (1) Sending any Telegram message beyond a simple one-line reply, (2) Creating structured messages with sections, lists, or status updates, (3) Need formatting unavailable via Clawdbot's Markdown conversion (underline, spoilers, expandable blockquotes, user mentions by ID), (4) Sending alerts, reports, summaries, or notifications to Telegram, (5) Want professional, scannable message formatting wit...

6511 votes

Just Fucking Cancel

Find and cancel unwanted subscriptions by analyzing bank transactions. Detects recurring charges, calculates annual waste, and helps you cancel with direct URLs and browser automation. Use when: 'cancel subscriptions', 'audit subscriptions', 'find recurring charges', 'what am I paying for', 'save money', 'subscription cleanup', 'stop wasting money'. Supports CSV import (Apple Card, Chase, Amex, Citi, Bank of America, Capital One, Mint, Copilot) OR Plaid API for automatic transaction pull. Out...

6511 votes
View all in business →