Back to Documentation & Writing

frontend-to-backend-requirements

api requirementsfrontend developmentbackend developmentdeveloper communicationdata documentationworkflow automationproject planningfull-stack
2.0k📄 MIT🕒 2026-03-05Source ↗

Install this skill

npx skills add softaworks/agent-toolkit

Works across Claude Code, Cursor, Codex, Copilot & Antigravity

The frontend-to-backend-requirements skill streamlines the communication gap between UI development and server-side logic. Instead of a developer guessing API structures or making premature decisions about database schemas, this tool forces a focus on functional needs. You document user goals, data visibility, and interaction states, leaving technical implementation to the backend team. The skill automates the creation of a structured markdown file at a specific path, ensuring all requirements remain consistent and visible within the repository. By explicitly framing requests as functional needs rather than implementation dictates, this process minimizes friction during code reviews and backend integration. It treats the backend as a collaborative partner, allowing for technical pushback while maintaining clarity on what the user interface must support.

When to Use This Skill

  • Documenting data needs for a new dashboard widget
  • Defining interaction requirements for a complex search form
  • Clarifying UI state expectations for an asynchronous data fetch
  • Listing permissions and rules for user-facing features

How to Invoke This Skill

Example prompts that trigger this skill in Claude Code, Cursor, or Antigravity:

  • Help me document the backend requirements for this feature
  • Draft a backend requirement file for the new login flow
  • Create a requirements doc for the user profile screen
  • What data do I need from the backend for this component?
  • Generate a spec for my frontend data needs

Pro Tips

  • 💡Before generating the requirements, ensure you have a clear understanding of the UI's functionality, user interactions, and business rules to provide the most comprehensive input.
  • 💡Use real-world user stories or scenarios when describing actions and data needs to give backend developers context and help them understand the 'why'.
  • 💡Leverage the 'What Backend Owns' table as a mental checklist to ensure you're not overstepping into implementation details, maintaining a clear separation of concerns.

What this skill does

  • Generates standardized requirement files in .claude/docs/ai/
  • Separates business intent from technical implementation
  • Forces documentation of loading, error, and empty states
  • Provides a template for surfacing logic uncertainties
  • Standardizes communication through a clear 'Needs vs. Implementation' format

When not to use it

  • When you need to define specific API endpoint paths or HTTP methods
  • When you are working alone on a project with no separate backend concerns
  • When you have already finalized the data schema with the server team

Example workflow

  1. Define the feature purpose and target user context
  2. List individual components required for the feature
  3. Specify necessary data points and user actions for each screen
  4. Document expected empty, error, and loading states
  5. Note any logical uncertainties or business rule questions
  6. Save the finalized requirements into the project's documentation directory

Prerequisites

  • A clear understanding of the UI component's intended function
  • Access to the repository's root directory for file generation

Pitfalls & limitations

  • !Accidentally slipping into technical prescriptions like endpoint names
  • !Failing to update the requirements file when logic changes
  • !Ignoring the 'Uncertainties' section, which leads to backend assumptions

FAQ

Should I define the JSON schema in the requirements?
No. Describing the schema is an implementation detail that belongs to the backend. Focus only on the data your component needs to display.
Where are the files generated?
The tool saves files to the .claude/docs/ai/<feature-name>/ directory to ensure documentation stays close to the relevant project features.
Can I suggest an API endpoint if I know how the backend works?
It is discouraged. Even if you know the system, stating the 'what' instead of the 'how' prevents coupling and encourages the backend team to suggest the most optimal technical approach.
What happens if the backend team disagrees with my requirements?
That is encouraged. The file includes a section for discussion, where you can log responses and decisions to keep the documentation current.

How it compares

Generic prompts often result in loose, disorganized notes that lack technical structure; this skill enforces a specific, professional format that serves as an active contract between frontend and backend.

Source & trust

2.0k stars📄 MIT🕒 Updated 2026-03-05
📄 Full skill instructions — original source: softaworks/agent-toolkit
# 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.

How to Use This Skill Unit

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/skills/frontend-to-backend-requirements/
  3. Save the file as SKILL.md
  4. The agent will automatically discover the skill based on its description.

Option B: Global Installation (All Agents)

Save the file to these locations to make it available across all projects:

  • Claude Code: ~/.claude/skills/softaworks/agent-toolkit/frontend-to-backend-requirements/SKILL.md
  • Cursor: ~/.cursor/skills/softaworks/agent-toolkit/frontend-to-backend-requirements/SKILL.md
  • Antigravity: ~/.gemini/antigravity/skills/softaworks/agent-toolkit/frontend-to-backend-requirements/SKILL.md

🚀 Install with CLI:
npx skills add softaworks/agent-toolkit

Read the Master Guide: Mastering Agent Skills

Recommended Rules

View more rules

Recommended Workflows

View more workflows

Recommended MCP Servers

View more MCP servers

Take It Further

Maximize your productivity with these powerful resources

📋

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
📖

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide

How to use this Skill in Claude Code & Cursor

For Claude Code (CLI)

To use this skill in Claude Code, copy the rule content into your project's custom instructions or follow our Add-Skill CLI guide. This ensures Claude follows your standards during every code generation.

For Cursor & Windsurf

For Cursor or Windsurf, individual skills are best used in the "Rules for AI" section. This specific unit helps the agent avoid documentation & writing issues, leading to cleaner, more efficient code.

Why the skill format matters: the standardized Agent Skills format lets your AI agent load detailed instructions only when they are relevant, keeping your prompt clean while improving results.

Source & attribution

This skill is categorized under Documentation & Writing and is published by Softaworks, maintained in softaworks/agent-toolkit.

← Browse All Agent Skills
Sponsored AI assistant. Recommendations may be paid.