Skip to content
Prompt

ai-rizz — Cursor Rules

by Texarkanine

AI Summary

A Cursor rules booster that enforces test-driven development practices for shell script writing, helping developers create testable, maintainable scripts with proper separation of concerns. Ideal for shell script developers and teams adopting TDD methodologies.

Install

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

I want to add the "ai-rizz — Cursor Rules" prompt rules to my project.
Repository: https://github.com/Texarkanine/ai-rizz

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

Required test-driven development practice for writing shell scripts

Test-Driven Development (TDD) for Shell Scripts

This rule defines best practices for AI assistants to follow when writing shell scripts using test-driven development (TDD). The AI should create shell scripts that are testable with shunit2, separate concerns, avoid side effects when being sourced, and allow functions to be tested in isolation. Following these guidelines ensures scripts can be reliably tested and maintained.

TDD Workflow for AI Assistants

When asked to create shell scripts, the AI should follow this test-driven workflow: • Write test first: Before implementing functionality, write tests that define the expected behavior • Run tests to see them fail: Verify tests correctly identify missing functionality • Implement minimum code to pass: Create just enough functionality to pass the tests • Run tests to confirm pass: Verify the implementation satisfies the requirements • Refactor code: Improve the implementation while maintaining test coverage • Repeat: Iterate for each new feature or requirement

Source script under test

. "$(dirname "${0}")/../calculator.sh"

Test for add function

test_add() { result=$(add 5 3) assertEquals "Addition should work correctly" "8" "$result" }

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 1mo ago
Active
AdoptionUnder 100 stars
0 ★ · Niche
DocsMissing or thin
Undocumented

GitHub Signals

Issues0
Updated1mo 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