lc-test
Test a Rust solution file against LeetCode's test cases (project)
When & Why to Use This Skill
This Claude skill streamlines the LeetCode practice workflow by allowing users to test Rust solution files against official test cases directly. It automates the execution of the leetcode-cli, providing instant feedback on algorithm correctness and performance, which is essential for efficient technical interview preparation and Rust programming mastery.
Use Cases
- Technical Interview Prep: Rapidly validate Rust-based algorithm solutions against LeetCode test suites to ensure edge-case coverage.
- Local Development Workflow: Test problems stored in a local directory (e.g., problems/1.two-sum.rs) without leaving the coding environment or manually running CLI commands.
- Debugging and Iteration: Quickly identify logical errors by viewing detailed test results and stdout/stderr output directly within the agent interface.
- Automated Submission Readiness: Use the tool to verify code locally to avoid failed submission attempts and maintain a high acceptance rate on the LeetCode platform.
| name | lc-test |
|---|---|
| description | Test a Rust solution file against LeetCode's test cases (project) |
LeetCode Test
Test a solution file against LeetCode's test cases.
Usage
/lc-test <file> - Test the solution file (e.g., problems/1.two-sum.rs)
Instructions
- Run
leetcode test <file> 2>&1and show the results to the user - If only problem ID is provided, find the file in
problems/directory
Note: leetcode test may have timeout issues. If it hangs, use leetcode submit directly.