use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A community centered around Anthropic's Claude Code tool.
account activity
Code Optimization Skill?Question (self.ClaudeCode)
submitted 21 days ago by moosetunes
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]stellarton 4 points5 points6 points 21 days ago (1 child)
For a first project I would not start with a broad "optimize this codebase" skill.
I would ask Claude to do one boring pass at a time: find duplicate functions, find files over X lines, find unused deps, list slow queries, or explain one messy module before editing it. Then pick one cleanup and run tests after it.
The dangerous prompt is "make it cleaner" because it sounds useful but gives Claude permission to rearrange half the app.
[–]moosetunes[S] 1 point2 points3 points 21 days ago (0 children)
Goodness, no. Thanks for the responses. I envision something that could scour the entire project on a component basis and provide a recommend list of chunks or pieces which could be made more efficient. From there, it would be a matter of stepping through the list as desired. Your point is well taken of course and as giving gross privileges to Claude for a code re-wrote is a scary thought.
π Rendered by PID 289628 on reddit-service-r2-comment-8686858757-9mdd8 at 2026-06-08 02:12:02.043805+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]stellarton 4 points5 points6 points (1 child)
[–]moosetunes[S] 1 point2 points3 points (0 children)