Agent smith

From diegosouzapw/awesome-omni-skill · View interactive version

Agent smith is an AI agent skill from the GitHub repository diegosouzapw/awesome-omni-skill. Intelligent financial management skill for Claude Code that provides comprehensive PocketSmith API integration with AI-powered analysis, transaction categorization, rule management, tax intelligence, and scenario planning. Use when working with PocketSmith data for (1) Transaction categorization and

How to use this skill

Skill file

Agent Smith

An intelligent financial management skill for Claude Code that transforms PocketSmith from a passive tracking tool into an active financial intelligence system.

Core Capabilities

1. Hybrid Rule Engine

2. 3-Tier Tax Intelligence (Australian ATO)

3. Transaction Categorization

4. Financial Analysis & Reporting

5. Scenario Analysis

6. Health Check System

7. Advanced Features

Quick Start

First-Time Setup

  1. Prerequisites:
  1. Configuration:
  1. Installation:

```bash

# From the skill directory

uv sync

```

  1. Guided Onboarding:

```bash

# Launch integrated onboarding (8 stages)

/agent-smith:install

```

The onboarding process will:

Time required: 30-60 minutes for first-time setup

Daily Usage

Two Usage Modes:

  1. Guided Journey Mode - When you start Claude Code, Agent Smith displays a status dashboard with:
  1. Power User Mode - Use slash commands directly for specific operations.

Slash Commands (7 specialized commands):

Python Scripts

All Python scripts are in scripts/ directory. Always run with uv run python -u for proper dependency resolution and unbuffered output.

Core Operations

# Categorize transactions
uv run python -u scripts/operations/batch_categorize.py --mode=smart --period=2025-11

# Run health check
uv run python -u scripts/health/check.py --full

# Generate spending report
uv run python -u scripts/reporting/generate.py --period=2025 --format=all

# Tax deduction analysis
uv run python -u scripts/tax/deduction_detector.py --period=2024-25

Script Organization

Unified Rule System

Agent Smith uses a YAML-based unified rule system for transaction categorization and labeling.

Quick Start with Rules

# 1. Choose a template for your household type
uv run python scripts/setup/template_selector.py

# 2. Customize rules in data/rules.yaml

# 3. Test with dry run
uv run python scripts/operations/batch_categorize.py --mode=dry_run --period=2025-11

# 4. Apply to transactions
uv run python scripts/operations/batch_categorize.py --mode=apply --period=2025-11

Example Rule

rules:
  # Category rule - categorize transactions
  - type: category
    name: WOOLWORTHS → Groceries
    patterns: [WOOLWORTHS, COLES, ALDI]
    category: Food & Dining > Groceries
    confidence: 95

  # Label rule - apply labels based on context
  - type: label
    name: Shared Groceries
    when:
      categories: [Groceries]
      accounts: [Shared Bills]
    labels: [Shared Expense, Essential]

Key Features

See references/unified-rules-guide.md for complete documentation.

Tax Intelligence

ATO Compliance (Australian Tax Office)

Three Levels:

  1. Reference (Level 1):
  1. Smart (Level 2) - Recommended:
  1. Full (Level 3) - Power Users:

Configure Tax Level:

# In .env file
TAX_INTELLIGENCE_LEVEL=smart  # reference|smart|full
TAX_JURISDICTION=AU
FINANCIAL_YEAR_END=06-30

Deduction Detection Example

from scripts.tax.deduction_detector import DeductionDetector

detector = DeductionDetector()
result = detector.detect_deduction(transaction)
# Returns: {"is_deductible": True, "confidence": "high",
#           "reason": "Office supplies", "substantiation_required": True}

CGT Tracking Example

from scripts.tax.cgt_tracker import CGTTracker, AssetType
from decimal import Decimal
from datetime import date

tracker = CGTTracker()
tracker.track_purchase(
    asset_type=AssetType.SHARES,
    name="BHP Group",
    quantity=Decimal("100"),
    purchase_date=date(2023, 1, 1),
    purchase_price=Decimal("45.50"),
    fees=Decimal("19.95")
)

