Custom rules and commands for AI coding assistants including Claude Code, Cursor, and ChatGPT.
- CLAUDE.md - Global behavior, generation, and formatting rules for Claude Code. Applied automatically to all interactions.
- Note: These settings can also be copy-pasted into the Cursor IDE in order to apply globally.
- CHATGPT.md - Concise rules for ChatGPT emphasizing direct, brief responses.
- commands/ask-questions.md -
/ask-questions: Systematic problem analysis and solution path optimization. - commands/code-review.md -
/code-review: Reviews changes between two branches with prioritized feedback. - commands/commit-push.md -
/commit-push: Commits and pushes changes following Conventional Commits v1.0.0. - commands/feature-branch.md -
/feature-branch: Creates and checks out a Git feature branch from a ticket title. - commands/pull-request.md -
/pull-request: Creates a PR with summary, test plan, and linked context. - commands/spawn.md -
/spawn: Runs model-parallel delegated tasks with strict file outputs and optional fix implementation.
Claude Code reads configuration from the ~/.claude/ directory. Use symlinks to keep rules synced with this repository.
# Clone the repository
git clone https://github.com/jkhines/ai-rules.git ~/src/ai-rules
# Create the Claude config directory if it doesn't exist
mkdir -p ~/.claude
# Symlink global rules
ln -s ~/src/ai-rules/CLAUDE.md ~/.claude/CLAUDE.md
# Symlink commands directory
ln -s ~/src/ai-rules/commands ~/.claude/commandsAfter setup, Claude Code automatically loads CLAUDE.md into every conversation and makes commands available via /ask-questions, /code-review, /commit-push, /feature-branch, /pull-request, and /spawn.
Cursor uses a similar structure to Claude Code:
- Global rules are set in the IDE:
Cursor Settings > General > Rules for AI - Project rules go in
.cursor/rules/within each project (.mdcformat) - Slash commands go in
.cursor/commands/within each project (.mdformat)
To use these rules in Cursor:
-
For global rules: Open
Cursor Settings > General > Rules for AIand paste the contents ofCLAUDE.md -
For slash commands: If the ~/.cursor/commands symlink has been set, slash commands will be imported into the Cursor IDE and cursor-agent.
# Symlink commands for slash command support (/ask-questions, /code-review, /commit-push, /feature-branch, /pull-request, /spawn)
ln -s ~/src/ai-rules/commands ~/.cursor/commandsAfter setup, invoke commands in Cursor's chat with /ask-questions, /code-review, /commit-push, /feature-branch, /pull-request, or /spawn.
ChatGPT does not support file-based configuration. Instead, copy rules into the Custom Instructions setting:
- Open ChatGPT and go to
Settings > Personalization > Customize ChatGPT - Ensure "Enable customization" is toggled ON
- Paste the contents of
CHATGPT.mdinto the Custom Instructions field - Instructions apply to all new conversations (1,500 character limit)
With symlinks, pulling updates from this repository automatically updates your Claude Code and Cursor configurations:
cd ~/src/ai-rules
git pullThis work is dedicated to the public domain under CC0 1.0 Universal.