leetcode-problem-fetcher
БесплатноБез исполняемых скриптовНе проверенFetch and parse LeetCode problems with metadata, constraints, examples, hints, difficulty ratings, and related problems. Integrates with LeetCode API for…
от a5c-ai★ 1 947 звёзд на GitHubОб этом скилле
leetcode-problem-fetcher
A specialized skill for fetching and parsing LeetCode problems with complete metadata, suitable for competitive programming practice, interview preparation, and algorithm learning workflows.
Purpose
Extract comprehensive problem data from LeetCode including:
- Problem statements and descriptions
- Input/output constraints and formats
- Test cases and hidden constraints
- Problem difficulty, tags, and acceptance rate
- Related problems and pattern tags
- Hints and solution approaches
Capabilities
Core Features
Problem Retrieval
- Fetch problems by title slug (URL-friendly name)
- Retrieve daily challenge problems
- Search problems by category, tags, difficulty, or keywords
- Access premium problem alternatives when available
Metadata Extraction
- Difficulty level (Easy, Medium, Hard)
- Acceptance rate and submission statistics
- Problem tags and categories
- Related problems and similar questions
- Company tags (when available)
Content Parsing
- Problem description in markdown format
- Input/output examples with explanations
- Constraints and edge cases
- Follow-up questions and optimizations
- Code templates for multiple languages
User Data Access
- User profile and statistics
- Contest ranking and history
- Submission history and solutions
- Progress tracking across problem sets
Integration Options
MCP Server (Recommended)
# Install LeetCode MCP Server by jinzcdev
claude mcp add-json "leetcode" '{"type":"stdio","command":"npx","args":["-y","@jinzcdev/leetcode-mcp-server","--site","global"]}'
Available MCP Tools:
get_daily_challenge- Fetch daily LeetCode challengeget_problem- Retrieve problem by titleSlugsearch_problems- Filter by category, tags, difficulty, keywordsget_user_profile- Access user dataget_user_contest_ranking- Track contest performance
Direct API Integration
// GraphQL endpoint for LeetCode
const LEETCODE_GRAPHQL = 'https://leetcode.com/graphql';
// Query for problem details
const problemQuery = `
query getProblem($titleSlug: String!) {
question(titleSlug: $titleSlug) {
questionId
title
titleSlug
content
difficulty
topicTags { name slug }
hints
sampleTestCase
codeSnippets { lang code }
stats
}
}
`;
Browser Extension
Competitive Companion - Parses problems from LeetCode and 115+ other online judges:
- Chrome: competitive-companion
- Firefox: competitive-companion
Usage
Fetch a Problem
# Using MCP Server
leetcode get_problem --titleSlug "two-sum"
# Output includes:
# - Problem title and description
# - Difficulty and acceptance rate
# - Topic tags
# - Examples and constraints
# - Code templates
Search Problems
# Search by difficulty and tags
leetcode search_problems --difficulty MEDIUM --tags "dynamic-programming,array"
# Search by keyword
leetcode search_problems --keyword "substring"
Get Daily Challenge
# Fetch today's daily challenge
leetcode get_daily_challenge
Output Schema
{
"problem": {
"id": "string",
"title": "string",
"titleSlug": "string",
"difficulty": "Easy|Medium|Hard",
"acceptanceRate": "number",
"description": "string (markdown)",
"constraints": ["string"],
"examples": [
{
"input": "string",
"output": "string",
"explanation": "string"
}
],
"hints": ["string"],
"topicTags": ["string"],
"similarQuestions": ["string"],
"codeTemplates": {
"python3": "string",
"cpp": "string",
"java": "string"
}
},
"metadata": {
"fetchedAt": "ISO8601 timestamp",
"source": "leetcode.com|leetcode.cn"
}
}
Integration with Processes
This skill enhances the following processes:
leetcode-problem-solving- Core problem-solving workflowpattern-recognition- Identifying algorithmic patternsfaang-interview-prep- FAANG interview preparation
References
- LeetCode MCP Server (jinzcdev)
- LeetCode MCP Server (doggybee)
- Competitive Companion
- Competitive Programming Helper (CPH)
Error Handling
| Error | Cause | Resolution |
|---|---|---|
PROBLEM_NOT_FOUND |
Invalid titleSlug | Verify problem URL or slug |
RATE_LIMITED |
Too many requests | Implement exponential backoff |
AUTH_REQUIRED |
Premium problem | Use alternative or authenticate |
NETWORK_ERROR |
Connection failed | Check network, retry with backoff |
Best Practices
- Caching:
Установить leetcode-problem-fetcher в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteWebFetchWebSearchВложенные файлы
FAQ
Что делает скилл leetcode-problem-fetcher?
Fetch and parse LeetCode problems with metadata, constraints, examples, hints, difficulty ratings, and related problems. Integrates with LeetCode API for comprehensive problem data retrieval.
Как установить скилл leetcode-problem-fetcher?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл leetcode-problem-fetcher запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic