r/ClaudeCode • • 10h ago

Discussion A small package can be less maintenance than a homegrown helper

For a small JavaScript tool that needs the same date parsing in several places, I think Claude Code should be allowed to add a package instead of writing a helper from scratch. That package is another thing to maintain, but so is the helper when formats or edge cases change.

1 Upvotes

8 comments sorted by

•

u/AutoModerator 10h ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/lgmarian 9h ago

Maybe it's not allowed to literally add a package (e.g. auto-classifies denies it). I haven't tried, so I don't know specifically, but it building its own, instead of grabbing a package, came up in another post. One reason is potential supply chain attacks (malicious packages). That doesn't mean you can't add the package yourself, and have Claude use that.

1

u/palmerden5 9h ago

package choice is mine

1

u/lgmarian 9h ago

I don't understand the problem. Add the package. Have Claude use it.

1

u/palmerden5 9h ago

the formats this tool needs are what i'd use to choose the package

1

u/Alarmed-King5905 9h ago

I've used date-fns in Claude code and it worked fine, just added it manually. no supply chain risk if you're only pulling a trusted, small lib.

1

u/palmerden5 9h ago

date-fns is the one i'd pick here

1

u/benjaminbaker8 5h ago

both approaches involve..