event = tracker.track_sale(
    asset_type=AssetType.SHARES,
    name="BHP Group",
    quantity=Decimal("100"),
    sale_date=date(2024, 6, 1),
    sale_price=Decimal("52.00"),
    fees=Decimal("19.95")
)
# Returns CGTEvent with capital_gain, discount_eligible, holding_period_days

Scenario Analysis

Historical Analysis

from scripts.scenarios.historical import calculate_what_if_spending

scenario = calculate_what_if_spending(
    transactions=transactions,
    category_name="Dining",
    adjustment_percent=-30.0,  # 30% reduction
    start_date="2025-01-01",
    end_date="2025-12-31"
)
print(f"Savings: ${scenario['savings']:.2f}")

Spending Forecast

from scripts.scenarios.projections import forecast_spending

forecast = forecast_spending(
    transactions=transactions,
    category_name="Groceries",
    months_forward=6,
    inflation_rate=3.0
)

Optimization Suggestions

from scripts.scenarios.optimization import suggest_optimizations

optimizations = suggest_optimizations(transactions=transactions)
print(f"Potential savings: ${optimizations['potential_annual_savings']:.2f}")

Command Architecture Patterns

All Agent Smith commands follow consistent patterns for reliability and maintainability.

1. Deterministic Python Scripts

Commands delegate to git-tracked Python scripts in scripts/ for all operations:

User Request → Slash Command → Python Script → PocketSmith API
     (UX)        (Guidance)      (Logic)         (Data)

Why this matters:

2. Subagent Delegation Pattern

Commands use subagents to preserve main conversation context:

**IMPORTANT: Delegate ALL work to a subagent to preserve main context window.**

Use the Task tool with `subagent_type: "general-purpose"` to execute...

When to use subagents:

3. Guided Workflow Pattern

Every command follows this structure:

  1. Goal - What will this accomplish?
  2. Why This Matters - Business context
  3. Execution Steps - Numbered steps with scripts
  4. Next Steps - What to do after completion

4. Visual Style Guidelines

| Element | Usage |

|---------|-------|

| Emojis | Status: ✅ success, ⏳ processing, ⚠️ warning, ❌ error |

| Progress | [23/100] Processing... |

| Tables | Results summaries |

| ASCII bars | Health dimensions: ████████░░ 80% |

5. Subagent Orchestration

Agent Smith uses intelligent subagent orchestration for complex operations:

When to delegate to subagents:

Subagent types:

Context preservation: Main skill maintains user preferences, session state, and high-level decisions while subagents handle heavy processing.

Health Check System

# Run comprehensive health check
uv run python scripts/health/check.py --full

6 Health Dimensions (scored 0-100):

  1. Data Quality (25%) - Uncategorized rate, duplicates, gaps
  2. Category Structure (20%) - Depth, unused categories, distribution
  3. Rule Engine (15%) - Coverage, efficiency, conflicts
  4. Tax Readiness (15%) - Tax categorization, compliance
  5. Automation (10%) - Savings automation, bill scheduling
  6. Budget Alignment (15%) - Variance, overspending

Output includes:

Automated monitoring:

Configuration Files

`.env` (Required)

# PocketSmith API
POCKETSMITH_API_KEY=<Your Developer API Key>

# Agent Smith Configuration
TAX_INTELLIGENCE_LEVEL=smart          # reference|smart|full
DEFAULT_INTELLIGENCE_MODE=smart       # conservative|smart|aggressive
AUTO_BACKUP=true
AUTO_ARCHIVE=true
ALERT_NOTIFICATIONS=true

# Tax Configuration (Australia)
TAX_JURISDICTION=AU
FINANCIAL_YEAR_END=06-30             # June 30
GST_REGISTERED=false

# Reporting Preferences
DEFAULT_REPORT_FORMAT=all            # markdown|csv|json|html|excel|all
CURRENCY=AUD

