ai-prd-workflow: Command for Claude Code

.claude/commands/generate-rules.md

generate-rules is a command for Claude Code from nurettincoban/ai-prd-workflow. It costs 9 tokens per session (915 once invoked), scanned A, original, MIT.

A command that creates a RULES.md file containing development guidelines, based on your product requirements and feature documents.

In plain words
What is it for?
Use it to define technical standards for a web app, mobile app, library, command-line tool, service, data pipeline, or game.
Why use it?
It turns project requirements into shared instructions for consistent development and AI assistance, while identifying unclear information that needs answers.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is nurettincoban/ai-prd-workflow's own configuration. It tells Claude Code how to work on ai-prd-workflow itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-prd-workflow configures →

Reuse

Borrowing it

Nothing to install: this file belongs to nurettincoban/ai-prd-workflow. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nurettincoban/ai-prd-workflow/main/.claude/commands/generate-rules.md
Clone the repo
git clone --depth 1 https://github.com/nurettincoban/ai-prd-workflow

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for generate-rules

README.md
[![agentmods](https://agentmods.dev/badge/commands/nurettincoban/ai-prd-workflow/generate-rules.svg)](https://agentmods.dev/commands/nurettincoban/ai-prd-workflow/generate-rules)
Your own site
<a href="https://agentmods.dev/commands/nurettincoban/ai-prd-workflow/generate-rules"><img src="https://agentmods.dev/badge/commands/nurettincoban/ai-prd-workflow/generate-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 915 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00009 $0.00915
Opus 5 $0.00005 $0.00458
Sonnet 5 $0.00002 $0.00183
Haiku 4.5 $0.00001 $0.00092

Measured 8d ago against content hash 6d8e4b5c20f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

generate-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/generate-rules.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an expert software architect and technical lead tasked with creating a comprehensive RULES.md file based on the Product Requirements Document (PRD.md) and features list (FEATURES.md), or the documents provided in the conversation.

Create a clear, structured RULES.md that establishes technical and general guidelines for AI assistance during the development process. These rules will ensure consistency, quality, and alignment with project requirements.

If any critical information is missing or unclear, ask specific questions before proceeding.

SCOPE THE CHECKLIST TO THE PRODUCT TYPE

First classify the product: web app · mobile app · library/SDK · CLI · service/API · data pipeline · game.

Apply only the sections and checks that fit that type. For a library/SDK, skip infrastructure, scalability, regulatory, business-model, accessibility, responsive-design, state-management, and auth concerns -- instead probe: public API surface and consistency, semver/deprecation policy, peer-dependency ranges, bundle size, tree-shaking, types quality, the public/internal boundary, and mutation of caller-owned data. Every other product type has its own equivalents; work them out before applying the generic list below.

State which product type you classified and which checks you skipped. Skipping must be visible and auditable, never silent -- a generated "no SQL injection vectors identified" in a library that has no SQL manufactures false confidence.

GROUND THE RULES IN EXISTING CODE

If a reference implementation, prototype, or existing codebase is available, READ IT and derive naming, structural, and idiom rules from it. Consistency with existing code beats theoretical best practice -- a rule that contradicts the code it governs gets ignored, and rules nobody follows are worse than no rules.

Generate the RULES.md by:

  1. TECHNOLOGY STACK DEFINITION:
    • Identify core technologies mentioned or implied in the PRD/features
    • Specify versions for each technology, and VERIFY every one against the actual registry before writing it down (npm view <pkg> version, pip index versions <pkg>, or the registry's latest endpoint). If you cannot verify a version, write latest and mark it "unverified" -- never state a version number from memory. Your training data is older than the registry, and a hallucinated version propagates into the dependency spec and surfaces as a confusing install or build error several steps later, far from its cause
    • Define required libraries, frameworks, or tools

Read the full file on GitHub · 66 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 66 lines · 9 tokens per session scan A 6d8e4b5c20f0

Subscribe to this mod's changes

generate-rules is a command published in the GitHub repository nurettincoban/ai-prd-workflow (284 stars, last pushed 1mo ago), licensed MIT. It adds 9 tokens to every session and 915 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.