# Tsh Create Custom Rules

> Create custom Cursor rules (.cursor/rules/*.mdc or cursor-instructions.md). Analyzes existing project conventions, determines appropriate rule type and scope, creates the rules file, and validates against best practices. Use when the user types /tsh-create-custom-rules or asks to create coding rules or instructions for Cursor. Use when this capability is needed.

- Skill: `tomevault-io/tsh-create-custom-rules` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/tsh-create-custom-rules`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/tsh-create-custom-rules/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/tsh-create-custom-rules

---

# /tsh-create-custom-rules

Load and follow the tsh-cursor-orchestrator agent skill. Create custom rules for Cursor. There are two types: repository-level rules (`cursor-instructions.md`) that apply to all Cursor interactions, and file-scoped rules (`.mdc` files with `globs` patterns in `.cursor/rules/`) that target specific files or directories. The user's message following this skill may contain specific requirements or conventions to encode.

## Required Skills

Before starting, load and follow these skills:
- `tsh-creating-rules` - for rules file creation workflow, type selection, scope decisions, and validation checklist
- `tsh-technical-context-discovering` - for discovering project conventions and workspace patterns before creating
- `tsh-codebase-analysing` - for analyzing workspace for existing coding conventions and patterns

## Workflow

1. **Research workspace conventions**: Analyze the workspace for existing coding standards and conventions:
   - Project structure and technology stack
   - Existing coding patterns and standards
   - Any existing rule files (`.cursor/rules/*.mdc` or `cursor-instructions.md`)
   - Note: this repository currently has NO rule files of either type
2. **Determine rule type**: Help the user choose the appropriate rule type:
   - **Repo-level** (`cursor-instructions.md`): applies to all Cursor interactions in the workspace
   - **File-scoped** (`.mdc` files in `.cursor/rules/` with `globs` patterns): applies only when matching files are in context
   - Guide the decision based on the user's needs and scope
3. **Clarify requirements**: Determine what conventions, standards, or behaviors to encode:
   - Coding standards and style preferences
   - Framework-specific patterns and conventions
   - Behavioral guidelines for Cursor in this workspace
   - If the user's message already contains requirements, confirm understanding before proceeding
4. **Create the rules file**: Create the rules file with appropriate type, scope, and content. Apply the `tsh-creating-rules` skill workflow for structure and validation.
5. **Review and validate**: Review the created rules against best practices:
   - Verify scope is appropriate for the rule type
   - Confirm guidelines are clear and actionable for Cursor
   - Check that file-scoped `globs` patterns match intended files (if applicable)

## Guidelines

- **Repo-level rules** (`cursor-instructions.md`): Place in `.cursor/rules/cursor-instructions.md`. Apply to all Cursor interactions — use for project-wide coding standards, naming conventions, architecture decisions.
- **File-scoped rules** (`.mdc` files with `globs`): Place in `.cursor/rules/` directory. Use `globs` glob patterns (relative to workspace root) to target specific files or directories.
- This repository currently has NO rule files — the user is starting from scratch. Communicate this context during the research step.

If the user attaches files or provides a description, use them as input for rule design.

When in doubt about the rule type or scope, ask the user for clarification rather than guessing.

---
> Source: [kkorus/cursor-collections](https://github.com/kkorus/cursor-collections) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-15 -->