# Advanced
API_RATE_LIMIT_DELAY=100             # ms between calls
CACHE_TTL_DAYS=7
SUBAGENT_MAX_PARALLEL=5

`data/config.json` (User Preferences)

{
  "user_id": 217031,
  "tax_level": "smart",
  "intelligence_mode": "smart",
  "alerts_enabled": true,
  "backup_before_mutations": true,
  "auto_archive": true,
  "default_report_formats": ["markdown", "csv", "html"]
}

`data/rules.yaml` (Unified Rules)

See references/unified-rules-guide.md for complete schema and examples.

Directory Structure

agent-smith/
├── SKILL.md                    # This file
├── .env                        # API configuration (not committed)
├── .env.sample                 # Configuration template
├── data/                       # Working data and state
│   ├── config.json             # User preferences
│   ├── rules.yaml              # Unified categorization rules
│   ├── templates/              # Pre-built rule templates
│   └── [other runtime data]
├── scripts/                    # Python code
│   ├── core/                   # API client, rule engine, utilities
│   ├── operations/             # Categorization, batch processing
│   ├── analysis/               # Spending analysis, trends
│   ├── reporting/              # Multi-format reports
│   ├── tax/                    # Tax intelligence (3-tier)
│   ├── scenarios/              # Scenario analysis
│   ├── orchestration/          # Subagent conductor
│   ├── workflows/              # Interactive workflows
│   ├── features/               # Advanced features
│   ├── health/                 # Health check system
│   └── utils/                  # Utilities
├── references/                 # Documentation
│   ├── pocketsmith-api.md      # PocketSmith API reference
│   ├── unified-rules-guide.md  # Complete rules documentation
│   ├── onboarding-guide.md     # First-time setup guide
│   └── health-check-guide.md   # Health check documentation
├── backups/                    # Timestamped backups (30-day retention)
├── logs/                       # Execution logs (14-day retention)
└── reports/                    # Generated reports (90-day retention)

Critical Operating Rules

NEVER create custom one-off scripts for core Agent Smith operations.

Agent Smith has a complete architecture with:

If you find yourself writing a new Python script to:

STOP. You are reinventing the wheel.

Instead:

  1. Check if a slash command exists (/smith:*)
  2. Check if a workflow exists in scripts/workflows/
  3. Check if a core operation exists in scripts/operations/
  4. Use the existing code that has been tested and uses correct API endpoints

Why this matters:

Exception: Only create new scripts when building NEW features not yet in the design, and always place them in the correct scripts/ subdirectory.

Best Practices

Transaction Categorization

  1. Always use /smith:categorize - Never create custom categorization scripts
  2. Start with a rule template matching your household type
  3. Use dry-run mode to preview categorization
  4. Review and adjust rules based on results
  5. Monitor rule performance metrics
  6. Let AI handle edge cases (LLM fallback)

Tax Compliance

  1. Configure appropriate tax level for your needs
  2. Track all deductible expenses as they occur
  3. Maintain receipt documentation (>$300 ATO requirement)
  4. Review tax reports before EOFY (June 30)
  5. Consult registered tax agent for complex situations

Financial Health

  1. Run health checks monthly
  2. Address high-priority recommendations first
  3. Maintain 95%+ categorization rate
  4. Review and clean up unused categories
  5. Set up automated alerts for budget overruns

Backup and Safety

  1. Always backup before bulk operations (automatic)
  2. Use dry-run mode for untested operations
  3. Review audit trail for unexpected changes
  4. Maintain 30 days of recent backups
  5. Export tax reports for 7-year ATO retention

References

For detailed documentation, see the references/ directory:

Support

Version: 1.6.0

Documentation: See references/ directory for comprehensive guides

Issues: For questions or issues, refer to the design documentation or create an issue in the repository.


Note: Agent Smith is designed for Australian tax compliance (ATO). Adapting for other jurisdictions requires updating tax intelligence modules and reference documentation.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.