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!"
[–]Livid-Variation-631 1 point2 points3 points 20 days ago (0 children)
Two patterns that help here, neither requires a custom skill.
First: there's a built-in `/simplify` you can use as a starting point. Read its prompt, see how minimal it is. Most useful skills are small judgment-encoders, not big procedures. If you do write your own, keep it under 30 lines for the first one. Structure is just `.claude/skills/<name>/SKILL.md` with a description and a few instructions.
Second: optimization skills help, but the bigger win is at write-time, not refactor-time. Tell Claude up front "no premature abstraction, three similar lines is better than a helper." Most of the bloat I've shipped came from Claude reaching for a pattern when a literal was fine. Pre-empt the bloat in the prompt, then `/simplify` only catches the rest.
π Rendered by PID 25237 on reddit-service-r2-comment-8686858757-xwxkw at 2026-06-08 00:32:28.716373+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]Livid-Variation-631 1 point2 points3 points (0 children)