Mmcp.market

generating-project-rules skill

by naravid19·naravid19/ai-project-rules-generator·10 stars·MIT

Make sure to use this skill WHENEVER the user mentions creating, generating, or updating project rules files (.cursorrules, AGENTS.md, CLAUDE.md, GEMINI.md, or equivalent) for any software project. This is essential when a user wants to integrate AI skills into their development workflow, or when they need cross-platform AI tool configuration. Skip this for general code generation, refactoring, or tasks unrelated to AI agent configuration files.

D40/100content scan

Is the generating-project-rules skill safe?

Serious findings: read the flagged lines first. We read 6 files in the folder on 2026-09-28.

  • highREADME.md:63

    Downloads a script and runs it in one step, so what runs is whatever that server sends that day. Common for installers, and still worth a look at the address.

    curl -sL https://raw.githubusercontent.com/naravid19/ai-project-rules-generator/main/setup.sh | bash
  • highsetup.sh:5

    Downloads a script and runs it in one step, so what runs is whatever that server sends that day. Common for installers, and still worth a look at the address.

    # Install:  curl -sL <raw-url>/setup.sh | bash

Install the generating-project-rules skill

A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description. Read the findings above first.

git clone --depth 1 https://github.com/naravid19/ai-project-rules-generator.git /tmp/ai-project-rules-generator
mkdir -p ~/.claude/skills
cp -r /tmp/ai-project-rules-generator/. ~/.claude/skills/generating-project-rules
available in every project

In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub

The instructions your agent would load

SKILL.md as published, without the frontmatter. Read it on GitHub

Generating Project Rules

Generate tailored .cursorrules, AGENTS.md, and platform-specific AI configuration files for any software project. This skill autonomously discovers the project's tech stack, integrates relevant AI skills via Just-In-Time retrieval, and produces high-fidelity rule files with mandatory quality verification.

[!IMPORTANT]

Pre-Execution Check: To ensure high-quality outputs, verify these practices before executing stages. This prevents common errors like context bloat and hallucinated values:

| Practice to Avoid | Symptom | How to Fix |

|-------------------|---------|------------|

| Skipping environment detection | Assuming Mode A without checking scripts/ | Always confirm execution mode in Stage 0.0 |

| Hardcoding skill names | Referencing a skill by repo name instead of keywords | Use keyword search to find the latest capabilities |

| Inferring design tokens from prose | Copying colors from README instead of config files | Parse actual source files for accurate tokens |

| Exceeding JIT budget | Loading >5 skill files into context | Keep context clean by dropping lowest-confidence matches |

| Claiming completion early | Saying "done" without running Stage 5 | Always verify outputs before completion |

Stage 0: Environment Detection & Preferences

0.0 Detect Execution Mode

It is essential to determine your execution mode first to provide a seamless user experience:

  • Mode A (Enhanced): scripts/ directory exists relative to this skill root. Use Python utilities for fast, token-efficient discovery and validation.
  • Mode B (Autonomous): scripts/ directory is missing. Provide a zero-install experience by falling back to native IDE capabilities (file reading, directory listing) to emulate script logic. Asking the user to install Python or download scripts disrupts their workflow.

[!NOTE]

Please operate silently in Mode B if scripts/ is absent, avoiding requests to clone repositories or run setup scripts. This ensures a frictionless experience for the user.

0.1 Load User Preferences

[!CAUTION]

⏸️ USER CHECKPOINT — Preferences Review

Before proceeding, you MUST present the wizard choices to the user and wait

for their response. Do NOT auto-select defaults. Present these as

multiple-choice questions using the IDE's native question UI:

1. Target platforms — which AI tools do they use?

2. Severity level — strict / balanced / relaxed

3. Output language — especially important if user communicates in non-English

4. Optional sections — security, a11y, i18n, perf, git, api-design

Include a recommendation based on project analysis:

- If README is in Thai → recommend th output language

- If project has APIs → recommend api-design section

- If project has auth → recommend security section

You MUST wait for user response before running wizard.py or proceeding.

Check for .rulesrc.yaml in the target project root. If found, parse and apply all fields as source of truth:

If no config file exists:

  • Mode A: Run python scripts/wizard.py for interactive prompts.
  • Mode B: Ask the user directly for: target platforms, severity, output language.

See assets/templates/rulesrc-template.yaml for the full configuration schema.

0.2 Multi-Language Support

If output_language is non-English, follow the translation patterns in assets/i18n/README.md. Translate rule descriptions and section headers. Keep code examples and technical terms in their original language.

Stage 1: Project Analysis

[!NOTE]

Enhance the user experience by autonomously scanning the project. Discovering information by reading files directly saves the user time and reduces unnecessary prompts.

1.1 Autonomous Codebase Discovery

Scan the target project systematically:

  1. Read config files: package.json, pyproject.toml, Cargo.toml, go.mod, pom.xml, Gemfile, manifest.json
  2. Identify intent: Read README.md or any spec/architecture file to understand project goals.
  3. Identify entry points: index.js, main.py, App.tsx, main.go, lib.rs, etc.
  4. Map architecture: Scan folder structure, component organization, layers.
  5. List ALL dependencies: Extract from both dependencies and devDependencies. Flag pattern-implying deps (e.g., zustand → state management, framer-motion → animations).

1.2 Extract Design Tokens (MANDATORY for styled projects)

[!IMPORTANT]

Avoid inferring colors, fonts, spacing, or breakpoints from README descriptions. Extracting them from actual config files ensures your generated rules match the implemented design system accurately.

Parse these files when they exist:

Mode A: Run python scripts/lib/designtokens.py for automated extraction. Mode B**: Open each config file and manually copy the exact values. If README colors differ from config, use CONFIG values and note the divergence.

1.3 Detect Target AI Platforms

Determine output files using this priority:

  1. Self-awareness: Identify what platform you are running in.
  2. Explicit config: Read target_platforms from .rulesrc.yaml.
  3. File detection: Scan project root for existing configuration files.

Default fallback: .cursorrules + AGENTS.md (most universal).

1.4 Confidence Assessment

Score the detected project signals:

Mode A: Run python scripts/wizard.py to auto-calculate. Mode B: Compute manually using the table above.

[!CAUTION]

⏸️ USER CHECKPOINT — Project Analysis Confirmation

After scoring confidence, ALWAYS present the detected project profile to the

user for confirmation:

More skills from naravid19/ai-project-rules-generator

All agent skills → · MCP servers