원클릭으로
json-report-generation
Generate and write structured JSON reports with proper formatting and validation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generate and write structured JSON reports with proper formatting and validation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Handles reading, populating, and saving .docx files using the python-docx library. Use this skill for any tasks involving template filling or modifying Word documents.
Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
This skill includes search capability in 13F, such as fuzzy search a fund information using possibly inaccurate name, or fuzzy search a stock cusip info using its name.
A comprehensive PDF toolkit for advanced data extraction and document analysis. Beyond text and table extraction, this tool is optimized for visual layout reasoning: it can map graphical elements to coordinates (such as determining appointment times based on their position on a calendar timeline) and identify color-coded features (e.g., distinguishing high-priority blocks from flexible blue-colored entries). Use this skill when the task requires interpreting schedule layouts, calculating durations from visual spans, or resolving scheduling conflicts based on the spatial and color properties of a PDF document.
Build deterministic, verifiable data visualizations with D3.js (v6). Generate standalone HTML/SVG (and optional PNG) from local data files without external network dependencies. Use when tasks require charts, plots, axes/scales, legends, tooltips, or data-driven SVG output.
invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.
| name | json-report-generation |
| description | Generate and write structured JSON reports with proper formatting and validation. |
Create, validate, and write JSON reports with proper formatting and schema verification.
{
"pr": {
"total": 0,
"merged": 0,
"closed": 0,
"avg_merge_days": 0.0,
"top_contributor": "username"
},
"issue": {
"total": 0,
"bug": 0,
"resolved_bugs": 0
}
}
pr.total: Integer count of all PRs created during periodpr.merged: Integer count of merged PRs (as of report date)pr.closed: Integer count of closed (non-merged) PRspr.avg_merge_days: Float rounded to 1 decimal placepr.top_contributor: String username of author with most PRsissue.total: Integer count of all issues created during periodissue.bug: Integer count of issues with 'bug' in any labelissue.resolved_bugs: Integer count of bug issues that were closedimport json
report = {
"pr": {
"total": 125,
"merged": 95,
"closed": 20,
"avg_merge_days": 3.2,
"top_contributor": "alice"
},
"issue": {
"total": 45,
"bug": 18,
"resolved_bugs": 12
}
}
with open('/app/report.json', 'w') as f:
json.dump(report, f, indent=2)
import json
def validate_report(report):
"""Validate report structure and types"""
required_keys = {'pr', 'issue'}
pr_keys = {'total', 'merged', 'closed', 'avg_merge_days', 'top_contributor'}
issue_keys = {'total', 'bug', 'resolved_bugs'}
assert set(report.keys()) == required_keys, "Missing top-level keys"
assert set(report['pr'].keys()) == pr_keys, "Missing PR keys"
assert set(report['issue'].keys()) == issue_keys, "Missing issue keys"
assert isinstance(report['pr']['total'], int), "PR total must be int"
assert isinstance(report['pr']['merged'], int), "PR merged must be int"
assert isinstance(report['pr']['closed'], int), "PR closed must be int"
assert isinstance(report['pr']['avg_merge_days'], (int, float)), "avg_merge_days must be numeric"
assert isinstance(report['pr']['top_contributor'], str), "top_contributor must be string"
assert isinstance(report['issue']['total'], int), "Issue total must be int"
assert isinstance(report['issue']['bug'], int), "Issue bug count must be int"
assert isinstance(report['issue']['resolved_bugs'], int), "resolved_bugs must be int"
return True
def write_report(report, filepath):
"""Write and validate report"""
validate_report(report)
with open(filepath, 'w') as f:
json.dump(report, f, indent=2)
print(f"Report written to {filepath}")
import json
def print_report(report):
"""Pretty print report for verification"""
print("=" * 60)
print("DECEMBER 2024 - CLI/CLI REPOSITORY PULSE")
print("=" * 60)
print("\nPull Requests:")
print(f" Total Created: {report['pr']['total']}")
print(f" Merged: {report['pr']['merged']}")
print(f" Closed (unmerged):{report['pr']['closed']}")
print(f" Avg Merge Time: {report['pr']['avg_merge_days']} days")
print(f" Top Contributor: {report['pr']['top_contributor']}")
print("\nIssues:")
print(f" Total Created: {report['issue']['total']}")
print(f" Bug Reports: {report['issue']['bug']}")
print(f" Resolved Bugs: {report['issue']['resolved_bugs']}")
print("=" * 60)
indent=2 for readable JSON formatting# Using jq to construct JSON (complex and error-prone)
jq -n \
--arg total "125" \
--arg merged "95" \
--arg closed "20" \
--arg avg "3.2" \
--arg contributor "alice" \
'{
pr: {total: ($total | tonumber), merged: ($merged | tonumber), closed: ($closed | tonumber), avg_merge_days: ($avg | tonumber), top_contributor: $contributor},
issue: {total: 45, bug: 18, resolved_bugs: 12}
}'