Run2 data mapping
Techniques for preparing and formatting data from JSON/API sources for inclusion in documents.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill run2_data-mappingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
0.9 KB, 187 tokens by cl100k_base, as published. Nobody here has run it
Data Mapping and Formatting
Before inserting data into a document, ensure it is correctly formatted.
Currency Formatting
def format_currency(value):
try:
# Assuming value is a string like "185,000" or a number
clean_val = str(value).replace(',', '')
return f"${float(clean_val):,.2f}"
except:
return value
Date Formatting
Standardize date formats if necessary.
from datetime import datetime
def format_date(date_str):
# If the input is "January 15, 2024"
return date_str # or convert to a specific format
Mapping Placeholders
Create a dictionary that matches the {{PLACEHOLDER}} keys in the document.
mapping = {f"{{{{{k}}}}}": str(v) for k, v in employee_data.items()}
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.