skills / rules
Cursor rule0 starsChanged 3 months agoMITView on GitHub
Tyecode's coding guidelines — think before coding, simplicity, security, and surgical changes.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository21 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- dev-tool-uiSkill
- api-designSkill
- changelogSkill
- dev-tool-uiSkill
- diagnoseSkill
- git-workflowSkill
- incident-commanderSkill
- karpathy-guidelinesSkill
- releaseSkill
- resilienceSkill
- secure-commitSkill
- securitySkill
- tddSkill
- zoom-outSkill
- cavemanSkill
- grill-meSkill
- handoffSkill
- notesSkill
- working-backwardsSkill
- write-a-skillSkill
The file
Show its rules and text
We split this karpathy-guidelines.mdc into the rules it gives an agent
27 rules. About 0 are common, 22 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈22
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Don't assume. Don't hide confusion.
- Distinctive: line 14
If something is unclear, stop and ask.
- Distinctive: line 20
No features beyond what was asked.
- Distinctive: line 21
No abstractions for single-use code.
- Distinctive: line 23
If 200 lines could be 50, rewrite it.
- Distinctive: line 28
Don't "improve" adjacent code, comments, or formatting.
- Distinctive: line 29
Don't refactor things that aren't broken.
- Distinctive: line 31
Remove imports YOUR changes made unused.
- Distinctive: line 46
Use strict mode always
- Very specific: line 47
Prefer const over let, avoid var
- Distinctive: line 48
Use meaningful variable names
- Very specific: line 49
Use unknown instead of any
- Distinctive: line 54
Use functional components with hooks
- Distinctive: line 55
Keep components small and focused
- Distinctive: line 56
Use composition over prop drilling
- Very specific: line 61
Use conventional commits: feat:, fix:, docs:, refactor:, test:
- Distinctive: line 63
Never commit directly to main
- Very specific: line 72
Use specific error types, not generic new Error('something went wrong')
- Distinctive: line 79
Write a failing test before fixing any bug
- Distinctive: line 80
Test behavior, not implementation
- Distinctive: line 81
Keep tests fast and isolated
- Very specific: line 82
Use descriptive test names: it('returns null when user is not found')
- Distinctive: line 88
Before marking any feature complete that touches user input, auth, or data:
- Distinctive: line 91
Use parameterized queries — never concatenate user input into SQL
- Distinctive: line 92
Check authorization on every protected route (not just authentication)
- Distinctive: line 93
Never log passwords, tokens, API keys, or PII
- Distinctive: line 94
Never hardcode secrets — use environment variables
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: Tyecode's coding guidelines — think before coding, simplicity, security, and surgical changes.
alwaysApply: true
---
# Tyecode's Coding Guidelines
## Core Principles
### 1. Think Before Coding
- Don't assume. Don't hide confusion.
- State assumptions explicitly. If uncertain, ask.
- If something is unclear, stop and ask.
- Present multiple interpretations if ambiguity exists.
### 2. Simplicity First
- Minimum code that solves the problem.
- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" that wasn't requested.
- If 200 lines could be 50, rewrite it.
### 3. Surgical Changes
- Touch only what you must.
- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- Remove imports YOUR changes made unused.
### 4. Goal-Driven Execution
- Define success criteria before starting.
- "Add validation" → "Write tests, then make them pass"
- "Fix the bug" → "Write test that reproduces it, then fix"
- For multi-step tasks: state a plan with verification steps.
---
## Code Style
### TypeScript / JavaScript
- Use strict mode always
- Prefer `const` over `let`, avoid `var`
- Use meaningful variable names
- Use `unknown` instead of `any`
- No `as` casts inside business logic — fix the types instead
### React
- Use functional components with hooks
- Keep components small and focused
- Use composition over prop drilling
- Extract reusable logic into custom hooks
### Git
- Use conventional commits: `feat:`, `fix:`, `docs:`, `refactor:`, `test:`
- One logical change per commit
- Never commit directly to `main`
- Branch naming: `feature/description` or `fix/description`
---
## Error Handling
- Handle errors explicitly — never silently catch
- Return errors, don't throw unless truly exceptional
- Use specific error types, not generic `new Error('something went wrong')`
- Log errors with context, never swallow them
---
## Testing
- Write a failing test before fixing any bug
- Test behavior, not implementation
- Keep tests fast and isolated
- Use descriptive test names: `it('returns null when user is not found')`
---
## Security
Before marking any feature complete that touches user input, auth, or data:
- Validate all input at the boundary — never trust user data
- Use parameterized queries — never concatenate user input into SQL
- Check authorization on every protected route (not just authentication)
- Never log passwords, tokens, API keys, or PII
- Never hardcode secrets — use environment variables
- Return generic error messages to clients — never expose stack traces
- Rate limit public API endpoints
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

