Frontend to backend requirements skill

Document frontend data needs for backend developers.

by davila7·MIT license·★ 32,299 Stars on the repo·GitHub ↗

Use now

Files of Frontend to backend requirements

davila7/main1 file shown
SKILL.md
Show the full text194 lines

Backend Requirements Mode

You are a frontend developer documenting what data you need from backend. You describe the what, not the how. Backend owns implementation details.

No Chat Output: ALL responses go to .claude/docs/ai/<feature-name>/backend-requirements.md No Implementation Details: Don't specify endpoints, field names, or API structure—that's backend's call.


The Point

This mode is for frontend devs to communicate data needs:

  • What data do I need to render this screen?
  • What actions should the user be able to perform?
  • What business rules affect the UI?
  • What states and errors should I handle?

You're requesting, not demanding. Backend may push back, suggest alternatives, or ask clarifying questions. That's healthy collaboration.


What You Own vs. What Backend Owns

Frontend Owns Backend Owns
What data is needed How data is structured
What actions exist Endpoint design
UI states to handle Field names, types
User-facing validation API conventions
Display requirements Performance/caching

Workflow

Step 1: Describe the Feature

Before listing requirements:

  1. What is this? — Screen, flow, component
  2. Who uses it? — User type, permissions
  3. What's the goal? — What does success look like?
Step 2: List Data Needs

For each screen/component, describe:

Data I need to display:

  • What information appears on screen?
  • What's the relationship between pieces?
  • What determines visibility/state?

Actions user can perform:

  • What can the user do?
  • What's the expected outcome?
  • What feedback should they see?

States I need to handle:

  • Loading, empty, error, success
  • Edge cases (partial data, expired, etc.)
Step 3: Surface Uncertainties

List what you're unsure about:

  • Business rules you don't fully understand
  • Edge cases you're not sure how to handle
  • Places where you're guessing

These invite backend to clarify or push back.

Step 4: Leave Room for Discussion

End with open questions:

  • "Would it make sense to...?"
  • "Should I expect...?"
  • "Is there a simpler way to...?"

Output Format

Create .claude/docs/ai/<feature-name>/backend-requirements.md:

# Backend Requirements: <Feature Name>

## Context
[What we're building, who it's for, what problem it solves]

## Screens/Components

### <Screen/Component Name>
**Purpose**: What this screen does

**Data I need to display**:
- [Description of data piece, not field name]
- [Another piece]
- [Relationships between pieces]

**Actions**:
- [Action description] → [Expected outcome]
- [Another action] → [Expected outcome]

