To answer my follow-up question: I assume rtk is implemented as a hook because if it was a skill, it would not reduce any tokens used as the LLM needs “think” and thus even increases token usage. Yes, it may reduce the ultimate shell command but to get there it probably would have tried out different things first that increases token usage.
AGENTS.md in a subdirectory equals an .mdc rule with globs
Not exactly. AGENTS.md has no frontmatter and no glob scoping. It’s loaded when the agent works with files in that directory, and it applies in full, not per file type. With .cursor/rules/*.mdc and globs: you get finer control by extension, auto-attach, and descriptions for on-demand loading. Related thread: Agents.md isolated within a subdirectory is applied to root?.
Style guides for Python, Java, TypeScript
Yep, .cursor/rules/*.mdc with globs is the best approach:
About RTK your follow-up
Your logic is basically right. A hook gives you two things a skill won’t:
Determinism: the command will always run on the trigger, no chance the LLM decides to do something else.
No tokens spent on reasoning: a hook doesn’t use the model at all, it’s just a script on an event.
A skill would only work if the model remembers to call it, plus it costs tokens for reasoning and parameters. So for deterministic enforcement like formatting, linting, guards, use a hook. For an sometimes run this multi-step process workflow, use a skill.