Agent skill

Nl To Constraints

by ArabelaTso in ArabelaTso/Skills-4-SE

Transforms natural language requirements (user stories, verbal descriptions, business rules) into formal specifications and constraints.

Apache-2.0Auto-check passedProduct & Project Management

Install Nl To Constraints

skills CLI
$ npx skills add ArabelaTso/Skills-4-SE --skill nl-to-constraints -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ArabelaTso/Skills-4-SE nl-to-constraints --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/nl-to-constraints .claude/skills/nl-to-constraints && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
nl-to-constraints
GitHub stars
253
Token cost
~2.3k tokens
SKILL.md length
590 words
Files
3 (incl. references, assets)
Skills in repo
170
Repo updated
First seen
Licence
Apache-2.0

At a glance

Transforms natural language requirements (user stories, verbal descriptions, business rules) into formal specifications and constraints.

  • Works in 5 steps: Analyze the Input → Classify Requirements → Extract Constraints → …
  • Converting informal requirements into structured
  • SKILL.md covers Core Capabilities, Workflow, Handling Ambiguity and Best Practices, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Nl To Constraints is an agent skill from ArabelaTso/Skills-4-SE. Transforms natural language requirements (user stories, verbal descriptions, business rules) into formal specifications and constraints. Use when converting informal requirements into structured, testable specifications with explicit constraints. Outputs in multiple formats including BDD-style Given-When-Then, JSON Schema, and structured plain text requirements documents.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files and assets (for example `assets/specification_schema.json` and `references/constraint_patterns.md`).

It sits in Product & Project Management, covering User stories and PRD writing. The repository describes itself as: A curated list of 180+ useful Claude Skills for Software Engineering and resources for customizing AI for SE workflows. The licence is Apache-2.0.

When your agent uses it

  • Converting informal requirements into structured
  • Testable specifications with explicit constraints

Example prompts

  • “Use the nl-to-constraints skill to transform natural language requirements (user stories, verbal descriptions, business rules) into formal…”
  • “/nl-to-constraints”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Analyze the Input
  2. Classify Requirements
  3. Extract Constraints
  4. Generate Specifications
  5. Validate and Refine

What it can do on your machine

Read from SKILL.md and the folder at commit 4f38503. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are gherkin, json and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Nl To Constraints loads about 2.3k tokens when it runs, and up to ~3.8k if it reads all its reference files. Until then it costs about 98 tokens; SKILL.md has 590 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~98
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ArabelaTso/Skills-4-SE at commit 4f38503, republished under its Apache-2.0 licence (© ArabelaTso). 590 words, ~2,310 tokens.

Download SKILL.mdSave it as .claude/skills/nl-to-constraints/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
nl-to-constraints
description
Transforms natural language requirements (user stories, verbal descriptions, business rules) into formal specifications and constraints. Use when converting informal requirements into structured, testable specifications with explicit constraints. Outputs in multiple formats including BDD-style Given-When-Then, JSON Schema, and structured plain text requirements documents.

Natural Language to Constraints/Specifications

You are an expert requirements engineer who transforms informal natural language into precise, structured specifications and constraints.

Core Capabilities

This skill enables you to:

  1. Parse natural language requirements - Extract structured information from user stories, verbal descriptions, and business rules
  2. Identify constraints - Detect and categorize data, business, temporal, state, authorization, cardinality, and performance constraints
  3. Generate formal specifications - Produce structured output in BDD format, JSON Schema, and plain text
  4. Validate completeness - Detect ambiguities, missing edge cases, and conflicting requirements
  5. Create test scenarios - Derive testable scenarios from requirements

Workflow

Follow this process when converting natural language to specifications:

Step 1: Analyze the Input

Read the natural language input carefully and:

  • Identify the main entities and actors
  • Extract explicit requirements and rules
  • Note implicit assumptions that need clarification
  • Flag ambiguous or vague language
  • Detect conflicting statements
Step 2: Classify Requirements

Categorize each requirement by:

  • Type: Functional, non-functional, business, technical, UI, security
  • Priority: Critical, high, medium, low
  • Constraint category: Data, business rule, temporal, state, authorization, cardinality, performance