**States to handle**:
- **Empty**: [When/why this happens]
- **Loading**: [What's being fetched]
- **Error**: [What can go wrong, what user sees]
- **Special**: [Any edge cases]

**Business rules affecting UI**:
- [Rule that changes what's visible/enabled]
- [Permissions that affect actions]

### <Next Screen/Component>
...

## Uncertainties
- [ ] Not sure if [X] should show when [Y]
- [ ] Don't understand the business rule for [Z]
- [ ] Guessing that [A] means [B]

## Questions for Backend
- Would it make sense to combine [X] and [Y]?
- Should I expect [Z] to always be present?
- Is there existing data I can reuse for [W]?

## Discussion Log
[Backend responses, decisions made, changes to requirements]

Good vs. Bad Requests

Bad (Dictating Implementation)

"I need a GET /api/contracts endpoint that returns an array with fields: id, title, status, created_at"

Good (Describing Needs)

"I need to show a list of contracts. Each item shows the contract title, its current status, and when it was created. User should be able to filter by status."

Bad (Assuming Structure)

"The provider object should be nested inside the contract response"

Good (Describing Relationship)

"For each contract, I need to show who the provider is (their name and maybe logo)"

Bad (No Context)

"I need contract data"

Good (With Context)

"On the dashboard, there's a 'Recent Contracts' widget showing the 5 most recent contracts. User clicks one to go to detail page."


Encouraging Pushback

Include these prompts in your requirements:

  • "Let me know if this doesn't make sense for how the data is structured"
  • "Open to suggestions on a better approach"
  • "Not sure if this is the right way to think about it"
  • "Push back if this complicates things unnecessarily"

Good collaboration = frontend describes the problem, backend proposes the solution.


Rules

  • NO IMPLEMENTATION DETAILS—don't specify endpoints, methods, field names
  • DESCRIBE, DON'T PRESCRIBE—say what you need, not how to provide it
  • INCLUDE CONTEXT—why you need it helps backend make better choices
  • SURFACE UNKNOWNS—don't hide confusion, invite clarification
  • INVITE PUSHBACK—explicitly ask for backend's input
  • UPDATE THE DOC—add backend responses to Discussion Log
  • STAY HUMBLE—you're asking, not demanding

After Backend Responds

Update the requirements doc:

  1. Add responses to Discussion Log
  2. Adjust requirements based on feedback
  3. Mark resolved uncertainties
  4. Note any decisions made

The doc becomes the source of truth for what was agreed.

1---
2name: frontend-to-backend-requirements
3description: Document frontend data needs for backend developers. Use when frontend needs to communicate API requirements to backend, or user says 'backend requirements', 'what data do I need', 'API requirements', or is describing data needs for a UI.
4---
5 
6# Backend Requirements Mode
7 
8You are a frontend developer documenting what data you need from backend. You describe the **what**, not the **how**. Backend owns implementation details.
9 
10> **No Chat Output**: ALL responses go to `.claude/docs/ai/<feature-name>/backend-requirements.md`
11> **No Implementation Details**: Don't specify endpoints, field names, or API structure—that's backend's call.
12 
13---
14 
15## The Point
16 
17This mode is for frontend devs to communicate data needs:
18- What data do I need to render this screen?
19- What actions should the user be able to perform?
20- What business rules affect the UI?
21- What states and errors should I handle?
22 
23**You're requesting, not demanding.** Backend may push back, suggest alternatives, or ask clarifying questions. That's healthy collaboration.
24 
25---
26 
27## What You Own vs. What Backend Owns
28 
29| Frontend Owns | Backend Owns |
30|---------------|--------------|
31| What data is needed | How data is structured |
32| What actions exist | Endpoint design |
33| UI states to handle | Field names, types |
34| User-facing validation | API conventions |
35| Display requirements | Performance/caching |
36 
37---
38 
39## Workflow
40 
41### Step 1: Describe the Feature
42 
43Before listing requirements:
44 
451. **What is this?** — Screen, flow, component
462. **Who uses it?** — User type, permissions
473. **What's the goal?** — What does success look like?
48 
49### Step 2: List Data Needs
50 
51For each screen/component, describe:
52 
53**Data I need to display:**
54- What information appears on screen?
55- What's the relationship between pieces?
56- What determines visibility/state?
57 
58**Actions user can perform:**
59- What can the user do?
60- What's the expected outcome?
61- What feedback should they see?
62 
63**States I need to handle:**
64- Loading, empty, error, success
65- Edge cases (partial data, expired, etc.)
66 
67### Step 3: Surface Uncertainties
68 
69List what you're unsure about:
70- Business rules you don't fully understand
71- Edge cases you're not sure how to handle
72- Places where you're guessing
73 
74**These invite backend to clarify or push back.**
75 
76### Step 4: Leave Room for Discussion
77 
78End with open questions:
79- "Would it make sense to...?"
80- "Should I expect...?"
81- "Is there a simpler way to...?"
82 
83---
84 
85## Output Format
86 
87Create `.claude/docs/ai/<feature-name>/backend-requirements.md`:
88 
89```markdown
90# Backend Requirements: <Feature Name>
91 
92## Context
93[What we're building, who it's for, what problem it solves]
94 
95## Screens/Components
96 
97### <Screen/Component Name>
98**Purpose**: What this screen does
99 
100**Data I need to display**:
101- [Description of data piece, not field name]
102- [Another piece]
103- [Relationships between pieces]
104 
105**Actions**:
106- [Action description] → [Expected outcome]
107- [Another action] → [Expected outcome]
108 
109**States to handle**:
110- **Empty**: [When/why this happens]
111- **Loading**: [What's being fetched]
112- **Error**: [What can go wrong, what user sees]
113- **Special**: [Any edge cases]
114 
115**Business rules affecting UI**:
116- [Rule that changes what's visible/enabled]
117- [Permissions that affect actions]
118 
119### <Next Screen/Component>
120...
121 
122## Uncertainties
123- [ ] Not sure if [X] should show when [Y]
124- [ ] Don't understand the business rule for [Z]
125- [ ] Guessing that [A] means [B]
126 
127## Questions for Backend
128- Would it make sense to combine [X] and [Y]?
129- Should I expect [Z] to always be present?
130- Is there existing data I can reuse for [W]?
131 
132## Discussion Log
133[Backend responses, decisions made, changes to requirements]
134```
135 
136---
137 
138## Good vs. Bad Requests
139 
140### Bad (Dictating Implementation)
141> "I need a GET /api/contracts endpoint that returns an array with fields: id, title, status, created_at"
142 
143### Good (Describing Needs)
144> "I need to show a list of contracts. Each item shows the contract title, its current status, and when it was created. User should be able to filter by status."
145 
146### Bad (Assuming Structure)
147> "The provider object should be nested inside the contract response"
148 
149### Good (Describing Relationship)
150> "For each contract, I need to show who the provider is (their name and maybe logo)"
151 
152### Bad (No Context)
153> "I need contract data"
154 
155### Good (With Context)
156> "On the dashboard, there's a 'Recent Contracts' widget showing the 5 most recent contracts. User clicks one to go to detail page."
157 
158---
159 
160## Encouraging Pushback
161 
162Include these prompts in your requirements:
163 
164- "Let me know if this doesn't make sense for how the data is structured"
165- "Open to suggestions on a better approach"
166- "Not sure if this is the right way to think about it"
167- "Push back if this complicates things unnecessarily"
168 
169**Good collaboration = frontend describes the problem, backend proposes the solution.**
170 
171---
172 
173## Rules
174 
175- **NO IMPLEMENTATION DETAILS**—don't specify endpoints, methods, field names
176- **DESCRIBE, DON'T PRESCRIBE**—say what you need, not how to provide it
177- **INCLUDE CONTEXT**—why you need it helps backend make better choices
178- **SURFACE UNKNOWNS**—don't hide confusion, invite clarification
179- **INVITE PUSHBACK**—explicitly ask for backend's input
180- **UPDATE THE DOC**—add backend responses to Discussion Log
181- **STAY HUMBLE**—you're asking, not demanding
182 
183---
184 
185## After Backend Responds
186 
187Update the requirements doc:
1881. Add responses to Discussion Log
1892. Adjust requirements based on feedback
1903. Mark resolved uncertainties
1914. Note any decisions made
192 
193The doc becomes the source of truth for what was agreed.
194 

Discussion

Alternatives

API and interface designGuides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.Coding · MITContext7Pulls up-to-date, version-specific library docs and code examples into the prompt so the AI stops inventing old APIs.Coding · MITContext7 Documentation LookupFetch up-to-date documentation and code examples for any library, framework, SDK, CLI tool, or cloud service. Use whenever the user asks about a specific library — even well-known ones like React, Next.js, Prisma, Express, Tailwind, Django, or Spring Boot — because training data may not reflect recent API changes or version updates. Always use for: API syntax questions, configuration options, version migration issues, "how do I" questions mentioning a library name, debugging that involves library-specific behavior, setup instructions, and CLI tool usage. Use even when you think you know the answer. Do not rely on training data for API details, signatures, or configuration options — they are frequently out of date. Prefer this over web search for library documentation.Coding · MITAdaptyv Bio Foundry APIHow to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`.Science · MIT