add-ui-screen
Skill44 starsChanged 5 months agoApache-2.0View on GitHub
Step-by-step workflow for adding a new screen/page to pulse-ui. Use when creating a new UI screen, page, dashboard view, or route in pulse-ui/.
In this repository20 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- product/CLAUDE.mdCLAUDE.md
- pulse-web-otel/CLAUDE.mdCLAUDE.md
- add-ai-sub-agentSkill
- add-alert-metricSkill
- add-api-endpointSkill
- add-ui-componentSkill
- clickhouse-migrationSkill
- deploy-serviceSkill
- fatal-fiveSkill
- integrate-pulse-web-sdkSkill
- pr-reviewSkill
- pulse-prd-authorSkill
- pulse-prd-reviewSkill
- web-otel-spec-audit-orchestratorSkill
- web-otel-spec-implementation-auditSkill
- web-sdk-e2e-matrixSkill
- web-sdk-instrumentSkill
- web-sdk-shipSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
Create a folder-based hook at pulse-ui/src/hooks/useGetMyData/:
- Distinctive: line 98
Use Mantine components, handle loading/error states:
- Very specific: line 140
Add entry in NAVBAR_ITEMS in Constants.ts with a Tabler icon.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add UI Screen
Workflow
- [ ] Step 1: Create screen folder structure
- [ ] Step 2: Define types/interfaces
- [ ] Step 3: Create React Query hook
- [ ] Step 4: Build the screen component
- [ ] Step 5: Add styles
- [ ] Step 6: Register route
- [ ] Step 7: Add navbar entry (if top-level)
- [ ] Step 8: Verify buildStep 1: Create Folder
pulse-ui/src/screens/MyScreen/
├── MyScreen.tsx
├── MyScreen.interface.ts
├── MyScreen.module.css
├── MyScreen.constants.ts
├── index.ts
└── components/ (if needed)index.ts:
export { MyScreen } from "./MyScreen";Step 2: Define Types
MyScreen.interface.ts:
export interface MyScreenProps {
// props if any
}
export interface MyDataItem {
id: string;
name: string;
// ...
}Step 3: React Query Hook
Create a folder-based hook at pulse-ui/src/hooks/useGetMyData/:
hooks/useGetMyData/
├── index.ts # Barrel export
├── useGetMyData.ts # Hook implementation
└── useGetMyData.interface.ts # Types for this hookuseGetMyData.interface.ts:
export interface MyDataResponse {
items: MyDataItem[];
}useGetMyData.ts:
import { useQuery } from "@tanstack/react-query";
import { makeRequest } from "../../helpers/makeRequest/makeRequest";
import { API_BASE_URL } from "../../constants/Constants";
import { MyDataResponse } from "./useGetMyData.interface";
export function useGetMyData(enabled: boolean) {
return useQuery({
queryKey: ["myData"],
queryFn: () => makeRequest<MyDataResponse>({
url: `${API_BASE_URL}/v1/my-endpoint`,
init: { method: "GET" },
}),
enabled,
refetchOnWindowFocus: false,
});
}index.ts:
export { useGetMyData } from "./useGetMyData";Step 4: Screen Component
Use Mantine components, handle loading/error states:
import { Container, Title, Loader, Alert } from "@mantine/core";
import classes from "./MyScreen.module.css";
import { useGetMyData } from "../../hooks/useGetMyData";
export function MyScreen() {
const { data, isLoading, error } = useGetMyData(true);
if (isLoading) return <Loader />;
if (error) return <Alert color="red">Failed to load data</Alert>;
return (
<Container className={classes.container}>
<Title order={2}>My Screen</Title>
{/* content */}
</Container>
);
}Step 5: Styles
MyScreen.module.css using Mantine CSS variables:
.container {
padding: var(--mantine-spacing-md);
}Step 6: Register Route
In Constants.ts, add to ROUTES:
MY_SCREEN: { basePath: "/my-screen", ... }In App.tsx, add <Route>:
<Route path={ROUTES.MY_SCREEN.basePath} element={<MyScreen />} />Step 7: Navbar (optional)
Add entry in NAVBAR_ITEMS in Constants.ts with a Tabler icon.
Step 8: Verify
cd pulse-ui && yarn buildDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

