extract-constraints

Extract technical constraints (C-*) from ecosystem E(t) - timeouts, API limits, compliance requirements, platform dependencies. Acknowledges given constraints, not design choices. Use to document ecosystem realities that code must work within.

16 stars

Best use case

extract-constraints is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Extract technical constraints (C-*) from ecosystem E(t) - timeouts, API limits, compliance requirements, platform dependencies. Acknowledges given constraints, not design choices. Use to document ecosystem realities that code must work within.

Teams using extract-constraints should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/extract-constraints/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/extract-constraints/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/extract-constraints/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How extract-constraints Compares

Feature / Agentextract-constraintsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Extract technical constraints (C-*) from ecosystem E(t) - timeouts, API limits, compliance requirements, platform dependencies. Acknowledges given constraints, not design choices. Use to document ecosystem realities that code must work within.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# extract-constraints

**Skill Type**: Actuator (Requirements Disambiguation)
**Purpose**: Extract C-* constraints acknowledging ecosystem E(t)
**Prerequisites**: REQ-* requirement exists

---

## Agent Instructions

You are extracting **constraints** (C-*) from the **ecosystem E(t)**.

**Constraints are GIVEN** (external reality), not **CHOSEN** (design decisions).

**Examples**:
- ✅ C-001: Stripe API timeout is 10 seconds (given by Stripe)
- ❌ C-002: We will use PostgreSQL (this is a design choice → ADR)

**Goal**: Acknowledge ecosystem constraints that code must work within.

---

## C-* Categories

### 1. API/Service Constraints

**Timeouts**:
```yaml
C-001: Stripe API timeout
  - Value: 10 seconds (given by Stripe documentation)
  - Source: https://stripe.com/docs/api#timeouts
  - Fallback: Return error to user
  - Monitoring: Alert if approaching timeout (>8s)
```

**Rate limits**:
```yaml
C-010: Stripe API rate limit
  - Limit: 100 requests per second
  - Source: Stripe API documentation
  - Behavior: Implement exponential backoff
  - Error: "Payment service temporarily unavailable"
```

---

### 2. Compliance Constraints

**PCI-DSS**:
```yaml
C-020: PCI-DSS Level 1 compliance
  - Requirement: Never store full credit card numbers
  - Implementation: Tokenize via Stripe
  - Validation: No card numbers in logs or database
  - Audit: Regular PCI scans required
```

**GDPR**:
```yaml
C-030: GDPR data portability
  - Requirement: Users can export their data
  - Format: JSON or CSV
  - Timeline: Within 30 days of request
  - Scope: All personal data
```

---

### 3. Platform Constraints

**Language/runtime**:
```yaml
C-040: Python version
  - Minimum: Python 3.8
  - Reason: Using dataclasses, type hints
  - Source: Project decision (E(t) = team knows Python)
  - Validation: Check at startup
```

**Dependencies**:
```yaml
C-050: bcrypt library
  - Library: bcrypt
  - Version: >=4.0.0
  - Reason: Password hashing (security requirement)
  - Source: Security team standard
```

---

### 4. Performance Constraints

**Response time SLAs**:
```yaml
C-060: Login response time
  - Max time: 500ms (p95)
  - Measurement: End-to-end from request to response
  - Monitoring: Datadog APM
  - Alerting: >400ms warning, >500ms critical
```

**Resource limits**:
```yaml
C-070: Database connection pool
  - Max connections: 20
  - Source: RDS instance limit
  - Behavior: Queue requests if pool exhausted
  - Timeout: 5 seconds wait for connection
```

---

### 5. Security Constraints

**Authentication**:
```yaml
C-080: HTTPS requirement
  - Protocol: All auth requests must be HTTPS
  - Source: Security policy
  - Enforcement: Reject HTTP requests
  - Exception: None (no HTTP fallback)
```

**Session management**:
```yaml
C-090: Session timeout
  - Duration: 30 minutes of inactivity
  - Source: Security team policy
  - Token: JWT with exp claim
  - Storage: Redis with TTL
```

---

## Constraint vs Design Decision

**Constraint (C-*)** - **GIVEN** by ecosystem:
```yaml
✅ C-001: Stripe API timeout is 10 seconds
   Source: Stripe documentation (external reality)
   We MUST work within this constraint

✅ C-002: PCI-DSS prohibits storing card numbers
   Source: Payment Card Industry regulation
   We MUST comply

✅ C-003: Team knows Python, not Java
   Source: Team capabilities (E(t))
   We work within this reality
```

**Design Decision** - **CHOSEN** by us:
```yaml
❌ "We will use PostgreSQL" → This is ADR, not C-*
❌ "We will implement REST API" → This is ADR, not C-*
❌ "We will use MVC pattern" → This is ADR, not C-*
```

**Rule**: If it's a choice between alternatives → **ADR** (Design stage)
If it's a given reality we must work within → **C-*** (Constraint)

---

## Extraction Process

### Step 1: Identify Ecosystem Sources

**Ask**:
1. What external APIs/services are we using? (Stripe, Auth0, AWS)
2. What compliance requirements apply? (PCI-DSS, GDPR, HIPAA)
3. What platform constraints exist? (language version, libraries)
4. What performance SLAs? (response time, uptime)
5. What security policies? (HTTPS, encryption, session timeout)
6. What team constraints? (skills, preferences, existing systems)

---

### Step 2: Document Each Constraint

