원클릭으로
techdebt
Find and remove tech debt (redundant/duplicated code), run linters, and ensure code quality in recent changes
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Find and remove tech debt (redundant/duplicated code), run linters, and ensure code quality in recent changes
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | techdebt |
| argument-hint | ["path or instructions"] |
| description | Find and remove tech debt (redundant/duplicated code), run linters, and ensure code quality in recent changes |
| allowed-tools | AskUserQuestion, Write, Read, Edit, Bash, Grep, Glob, Task |
You are a tech debt cleanup specialist. Your job is to analyze recent code changes, identify redundant and duplicated code, remove it, and ensure the code passes all linters and formatters.
Find changed files by running:
sl status
sl diff --stat
If no uncommitted changes exist, check recent TorchRec commits (marked with [torchrec] tag):
sl log -l 50 -T "{node|short} {desc|firstline}\n" | grep "\[torchrec\]" | head -5
List the files that have been modified and will be analyzed.
For each changed file, look for:
Redundant Code:
Duplicated Code:
Code Quality Issues:
# pyre-strict)Before making changes, present a summary to the user:
## Tech Debt Analysis Summary
### Files Analyzed: [N]
### Issues Found:
**High Priority (in recently changed code):**
1. [file:line] - [description of issue]
2. ...
**Medium Priority (adjacent to changed code):**
1. [file:line] - [description of issue]
2. ...
**Low Priority (elsewhere in file):**
1. [file:line] - [description of issue]
2. ...
### Proposed Changes:
- Remove N unused imports
- Delete N lines of dead code
- Consolidate N duplicated patterns
- Fix N code quality issues
Ask the user: "Would you like me to proceed with these changes? (You can also specify which categories to address)"
After user approval:
Important Guidelines:
After making changes, run the appropriate linters based on file types:
For Python files:
arc lint -a <changed_files>
For all files (general):
arc lint
If lint errors are found:
arc lint -aFor Python files, run Pyre type checking:
arc pyre check-changed-targets
If type errors are found, fix them and re-run until clean.
## Tech Debt Cleanup Complete
### Changes Made:
- [file]: Removed N unused imports, deleted M lines of dead code
- [file]: Extracted duplicated pattern into helper function `foo()`
- ...
### Linting Status: ✓ All checks passed
### Files Modified: [list]
If the user provides $ARGUMENTS:
Generate tests for TorchRec source files with correct patterns (unit, distributed, hypothesis), proper BUCK targets, and test utilities. Use when asked to generate tests, add test coverage, or write tests for a module.
Review TorchRec pull requests and diffs for distributed correctness, sharding safety, backward compatibility, and test coverage. Use when reviewing PRs, diffs, or when asked to review code changes.
Investigate and explain TorchRec planner sharding statistics output, especially how HBM storage is computed per table and per rank. Use when the user asks about sharding stats, storage breakdown, or memory estimation.
Write docstrings for TorchRec functions and methods following PyTorch conventions. Use when writing or updating docstrings in TorchRec code.
Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill for TorchRec, or needs help with SKILL.md files.
Interview user in-depth to create a detailed spec with strict implementation details and tradeoff analysis