/SKILL.md
Use this skill when working in the leetcode-75-c repository to add, refactor, explain, verify, or document a LeetCode C solution while preserving the repo's standalone-first folder style and markdown note conventions.
npx skillsauth add androidmiao/leetcode-75-c leetcode-75-c-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill for tasks inside the leetcode-75-c repository when the user wants to:
.c solutionREADME.md, *_Description.md, *_Editorial.md, or *_Opus-4.6.mdThis repo has two common layouts.
Usually contains:
Problem Name.c*_Description.md*_Editorial.md*_Opus-4.6.mdThis is the default and preferred style for new problems.
Usually contains:
solution.csolution.hmain.cMakefileREADME.mdOnly use this layout when the folder already uses it or the user explicitly asks for it.
For a new problem, default to standalone style unless the user explicitly asks for split local-test files.
Problem Name.c*_Description.md*_Editorial.md*_Opus-4.6.md*_Memory.mdUse the nearest existing naming pattern in the repo. Do not normalize the entire repository.
Problem Name.c.c file as the main teaching artifact for explanation-heavy tasksInitialization always requires opening the LeetCode problem page in the browser, regardless of whether the user provides a link. If the user does not provide a URL, construct it from the problem number/name (e.g. https://leetcode.com/problems/<slug>/) and open it via Chrome DevTools MCP. If the slug cannot be determined, ask the user for the link before proceeding.
Treat page syncing as part of every initialization. Initialization is not complete until:
*_Description.md has been synced from the Description page, with the full English section first followed by a full Traditional Chinese (繁體中文) translation / paraphrase (same bilingual formatting as *_Editorial.md)*_Editorial.md has been synced from the Editorial page when the editorial is accessible*_Editorial.md contains the full Solution section structure as repo-maintainable English notes plus corresponding Traditional Chinese (繁體中文) translation / paraphrase*_Opus-4.6.md has been created with an implementation vs. editorial comparison (see below).c solution file contains detailed Traditional Chinese (繁體中文) inline comments and ASCII diagram(s) in the top-of-file block comment (see "Traditional Chinese (繁體中文) annotation and diagram rules" below)*_Linux.md has been created with a Linux kernel connection analysis (see "Creating *_Linux.md during initialization" below)*_Memory.md has been created with a memory address / array index diagram (see "Creating *_Memory.md during initialization" below)*_Opus-4.6.md during initializationAfter both the .c solution and *_Editorial.md are in place, always create *_Opus-4.6.md as part of initialization. It must contain:
.c solution is the same algorithm as one of the editorial approaches, a variation, or a different approach entirely.Write the full English section first, then the full Traditional Chinese (繁體中文) translation / paraphrase after it.
*_Linux.md during initializationAfter the .c solution and *_Editorial.md are in place, always create *_Linux.md as part of initialization. Identify which Linux kernel subsystem or utility uses the same (or a closely related) algorithm and produce the file according to the rules in the "Linux Kernel connection notes" section below. If no obvious kernel connection exists for the problem, research broadly — most fundamental data-structure and algorithm patterns (merge sort, hash tables, red-black trees, BFS/DFS, union-find, LRU cache, trie, etc.) have a counterpart somewhere in the kernel source tree. Only skip this file if genuinely no meaningful kernel parallel can be found after a reasonable search.
.c directly and keep matching markdown aligned with it.solution.c, declarations in solution.h, and lightweight checks in main.c.Makefile exists, run the local verification flow when logic changes.When the user explicitly says the goal is "for Google LeetCode interview" or equivalent:
k heap over a repo-only teaching simplification when the heap approach materially improves complexity.*_Opus-4.6.md, explicitly state:
Every .c solution produced or updated in this repo must include:
/* */ block comments for multi-line diagrams; use /* … */ or // for inline notes.This annotation step is part of initialization when a LeetCode link is provided. It must be applied to the .c file before initialization is considered complete.
If the user asks you to use the problem description to implement the solution in the target .c file:
.c file.When maintaining markdown notes:
README.md: short practical explanation of the chosen approach*_Description.md: problem statement notes*_Editorial.md: structured algorithm explanation and complexity notes*_Opus-4.6.md: working notes, comparisons, and AI-assisted reasoning for that problem*_Memory.md: memory address / array index diagrams tracing the algorithm with hypothetical hex addressesNaming rule for algorithm-explanation notes:
*_Editorial.md*_Solution.md files*_Editorial.md when the user asks*_Solution.md files repo-wide unless the user explicitly requests that cleanupUpdate only the files relevant to the request.
Unless the user explicitly asks for interleaved bilingual formatting:
When the user asks you to open a LeetCode problem, Description page, or Editorial page and update local markdown:
*_Description.md, capture the problem statement, examples, constraints, and follow-up. Then append a full Traditional Chinese (繁體中文) translation / paraphrase after the English section (same bilingual formatting default as *_Editorial.md).*_Editorial.md, capture the official Solution section structure, approach names, core ideas, algorithm steps, and complexity notes.*_Editorial.md, include the full set of Solution approaches that are visible on the page in English repo notes first, then add the corresponding Traditional Chinese (繁體中文) translation / paraphrase after that.*_Linux.md)When the user mentions a Linux kernel connection (e.g. "kernel 的 list_sort 就是 merge sort 變體") or asks about how a problem relates to real-world kernel code:
*_Linux.md file in the problem folder (e.g. 23_Merge k Sorted Lists_Linux.md).lib/, include/linux/, test files, etc.) with a brief description of each file's role..c solution along dimensions such as: algorithm direction (top-down vs. bottom-up), data structure, merge strategy, stability, complexity, API design (hardcoded vs. generic comparator).This file is created both during initialization (see "Creating *_Linux.md during initialization") and on demand when the user raises a kernel connection for an existing problem.
*_Memory.md)When the user asks for a memory diagram, or during new-problem initialization from a LeetCode link, create a *_Memory.md file in the problem folder (e.g. 700_Search in a Binary Search Tree_Memory.md).
*_Memory.md during initializationAfter the .c solution is in place, always create *_Memory.md as part of initialization. The file must contain (adapt sections to the problem's data structure):
2*i+1 for left child), and provide a full index-relationship table.舊值 → 新值)Style rules:
───▶, ─┐, ▼, ◄── box-drawing characters for pointer arrows in ASCII diagrams.┌─┬─┐ │ ├─┤ └─┴─┘ for memory boxes.This file is created both during initialization and on demand when the user asks for a memory / pointer / array-index diagram for an existing problem.
When the user asks things like "is this the same as your solution?" or "which is better?":
*_Opus-4.6.md file exists and the user wants the result saved, record the comparison there.Prefer fast local inspection:
rg --files .
rg -n "pattern" <folder>
sed -n '1,200p' <file>
make
For a newer local-test folder with a Makefile, use make to verify changes.
*_Opus-4.6.md notes unless the user asked for that file to be updated.development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.