cursor-kooi-env-docs
CLAUDE.md1 starsChanged 4 months agoMITView on GitHub
cursor-kooi-env-docs is a zero-dependency, cross-platform system that installs auto-updating environment documentation into Cursor AI projects. It consists of shell-based installers (install.ps1, install.sh), template files deployed to user projects, and Cursor .mdc rule files that enable automatic context loading. There is no build step, no package manager, and no runtime. The entire project is Markdown, PowerShell, and Bash scripts. There are three distinct .cursor/ directory contexts -- do not confuse them: When editing template content, always edit in template/. The root…
- Pipes a download into a shell
In this repository2 other files it gives its agents.
- .cursor/rules/environment-maintenance.mdcCursor rule
- .cursor/rules/project-environment.mdcCursor rule
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
When editing template content, always edit in template/.
- Very specific: line 60
All shipped .ps1 files must work in Windows PowerShell 5.1+.
- Very specific: line 63
Use Write-Host with -ForegroundColor for colored output (e.g., [OK], [ERR], [WARN] prefixes instead of emoji).
- Very specific: line 73
Dual-platform scripts: Every script exists in both .ps1 and .sh variants.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md 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
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
cursor-kooi-env-docs is a zero-dependency, cross-platform system that installs auto-updating environment documentation into Cursor AI projects. It consists of shell-based installers (install.ps1, install.sh), template files deployed to user projects, and Cursor .mdc rule files that enable automatic context loading.
There is no build step, no package manager, and no runtime. The entire project is Markdown, PowerShell, and Bash scripts.
Repository Layout (Three .cursor/ Contexts)
There are three distinct .cursor/ directory contexts -- do not confuse them:
- Root
.cursor/-- Dogfooding setup for this repository itself template/-- Source files that the installers download and deploy to user projects. Edits here affect all new installations.examples/*/-- Complete working example projects (nodejs-express, python-flask) with their own.cursor/directories
When editing template content, always edit in template/. The root .cursor/ is the project's own usage of the system.
Testing
There are no unit tests or a test runner. Testing is manual + CI.
CI (GitHub Actions): .github/workflows/test-installer.yml runs on push/PR to main:
- Bash installer tests on ubuntu-latest and macos-latest
- PowerShell installer tests on windows-latest
- Line ending validation (LF for
.sh, CRLF for.ps1via.gitattributes)
Manual installer testing:
# Windows - test locally
.\install.ps1
.\install.ps1 --force
# Windows - test from GitHub (preferred, ensures correct line endings)
irm https://raw.githubusercontent.com/u00dxk2/cursor-kooi-env-docs/main/install.ps1 | iex# Unix/Mac - test from GitHub
curl -fsSL https://raw.githubusercontent.com/u00dxk2/cursor-kooi-env-docs/main/install.sh | bashValidation scripts (run inside a project that has the system installed):
./.cursor/validate-install.sh # Unix
.\.cursor\validate-install.ps1 # Windows
./.cursor/check-env-docs.sh # Staleness check (Unix)
.\.cursor\check-env-docs.ps1 # Staleness check (Windows)Critical Constraints
Line Endings
.gitattributes enforces *.ps1 as CRLF and *.sh as LF. This is load-bearing -- PowerShell scripts with LF line endings produce parse errors. Never disable or weaken .gitattributes rules.
PowerShell 5.1 Compatibility
All shipped .ps1 files must work in Windows PowerShell 5.1+. This means:
- No non-ASCII characters (no emoji, no Unicode checkmarks) in any
.ps1file undertemplate/or at root. PS5.1 can misinterpret UTF-8 without BOM, corrupting characters and breaking the parser. - No
&&operator -- use;or separate statements instead (&&requires PS7+). - Use
Write-Hostwith-ForegroundColorfor colored output (e.g.,[OK],[ERR],[WARN]prefixes instead of emoji).
Branch Protection
Direct pushes to main are blocked. All changes require a pull request with passing CI and maintainer (@u00dxk2) approval.
Conventions
- Commits: Conventional Commits format (
feat:,fix:,docs:,chore:, etc.) - PR titles: Same conventional commit format, under 70 characters
- Dual-platform scripts: Every script exists in both
.ps1and.shvariants. Changes to logic in one must be mirrored in the other. - Installer behavior: Preserves existing files by default;
--forceflag overwrites. Installers must not require git, admin privileges, or interactive prompts.
How the System Works (Architecture)
- User runs the one-line installer (
curl | bashorirm | iex) - Installer creates
.cursor/rules/and downloads template files from GitHub raw URLs (template/directory is the source) - User asks Cursor to generate
.cursor/rules/project-environment.mdcusing the prompt inquick-prompt.txt - The
.mdcfile withalwaysApply: truefrontmatter is automatically loaded by Cursor at every session start environment-maintenance.mdcinstructs the AI to check staleness (7-day warning, 14-day critical) and update the docs in real-time when environment changes are discovered
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.