Use the constraint patterns in references/constraint_patterns.md to identify and classify constraints systematically.

Step 3: Extract Constraints

For each identified constraint, extract:

  • Entity - What is being constrained
  • Category - Type of constraint (see constraint_patterns.md for categories)
  • Severity - Must/should/may (RFC 2119 compliance)
  • Formal expression - Logical representation when possible
  • Validation method - How to check compliance
  • Error message - What to show when violated

Example:

Natural language: "Users must provide a valid email address when registering"

Extracted constraint:

Entity: User Registration
Category: Data
Severity: must
Formal expression: email MATCHES ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Validation method: Regex pattern matching on input
Error message: "Please enter a valid email address"
Step 4: Generate Specifications

Produce output in the requested format(s):

A. BDD-Style (Given-When-Then)

Structure test scenarios as:

gherkin
Scenario: [Scenario name]
  Given [precondition/context]
  When [action or event]
  Then [expected outcome]
  And [additional expectations]

Example:

gherkin
Scenario: User registration with valid email
  Given a new user on the registration page
  When they enter email "user@example.com" and submit the form
  Then the account is created successfully
  And a confirmation email is sent to "user@example.com"

Scenario: User registration with invalid email
  Given a new user on the registration page
  When they enter email "invalid-email" and submit the form
  Then an error message "Please enter a valid email address" is displayed
  And the account is not created
B. JSON Schema Format

Use the template in assets/specification_schema.json to structure output as:

json
{
  "metadata": {
    "title": "User Registration System",
    "version": "1.0",
    "source": "[Original natural language text]"
  },
  "requirements": [
    {
      "id": "REQ-001",
      "type": "functional",
      "priority": "critical",
      "description": "Users must be able to register with email and password",
      "acceptance_criteria": [
        "Email field accepts valid email formats",
        "Password must be at least 8 characters",
        "Confirmation email is sent upon successful registration"
      ],
      "constraints": ["CON-001", "CON-002"]
    }
  ],
  "constraints": [
    {
      "id": "CON-001",
      "category": "data",
      "severity": "must",
      "entity": "User.email",
      "description": "Email must be valid email format",
      "formal_expression": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
      "validation_method": "Regex validation",
      "error_message": "Please enter a valid email address"
    }
  ],
  "test_scenarios": [
    {
      "id": "TEST-001",
      "requirement_ids": ["REQ-001"],
      "given": "A new user on registration page",
      "when": "User enters valid email and password",
      "then": "Account is created and confirmation email sent"
    }
  ]
}
C. Structured Plain Text

Format as a requirements document:

markdown
# Requirements Specification: [Feature Name]

## Requirements

### REQ-001: User Registration [CRITICAL]
**Type**: Functional
**Description**: Users must be able to register with email and password

**Acceptance Criteria**:
- Email field accepts valid email formats
- Password must be at least 8 characters
- Confirmation email is sent upon successful registration

**Related Constraints**: CON-001, CON-002

## Constraints

### CON-001: Email Validation [MUST]
**Category**: Data Constraint
**Entity**: User.email
**Description**: Email must match valid email format

**Validation**:
- Pattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
- Method: Regex validation on input
- Error: "Please enter a valid email address"

## Test Scenarios

### TEST-001: Valid Registration
Given a new user on the registration page
When they enter email "user@example.com" and password "SecurePass123"
Then the account is created successfully
And a confirmation email is sent
Step 5: Validate and Refine

Before delivering output:

  1. Check completeness - Are all aspects of the input covered?
  2. Verify consistency - Do requirements and constraints align?
  3. Test logic - Are conditional constraints properly expressed?
  4. Flag ambiguities - Highlight anything needing clarification
  5. Identify gaps - Note missing error cases, edge conditions, or dependencies
Show full SKILL.md (255 more words)Show less

Handling Ambiguity

When you encounter vague or ambiguous language:

  1. Flag it explicitly in the output
  2. List possible interpretations
  3. Ask specific clarifying questions
  4. Provide a default interpretation with the caveat that it needs confirmation

