codeforces-api-client
npx machina-cli add skill a5c-ai/babysitter/codeforces-api-client --openclawCodeforces API Client Skill
Purpose
Interface with the Codeforces API to fetch contest data, problem sets, submissions, and user statistics for competitive programming workflows.
Capabilities
- Fetch contest problems and metadata
- Submit solutions and retrieve verdicts
- Access user standings and rating history
- Retrieve editorials and problem tags
- Virtual contest management
- Fetch recent submissions and status
- Access problemset by tags and difficulty
Target Processes
- codeforces-contest
- progress-tracking
- skill-gap-analysis
- upsolving workflows
Integration
Uses the official Codeforces API (https://codeforces.com/apiHelp) with proper rate limiting and authentication when required.
Input Schema
{
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["getContestProblems", "getUserSubmissions", "getProblemset", "getStandings", "getUserRating"]
},
"contestId": { "type": "integer" },
"handle": { "type": "string" },
"tags": { "type": "array", "items": { "type": "string" } },
"count": { "type": "integer", "default": 10 }
},
"required": ["action"]
}
Output Schema
{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"data": { "type": "object" },
"error": { "type": "string" }
},
"required": ["success"]
}
Usage Example
{
"action": "getContestProblems",
"contestId": 1900
}
Source
git clone https://github.com/a5c-ai/babysitter/blob/main/plugins/babysitter/skills/babysit/process/specializations/algorithms-optimization/skills/codeforces-api-client/SKILL.mdView on GitHub Overview
Interface with the Codeforces API to fetch contest data, problem sets, submissions, and user statistics for competitive programming workflows. It enables automated practice, upsolving, and progress tracking by querying contests, problem metadata, editorials, and rating history.
How This Skill Works
The skill sends HTTP requests to the official Codeforces API (codeforces.com/apiHelp) using action-based inputs like getContestProblems, getProblemset, getUserSubmissions, getStandings, and getUserRating. It enforces rate limiting and supports authentication when private data is needed, returning a unified response with success, data, and error fields.
When to Use It
- When you need the problem set and metadata for a specific contest (getContestProblems)
- When curating practice material by tags or difficulty (getProblemset)
- When tracking a user’s activity, standings, or rating history (getStandings, getUserRating, getUserSubmissions)
- When preparing for virtual contests or automated progress dashboards
- When researching editorial availability and problem tags for targeted learning
Quick Start
- Step 1: Choose an action (for example, getContestProblems) and provide required fields like contestId or handle.
- Step 2: Send the JSON payload to the Codeforces API client and receive a response with { success, data, error }.
- Step 3: Parse the data and feed it into your workflow (dashboards, upsolving plans, or automation pipelines).
Best Practices
- Validate action and required fields before request
- Respect Codeforces API rate limits and implement backoff
- Cache results for repeated queries (e.g., problemsets by tag)
- Handle errors gracefully using the 'error' field
- Prefer batched requests (where supported) to reduce round-trips
Example Use Cases
- { action: getContestProblems, contestId: 1900 }
- { action: getProblemset, tags: ["graphs", "dp"], count: 20 }
- { action: getUserSubmissions, handle: "tourist", count: 50 }
- { action: getStandings, contestId: 1510, handle: "yourHandle" }
- { action: getUserRating, handle: "yourHandle" }