Skip to content
Back to skills

Product

BSecurity

Generate Product Requirements Document with EARS syntax and structured ambiguity clarification

  • 24 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added October 14, 2026
ai-agentsgosecurityperformance

Security analysis

B75/100
  • criticalImpersonates system messages to override safety constraints

Pro scans all 21 files and shows the line behind each finding

Scanned November 22, 2026

npx -y skills add andreibesleaga/GABBE --skill product --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Product?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Product
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/andreibesleaga-product-05511ac1/badge)](https://www.skillsdirectory.com/skills/andreibesleaga-product-05511ac1)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: spec-writer
description: Generate Product Requirements Document with EARS syntax and structured ambiguity clarification
triggers: [spec, PRD, feature, requirements, product requirements, write spec, new feature]
tags: [product]
core: true
context_cost: medium
---
# Spec Writer Skill

## Goal
Transform a user goal or feature request into a structured PRD using EARS syntax. Before generating requirements, invoke the ambiguity layer to clarify unclear aspects. Human approval required before proceeding to implementation.

> **Boundary vs `product/req-elicitation.skill`:** `req-elicitation` is the heavyweight IEEE 29148 / IREB elicitation pass (stakeholder interviews, use cases → full `EARS_REQUIREMENTS.md`). `spec-writer` is the fast feature-to-PRD path that reuses the **same EARS forms** (defined canonically in `req-elicitation`). For large or regulated requirement sets, run `req-elicitation`; use `spec-writer` for a single feature's PRD. Both must use the identical EARS patterns.

## Steps

1. **Receive and understand the goal**
   - First, check for `Step 0` strategic context in `docs/strategic/` (e.g., `BUSINESS_CASE.md`, `EMPATHY_MAP.md`, `PROBLEM_STATEMENT.md`). If present, read them.
   - Ask the user: "Describe what you want to build in plain language"
   - Identify: Who is the user? What problem does it solve? What does success look like? (using the strategic docs if available)

2. **Ambiguity Layer — ask clarifying questions**
   Identify and ask about ALL ambiguous aspects before writing requirements:
   ```
   Questions to ask (examples):
   - "Who are the users of this feature? (roles, permissions, guest vs authenticated)"
   - "What happens if [edge case] occurs?"
   - "What are the performance expectations? (response time, concurrent users)"
   - "Is there an existing system this integrates with? What are its constraints?"
   - "What is explicitly out of scope for this version?"
   - "Are there any regulatory requirements? (GDPR, HIPAA, PCI-DSS)"
   - "What devices/browsers must be supported?"
   ```
   Wait for answers before proceeding.

3. **Generate the PRD** using templates/product/PRD_TEMPLATE.md

4. **Write EARS requirements** — use all 5 patterns as appropriate:

   **Ubiquitous** (always applies):
   ```
   THE SYSTEM SHALL encrypt all data in transit using the TLS versions set in `security/cryptography-standards.skill.md`.
   ```

   **Event-Driven** (triggered by an event):
   ```
   WHEN a user submits a login form with incorrect credentials 3 consecutive times
   THE SYSTEM SHALL lock the account for 15 minutes and send an email notification.
   ```

   **State-Driven** (while in a state):
   ```
   WHILE the payment processing service is unavailable
   THE SYSTEM SHALL queue requests and retry with exponential backoff up to 3 times.
   ```

   **Optional Feature** (feature flag / conditional):
   ```
   WHERE two-factor authentication is enabled for the account
   THE SYSTEM SHALL require a TOTP code on each login attempt.
   ```

   **Unwanted Behavior** (defensive requirements — canonical `IF…THEN` form):
   ```
   IF a password is submitted for storage THEN THE SYSTEM SHALL hash it and SHALL NOT store the plaintext in any medium.
   IF an unhandled error occurs THEN THE SYSTEM SHALL return a generic error and SHALL NOT expose internal stack traces in HTTP responses.
   ```
   (Matches the `IF [unwanted condition] THEN the [system] shall [protective response]` form in `req-elicitation.skill` / `req-review.skill`.)

5. **Write acceptance criteria**
   Each requirement needs 1+ verifiable acceptance criteria:
   ```
   Given [precondition]
   When [action]
   Then [expected outcome with measurable result]
   ```

6. **Non-functional requirements**
   Always include:
   - Performance: expected response time, throughput
   - Security: data classification, access control requirements
   - Accessibility: WCAG level (if UI feature)
   - Scalability: expected load, growth projections

7. **Out of scope section**
   Explicitly list what this feature does NOT include. This prevents scope creep.

8. **Present PRD to human for approval**
   Say: "Here is the PRD. Please review and approve before I proceed to architecture/planning."

9. **After approval: create SDLC checkpoint S01**
   - Invoke sdlc-checkpoint.skill → creates SESSION_SNAPSHOT/S01_requirements.md
   - Updates PROJECT_STATE.md → current phase: S02 ARCHITECTURE

## Constraints
- NEVER skip the ambiguity layer — unresolved ambiguity is the #1 cause of rework
- NEVER start planning or implementation without human approval of the PRD
- All requirements must be EARS-formatted and verifiable (not vague like "fast" or "user-friendly")
- Use the PRD template in templates/product/PRD_TEMPLATE.md

## Output Format
Completed PRD.md file at project root (or docs/) using templates/product/PRD_TEMPLATE.md structure.

## Limits and safety
- Do not issue the final PRD while a feature that touches personal data, payments or external integrations lacks a security NFR for data in transit and at rest.
- Security NFRs cite a verifiable standard or a number; do not write "secure".
- For software with logins, personal data, uploads, payments or an AI agent, run `security/security-requirements.skill.md` and write its Security and Privacy lines into the EARS file.
- Start the PRD with a data classification (Public, Internal, Confidential, Restricted) and derive the baseline requirements from it.
- Do not turn hardcoded passwords, backdoor accounts or disabled certificate checks into requirements; flag them.
- If clarification answers stay unusable after 3 rounds, stop and ask the human instead of writing the PRD.

Files in this skill

  • accessibility.skill.md6.7 KB
  • adr-writer.skill.md5 KB
  • business-case.skill.md4.1 KB
  • change-management.skill.md6.1 KB
  • decompose.skill.md4.1 KB
  • design-thinking.skill.md3.9 KB
  • estimation-sizing.skill.md5.7 KB
  • evals/spec-writer.eval.yaml967 B
  • financial-governance.skill.md5.8 KB
  • green-software.skill.md3.2 KB
  • ideation-facilitation.skill.md5.7 KB
  • market-analysis.skill.md3.5 KB
  • opportunity-assessment.skill.md5.8 KB
  • product-analytics.skill.md6.1 KB
  • professional-practice.skill.md7.6 KB
  • req-elicitation.skill.md11.4 KB
  • req-review.skill.md11.7 KB
  • spec-analyze.skill.md5.2 KB
  • spec-writer.skill.md6.5 KB
  • stakeholder-management.skill.md3.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.