Common ambiguity patterns (see references/constraint_patterns.md for complete list):

  • Vague quantifiers: "many", "few", "some"
  • Unclear scope: "the system", "users" (which ones?)
  • Missing edge cases: No mention of error conditions
  • Undefined terms: Domain jargon without definition

Example:

Natural language: "The system should process orders quickly"

Output:

⚠️ AMBIGUITY DETECTED

Requirement: Order Processing Performance
Issue: "quickly" is not quantified

Possible interpretations:
1. Process within 1 second (real-time requirement)
2. Process within 5 seconds (acceptable for web)
3. Process within 1 minute (batch-like processing)

Clarifying questions:
- What is the maximum acceptable processing time?
- What percentage of orders must meet this threshold?
- Are there different performance requirements for different order types?

Suggested constraint (pending clarification):
CON-XXX: Order processing time should be <= 5 seconds for 95% of orders

Best Practices

  1. Be explicit - Convert implicit assumptions into explicit constraints
  2. Use signal words - Pay attention to "must", "should", "may" for severity levels
  3. Consider edge cases - What happens at boundaries, with invalid input, or in error conditions?
  4. Maintain traceability - Link constraints back to requirements and test scenarios
  5. Stay testable - Every requirement should have verifiable acceptance criteria
  6. Preserve context - Include relevant business context in descriptions
  7. Normalize terminology - Use consistent terms throughout the specification

Signal Words Reference

  • Must/Shall/Required → Mandatory constraint, hard validation
  • Should/Recommended → Soft constraint, guideline
  • May/Optional → Nice-to-have, not enforced
  • Must not/Shall not → Prohibited, rejection rule
  • If/When/Unless → Conditional constraint with precondition

Output Selection

Choose output format(s) based on the use case:

  • BDD (Given-When-Then): Best for test-driven development, communicating with QA
  • JSON Schema: Best for API contracts, data validation, integration with tools
  • Structured Plain Text: Best for documentation, stakeholder review, requirements management

When not specified, provide all three formats or ask which format is preferred.

Resources

  • references/constraint_patterns.md - Detailed patterns for extracting constraints by category
  • assets/specification_schema.json - JSON Schema template for structured output

© ArabelaTso, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references, assets) in skills/nl-to-constraints of ArabelaTso/Skills-4-SE.

  • SKILL.md
  • assets/specification_schema.json
  • references/constraint_patterns.md

Open the folder on GitHubat commit 4f38503

Compare with similar skills

Nl To Constraints next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Nl To Constraints compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nl To Constraints this skillArabelaTso/Skills-4-SE253—~2.3kAutomated safety check: PassApache-2.0
Ralph Tui Create Beadssubsy/ralph-tui2.5k1 repos~2.6kAutomated safety check: PassMIT
Ralph Tui Create Beads Rustsubsy/ralph-tui2.5k1 repos~2.8kAutomated safety check: PassMIT
Ralph Tui Create JSONsubsy/ralph-tui2.5k1 repos~2.6kAutomated safety check: PassMIT
To Prdywwynm/EverythingDone14411 repos~777Automated safety check: PassGPL-3.0
Use Case Writerphucnt-bazone-vietnam/use-case-writer143—~4.1kAutomated safety check: PassMIT

Similar skills

  • Ralph Tui Create Beads

    subsy/ralph-tui

    Convert PRDs to beads for ralph-tui execution. An agent skill from subsy/ralph-tui.

    2.5k GitHub starsUsed in 1 repo~2.6k tokens
    Product & Project ManagementAuto-check passed
  • Convert PRDs to beads for ralph-tui execution using beads-rust (br CLI).

    2.5k GitHub starsUsed in 1 repo~2.8k tokens
    Product & Project ManagementAuto-check passed
  • Ralph Tui Create JSON

    subsy/ralph-tui

    Convert PRDs to prd.json format for ralph-tui execution. An agent skill from subsy/ralph-tui.

    2.5k GitHub starsUsed in 1 repo~2.6k tokens
    Product & Project ManagementAuto-check passed
  • To Prd

    ywwynm/EverythingDone

    Turn the current conversation context into a PRD and publish it to the project issue tracker.

    144 GitHub starsUsed in 11 repos~777 tokens
    Product & Project ManagementAuto-check passed
  • Use Case Writer

    phucnt-bazone-vietnam/use-case-writer

    Generate Use Case specifications in English Markdown following the IT BA standard 13-field template (Karl Wiegers / IIBA).

    143 GitHub stars~4.1k tokensUpdated 4 mo ago
    Product & Project ManagementAuto-check passed
  • Project Planner

    adrianpuiu/claude-skills-marketplace

    Comprehensive project planning and documentation generator for software projects.

    100 GitHub starsUsed in 1 repo~6k tokens
    Product & Project ManagementAuto-check passed

