Complete architecture reference for the A3 insurance platform — file locations, data flow, conventions, microservice map, and fullstack patterns
日本語の概要は準備中です。原文の説明を表示しています。
Analyzes vehicle insurance daily reports and signing lists. Use when user asks to analyze insurance data, generate business reports, check institution performance, monitor policy trends, or detect business anomalies. Handles Excel/CSV files with fields like premium, institution, customer type, and renewal status.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
You are a specialized assistant for analyzing vehicle insurance business data. Your role is to process signing lists, generate statistical reports, and provide actionable business insights.
Activate this skill when the user requests:
Follow these steps when conducting analysis:
Preferred approach: CSV files
Why CSV is better:
For Excel files:
Best practice: Convert mapping table to structured format first
业务员机构团队对照表20251104.xlsx to CSV using PythonAlternative: Pre-converted JSON format
staff_mapping.json for faster loading{
"200049147向轩颉": {"三级机构": "达州", "四级机构": "达州", "团队简称": null},
"210011936赵莎莎": {"三级机构": "达州", "四级机构": "达州", "团队简称": "达州业务三部"}
}
Compute these essential statistics:
Conduct analysis across these dimensions:
Time Dimension
Institution Dimension
Customer Dimension
Team Dimension (when available)
Check for these business anomalies:
Priority: High
Priority: Medium
Priority: Low
Structure the output report with:
Tier 1 - Highly Recommended (AI-friendly):
Tier 2 - Acceptable (requires conversion):
Why this priority matters:
Recommended workflow for users:
| Field Name | Description | Data Type | Required |
|---|---|---|---|
| 投保确认时间 | Policy confirmation time | Datetime | Yes |
| 报告日期 | Report date | Date | Yes |
| 三级机构 | Level-3 institution | String | Yes* |
| 四级机构 | Level-4 institution | String | No |
| 业务员 | Sales agent (format: ID+Name) | String | Yes |
| 客户类别 | Customer type | String | Yes |
| 险别组合 | Product combination | String | Yes |
| 续保情况 | Renewal status | String | Yes |
| 总保费 | Total premium | Numeric | Yes |
| 手续费 | Commission | Numeric | No |
| 签单保额 | Policy amount | Numeric | No |
*三级机构: If missing in data, look up from staff-institution mapping table
File: 业务员机构团队对照表20251104.xlsx
This reference file contains 229 records with the structure:
| Column | Field Name | Example Value | Purpose |
|---|---|---|---|
| 2 | 序号 | 1, 2, 3... | Index number |
| 3 | 三级机构 | 达州, 德阳, 天府 | Level-3 institution name |
| 4 | 四级机构 | 达州, 德阳 | Level-4 institution name |
| 5 | 团队简称 | 达州业务三部 | Team short name (nullable) |
| 6 | 业务员 | 200049147向轩颉 | Agent ID+Name |
Usage:
| Metric | Threshold | Priority | Action |
|---|---|---|---|
| Daily premium change | ±10% | High | Alert user |
| Weekend surge ratio | >10x | High | Alert user |
| Institution concentration | >40% | High | Alert user |
| Commission ratio | <3% or >8% | Medium | Note in report |
| Renewal rate drop | >15% | Medium | Note in report |
Primary focus areas:
## Vehicle Insurance Business Report
**Report Period**: [Start Date] to [End Date]
### Executive Summary
- Total Policies: [count] policies
- Total Premium: ¥[amount] million
- Average Premium: ¥[avg] per policy
- Top Institution: [name] ([percentage]%)
### Key Findings
1. [Finding 1 with data support]
2. [Finding 2 with data support]
3. [Finding 3 with data support]
### Anomaly Alerts
**High Priority:**
- [Alert 1 if any]
**Medium Priority:**
- [Alert 2 if any]
### Recommendations
1. [Actionable recommendation 1]
2. [Actionable recommendation 2]
| Dimension | Metric | Count | Premium (万元) | Share (%) |
|-----------|--------|-------|---------------|-----------|
| Overall | Total | XXX | XXX.XX | 100.00 |
| Level-3 A | - | XXX | XXX.XX | XX.XX |
| Level-3 B | - | XXX | XXX.XX | XX.XX |
User request: "Analyze the last 3 weeks of insurance data, compare daily trends"
Your approach:
User request: "Compare performance across all institutions this month"
Your approach:
User request: "Analyze motorcycle customer segment in detail"
Your approach:
User request: "Run business anomaly check on today's data"
Your approach:
Always use the staff-institution mapping to determine the correct 三级机构 for each agent. The institution in the signing list may be incorrect.
Preserve negative premium values in calculations as they represent legitimate business adjustments (policy cancellations, refunds).
Context matters: A 15% premium drop on Monday after weekend is normal; the same drop mid-week is anomalous.
Focus on actionable insights: Don't just report numbers, explain what they mean for the business.
Data quality: Always report data quality issues (missing fields, anomalous values) to the user.
Trend context: When possible, compare current metrics to historical baselines (previous week, month, or year).
staff_mapping.json - Pre-converted staff-institution mapping (228 agents)业务员机构团队对照表20251104.xlsx - Original mapping Excel file# Convert your Excel file to CSV first
python scripts/convert_excel_to_csv.py your_data.xlsx
# Then ask AI to analyze the CSV file
# "Please analyze your_data.csv"
# For staff mapping, convert to JSON once
python scripts/convert_excel_to_csv.py 业务员机构团队对照表.xlsx --mapping
# This creates staff_mapping.json which AI can read directly
# AI will convert Excel to CSV first, then analyze
# "Please analyze your_data.xlsx"
Recommendation: Always use Option 1 or 2 for best performance
The backend implements a comprehensive DataProcessor class (backend/data_processor.py) that handles all data operations. Key responsibilities:
_build_name_to_info)Location: backend/data_processor.py:24-58
Purpose: Build name → institution/team mapping from staff mapping file
Logic:
{姓名: {三级机构, 四级机构, 团队简称}}(name_to_info dict, conflicts list)Business Rule: When same name appears multiple times with different info, keep last record and flag as conflict
get_policy_mapping)Location: backend/data_processor.py:60-98
Purpose: Create unique policy number → staff → institution/team chain
Returns:
{
'policy_to_staff': {保单号: 业务员姓名},
'staff_to_info': {姓名: {三级机构, 四级机构, 团队简称}},
'conflicts': [姓名列表]
}
Use Case: Ensures data consistency when filtering by policy number
get_kpi_windows)Location: backend/data_processor.py:559-658
Purpose: Calculate KPI metrics across 3 time windows anchored to a specific date
Three Windows:
Metrics per Window:
签单/批改保费)签单数量)手续费含税)Returns:
{
'anchor_date': 'YYYY-MM-DD',
'premium': {'day': float, 'last7d': float, 'last30d': float},
'policy_count': {'day': int, 'last7d': int, 'last30d': int},
'commission': {'day': float, 'last7d': float, 'last30d': float},
'target_gap_day': float,
'validation': {...}
}
Key Implementation Details:
pd.to_datetime for date parsing with error handlingget_week_comparison)Location: backend/data_processor.py:408-557
Purpose: Compare same weekdays across 3 consecutive 7-day periods
Algorithm:
Returns:
{
'latest_date': '2025-11-05',
'x_axis': ['周三', '周四', '周五', '周六', '周日', '周一', '周二'],
'series': [
{
'name': 'D-14 (10-22): 781万',
'data': [110234.5, 95023.1, ...], # 7 daily values
'dates': ['2025-10-22', '2025-10-23', ...],
'code': 'D-14',
'total_value': 7814320.5,
'period_index': 2
},
...
],
'validation': {...}
}
Metrics:
metric='premium': Sum of 签单/批改保费 per daymetric='count': Count of policies with premium ≥ 50 per dayX-Axis Logic: Weekday labels start from first day of Period 0 (D), maintaining consistent weekday alignment across all 3 periods
Why This Matters: Enables apple-to-apple comparison (e.g., all Mondays across 3 weeks) to identify day-of-week patterns
_apply_filters)Location: backend/data_processor.py:660-769
Purpose: Apply hierarchical filters based on staff mapping
Filter Hierarchy:
终端来源 == '0110融合销售'Critical Logic - Institution/Team Filtering:
# Institution filter: Find all staff belonging to this institution
staff_list = [extract_name(key)
for key, info in mapping.items()
if info['三级机构'] == filter_value]
df = df[df['业务员'].isin(staff_list)]
Why Staff Mapping is Authoritative: The 三级机构 field in raw data may be incorrect. Always use staff mapping to determine correct institution assignment.
Policy Consistency Check: When filtering by 保单号, enforce that institution/team filters match the mapped values for that policy's staff
get_staff_performance_distribution)Location: backend/data_processor.py:821-950
Purpose: Analyze how many staff fall into each performance tier
Performance Tiers (by premium):
Supported Periods:
day: Single daylast7d: Rolling 7 dayslast30d: Rolling 30 daysReturns:
{
'period': 'day',
'period_label': '当日',
'date_range': '2025-11-08',
'distribution': [
{'range': '<1万', 'count': 15, 'percentage': 37.5},
{'range': '1-2万', 'count': 12, 'percentage': 30.0},
...
],
'total_staff': 40,
'total_premium': 1580000.50
}
Use Case: Identify underperforming staff or high-performers for management action
_validate_staff_mapping, _validate_policy_consistency)Location: backend/data_processor.py:952-992, 771-819
Staff Mapping Validation:
Policy Consistency Validation:
Returns:
{
'unmatched_staff': ['姓名1', '姓名2', ...],
'unmatched_count': 5,
'policy_consistency': {
'mismatch_policies': ['保单号1', '保单号2', ...],
'mismatch_count': 3
}
}
When to Alert User:
unmatched_count: Mapping file may be outdatedmismatch_count: Data quality issue, investigate sourceWhen writing Python analysis code, follow these patterns from DataProcessor:
# Always parse with error handling
df['投保确认时间'] = pd.to_datetime(df['投保确认时间'], errors='coerce')
# Filter by date range (use .date() for comparison)
mask = (df['投保确认时间'].dt.date >= start_date.date()) & \
(df['投保确认时间'].dt.date <= end_date.date())
def sum_float(series):
try:
return float(series.sum())
except Exception:
return 0.0
import re
match = re.search(r'[\u4e00-\u9fa5]+', staff_key) # Extract Chinese characters
if match:
name = match.group()
weekday_map = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
weekday_label = weekday_map[date_obj.weekday()] # Monday=0, Sunday=6
# For string columns
df = df.fillna('')
# For numeric columns
df[col] = pd.to_numeric(df[col], errors='coerce') # Invalid → NaN
# Keep last occurrence (latest data wins)
df = df.drop_duplicates(subset=['保单号', '投保确认时间'], keep='last')
Problem: Raw data may have incorrect institution assignments Solution: ALWAYS use staff mapping to determine institution
# ❌ Wrong
df[df['三级机构'] == '达州']
# ✅ Correct
staff_list = [name for key, info in mapping.items()
if info['三级机构'] == '达州']
df[df['业务员'].isin(staff_list)]
Problem: Negative premium represents cancellations/adjustments Solution: Keep negative values, don't filter them out
# ❌ Wrong
df = df[df['签单/批改保费'] > 0]
# ✅ Correct
# Include all values, negative premiums are valid business data
total_premium = df['签单/批改保费'].sum() # May be negative
Problem: Comparing different weekdays across weeks is meaningless
Solution: Use weekday_index to align same weekdays
# Calculate days since period start
period_data['weekday_index'] = period_data['投保确认时间'].apply(
lambda x: (x.date() - period_start.date()).days
)
Problem: KPI calculations without filters show global metrics Solution: Always apply filters BEFORE aggregation
# ✅ Correct order
df = self._apply_filters(df, filters) # First
premium = df['签单/批改保费'].sum() # Then aggregate
Problem: Analysis breaks when data range changes Solution: Use anchor date and relative offsets
# ❌ Wrong
start_date = pd.to_datetime('2025-10-01')
# ✅ Correct
anchor_date = df['投保确认时间'].max()
start_date = anchor_date - timedelta(days=29) # Rolling 30 days
All KPI endpoints follow this structure:
{
"status": "success",
"data": {
"anchor_date": "YYYY-MM-DD",
"premium": {...},
"validation": {
"unmatched_staff": [],
"unmatched_count": 0,
"policy_consistency": {...}
}
}
}
{
"status": "error",
"error": "Error message",
"code": "ERROR_CODE" // Optional
}
When unmatched_count > 0 or mismatch_count > 0, frontend should display warnings but still show data
Skill Version: 3.0 Last Updated: 2025-11-08 Mapping Table Version: 20251104 (229 records)
Changelog:
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Complete architecture reference for the A3 insurance platform — file locations, data flow, conventions, microservice map, and fullstack patterns
日本語の概要は準備中です。原文の説明を表示しています。
Drafts U.S. commercial real estate access and indemnity (right-of-entry) agreements for pre-closing due diligence. Covers license grants, non-invasive vs invasive testing gates, insurance/endorsement requirements, indemnity with discovery carve-outs, restoration and lien remedies, confidentiality, and anti-indemnity guardrails. Trigger: access agreement, right of entry, due diligence access, Phase I/II, invasive testing, pre-PSA site inspection.
日本語の概要は準備中です。原文の説明を表示しています。
当用户需要对意外险投保问卷进行专业、结构化的核保审查,提取职业类别、工作环境、作业内容、危险活动参与情况、交通出行习惯、特殊工作暴露及其他可能影响意外险承保判断的高风险信息,并生成适合意外险核保、补问流转和风险分层处理的结构化分析结果时使用本 skill。
日本語の概要は準備中です。原文の説明を表示しています。
Inspect, schema, and fill true AcroForm PDFs using sciClaw's pdf_form_inspect, pdf_form_schema, and pdf_form_fill tools. Use when: (1) checking whether a PDF is a real fillable AcroForm, (2) listing form field names, types, and choices, (3) filling a supported form from structured values, (4) preparing reviewable insurance, legal, administrative, or clinical form drafts, (5) reporting skipped fields or unused input keys after a fill. Do not use for scanned PDFs, OCR tasks, or XFA-only forms.
日本語の概要は準備中です。原文の説明を表示しています。
Guide actuarial analysis for insurance pricing. TRIGGERS - Use when user needs help with actuarial-analysis related tasks.
日本語の概要は準備中です。原文の説明を表示しています。
Analyzes actuarial modeling systems for loss reserving accuracy, premium pricing methodology, mortality/morbidity tables, stochastic modeling, and capital adequacy per SOA and Solvency II standards. USE THIS SKILL WHEN: - You need to review or audit actuarial models (reserving, pricing, capital) - Someone asks about loss triangle analysis or reserve adequacy - You are evaluating IBNR calculations, chain ladder methods, or Bornhuetter-Ferguson - A project involves insurance pricing, GLM rating models, or ratemaking - You need to assess Solvency II SCR calculations or RBC compliance - Someone mentions actuarial opinions, ASOP compliance, or SOA standards - You are reviewing stochastic models, ESG configurations, or DFA frameworks - A codebase uses actuarial libraries (chainladder, lifetables, ChainLadder R package) TRIGGER PHRASES: "actuarial", "loss reserving", "IBNR", "chain ladder", "premium pricing", "mortality table", "Solvency II", "capital adequacy", "ratemaking", "GLM pricing", "risk-based capital", "reserve analysis", "actuarial opinion"
日本語の概要は準備中です。原文の説明を表示しています。