HackerTrans
TopNewTrendsCommentsPastAskShowJobs

simonair

no profile record

comments

simonair
·قبل 5 أشهر·discuss
Not who you asked but I have made similar experiences with Claude Code. For example I might have asked it to “commit the changes” and be surprised that it did not use the skill `committing-changes`.

Now if I ask “why did you not use the skill”, the answer typically starts with an apology, the insight which skill it should have used, and it will proceed using the skill.

In contrast, asking “what can we change in the skill description so you use it next time I ask you to commit”, it will typically explain how it selects skills and how to modify the skill in question’s description so it would pick it on its own.
simonair
·قبل 6 أشهر·discuss
I got tired of brittle literals like `http://localhost:3000` and `postgres://…@127.0.0.1/...` creeping into my code, so I wrote a few ESLint rules that detect “hardcoded infrastructure” strings and ask the agent to find the constant in the codebase — not by guessing its name but by `grep`-ing for its value.

The detection is based on dumb string literal heuristics, but has proven rather effective. Example patterns:

const hardcodedInfrastructure = { url: /^https?:\/\/(localhost|127\.0\.0\.1|192\.168\.\d+\.\d+|10\.\d+\.\d+\.\d+|172\.(1[6-9]|2\d|3[01])\.\d+\.\d+)(:\d+)?/i, dbUrl: /^(postgresql|postgres|mysql|mongodb):\/\/.*@(localhost|127\.0\.0\.1|192\.168\.\d+\.\d+|10\.\d+\.\d+\.\d+|172\.(1[6-9]|2\d|3[01])\.\d+\.\d+)/i, localhost: /^localhost$/i, localhostPort: /^localhost:\d+$/i, };
simonair
·قبل 6 أشهر·discuss
For anyone who cares about zsh startup performance, `zsh4humans` by `romkatv` (author of powerlevel10k) is worth a look: https://github.com/romkatv/zsh4humans

It achieves instant startup by rendering the prompt before the full shell initializes. Since adopting it, I am done fiddling with my shell config and the fact that `zsh4humans` is in maintenance-mode is actually an advantage as it keeps me from wasting time refactoring `zshrc`.