/aiwg-regenerate-cursorrules
Regenerate .cursorrules for Cursor with preserved team directives
Claude Code
$ npx -y skills add jmagly/aiwg --skill aiwg-regenerate-cursorrules --agent claude-code
Codex
$ npx skills add jmagly/aiwg --skill aiwg-regenerate-cursorrules -a codex -y
Cursor
$ npx skills add jmagly/aiwg --skill aiwg-regenerate-cursorrules -a cursor -y
Gemini CLI
$ npx skills add jmagly/aiwg --skill aiwg-regenerate-cursorrules -a gemini-cli -y
GitHub Copilot
$ npx skills add jmagly/aiwg --skill aiwg-regenerate-cursorrules -a github-copilot -y
OpenCode
$ npx skills add jmagly/aiwg --skill aiwg-regenerate-cursorrules -a opencode -y
Windsurf
$ npx skills add jmagly/aiwg --skill aiwg-regenerate-cursorrules -a windsurf -y
SKILL.md
aiwg-regenerate-cursorrules.SKILL.mdnamespace: aiwg
name: aiwg-regenerate-cursorrules
platforms: [all]
description: Regenerate .cursorrules for Cursor with preserved team directives
Regenerate .cursorrules
Regenerate the `.cursorrules` file for Cursor IDE integration, analyzing current project state while preserving team directives and organizational requirements.
**Hook file approach (default):** Generates `AIWG-cursor.md` and adds `@AIWG-cursor.md` directive to `.cursorrules`. Note: Cursor's @-link support in `.cursorrules` is partially confirmed — see #444.
**Full inject (`--full-inject`):** Embeds AIWG content inline with AIWG markers (safe fallback).
Parameters
| Flag | Description | |------|-------------| | `--no-backup` | Skip creating backup file | | `--dry-run` | Preview changes without writing | | `--show-preserved` | List all detected preserved content and exit | | `--full` | Full regeneration, preserve nothing (destructive) |
Execution Steps
Step 1: Create Backup
Unless `--no-backup` specified:
1. Check if `.cursorrules` exists 2. If exists, copy to `.cursorrules.backup-{YYYYMMDD-HHMMSS}` 3. Report backup location
Step 2: Extract Preserved Content
Same preservation patterns as other platforms:
1. **Explicit Preserve Blocks**: `<!-- PRESERVE -->` ... `<!-- /PRESERVE -->` 2. **Preserved Section Headings**: Team *, Org *, Definition of Done, etc. 3. **Inline Directives**: Lines with directive keywords
Step 3: Analyze Project
- Languages and package managers
- Development commands
- Test framework
- CI/CD configuration
- Directory structure
- Cursor-specific configuration in `.cursor/`
Step 4: Detect AIWG State
Check installed frameworks by scanning:
- `.cursor/agents/` for deployed agents
- `.cursor/rules/` for MDC rules
- `.cursor/commands/` for commands
Read registry for framework versions.
Step 5: Generate .cursorrules
**Document Structure:**
# .cursorrules
Project rules for Cursor AI assistance.
## Project Overview
{Description from README.md or package.json}
## Tech Stack
- **Language**: {detected languages}
- **Framework**: {detected frameworks}
- **Package Manager**: {npm/yarn/pnpm/etc.}
## Development Commands
| Command | Description |
|---------|-------------|
| `npm install` | Install dependencies |
| `npm run build` | Build project |
| `npm test` | Run tests |
## Project Structuresrc/ → Source code test/ → Test files docs/ → Documentation
## Code Conventions
{Project-specific conventions}
---
## Team Directives
<!-- PRESERVED SECTION -->
{ALL PRESERVED CONTENT}
<!-- /PRESERVED SECTION -->
---
## AIWG Framework Integration
This project uses AIWG SDLC framework with Cursor.
### Installed Frameworks
| Framework | Agents | Commands |
|-----------|--------|----------|
| sdlc-complete | 54 | 42 |
### Using Agents
Invoke agents via @-mention in Cursor:
```text
@security-architect Review the authentication implementation
@test-engineer Generate unit tests for the user serviceNatural Language Mappings
| Request | Maps To | |---------|---------| | "run security review" | flow-security-review-cycle | | "check status" | project-status | | "start iteration N" | flow-iteration-dual-track |
Project Artifacts
{If .aiwg/ exists:}
| Category | Location | |----------|----------| | Requirements | @.aiwg/requirements/ | | Architecture | @.aiwg/architecture/ |
Core References
| Topic | Reference | |-------|-----------| | Orchestration | @~/.local/share/ai-writing-guide/agentic/code/addons/aiwg-utils/prompts/core/orchestrator.md | | Agent Design | @~/.local/share/ai-writing-guide/agentic/code/addons/aiwg-utils/prompts/agents/design-rules.md |
{If SDLC framework installed:}
SDLC References
| Topic | Reference | |-------|-----------| | Natural Language | @~/.local/share/ai-writing-guide/agentic/code/frameworks/sdlc-complete/docs/simple-language-translations.md |
Resources
- **AIWG Installation**: `~/.local/share/ai-writing-guide`
---
<!-- Add team-specific notes below. Content in preserved sections survives regeneration. -->
### Step 6: Write Output
**If `--dry-run`:** Display content, do not write.
**Otherwise:**
1. Write to `.cursorrules`
2. Report summary
.cursorrules Regenerated ========================
Backup: .cursorrules.backup-20251206-153512
Preserved: 2 sections, 15 lines Regenerated: Project overview, structure, AIWG integration
Output: .cursorrules (187 lines)
## Examples
```bash
# Regenerate .cursorrules
/aiwg-regenerate-cursorrules
# Preview changes
/aiwg-regenerate-cursorrules --dry-run
# Check preserved content
/aiwg-regenerate-cursorrules --show-preserved
# Full regeneration
/aiwg-regenerate-cursorrules --full
Related Commands
| Command | Regenerates | |---------|-------------| | `/aiwg-regenerate-claude` | CLAUDE.md | | `/aiwg-regenerate-warp` | WARP.md | | `/aiwg-regenerate-agents` | AGENTS.md | | `/aiwg-regenerate-cursorrules` | .cursorrules | | `/aiwg-regenerate-windsurfrules` | .windsurfrules | | `/aiwg-regenerate-copilot` | copilot-instructions.md | | `/aiwg-regenerate` | Auto-detect |
References
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/README.md — aiwg-utils addon overview
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/native-ux-tools.md — Platform capability matrix including Cursor support
- @$AIWG_ROOT/docs/cli-reference.md — CLI reference for aiwg sync and regenerate commands
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/README.md — SDLC framework integration referenced in generated .cursorrules
Read more
namespace: aiwg name: aiwg-regenerate-cursorrules platforms: [all] description: Regenerate .cursorrules for Cursor with preserved team directives
Regenerate .cursorrules
Regenerate the `.cursorrules` file for Cursor IDE integration, analyzing current project state while preserving team directives and organizational requirements.
**Hook file approach (default):** Generates `AIWG-cursor.md` and adds `@AIWG-cursor.md` directive to `.cursorrules`. Note: Cursor's @-link support in `.cursorrules` is partially confirmed — see #444.
**Full inject (`--full-inject`):** Embeds AIWG content inline with AIWG markers (safe fallback).
Parameters
| Flag | Description | |------|-------------| | `--no-backup` | Skip creating backup file | | `--dry-run` | Preview changes without writing | | `--show-preserved` | List all detected preserved content and exit | | `--full` | Full regeneration, preserve nothing (destructive) |
Execution Steps
Step 1: Create Backup
Unless `--no-backup` specified:
1. Check if `.cursorrules` exists 2. If exists, copy to `.cursorrules.backup-{YYYYMMDD-HHMMSS}` 3. Report backup location
Step 2: Extract Preserved Content
Same preservation patterns as other platforms:
1. **Explicit Preserve Blocks**: `<!-- PRESERVE -->` ... `<!-- /PRESERVE -->` 2. **Preserved Section Headings**: Team *, Org *, Definition of Done, etc. 3. **Inline Directives**: Lines with directive keywords
Step 3: Analyze Project
- Languages and package managers
- Development commands
- Test framework
- CI/CD configuration
- Directory structure
- Cursor-specific configuration in `.cursor/`
Step 4: Detect AIWG State
Check installed frameworks by scanning:
- `.cursor/agents/` for deployed agents
- `.cursor/rules/` for MDC rules
- `.cursor/commands/` for commands
Read registry for framework versions.
Step 5: Generate .cursorrules
**Document Structure:**
# .cursorrules
Project rules for Cursor AI assistance.
## Project Overview
{Description from README.md or package.json}
## Tech Stack
- **Language**: {detected languages}
- **Framework**: {detected frameworks}
- **Package Manager**: {npm/yarn/pnpm/etc.}
## Development Commands
| Command | Description |
|---------|-------------|
| `npm install` | Install dependencies |
| `npm run build` | Build project |
| `npm test` | Run tests |
## Project Structuresrc/ → Source code test/ → Test files docs/ → Documentation
## Code Conventions
{Project-specific conventions}
---
## Team Directives
<!-- PRESERVED SECTION -->
{ALL PRESERVED CONTENT}
<!-- /PRESERVED SECTION -->
---
## AIWG Framework Integration
This project uses AIWG SDLC framework with Cursor.
### Installed Frameworks
| Framework | Agents | Commands |
|-----------|--------|----------|
| sdlc-complete | 54 | 42 |
### Using Agents
Invoke agents via @-mention in Cursor:
```text
@security-architect Review the authentication implementation
@test-engineer Generate unit tests for the user serviceNatural Language Mappings
| Request | Maps To | |---------|---------| | "run security review" | flow-security-review-cycle | | "check status" | project-status | | "start iteration N" | flow-iteration-dual-track |
Project Artifacts
{If .aiwg/ exists:}
| Category | Location | |----------|----------| | Requirements | @.aiwg/requirements/ | | Architecture | @.aiwg/architecture/ |
Core References
| Topic | Reference | |-------|-----------| | Orchestration | @~/.local/share/ai-writing-guide/agentic/code/addons/aiwg-utils/prompts/core/orchestrator.md | | Agent Design | @~/.local/share/ai-writing-guide/agentic/code/addons/aiwg-utils/prompts/agents/design-rules.md |
{If SDLC framework installed:}
SDLC References
| Topic | Reference | |-------|-----------| | Natural Language | @~/.local/share/ai-writing-guide/agentic/code/frameworks/sdlc-complete/docs/simple-language-translations.md |
Resources
- **AIWG Installation**: `~/.local/share/ai-writing-guide`
---
<!-- Add team-specific notes below. Content in preserved sections survives regeneration. -->
### Step 6: Write Output **If `--dry-run`:** Display content, do not write. **Otherwise:** 1. Write to `.cursorrules` 2. Report summary
.cursorrules Regenerated ========================
Backup: .cursorrules.backup-20251206-153512
Preserved: 2 sections, 15 lines Regenerated: Project overview, structure, AIWG integration
Output: .cursorrules (187 lines)
## Examples ```bash # Regenerate .cursorrules /aiwg-regenerate-cursorrules # Preview changes /aiwg-regenerate-cursorrules --dry-run # Check preserved content /aiwg-regenerate-cursorrules --show-preserved # Full regeneration /aiwg-regenerate-cursorrules --full
Related Commands
| Command | Regenerates | |---------|-------------| | `/aiwg-regenerate-claude` | CLAUDE.md | | `/aiwg-regenerate-warp` | WARP.md | | `/aiwg-regenerate-agents` | AGENTS.md | | `/aiwg-regenerate-cursorrules` | .cursorrules | | `/aiwg-regenerate-windsurfrules` | .windsurfrules | | `/aiwg-regenerate-copilot` | copilot-instructions.md | | `/aiwg-regenerate` | Auto-detect |
References
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/README.md — aiwg-utils addon overview
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/native-ux-tools.md — Platform capability matrix including Cursor support
- @$AIWG_ROOT/docs/cli-reference.md — CLI reference for aiwg sync and regenerate commands
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/README.md — SDLC framework integration referenced in generated .cursorrules
Reusable project context and specialist workflows for the AI tools you already use. Plan software, coordinate specialist reviews, prepare campaigns, investigate incidents, organize research, curate media, and maintain operational knowledge.
Other skills on aiwg.
More skills from other plugins.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
ask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
Questions about aiwg-regenerate-cursorrules.
- Which coding agents can use aiwg-regenerate-cursorrules?
- aiwg-regenerate-cursorrules installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