More from ArabelaTso/Skills-4-SE

All 170 skills in this repo
  • Framework Migration Assistant

    ArabelaTso/Skills-4-SE

    Automatically migrate Python web applications between frameworks (Flask → FastAPI, Django → FastAPI).

    253 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Metamorphic Test Generator

    ArabelaTso/Skills-4-SE

    Generate test cases using metamorphic testing by applying transformations based on metamorphic properties.

    253 GitHub stars~798 tokensUpdated 1 mo ago
    Auto-check passed
  • Reproduction Trace Instrumenter

    ArabelaTso/Skills-4-SE

    Instruments programs to capture execution traces specifically for reproducing reported bugs, enabling consistent replay and diagnosis of failures.

    253 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Spring Mvc To Boot Migrator

    ArabelaTso/Skills-4-SE

    Automatically migrate Spring MVC applications to Spring Boot.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • State Snapshot Instrumenter

    ArabelaTso/Skills-4-SE

    Instrument programs (Python, C/C++, Java) to capture snapshots of key program states at runtime, including variables, memory, and call stacks.

    253 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Nl To Constraints

What does Nl To Constraints do?

Transforms natural language requirements (user stories, verbal descriptions, business rules) into formal specifications and constraints. Nl To Constraints is an agent skill from ArabelaTso/Skills-4-SE. Transforms natural language requirements (user stories, verbal descriptions, business rules) into formal specifications and constraints.

When should I use Nl To Constraints?

Nl To Constraints fits situations like: converting informal requirements into structured; testable specifications with explicit constraints.

How do I install Nl To Constraints in Claude Code?

Run `npx skills add ArabelaTso/Skills-4-SE --skill nl-to-constraints -a claude-code`. Or copy the skill folder (skills/nl-to-constraints in ArabelaTso/Skills-4-SE) into .claude/skills/nl-to-constraints in your project. Claude Code loads it when a task matches its description.

How do I install Nl To Constraints in Codex?

Run `npx skills add ArabelaTso/Skills-4-SE --skill nl-to-constraints -a codex`. Or copy the skill folder (skills/nl-to-constraints in ArabelaTso/Skills-4-SE) into .agents/skills/nl-to-constraints in your project. Codex loads it when a task matches its description.

Can I use Nl To Constraints in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ArabelaTso/Skills-4-SE --skill nl-to-constraints -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nl-to-constraints, .gemini/skills/nl-to-constraints, .github/skills/nl-to-constraints and .opencode/skills/nl-to-constraints in your project.

What does Nl To Constraints need to run?

SKILL.md names no scripts, command-line tools or credentials: Nl To Constraints is instructions for the agent only.

Does Nl To Constraints access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Nl To Constraints safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Nl To Constraints use?

Nl To Constraints is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nl To Constraints use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.

What are the alternatives to Nl To Constraints?

Skills that share tags, products or a category with Nl To Constraints: Ralph Tui Create Beads (subsy/ralph-tui, 2.5k stars), Ralph Tui Create Beads Rust (subsy/ralph-tui, 2.5k stars), Ralph Tui Create JSON (subsy/ralph-tui, 2.5k stars) and To Prd (ywwynm/EverythingDone, 144 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nl To Constraints?

ArabelaTso (a GitHub user) maintains it in ArabelaTso/Skills-4-SE, which has 253 GitHub stars. The repository holds 170 skills in this directory. The repository was last updated on August 21, 2026.

Source: ArabelaTso/Skills-4-SE on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.