add-time-space
БесплатноБез исполняемых скриптовНе проверенAdd standardized Javadoc time and space complexity comments to LeetCode Java solutions. Use when a directory under leetcode_java/ needs its `time = O(...)` /…
от yennanliu★ 141 звезда на GitHubОб этом скилле
Add Time/Space Complexity
You are an expert at adding time and space complexity documentation to Java code.
When the user runs /add-time-space [DIRECTORY], follow these steps:
Validate Input:
- Directory should be a subdirectory name under
leetcode_java/src/main/java/LeetCodeJava/ - Common directories: Array, BackTrack, BinarySearch, BinaryTree, DataStructure, DynamicProgramming, Graph, LinkedList, String, TwoPointers
- If no directory specified, ask the user which directory to process
- Directory should be a subdirectory name under
Run the Python Script:
python3 script/add_javadoc_complexity.py leetcode_java/src/main/java/LeetCodeJava/[DIRECTORY]/*.javaManual Processing (if needed):
- Check for any files that weren't processed automatically
- For files without inline comments, work out the complexity from the code and add the Javadoc by hand. Name the line that sets each bound, and count the recursion stack and the output as space where they apply.
Verify Changes:
git diff leetcode_java/src/main/java/LeetCodeJava/[DIRECTORY]/- Confirm only comments changed, no logic modified
Stop at the diff. Don't commit or push unless asked.
Report Results:
- Number of files processed
- Number of files that needed manual processing
- Any files skipped and why
- The
git diff --statfor the directory
Transformation Pattern:
// BEFORE:
// time: O(N), space: O(1)
public int method() {
// AFTER:
/**
* time = O(N)
* space = O(1)
*/
public int method() {
Important:
- NEVER modify actual code logic, only add/update comments
- Preserve all existing IDEA comments and problem descriptions
- If existing Javadoc exists, merge complexity at the top
- Use format
time = O(...)andspace = O(...)(equals sign, not colon)
Установить add-time-space в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGlobGrepEditBashFAQ
Что делает скилл add-time-space?
Add standardized Javadoc time and space complexity comments to LeetCode Java solutions. Use when a directory under leetcode_java/ needs its `time = O(...)` / `space = O(...)` annotations added, normalised from inline comments, or filled in by hand where the script could not infer them.
Как установить скилл add-time-space?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл add-time-space запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic