/domain-fintech
Use when building fintech apps. Keywords: fintech, trading, decimal, currency, financial, money, transaction, ledger, payment, exchange rate, precision, rounding, accounting, 金融, 交易系统, 货币, 支付
$ npx -y skills add zhanghandong/rust-skills --skill domain-fintech --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/domain-fintech
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when building fintech apps. Keywords: fintech, trading, decimal, currency, financial, money, transaction, ledger, payment, exchange rate, precision, rounding, accounting, 金融, 交易系统, 货币, 支付
SKILL.md
domain-fintech.SKILL.mdname: 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 Rule | Design Constraint | Rust Implication | |-------------|-------------------|------------------| | Audit trail | Immutable records | Arc<T>, no mutation | | Precision | No floating point | rust_decimal | | Consistency | Transaction boundaries | Clear ownership | | Compliance | Complete logging | Structured tracing | | Reproducibility | Deterministic execution | No 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
| Purpose | Crate | |---------|-------| | Decimal math | rust_decimal | | Date/time | chrono, time | | UUID | uuid | | Serialization | serde | | Validation | validator |
Design Patterns
| Pattern | Purpose | Implementation | |---------|---------|----------------| | Currency newtype | Type safety | `struct Amount(Decimal);` | | Transaction | Atomic operations | Event sourcing | | Audit log | Traceability | Structured logging with trace IDs | | Ledger | Double-entry | Debit/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
| Mistake | Domain Violation | Fix | |---------|-----------------|-----| | Using f64 | Precision loss | rust_decimal | | Mutable transaction | Audit trail broken | Immutable + events | | String for amount | No validation | Validated newtype | | Silent overflow | Money disappears | Checked arithmetic |
---
Trace to Layer 1
| Constraint | Layer 2 Pattern | Layer 1 Implementation | |------------|-----------------|------------------------| | Immutable records | Event sourcing | Arc<T>, Clone | | Transaction scope | Aggregate | Owned children | | Precision | Value Object | rust_decimal newtype | | Thread-safe sharing | Shared immutable | Arc (not Rc) |
---
Related Skills
| When | See | |------|-----| | Value Object design | m09-domain | | Ownership for immutable | m01-ownership | | Arc for sharing | m02-resource | | Error handling | m13-domain-error |
Read more
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 Rule | Design Constraint | Rust Implication | |-------------|-------------------|------------------| | Audit trail | Immutable records | Arc<T>, no mutation | | Precision | No floating point | rust_decimal | | Consistency | Transaction boundaries | Clear ownership | | Compliance | Complete logging | Structured tracing | | Reproducibility | Deterministic execution | No 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
| Purpose | Crate | |---------|-------| | Decimal math | rust_decimal | | Date/time | chrono, time | | UUID | uuid | | Serialization | serde | | Validation | validator |
Design Patterns
| Pattern | Purpose | Implementation | |---------|---------|----------------| | Currency newtype | Type safety | `struct Amount(Decimal);` | | Transaction | Atomic operations | Event sourcing | | Audit log | Traceability | Structured logging with trace IDs | | Ledger | Double-entry | Debit/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
| Mistake | Domain Violation | Fix | |---------|-----------------|-----| | Using f64 | Precision loss | rust_decimal | | Mutable transaction | Audit trail broken | Immutable + events | | String for amount | No validation | Validated newtype | | Silent overflow | Money disappears | Checked arithmetic |
---
Trace to Layer 1
| Constraint | Layer 2 Pattern | Layer 1 Implementation | |------------|-----------------|------------------------| | Immutable records | Event sourcing | Arc<T>, Clone | | Transaction scope | Aggregate | Owned children | | Precision | Value Object | rust_decimal newtype | | Thread-safe sharing | Shared immutable | Arc (not Rc) |
---
Related Skills
| When | See | |------|-----| | Value Object design | m09-domain | | Ownership for immutable | m01-ownership | | Arc for sharing | m02-resource | | Error handling | m13-domain-error |
AI-powered Rust development assistant with meta-cognition framework
Other skills on rust-skills.
- /coding-guidelines
Use when asking about Rust code style or best practices. Keywords: naming, formatting, comment, clippy, rustfmt, lint, code style, best practice, P.NAM, G.FMT, code review, naming convention, variable naming, function naming, type naming, 命名规范, 代码风格, 格式化, 最佳实践, 代码审查, 怎么命名
Open skill - /core-actionbook
Internal support skill for actionbook MCP selectors used by Rust documentation research workflows. Use only when another rust-skills workflow explicitly requests actionbook-backed selectors.
Open skill - /core-agent-browser
Internal support skill for agent-browser CLI workflows used by rust-learner, docs-researcher, and crate-researcher. Use only when browser automation is explicitly required.
Open skill - /core-dynamic-skills
Internal command support for dynamic Rust crate skill management. Use only when explicitly invoked by /sync-crate-skills, /clean-crate-skills, or /update-crate-skill.
Open skill - /core-fix-skill-docs
Internal maintenance support for checking and fixing generated Rust skill documentation references. Use only when explicitly invoked by /fix-skill-docs.
Open skill - /domain-cli
Use when building CLI tools. Keywords: CLI, command line, terminal, clap, structopt, argument parsing, subcommand, interactive, TUI, ratatui, crossterm, indicatif, progress bar, colored output, shell completion, config file, environment variable, 命令行, 终端应用, 参数解析
Open skill

