# Firestore. Inside build().

> Copilot writes the common Flutter shape, not yours.

- **Format:** short video, 9 steps, ~51 seconds
- **Topic:** Building a GitHub Copilot Skill for Flutter — why Copilot calls Firestore inside build() with state in setState, and how one SKILL.md makes it produce a repository, a use case, a Cubit and a bloc_test instead.
- **Author:** Suthahar Jegatheesan (MSDEVBUILD)
- **Category:** GitHub Copilot · copilot
- **Published:** 2026-02-14
- **Tags:** githubcopilot, flutter, firebase, firestore, bloc, cleanarchitecture, aicoding, msdevbuild
- **Canonical URL:** https://blog.msdevbuild.com/shorts/copilot-skill-flutter-firestore-build/

---
## What you'll learn

- Why Copilot calls Firestore inside a Flutter build() method
- Why a Skill description is its activation trigger
- How a Skill produces a repository, a Cubit and a bloc_test

## Understand it one step at a time

### 1. Add a query

A developer asks Copilot for an orders screen backed by Firestore. No Skill yet.

### 2. All in one widget

Firestore inside build(), orders in setState, no repository and no test.

### 3. Explained, then forgotten

The tech lead explained the method in chat two weeks ago. The chat is gone.

### 4. Write a SKILL.md

One folder under .github/skills with the method in it: flutter-feature.

### 5. The description is the trigger

Copilot reads only the description until it matches. A vague one never fires.

### 6. Rules, workflow, checklist

Flat rules, numbered steps, real examples, and a checklist that decides when it is done.

### 7. Same prompt, again

"add screen" and "Firestore" match. The Skill loads and Copilot follows it.

### 8. Checklist passes

Every check ticked. The Firestore-in-features grep stays at zero.

### 9. Write the method once

A trigger-rich description, flat rules, a workflow, real examples and a checklist.

---

## The takeaway

**Write the method once. Copilot loads it when it matches.**

The description is the trigger; the checklist decides when the feature is done.
