D

domain-fintech

by @zhanghandongv
4.4(4)

フィンテックアプリを構築する際に使用します。キーワード:フィンテック、取引、小数、通貨、金融、お金、トランザクション、台帳、支払い、為替レート、精度、丸め、会計。

Fintech DevelopmentRust for FinanceBlockchain TechnologyQuantitative FinanceFinancial APIsGitHub
インストール方法
npx skills add zhanghandong/rust-skills --skill domain-fintech
compare_arrows

Before / After 効果比較

1
使用前

フィンテックアプリケーションを構築する際、取引や通貨などの複雑な領域に関わるため、専門的な指導が不足していると精度問題やビジネスロジックのエラーが発生しやすくなります。

使用後

フィンテックアプリケーション構築に関する専門的な指導を提供し、取引や通貨処理などの重要な領域をカバーすることで、アプリケーションの精度とビジネスロジックの正確性を確保します。

description SKILL.md


name: domain-fintech description: "Use when building fintech apps. Keywords: fintech, trading, decimal, currency, financial, money, transaction, ledger, payment, exchange rate, precision, rounding, accounting, 金融, 交易系统, 货币, 支付" user-invocable: false

FinTech Domain

Layer 3: Domain Constraints

Domain Constraints → Design Implications

Domain RuleDesign ConstraintRust Implication
Audit trailImmutable recordsArc, no mutation
PrecisionNo floating pointrust_decimal
ConsistencyTransaction boundariesClear ownership
ComplianceComplete loggingStructured tracing
ReproducibilityDeterministic executionNo race conditions

Critical Constraints

Financial Precision

RULE: Never use f64 for money
WHY: Floating point loses precision
RUST: Use rust_decimal::Decimal

Audit Requirements

RULE: All transactions must be immutable and traceable
WHY: Regulatory compliance, dispute resolution
RUST: Arc<T> for sharing, event sourcing pattern

Consistency

RULE: Money can't disappear or appear
WHY: Double-entry accounting principles
RUST: Transaction types with validated totals

Trace Down ↓

From constraints to design (Layer 2):

"Need immutable transaction records"
    ↓ m09-domain: Model as Value Objects
    ↓ m01-ownership: Use Arc for shared immutable data

"Need precise decimal math"
    ↓ m05-type-driven: Newtype for Currency/Amount
    ↓ rust_decimal: Use Decimal type

"Need transaction boundaries"
    ↓ m12-lifecycle: RAII for transaction scope
    ↓ m09-domain: Aggregate boundaries

Key Crates

PurposeCrate
Decimal mathrust_decimal
Date/timechrono, time
UUIDuuid
Serializationserde
Validationvalidator

Design Patterns

PatternPurposeImplementation
Currency newtypeType safetystruct Amount(Decimal);
TransactionAtomic operationsEvent sourcing
Audit logTraceabilityStructured logging with trace IDs
LedgerDouble-entryDebit/credit balance

Code Pattern: Currency Type

use rust_decimal::Decimal;

#[derive(Clone, Debug, PartialEq)]
pub struct Amount {
    value: Decimal,
    currency: Currency,
}

impl Amount {
    pub fn new(value: Decimal, currency: Currency) -> Self {
        Self { value, currency }
    }

    pub fn add(&self, other: &Amount) -> Result<Amount, CurrencyMismatch> {
        if self.currency != other.currency {
            return Err(CurrencyMismatch);
        }
        Ok(Amount::new(self.value + other.value, self.currency))
    }
}

Common Mistakes

MistakeDomain ViolationFix
Using f64Precision lossrust_decimal
Mutable transactionAudit trail brokenImmutable + events
String for amountNo validationValidated newtype
Silent overflowMoney disappearsChecked arithmetic

Trace to Layer 1

ConstraintLayer 2 PatternLayer 1 Implementation
Immutable recordsEvent sourcingArc, Clone
Transaction scopeAggregateOwned children
PrecisionValue Objectrust_decimal newtype
Thread-safe sharingShared immutableArc (not Rc)

Related Skills

WhenSee
Value Object designm09-domain
Ownership for immutablem01-ownership
Arc for sharingm02-resource
Error handlingm13-domain-error

forumユーザーレビュー (0)

レビューを書く

効果
使いやすさ
ドキュメント
互換性

レビューなし

統計データ

インストール数293
評価4.4 / 5.0
バージョン
更新日2026年3月16日
比較事例1 件

ユーザー評価

4.4(4)
5
0%
4
0%
3
0%
2
0%
1
0%

この Skill を評価

0.0

対応プラットフォーム

🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI

タイムライン

作成2026年3月16日
最終更新2026年3月16日