Skip to content
Back to skills

Collection

BSecurity

SPEC writing standards with EARS format and TAG traceability

  • 24 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
securityrustgoapidatabasesecurityperformance

Works with

  • api

Security analysis

B75/100
  • criticalImpersonates system messages to override safety constraints

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

Scanned September 8, 2026

npx -y skills add mattnigh/skills_collection --skill collection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collection?

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

Security grade badge for Collection
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/mattnigh-collection-1f417e66/badge)](https://www.skillsdirectory.com/skills/mattnigh-collection-1f417e66)

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: moai-foundation-specs
version: 4.0.0
updated: 2025-11-20
status: stable
tier: foundation
description: SPEC writing standards with EARS format and TAG traceability
allowed-tools: [Read, Write, WebSearch, WebFetch]
---

# SPEC Writing Expert

**Requirement Specification Standards**

> **Format**: EARS (Easy Approach to Requirements Syntax)  
> **Traceability**: TAG-based (SPEC→TEST→CODE→DOC)

---

## Overview

Standardized approach to writing clear, testable requirements.

### SPEC Components

1.  **Functional Requirements**: What the system does.
2.  **Non-Functional Requirements**: Performance, security, usability.
3.  **Acceptance Criteria**: Testable conditions for completion.
4.  **TAG Assignment**: Unique identifier for traceability.

---

## EARS Format (5 Types)

### 1. Ubiquitous Requirements

Always true, no conditions.

**Template**: The [system] shall [action].

**Example**:

```
The authentication system shall encrypt passwords using bcrypt.
```

### 2. Event-Driven Requirements

Triggered by events.

**Template**: When [trigger], the [system] shall [action].

**Example**:

```
When a user submits login credentials, the system shall validate against the database.
```

### 3. State-Driven Requirements

Depends on system state.

**Template**: While [state], the [system] shall [action].

**Example**:

```
While user is authenticated, the system shall display personalized dashboard.
```

### 4. Optional Requirements

May or may not occur.

**Template**: Where [condition], the [system] shall [action].

**Example**:

```
Where MFA is enabled, the system shall require second factor authentication.
```

### 5. Complex Requirements

Multiple conditions.

**Template**: If [condition], then [action], else [alternative].

**Example**:

```
If password validation fails, then system shall display error message, else proceed to dashboard.
```

---

## SPEC Template

```markdown
# SPEC-001: User Authentication

## Overview

Implement secure user authentication with JWT tokens.

## Functional Requirements

### @AUTH-001: Login Validation

**Type**: Event-Driven
**Requirement**: When user submits credentials, system shall validate email and password format before database lookup.
**Acceptance Criteria**:

- Email format: RFC 5322 compliant
- Password: min 8 characters
- Return validation errors within 100ms

### @AUTH-002: Password Hashing

**Type**: Ubiquitous
**Requirement**: System shall hash passwords using bcrypt with 12 rounds.
**Acceptance Criteria**:

- Bcrypt algorithm (OWASP recommended)
- 12 salt rounds (2025 standard)
- Unique salt per password

## Non-Functional Requirements

### @AUTH-NF-001: Performance

- Login response time: <500ms (p95)
- Concurrent logins: 1000/sec

### @AUTH-NF-002: Security

- OWASP Top 10 compliance
- TLS 1.3 for transmission
- Rate limiting: 5 attempts/min per IP

## TAG Traceability

- SPEC: @AUTH-001, @AUTH-002
- Tests: test_auth.py
- Code: auth/login.py
- Docs: api/authentication.md
```

---

## Best Practices

1.  **One Requirement Per TAG**: Don't combine multiple requirements.
2.  **Testable**: Each requirement must be verifiable.
3.  **Unambiguous**: Use "shall" (mandatory), "should" (recommended), "may" (optional).
4.  **Measurable**: Include quantifiable acceptance criteria.

---

## Validation Checklist

- [ ] **EARS Format**: Correct template used?
- [ ] **TAG Assignment**: Unique @TAG-### assigned?
- [ ] **Testable**: Can be verified with tests?
- [ ] **Complete**: Acceptance criteria defined?
- [ ] **Traceable**: Linked to TEST/CODE/DOC?

---

## Related Skills

- `moai-foundation-ears`: Detailed EARS syntax
- `moai-foundation-tags`: TAG management
- `moai-foundation-trust`: Quality principles

---

**Last Updated**: 2025-11-20

Files in this skill

  • 0Chan-smc__claude-code-workflow-lab__claude__skills__frontend-dev-guidelines__SKILL.md15.1 KB
  • 17hz__nextjs-template__claude__skills__example-skill__SKILL.md316 B
  • 1ambda__dataops-platform__claude__skills__context-synthesis__SKILL.md3.5 KB
  • 1natsu172__dotfiles__claude__skills__git-analysis__SKILL.md5.4 KB
  • 1natsu172__dotfiles__claude__skills__github-pr-best-practices__SKILL.md7.7 KB
  • 23Maestro__prospect-pipeline__claude__skills__npid-fastapi-skill.md26.1 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-javascript__SKILL.md15.7 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-python__SKILL.md17.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-expression-syntax__SKILL.md9.4 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-mcp-tools-expert__SKILL.md12.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-node-configuration__SKILL.md16.6 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-workflow-patterns__SKILL.md11.2 KB
  • 3x-Projetos__claude-memory-framework__claude__skills__scientist__SKILL.md14.8 KB
  • 5MinFutures__futures-arena__claude__skills__migration-tracker__SKILL.md16.2 KB
  • 5MinFutures__futures-arena__claude__skills__planning-guidelines__SKILL.md11.8 KB
  • 92Bilal26__TaskPilotAI__claude__skills__assessment-builder__SKILL.md17.5 KB
  • 92Bilal26__TaskPilotAI__claude__skills__book-scaffolding__SKILL.md19.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__code-validation-sandbox__SKILL.md6.2 KB
  • 92Bilal26__TaskPilotAI__claude__skills__exercise-designer__SKILL.md18.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__learning-objectives__SKILL.md24.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 security →

Comments

Loading comments…

Newsletter

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