

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# CLAUDE.md23This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.45## Project Overview67This is a repository for managing and distributing Cursor AI rules, particularly focused on web development with strong emphasis on PHP/Drupal, frontend frameworks, and security best practices. The project provides an interactive PHP installer that allows developers to selectively install rule sets into their projects.89## Common Development Tasks1011### Running Tests12```bash13# Run all tests14cd .tests && ./run-all-tests.sh1516# Run individual test scripts17cd .tests18./test-copy.sh # Test basic installation functionality19./test-debug.sh # Test debug mode20./test-invalid-option.sh # Test invalid option handling21./test-conflicting-options.sh # Test conflicting options22./test-missing-files.sh # Test missing file handling23```2425### Testing the Installer26```bash27# Test installation interactively28php install.php2930# Test with specific options31php install.php --core # Install core rules only32php install.php --web-stack # Install web stack rules (includes core)33php install.php --python # Install Python rules (includes core)34php install.php --all # Install all rules3536# Test with debug mode37php install.php --debug --core3839# Test installation to custom directory40php install.php --all --destination=my/custom/path4142# Test installation via curl (non-interactive)43curl -s https://raw.githubusercontent.com/ivangrynenko/cursor-rules/main/install.php | php -- --ws44cat install.php | php -- --core # Test piped input locally45```4647### Linting and Code Quality48- PHP syntax validation: `php -l install.php`49- No specific linting commands configured - consider adding phpcs/phpmd5051## Architecture and Code Structure5253### Project Organization54- **install.php**: Main installer script (current version defined by CURSOR_RULES_VERSION constant)55- **.cursor/rules/**: Contains 56 MDC rule files organized by category56- **.cursor/UPDATE.md**: Installation receipt file tracking installed version and configuration (created by installer)57- **.tests/**: Bash test scripts for installer validation58- **.github/workflows/**: CI/CD pipeline using GitHub Actions for PHP 8.359- **AGENTS.md**: Comprehensive guide for using Cursor Rules (created by installer)6061### Rule Categories621. **Core Rules** (7 files): Git standards, testing guidelines, README maintenance632. **Web Development Rules**:64 - Frontend: JavaScript, React, Vue, Tailwind, accessibility65 - Backend: PHP/Drupal standards, database66 - Security: OWASP Top 10 implementations for Drupal67 - DevOps: Docker, Lagoon, Vortex configurations683. **Python Rules** (10 files): Security-focused rules following OWASP standards6970### Key Design Patterns71- **Installer Architecture**:72 - Stateless design - each execution is independent73 - Builder pattern for rule set construction74 - Strategy pattern for interactive vs non-interactive modes75 - Factory pattern for rule set management7677### Installation Flow781. User executes install.php (directly or via curl)792. Script detects if running interactively or with parameters803. Creates .cursor/rules directory structure814. Downloads and installs selected rule files from GitHub825. Creates/overwrites .cursor/UPDATE.md file as an installation receipt836. Creates/updates AGENTS.md documentation (unless --yes flag overwrites)8485## Versioning System8687### Version Management88- **Version Constant**: Defined in install.php as `CURSOR_RULES_VERSION`89- **Version History**: Tracked in GitHub releases and repository documentation90- **Release Process**:91 1. Update CURSOR_RULES_VERSION constant in install.php92 2. Update version history in repository documentation93 3. Create GitHub release matching the version number94 4. Tag the release in git9596### .cursor/UPDATE.md File Purpose97The UPDATE.md file serves as an installation receipt that:98- Records the version of cursor-rules that was installed99- Documents the installation date and time100- Lists the number of rule files installed101- Shows the installation type (core, web-stack, Python, etc.)102- Records any tag filters that were applied103- Gets created/overwritten by the installer on each run104- Helps users identify which version and configuration they have installed105106## Known Issues and Solutions107108### Curl Piping Issues (Fixed in v1.0.6)109When piping the installer through curl, several PHP-specific behaviors can cause problems:110111**Problem**: Script hangs when using `curl ... | php` commands112**Root Causes**:1131. `$_SERVER['PHP_SELF']` becomes "Standard input code" instead of script name when piped1142. PHP continues waiting for STDIN input even after script completion1153. Arguments may not parse correctly when using `--` separator with piped input116117**Solutions Implemented**:1181. **Entry Point Detection**: Check for both normal execution and "Standard input code"119```php120 if (basename(__FILE__) === basename($_SERVER['PHP_SELF'] ?? '') ||121 ($_SERVER['PHP_SELF'] ?? '') === 'Standard input code')122```1231242. **STDIN Cleanup**: Always close STDIN before exit to prevent hanging125```php126 if (defined('STDIN') && is_resource(STDIN)) {127 fclose(STDIN);128 }129```1301313. **Argument Parsing**: Handle both with and without `--` separator132```php133 if (!stream_isatty(STDIN) && $_SERVER['PHP_SELF'] === 'Standard input code') {134 // Parse arguments from argv when piped135 }136```137138### Testing Coverage Gaps139**Issue**: Test suite only covered direct PHP execution, not curl piping scenarios140**Recommendation**: Add tests for:141- `curl ... | php` execution paths142- `cat install.php | php` scenarios143- Argument parsing with and without `--` separator144- STDIN handling in different contexts145146## Important Considerations147148### When Adding New Rules149- Follow MDC format (Markdown with custom rule syntax)150- Place in appropriate category under .cursor/rules/151- Update the rule arrays in install.php (core_rules, web_stack_rules, python_rules)152- Add rule to README.md documentation table153- Consider rule dependencies (e.g., web stack includes core rules)154155### When Modifying the Installer156- Maintain PHP 8.3+ compatibility157- Preserve both interactive and non-interactive modes158- Update CURSOR_RULES_VERSION constant when making changes159- Ensure all tests pass before committing160- Test with both local files and GitHub downloads161162### Testing Guidelines163- All tests are bash scripts in .tests/ directory164- Tests use temporary directories to avoid affecting the actual installation165- Each test should output clear success/failure messages166- GitHub Actions runs all tests on push/PR to main branch167168## Security Considerations169- Never commit sensitive information or API keys170- Rule files should not contain hardcoded credentials171- Installer validates file permissions and directory creation172- Downloaded files are fetched over HTTPS from GitHub173174## Contributing175- Follow conventional commits format (fix:, feat:, docs:, etc.)176- Update relevant documentation when adding features177- Ensure all tests pass before submitting PR178- New rules should include clear descriptions and examples
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| ivangrynenko/cursorrules.cursor/rules/behat-steps.mdc · 87 | Cursor rules | lint-formatstyleperformanceagent-behaviour | 42/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/confluence-editing-standards.mdc · 87 | Cursor rules | stylearchsecuritydeployment | 60/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/cursor-rules.mdc · 87 | Cursor rules | teststylearchgit+2 | 77/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/debugging-standards.mdc · 87 | Cursor rules | no sections | 30/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-authentication-failures.mdc · 87 | Cursor rules | security | 48/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-broken-access-control.mdc · 87 | Cursor rules | stylesecurity | 52/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-cryptographic-failures.mdc · 87 | Cursor rules | security | 48/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-database-standards.mdc · 87 | Cursor rules | database | 30/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-file-permissions.mdc · 87 | Cursor rules | stylearchsecurity | 62/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-injection.mdc · 87 | Cursor rules | securitydo-not | 55/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-insecure-design.mdc · 87 | Cursor rules | security | 48/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-integrity-failures.mdc · 87 | Cursor rules | style | 60/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-logging-failures.mdc · 87 | Cursor rules | security | 48/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-security-misconfiguration.mdc · 87 | Cursor rules | security | 48/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-ssrf.mdc · 87 | Cursor rules | style | 52/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/drupal-vulnerable-components.mdc · 87 | Cursor rules | stylesecurity | 67/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/git-commit-standards.mdc · 87 | Cursor rules | git | 44/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/github-actions-standards.mdc · 87 | Cursor rules | no sections | 44/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/improve-cursorrules-efficiency.mdc · 87 | Cursor rules | no sections | 34/100 | 14 days ago | |
| ivangrynenko/cursorrules.cursor/rules/javascript-broken-access-control.mdc · 87 | Cursor rules | securitydo-not | 39/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| stacklok/toolhiveCLAUDE.md · 2.0k | CLAUDE.md | buildteststylearch+4 | 100/100 | 14 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 46 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 14 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.5k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 14 days ago | |
| tyrchen/geektime-bootcamp-aiw7/genslides/backend/CLAUDE.md · 230 | CLAUDE.md | testlint-formatstylearch+6 | 100/100 | 9 days ago | |
| tphakala/birdnet-goCLAUDE.md · 1.6k | CLAUDE.md | buildtestlint-formatstyle+8 | 100/100 | today | |
| microsoft/playwrightCLAUDE.md · 95k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 7 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 14 days ago | |
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 7 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/ivangrynenko-cursorrules-claude)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.