Claude-skill-registry lc-show
Show LeetCode problem details and generate Rust template (project)
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/lc-show" ~/.claude/skills/majiayu000-claude-skill-registry-lc-show && rm -rf "$T"
manifest:
skills/data/lc-show/SKILL.mdsource content
LeetCode Show
Show problem details and generate Rust template in
problems/ directory.
Usage
/lc-show <problem_id> - Show problem and generate Rust code template
Instructions
- Run
to display the problem descriptionleetcode show <problem_id> 2>/dev/null - Show the problem details to the user
- Run
to generate the Rust templateleetcode show <problem_id> -g -l rust 2>/dev/null - Move the generated file to
directory:problems/mv <problem_id>.<problem-name>.rs problems/ - Tell the user the file is ready at
problems/<problem_id>.<problem-name>.rs
File Format
use std::collections::HashMap; // if needed impl Solution { pub fn function_name(...) -> ... { // implementation } }
Note:
struct Solution; は含めない(LeetCode側で定義されるため)。rust-analyzer用には build.rs が lib.rs 経由で提供する。
Commands
- Test:
leetcode test problems/<file>.rs - Submit:
leetcode submit problems/<file>.rs