# Sketch Assistant Rules Explained 📐

{% hint style="success" %}
Download our [Sketch assistant](https://www.sketch.com/extensions/assistants/@sketch2react/sketch2react-assistant/)
{% endhint %}

## Document must contain one artboard named “Start” on a page named “Start here”

![](/files/-MIslTSvghg6A-9CTEL3)

Behind the scenes this artboard actually becomes your **very first page in code**, aka index.html 🤖💪

## Document must contain one page named “Start here”

![](/files/-MIslaJUS8XVTw63jrSu)

We call this the **code page**. You can have several pages in your Sketch file but only the things that are on this super important page comes out to code in Sketch2React. ✅

## Group name may contain zero or one pair of square brackets

![In this example we added a margin top of 16px to this text block ](/files/-MIt050TPNLOsRUGpHLX)

**Square brackets** **\[ ]** are used for adding CSS rules to specific parts of your design. Read more about them [here](https://app.gitbook.com/@sketch2react/s/sketch2react-io/learn/cheat-sheet#classes).

## Group name must contain one pair of curly brackets

![](/files/-MIxzfL1U7JgHrslJcAe)

**Curly brackets** **{ }** are used within the Sketch2React framework to define component name i.e. **{container}**. Incorrect number of square brackets will cause parsing errors.

## Text name must contain one pair of curly brackets

![Here we have created a {text} component and saved it as a symbol aka reusable component](/files/-MIy-nAO06ttYfsizrnF)

**Curly brackets** **{ }** are used within the Sketch2React framework to define component name i.e. **{text}**. One neat trick is that if you convert your Sketch2React components to symbols, you don't need to follow our naming convention for the parent, in above case we have called the symbol **H1**.

## Text name may contain zero or one pair of square brackets

![Here we use the CSS class for using view height 100% for a nice flex layout of the whole container](/files/-MIy1Qkc4ZYXablZH24q)

Square brackets are used within the Sketch2React framework to define css-classes i.e. \[css-class-name1 css-class-name2].

## Artboards must contain at least one text layer named {externalasset.css}

![](/files/-MIy2loaip_EnqumSGK-)

**{externalasset.css}** is used within the Sketch2React framework to target external CSS assets (fonts, local CSS-files, animation libraries etc.) that should be included in the generated output. Make sure to copy them to all your pages where you have external dependencies.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sketch2react.gitbook.io/sketch2react-io/learn/sketch2react-core-assistant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
