Use when creating technical specifications for features, systems, or architectural designs. Creates comprehensive specification documents using the Wrangler MCP issue management system with proper structure and completeness checks.
Creates comprehensive technical specifications for features, systems, or architectural designs using the Wrangler MCP system. Triggers when you need to define how something should work technically, design architecture, specify APIs, or plan complex features requiring coordination.
/plugin marketplace add samjhecht/wrangler/plugin install wrangler@samjhecht-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference.mdtemplates/SPECIFICATION_TEMPLATE.mdYou are a specialist at creating comprehensive technical specifications that serve as the authoritative source of truth for implementation. Your job is to gather all necessary information, resolve ambiguities, and produce complete, implementable specifications.
MANDATORY: When using this skill, announce it at the start with:
š§ Using Skill: writing-specifications | [brief purpose based on context]
Example:
š§ Using Skill: writing-specifications | [Provide context-specific example of what you're doing]
This creates an audit trail showing which skills were applied during the session.
type: "specification" to create the specificationExplore the project context to understand the broader scope in which the specification fits. Explore what already exists in the project that the code created from the spec will be integrated.
Before writing the spec, clarify:
Use AskUserQuestion tool to resolve:
Full Technical Specification (use SPECIFICATION_TEMPLATE.md structure):
Lightweight Specification:
Use the template structure from SPECIFICATION_TEMPLATE.md as your guide. Key sections:
Always include:
Include when relevant:
Omit when not applicable:
Call issues_create with type: "specification":
issues_create({
title: "Clear specification title - what's being specified",
description: `# Specification: [Feature/Component Name]
## Executive Summary
[Comprehensive description following template structure...]
## Goals and Non-Goals
[...]
## Requirements
[...]
[Continue with all relevant sections from template]
`,
type: "specification",
status: "open", // or "draft" if org uses different statuses
priority: "high" | "medium" | "low" | "critical",
labels: ["specification", "design", ...other relevant labels],
assignee: "specification-owner",
project: "project-name",
wranglerContext: {
agentId: "spec-writer",
parentTaskId: "parent-initiative-id",
estimatedEffort: "estimation for implementation"
}
})
Before creating, verify:
Reference the full template structure: SPECIFICATION_TEMPLATE.md
Key sections overview:
Use Specification when:
Use Feature Request when:
Use Task/Issue when:
Step 1: Gather information
Ask clarifying questions:
Step 2: Choose depth
This is a major feature ā Use full specification template
Step 3: Structure content
issues_create({
title: "Authentication System Specification",
description: `# Specification: Authentication System
## Executive Summary
**What:** JWT-based authentication system supporting email/password login, OAuth (Google, GitHub), and multi-factor authentication.
**Why:** Users need secure access to the platform with modern authentication options and strong security guarantees.
**Scope:**
- Included: User registration, login, logout, password reset, OAuth integration, MFA (TOTP), session management
- Excluded: Single Sign-On (SSO) for enterprise, biometric authentication, passwordless authentication
**Status:** Draft
## Goals and Non-Goals
### Goals
- Secure user authentication with industry best practices
- Support multiple authentication methods (password, OAuth)
- Enable optional MFA for enhanced security
- Provide seamless user experience
- Maintain audit trail for security events
### Non-Goals
- Enterprise SSO integration (future phase)
- Biometric authentication (out of scope)
- Social login beyond Google and GitHub (can add later)
## Requirements
### Functional Requirements
- **FR-001:** System MUST allow users to register with email and password
- **FR-002:** System MUST validate email addresses and enforce password strength requirements
- **FR-003:** System MUST support OAuth 2.0 login via Google and GitHub
- **FR-004:** System MUST issue JWT tokens with 1-hour expiration
- **FR-005:** System MUST support refresh tokens with 30-day expiration
- **FR-006:** System MUST allow users to enable TOTP-based MFA
- **FR-007:** System MUST provide password reset via email
- **FR-008:** System MUST log all authentication events for audit
### Non-Functional Requirements
- **Performance:** Login requests MUST complete within 500ms (p95)
- **Security:** Passwords MUST be hashed with bcrypt (cost factor 12)
- **Security:** All auth endpoints MUST use HTTPS
- **Security:** Rate limiting MUST prevent brute force (max 5 login attempts per 15 minutes per IP)
- **Reliability:** Auth service MUST have 99.9% uptime
- **Compliance:** MUST comply with GDPR for user data handling
### User Experience Requirements
- **Accessibility:** Login forms MUST meet WCAG 2.1 AA standards
- **Responsiveness:** Auth UI MUST work on mobile, tablet, desktop
- **Usability:** Password reset MUST complete in under 3 clicks
## Architecture
### High-Level Architecture
\`\`\`
āāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāā
ā Client āāāāāāāāāāā Auth API āāāāāāāāāāā Database ā
ā (Browser) āāāāāāāāāāā (Node.js) āāāāāāāāāāā (Postgres) ā
āāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāā
ā
āāāāāāāā“āāāāāāāā
ā ā
āāāāāāā¼āāāāāā āāāāāā¼āāāāāāā
ā OAuth ā ā Email ā
ā Providers ā ā Service ā
āāāāāāāāāāāāā āāāāāāāāāāāāā
\`\`\`
### Components
#### Component 1: Auth API
**Responsibility:** Handle authentication requests, issue/validate tokens
**Interfaces:**
- Input: HTTP requests (POST /auth/register, POST /auth/login, etc.)
- Output: JWT tokens, user session data, error responses
**Dependencies:**
- Database for user storage
- Email service for verification/password reset
- OAuth providers for social login
**Key behaviors:**
- Validate credentials
- Issue JWT and refresh tokens
- Enforce rate limiting
- Log security events
[... continue with more sections following template ...]
## Security Considerations
### Authentication & Authorization
- Password authentication uses bcrypt (cost factor 12)
- JWTs signed with RS256 (public/private key pair)
- Refresh tokens stored in database with one-time use constraint
- MFA uses TOTP (RFC 6238) with 30-second time window
### Data Protection
- Passwords: bcrypt hashed, never stored in plaintext
- Tokens: JWTs with short expiration, refresh tokens in database only
- PII: Email addresses encrypted at rest (AES-256)
- Session data: HTTPOnly, Secure, SameSite cookies
[... continue with all relevant sections ...]
## Success Criteria
### Launch Criteria
- [ ] All functional requirements implemented
- [ ] Security audit passed
- [ ] Load testing shows p95 < 500ms at 1000 req/s
- [ ] Test coverage > 90%
- [ ] Documentation complete
### Success Metrics (Post-Launch)
- User adoption: 80% of users successfully authenticate within first 7 days
- Error rate: < 0.1% authentication failures (excluding invalid credentials)
- Performance: p95 latency < 500ms maintained for 30 days
- Security: Zero successful unauthorized access attempts
## References
### Related Specifications
- User Management System Specification
- Session Management Specification
### External Resources
- OAuth 2.0 RFC: https://tools.ietf.org/html/rfc6749
- TOTP RFC: https://tools.ietf.org/html/rfc6238
- JWT RFC: https://tools.ietf.org/html/rfc7519
`,
type: "specification",
status: "open",
priority: "high",
labels: ["specification", "auth", "security", "design"],
assignee: "auth-team-lead",
project: "User Platform v2",
wranglerContext: {
agentId: "spec-writer-agent",
estimatedEffort: "6 weeks implementation",
},
});
ā Avoid:
ā Instead:
After creating the specification, validate:
issues_create, don't manually create filesspecifications/ directoryissues_update to revise specifications as decisions are madewranglerContext.parentTaskIdMaster authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.