소스 정보
- 저장소
- cxcscmu/SkillLearnBench
- 최근 소스 활동
- 2026년 4월 24일 05:14
- 감지된 SKILL.md 언어
- 영어
- 스타
- 77
- 포크
- 4
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/cxcscmu/SkillLearnBench --skill json-result-formatting명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
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.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | json-result-formatting |
| description | Format query results to JSON with proper structure and token tracking |
Formatting retrieved data into standardized JSON output with answer lists and token tracking.
{
"q1": {"answer": ["xxx"], "tokens": 123},
"q2": {"answer": ["xxx", "yyy"], "tokens": 456},
"q3": {"answer": [], "tokens": 789}
}
import json
result = {
"q1": {"answer": [], "tokens": 0},
"q2": {"answer": [], "tokens": 0},
"q3": {"answer": [], "tokens": 0}
}
def add_answer(result, question_key, answer_items, tokens=0):
"""Add answer as list (always list format)"""
# Ensure answer_items is a list
if isinstance(answer_items, str):
answer_items = [answer_items]
elif not isinstance(answer_items, list):
answer_items = list(answer_items)
result[question_key] = {
"answer": answer_items,
"tokens": int(tokens)
}
return result
# Usage
result = add_answer(result, "q1", ["eid_1e9356f5"], tokens=150)
result = add_answer(result, "q2", employee_ids_list, tokens=200)
import json
def write_result_file(result, filepath):
"""Write result to JSON file"""
with open(filepath, 'w') as f:
json.dump(result, f, indent=4)
print(f"Results written to {filepath}")
# Usage
write_result_file(result, '/root/answer.json')
import json
# For local data processing, estimate tokens
def estimate_tokens_from_text(text):
"""Rough estimation: ~4 characters per token"""
return len(text) // 4
# Better: track actual API usage
def track_tokens(usage_dict):
"""Track from API response"""
if hasattr(usage_dict, 'input_tokens'):
return usage_dict.input_tokens + usage_dict.output_tokens
return 0
import json
# Initialize
result = {
"q1": {"answer": [], "tokens": 0},
"q2": {"answer": [], "tokens": 0},
"q3": {"answer": [], "tokens": 0}
}
# Q1: Authors and reviewers
authors = ["eid_1e9356f5"]
reviewers = ["eid_06cddbb3", "eid_99835861"]
result["q1"]["answer"] = authors + reviewers
result["q1"]["tokens"] = 150 # Estimated or tracked
# Q2: Competitor insights team members
competitor_team = ["eid_xxx", "eid_yyy"]
result["q2"]["answer"] = competitor_team
result["q2"]["tokens"] = 200
# Q3: Demo URLs
urls = ["https://example.com/demo1", "https://example.com/demo2"]
result["q3"]["answer"] = urls
result["q3"]["tokens"] = 100
# Write output
with open('/root/answer.json', 'w') as f:
json.dump(result, f, indent=4)
Always Use Lists
["value"] not "value"["item1", "item2"][] not nullToken Tracking
response.usage.input_tokens + response.usage.output_tokensData Validation
# Ensure no duplicates
result["q1"]["answer"] = list(set(result["q1"]["answer"]))
# Ensure proper types
result["q2"]["tokens"] = int(result["q2"]["tokens"])
Indent and Format
# Always use proper formatting
json.dump(data, f, indent=4)
json.load()import json
# Verify output file
with open('/root/answer.json', 'r') as f:
data = json.load(f)
# Check structure
for q_key, q_data in data.items():
assert "answer" in q_data
assert "tokens" in q_data
assert isinstance(q_data["answer"], list)
assert isinstance(q_data["tokens"], int)
print(f"{q_key}: {len(q_data['answer'])} items, {q_data['tokens']} tokens")