用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/personamanagmentlayer/pcl --skill finance-expert命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Expert in Persona Control Language (PCL) - language design, compiler architecture, runtime systems, and ecosystem development
Expert system for designing, creating, and validating PCL skills with comprehensive domain knowledge extraction
Expert-level Docker containerization, image optimization, and container orchestration. Use this skill for building efficient Docker images, managing containers, and implementing Docker best practices.
基于 SOC 职业分类
正在显示 SKILL.md
| name | finance-expert |
| version | 1.0.0 |
| description | Expert-level financial systems, FinTech, banking, payments, and financial technology |
| category | domains |
| tags | ["finance","fintech","banking","payments","trading","accounting"] |
| allowed-tools | ["Read","Write","Edit","Bash(*)"] |
Expert guidance for financial systems, FinTech applications, banking platforms, payment processing, and financial technology development.
# Payment gateway integration (Stripe)
import stripe
from decimal import Decimal
stripe.api_key = "sk_test_..."
class PaymentService:
def create_payment_intent(self, amount: Decimal, currency: str = "usd"):
"""Create payment intent with idempotency"""
return stripe.PaymentIntent.create(
amount=int(amount * 100), # Convert to cents
currency=currency,
payment_method_types=["card"],
metadata={"order_id": "12345"}
)
def process_refund(self, payment_intent_id: str, amount: Decimal = None):
"""Process full or partial refund"""
return stripe.Refund.create(
payment_intent=payment_intent_id,
amount=int(amount * 100) if amount else None
)
def handle_webhook(self, payload: str, signature: str):
"""Handle Stripe webhook events"""
try:
event = stripe.Webhook.construct_event(
payload, signature, webhook_secret
)
if event.type == "payment_intent.succeeded":
payment_intent = event.data.object
.handle_successful_payment(payment_intent)
event. == :
payment_intent = event.data.
.handle_failed_payment(payment_intent)
{: }
ValueError:
{: }
# Open Banking API integration (Plaid)
from plaid import Client
from plaid.errors import PlaidError
class BankingService:
def __init__(self):
self.client = Client(
client_id="...",
secret="...",
environment="sandbox"
)
def create_link_token(self, user_id: str):
"""Create link token for Plaid Link"""
response = self.client.LinkToken.create({
"user": {"client_user_id": user_id},
"client_name": "My App",
"products": ["auth", "transactions"],
"country_codes": ["US"],
"language": "en"
})
return response["link_token"]
def exchange_public_token(self, public_token: str):
"""Exchange public token for access token"""
response = self.client.Item.public_token.exchange(public_token)
return {
"access_token": response["access_token"],
"item_id": response["item_id"]
}
def ():
response = .client.Accounts.get(access_token)
response[]
():
response = .client.Transactions.get(
access_token,
start_date,
end_date
)
response[]
from decimal import Decimal, ROUND_HALF_UP
from datetime import datetime, timedelta
class FinancialCalculator:
@staticmethod
def calculate_interest(principal: Decimal, rate: Decimal, periods: int) -> Decimal:
"""Calculate compound interest"""
return principal * ((1 + rate) ** periods - 1)
@staticmethod
def calculate_loan_payment(principal: Decimal, annual_rate: Decimal, months: int) -> Decimal:
"""Calculate monthly loan payment (amortization)"""
monthly_rate = annual_rate / 12
payment = principal * (monthly_rate * (1 + monthly_rate) ** months) / \
((1 + monthly_rate) ** months - 1)
return payment.quantize(Decimal('0.01'), rounding=ROUND_HALF_UP)
@staticmethod
def calculate_npv(cash_flows: list[Decimal], discount_rate: Decimal) -> Decimal:
"""Calculate Net Present Value"""
npv = Decimal('0')
for i, cf in enumerate(cash_flows):
npv += cf / ((1 + discount_rate) ** i)
return npv.quantize(Decimal('0.01'), rounding=ROUND_HALF_UP)
@staticmethod
def calculate_roi() -> Decimal:
((gain - cost) / cost * ).quantize(Decimal())
from sklearn.ensemble import RandomForestClassifier
import pandas as pd
class FraudDetectionService:
def __init__(self):
self.model = RandomForestClassifier()
def extract_features(self, transaction: dict) -> dict:
"""Extract features for fraud detection"""
return {
"amount": transaction["amount"],
"hour_of_day": transaction["timestamp"].hour,
"day_of_week": transaction["timestamp"].weekday(),
"merchant_category": transaction["merchant_category"],
"is_international": transaction["is_international"],
"card_present": transaction["card_present"],
"transaction_velocity_1h": self.get_velocity(transaction, hours=1),
"transaction_velocity_24h": self.get_velocity(transaction, hours=24)
}
def predict_fraud(self, transaction: dict) -> dict:
"""Predict if transaction is fraudulent"""
features = self.extract_features(transaction)
fraud_probability = self.model.predict_proba([features])[][]
{
: fraud_probability > ,
: fraud_probability,
: .get_risk_level(fraud_probability)
}
() -> :
score > :
score > :
score > :
:
# PCI-DSS Compliance
class PCICompliantPaymentHandler:
def process_payment(self, card_data: dict):
# Never store full card number, CVV, or PIN
# Tokenize card data immediately
token = self.tokenize_card(card_data)
# Store only last 4 digits and token
payment_record = {
"token": token,
"last_4": card_data["number"][-4:],
"exp_month": card_data["exp_month"],
"exp_year": card_data["exp_year"]
}
return self.process_with_token(token)
def tokenize_card(self, card_data: dict) -> str:
# Use payment gateway tokenization
return stripe.Token.create(card=card_data)["id"]
# KYC/AML Compliance
class ComplianceService:
def verify_customer(self, customer_data: dict) -> dict:
"""Perform KYC verification"""
# Identity verification
identity_verified = self.verify_identity(customer_data)
# Sanctions screening
sanctions_clear = self.screen_sanctions(customer_data)
# Risk assessment
risk_level = .assess_risk(customer_data)
{
: identity_verified sanctions_clear,
: risk_level,
: risk_level ==
}
❌ Using float for money calculations ❌ Storing credit card data unencrypted ❌ No transaction logging/audit trail ❌ Synchronous payment processing ❌ No idempotency in payment APIs ❌ Ignoring PCI-DSS compliance ❌ No fraud detection