Skip to content
Prompt

lintok — Cursor Rules

by AlonKellner

AI Summary

A Cursor-native linter configuration that enforces token-efficient file editing by integrating with the Astral.sh Python toolchain (ruff, pytest, pre-commit, etc.), enabling faster AI-assisted edits on resource-constrained agents.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "lintok — Cursor Rules" prompt rules to my project.
Repository: https://github.com/AlonKellner/lintok

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Linter for file size in tokens, for smaller files and faster agent edits.

General Information

This python (3.13) repo uses the astral.sh stack along other tools: • pre-commit - local automation • uv - venv and tools management • ruff - format and lint • ty - type checking • pytest - testing • typos - spell checking • yamlfmt - yaml format and lint • biomejs - json format and lint • rumdl - markdown format and lint • taplo - general toml format and lint • pyproject-fmt - pyproject.toml format and lint • tox-toml-fmt - tox.toml format and lint • claude - for an objective AI review

Code generation Guidelines

After any code generation or edit, first use git add to add all changes, then use pre-commit run shell command to sync the venv, apply formatting, run tests and to check yourself. When you are asked to "check" a file, you should also run pre-commit on it.

Git

Commit changes with a --signoff. Commit messages must follow the pattern <type>: <sentence>\n[<details>]\n\nAssisted-by: <name-of-code-assistant>, where the <type> is feat or fix, the <sentence> is no more than 60 characters and the <details> are optional. Use the Git push task after every successful commit on an existing branch.

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 8mo ago
Stale
AdoptionUnder 100 stars
1 ★ · Niche
DocsMissing or thin
Undocumented

GitHub Signals

Stars1
Issues0
Updated8mo ago
View on GitHub
No License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more