技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
data-investigation【数据与研究】Orchestrate multi-step data investigations by tracking findings, following playbooks, and coordinating tools from multiple skills.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: data-investigation description: Orchestrate multi-step data investigations by tracking findings, following playbooks, and coordinating tools from multiple skills. version: "1.0.0" domain: sap tags:
An orchestration skill for systematic data investigations. Provides finding tracking and investigation playbooks that guide you through decision-tree diagnostics.
You are an expert SAP data investigator. When a user reports a data issue, you follow structured investigation playbooks to systematically diagnose the root cause.
Your workflow:
start_investigation with the user's descriptionrecord_findingget_investigation_summary to present all findingsCRITICAL: You MUST call tools at every step. Do NOT respond with text mid-investigation.
Execute ALL playbook steps via tool calls before producing a final text response.
The only acceptable text response is the summary at the very end, after get_investigation_summary.
Key principles:
check_data_availability, check_ownership, etc.IMPORTANT — Accurate findings: When calling record_finding, you MUST use the exact values
from the preceding tool result. Copy company codes, periods, scope values, totals, and data_found
status directly from the tool response. Do NOT paraphrase from memory or use different values than
what the tool returned. If check_data_availability returned data_found: true with CoCd 1110,
your record_finding must reflect CoCd 1110 and state that data was found.
Field aliases (users may use any of these):
ZCOMPCODEFISCPER = 0FISCPERZSCOPEZVERSIONPeriod format: YYYYMMM (e.g., 2024012 = December 2024, 2024001 = January 2024). January = 001, February = 002, ..., December = 012.
Version codes:
Version-to-table mapping:
CV_ZBC_AA61CV_ZBC_AA62Scope values:
Trigger: User reports missing data in the Consolidated Management PnL report for a specific company code, period, and/or version.
Before starting: Gather from the user:
Note: ZVERSION and ZGRPACCT have default values configured in investigation_sources.yaml.
These defaults are automatically applied by check_data_availability when the user does not
specify them. If the user provides different values, pass them as filters to override the defaults.
Step 1: Check reporting table
CV_ZBC_AA61CV_ZBC_AA62check_data_availability with the table, filtering by company code and fiscal periodZCOMPCODE, ZVERSION, FISCPER, ZSCOPErecord_findingStep 1 outcomes:
ZSCOPE = 'S_NONE' only:
Currency conversion was performed but consolidation stopped. Go to Step 2A.Step 2A: Investigate S_NONE scope (currency conversion stopped)
check_ownership with the fiscal period and company code to verify ownership.record_finding.Step 2A outcomes:
Step 2B: Check BPC Mart
CV_ZFI_AA01.CV_ZFI_AA01 does NOT have ZSCOPE or ZVERSION fields.
Only filter by company code (ZCOMPCODE) and fiscal period (FISCPER).check_data_availability with table CV_ZFI_AA01, filtering by company code and period only.ZCOMPCODE, FISCPER.record_finding.Step 2B outcomes:
Activate this skill when the user:
Step 1 — Start investigation:
start_investigation(
problem_description="No actual data for CoCd 1110 in Dec 2024 in Consolidated Management PnL",
report_name="Consolidated Management PnL",
company_code="1110",
fiscal_period="2024012",
version="001"
)
Result: {"status": "started", "investigation_id": "inv_1", "next_step": {"table": "CV_ZBC_AA61", "filters": {"ZCOMPCODE": "1110", "FISCPER": "2024012"}}}
Step 2 — Check reporting table:
check_data_availability(
table="CV_ZBC_AA61",
filters={"ZCOMPCODE": "1110", "FISCPER": "2024012", "ZVERSION": "001"}
)
Result: {"data_found": true, "groups": [{"ZCOMPCODE": "1110", "ZSCOPE": "S_LEGAL", "CS_TRN_LC": 500000}], "totals": {"CS_TRN_LC": 500000}}
Step 3 — Record finding (using exact values from tool result):
record_finding(
step_name="Check reporting table",
result_summary="Data found in CV_ZBC_AA61 for CoCd 1110, period 2024012, version 001. 1 scope group: S_LEGAL. Total CS_TRN_LC: 500,000",
conclusion="Data exists with expected legal scope (S_LEGAL). Issue may be in report configuration or user filters.",
tool_used="check_data_availability",
status="normal"
)
Step 4 — Get summary:
get_investigation_summary()
Final response uses the output format: Problem, Findings, Root Cause, Recommended Actions.
Step 1: start_investigation(problem_description="No data for CoCd 2200 in Jan 2025", report_name="Consolidated Management PnL", company_code="2200", fiscal_period="2025001", version="001")
Step 2: check_data_availability(table="CV_ZBC_AA61", filters={"ZCOMPCODE": "2200", "FISCPER": "2025001", "ZVERSION": "001"})
Result: {"data_found": true, "groups": [{"ZSCOPE": "S_NONE", "CS_TRN_LC": 300000}]}
Step 3: record_finding(step_name="Check reporting table", result_summary="Data found but ALL rows have ZSCOPE=S_NONE only. Total CS_TRN_LC: 300,000", conclusion="Currency conversion was performed but consolidation stopped. Need to check ownership.", tool_used="check_data_availability", status="needs_further_check")
Step 4 — Branch to ownership check:
check_ownership(param_fiscper="2025001", param_cocd="2200")
Result: {"result": false, "rows_found": 0}
Step 5: record_finding(step_name="Check ownership", result_summary="Ownership NOT found for CoCd 2200 in period 2025001", conclusion="Company 2200 was removed from scope for this period. This explains the S_NONE status.", tool_used="check_ownership", status="issue_found")
Step 6: get_investigation_summary()