add-dashboard-category
Skill24 starsChanged 5 days agoApache-2.0View on GitHub
Add a new top-level dashboard category with database mapping, tests page, and empty dashboard
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-dashboard-pageSkill
- clickhouse-updateSkill
- review-ij-perfSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 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.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Add a new top-level dashboard category called $0 with database $1 and table $2.
- Very specific: line 11
All changes go in dashboard/new-dashboard/src/routes.ts plus one new Vue component.
- Very specific: line 40
Before export const PRODUCTS, add the Product object.
- Very specific: line 62
Before export function getNewDashboardRoutes(), add the routes array.
- Very specific: line 86
Add ...myCategoryRoutes to the children array inside getNewDashboardRoutes(), before the ReportDegradations route entry.
- Very specific: line 90
Create a new file at dashboard/new-dashboard/src/components/<componentDir>/PerformanceDashboard.vue:
- Very specific: line 118
Use existing constants like DASHBOARD_LABEL, TESTS_LABEL, TEST_ROUTE, DASHBOARD_ROUTE, and MACHINES.HETZNER / MACHINES.AWS_LINUX
- Very specific: line 119
Only drop to a raw object literal with satisfies TypedRouteRecord<...> for special cases the helpers don't cover (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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 a new top-level dashboard category called $0 with database $1 and table $2.
Steps
All changes go in dashboard/new-dashboard/src/routes.ts plus one new Vue component.
1. Add route prefix
In the ROUTE_PREFIX enum, add a new entry. Use PascalCase for the key and a lowercase URL path derived from the category name.
Example:
enum ROUTE_PREFIX {
// ... existing entries
MyCategory = "/myCategory",
}2. Add route enum entries
In the ROUTES enum, add entries for Tests and Dashboard:
enum ROUTES {
// ... existing entries
MyCategoryTests = `${ROUTE_PREFIX.MyCategory}/${TEST_ROUTE}`,
MyCategoryDashboard = `${ROUTE_PREFIX.MyCategory}/${DASHBOARD_ROUTE}`,
}3. Add Product definition
Before export const PRODUCTS, add the Product object. Tabs are built with the tab(url, label) helper:
const MY_CATEGORY: Product = {
url: ROUTE_PREFIX.MyCategory,
label: "My Category",
children: [
{
url: ROUTE_PREFIX.MyCategory,
label: "",
tabs: [tab(ROUTES.MyCategoryDashboard, DASHBOARD_LABEL), tab(ROUTES.MyCategoryTests, TESTS_LABEL)],
},
],
}4. Add to PRODUCTS array
Insert the new product in alphabetical order within the PRODUCTS array.
5. Add route handlers
Before export function getNewDashboardRoutes(), add the routes array. Use the route-builder helpers rather than raw object literals:
const myCategoryRoutes = [
perfTests(
ROUTES.MyCategoryTests,
{ dbName: "<the dbName argument>", table: "<the table argument>", initialMachine: MACHINES.HETZNER, withInstaller: false },
"My Category Performance tests"
),
dashboard(ROUTES.MyCategoryDashboard, () => import("./components/myCategory/PerformanceDashboard.vue"), "My Category Dashboard"),
]The route-builder helpers (defined near the top of routes.ts):
perfTests(path, props: PerformanceTestsProps, pageTitle)— a Performance-tests page using the sharedPerformanceTests.vue. Thesatisfies TypedRouteRecord<PerformanceTestsProps>annotation lives inside the helper, so you don't write it here.dashboard(path, component, pageTitle, props?)— a dashboard page;componentis a lazy() => import(...),propsis an optional static-props record.startupDashboard(path, { table, defaultProject? }, pageTitle)— a startup-metrics dashboard.compareBuilds(path, { dbName, table }, pageTitle?),compareBranches(path, { dbName, table, metricsNames? }, pageTitle?),compareModes(path, { dbName, table }, pageTitle?)— comparison pages;pageTitledefaults to the standard label.
The dbName and table are extracted from the argument: if the argument is perfintDev_kotlinNotebooks, then dbName is perfintDev and table is kotlinNotebooks. If no underscore separator is present, use the full value as both dbName and table.
6. Register routes
Add ...myCategoryRoutes to the children array inside getNewDashboardRoutes(), before the ReportDegradations route entry.
7. Create empty dashboard Vue component
Create a new file at dashboard/new-dashboard/src/components/<componentDir>/PerformanceDashboard.vue:
<template>
<DashboardPage
db-name="<dbName>"
table="<table>"
persistent-id="<table>_dashboard"
initial-machine="linux-blade-hetzner"
:with-installer="false"
/>
</template>
<script setup lang="ts">
import DashboardPage from "../common/DashboardPage.vue"
</script>The component directory name should match the table name (camelCase).
Important conventions
- Route prefix keys use PascalCase:
KotlinNotebooks - URL paths use camelCase:
/kotlinNotebooks - Product const names use UPPER_SNAKE_CASE:
KOTLIN_NOTEBOOKS - Route array variable names use camelCase:
kotlinNotebooksRoutes - PRODUCTS array is sorted alphabetically
- Build tabs with
tab(url, label); build routes with theperfTests/dashboard/startupDashboard/compareBuilds/compareBranches/compareModeshelpers - Use existing constants like
DASHBOARD_LABEL,TESTS_LABEL,TEST_ROUTE,DASHBOARD_ROUTE, andMACHINES.HETZNER/MACHINES.AWS_LINUX - Only drop to a raw object literal with
satisfies TypedRouteRecord<...>for special cases the helpers don't cover (e.g. thePerformanceUnitTests.vuecomponent, or a:subproject?path param)
Does 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.

