agentsclimarketplace

Run2 Output Result to JSON File

Skill cxcscmu/SkillLearnBench/skills/b3-teacher-feedback-claude-haiku-4-5/earthquake-plate-calculation/run2_Output-Result-to-JSON-File

Write the final result dictionary to a JSON file at `/root/answer.json` with proper formatting and field validation. Use this skill as the final step to save the analysis result.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run2_Output-Result-to-JSON-File

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

0.9 KB, 159 tokens by cl100k_base, as published. Nobody here has run it

import json

def save_result_to_json(result, output_path='/root/answer.json'):
    """
    Save result to JSON file with proper formatting.
    
    Args:
        result: Dictionary with earthquake result data
        output_path: Path where JSON file should be written
    """
    # Validate all required fields are present
    required_fields = ['id', 'place', 'time', 'magnitude', 'latitude', 'longitude', 'distance_km']
    for field in required_fields:
        if field not in result:
            raise ValueError(f"Missing required field: {field}")
    
    with open(output_path, 'w') as f:
        json.dump(result, f, indent=2)
    
    print(f"Result saved to {output_path}")

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.