**Template**:
```yaml
C-{ID}: {Constraint Name}
  - Value/Requirement: {What is constrained}
  - Source: {Where this constraint comes from - API docs, regulation, policy}
  - Ecosystem E(t): {What ecosystem component imposes this}
  - Implementation: {How code must handle this}
  - Validation: {How to verify compliance}
  - Autogenerate: {Yes/No}
```

---

## Output Format

```
[EXTRACT CONSTRAINTS - <REQ-ID>]

Requirement: User login

Constraints Extracted:

API/Service Constraints (2):
  ✓ C-001: Database query timeout (100ms, RDS limit)
  ✓ C-002: Session storage (Redis, existing infrastructure)

Compliance Constraints (2):
  ✓ C-003: HTTPS required (security policy)
  ✓ C-004: Password hashing (bcrypt, security standard)

Performance Constraints (1):
  ✓ C-005: Login response time (<500ms, SLA requirement)

Total: 5 constraints

Ecosystem E(t) Acknowledged:
  - External: RDS connection limits, Redis infrastructure
  - Compliance: Security policies (HTTPS, bcrypt)
  - Performance: SLA requirements

Updated: docs/requirements/authentication.md
  Added: Constraints section with 5 C-*

✅ Constraint Extraction Complete!
```

---

## Notes

**Why extract constraints?**
- **Acknowledge ecosystem E(t)**: Document external realities
- **Design context**: Constraints inform ADRs (architecture decisions)
- **Code generation**: Some constraints can be autogenerated (timeout checks)
- **Compliance**: Document regulatory requirements

**Homeostasis Goal**:
```yaml
desired_state:
  all_ecosystem_constraints_documented: true
  constraints_vs_choices_clear: true
```

**"Excellence or nothing"** 🔥

Related Skills

extracting-learned-skills

16
from diegosouzapw/awesome-omni-skill

Extracts reusable skills and decision-making heuristics from debugging sessions. Use after solving tricky bugs, discovering non-obvious workarounds, or finding hidden gotchas specific to a codebase. Triggers include "save this as a skill", "learn from this", or after significant debugging effort.

extract-openapi-from-code

16
from diegosouzapw/awesome-omni-skill

Use when extracting or generating an OpenAPI spec from existing API code. Triggers on "extract OpenAPI", "code first", "generate spec from code", "FastAPI OpenAPI", "Spring Boot OpenAPI", "NestJS swagger", "Django OpenAPI", "Flask OpenAPI", "Rails swagger", "Laravel OpenAPI", "existing API code"

competitive-ads-extractor

16
from diegosouzapw/awesome-omni-skill

Extracts and analyzes competitors' ads from ad libraries (Facebook, LinkedIn, etc.) to understand what messaging, problems, and creative approaches are working. Helps inspire and improve your own ad campaigns.

charles-proxy-extract

16
from diegosouzapw/awesome-omni-skill

Extracts HTTP/HTTPS request and response data from Charles Proxy session files (.chlsj format), including URLs, methods, status codes, headers, request bodies, and response bodies. Use when analyzing captured network traffic from Charles Proxy debug sessions, inspecting API calls, debugging HTTP requests, or examining proxy logs.

pattern-extraction

16
from diegosouzapw/awesome-omni-skill

Extract design systems, architecture patterns, and methodology from codebases into reusable skills and documentation. Use when analyzing a project to capture patterns, creating skills from existing code, extracting design tokens, or documenting how a project was built. Triggers on "extract patterns", "extract from this repo", "analyze this codebase", "create skills from this project", "extract design system".

antiquities-extractor

16
from diegosouzapw/awesome-omni-skill

Extract and structure data from documents about the illegal antiquities trade, including dealers, collectors, artifacts, locations, and relationships. Use when processing news reports, academic articles, legal documents, encyclopedia entries, or research materials pertaining to looted artifacts, antiquities trafficking, provenance research, or cultural heritage crimes. Returns structured JSON with entities (persons, organizations, artifacts, locations) and their relationships.

resume-extractor

16
from diegosouzapw/awesome-omni-skill

Extract and categorize yearly career data into structured components (what_i_did, my_thoughts, performance). Use when processing raw yearly markdown files into organized sections.

extracting-ai-context

16
from diegosouzapw/awesome-omni-skill

Extracts and manages AI context (skills, AGENTS.md) from workflow-kotlin library JARs. Use when setting up AI tooling for a workflow-kotlin project, updating skills after a library version change, or configuring agent-specific directories.

extracta-ai-automation

16
from diegosouzapw/awesome-omni-skill

Automate Extracta AI tasks via Rube MCP (Composio). Always search tools first for current schemas.

email-extractor

16
from diegosouzapw/awesome-omni-skill

Expert in email content extraction and analysis. **Use whenever the user mentions .eml files, email messages, says "Extract email information", "Using the email information", or requests to extract, parse, analyze, or process email files.** Handles email thread parsing, attachment extraction, and converting emails to structured markdown format for AI processing. (project, gitignored)

arxiv-paper-extract

16
from diegosouzapw/awesome-omni-skill

Extract, translate and save arXiv CS.CV papers for a specific date. Use when user asks to fetch arXiv papers, download paper lists, extract CV papers, translate paper titles to Chinese, or save paper metadata from arxiv.org/list/cs.CV.

extract-page

16
from diegosouzapw/awesome-omni-skill

Extract a single page from a PDF as a PNG image for quick preview.