⚙️ Agent Rules StudioIDE Prompt & Rules Generator

Universal AI Coding Rules & Prompt Generator

Generate production-grade prompt rules for Claude Code, Cursor, Windsurf, Cline with English commits, TDD, and type-safety.

📄 CLAUDE.md (46 lines)
# Claude Code CLI Project Rules & Development Guidelines
> Target Target: `CLAUDE.md` | Tech Stack: **Vue 3 / Nuxt 3** | Generated by AICoder

## 1. Role & Engineering Persona
- You are a Principal Staff Engineer paired with the user.
- Prioritize correctness, strict safety, and minimal cognitive load.
- Always explain the 'why' before modifying critical code paths.

## 2. Tech Stack Architecture Guidelines
- Use Vue 3 `<script setup>` with TypeScript exclusively.
- State management: Prefer Composables (`composables/useX.ts`) over complex global stores unless strictly necessary.
- Tailwind CSS: Use utility classes cleanly. Avoid arbitrary arbitrary unmaintainable inline styles.
- SSR Safety: Guard browser-only APIs (`window`, `localStorage`) with `false` or `onMounted`.

## 3. Engineering & Workflow Guardrails
### Git Commit Guidelines
- **Strict English Only**: All Git commit messages MUST be written entirely in English. Chinese characters are strictly forbidden in commit messages.
- **Conventional Commits Format**: `<type>(<scope>): <summary in English>`
  - `feat(...)`: New features
  - `fix(...)`: Bug fixes and UI/layout corrections
  - `refactor(...)`: Code refactoring without behavioral changes
  - `chore(...)`: Tooling, dependency, or configuration maintenance
  - `perf(...)`: Performance optimizations
  - `test(...)`: Adding or correcting tests

### Type Safety & Code Quality
- **Zero Any Policy**: Avoid `any` types. Use proper generics, unknown with type narrowing, or specific interfaces.
- Validate external inputs at system boundaries using runtime schema validators.
- Keep functions focused and under 40 lines where feasible.

### Verification & Testing Policy
- **Always verify before completion**: Run unit tests, type checkers, and build commands before declaring a task done.
- Never push broken code to main. Maintain 0-error build status across all PRs.

### Code Organization
- Do not create monolithic files over 400 lines. Split modular logic into dedicated composables or helper utilities.
- Preserve existing docstrings, API comments, and formatting standards.

### Security & Secret Protection
- **Never hardcode secrets, tokens, or private API keys** into source code files.
- Verify user permissions before executing irreversible filesystem deletes or drops.

### MCP & Tool Execution Protocol
- Defensively validate arguments before invoking external tool calls.
- When external commands fail, read stderr logs carefully and perform root-cause repair.

💡 Best Practices for AI Coding Rule Files

1. Place in Repository Root

Save the generated file in your project root. The agent will automatically parse and respect instructions on every prompt.

2. Be Explicit & Actionable

Clear constraints (e.g. strict English commits, zero any types) perform drastically better than vague stylistic wishes.

3. Commit to Git Version Control

Check rule files into Git so your entire team shares unified code standards across Cursor, Claude Code, and Windsurf.