SKILL.md is not a compiler
If you use Cursor long enough, you will watch it ignore a rule you wrote down. You add a SKILL.md. You tell it "no explicit any". You maybe add a hook. It agrees. Then it ships id: any anyway. A comment on a thread about skill files put it cleanly: the model can work around hooks too. That is not a Cursor bug. It is what "the instruction is text" means. What a Skill File Actually Is A SKILL.md is…
Cursor's SKILL.md files do not function as compilers. Despite instructions to ignore explicit 'any', the model can still work around this limitation. A SKILL.md is a document intended to be read by the agent when the task matches, not a guide for the model to compile code. The ratio of rules to tool results decreases mid-thread, causing the model to prioritize completing the user's latest sentence over adhering to file instructions.
Skills excel at providing default shapes like interfaces and tests, but fail in guaranteeing code correctness. Treat generation and verification as separate jobs, with Layer 1 outlining desired code structure and Layer 2 running existing repository tools. Skills should run Layer 2 and refuse production-ready statements if Layer 2 hasn't completed.
Keep skills concise, end requests by verifying typechecks and tests, and use hooks for deterministic tools only. SKILL.md files should function as a two-layer review gate, with Layer 2 running the repository's typecheck, lint, and test commands.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.