agentleFS
ThisIsSadeghiThisIsSadeghi/KMPilot/.claude/skills/using-design-system/SKILL.md

using-design-system

Skill56 starsChanged 3 months agoMITView on GitHub

Ensures consistent use of X-components design system instead of Material3 when working on feature UI code. Automatically activates for Composable functions in feature modules or when user mentions UI/screens/components.

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use X-components from :core:designsystem instead of Material3 in feature modules.

    line 9
  2. Very specific:

    If a Stitch design blueprint exists (.claude/docs/{featurename}/designs/{featurename}_blueprint.md with blueprintConsumed == false in …

    line 15
  3. Very specific:

    Theme: Never wrap screens in XTheme (app-level only).

    line 39
  4. Very specific:

    Navigation: Use XNavHost (pre-configured animations)

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Using Design System

Use X-components from :core:designsystem instead of Material3 in feature modules.

Architecture Reference: @../_shared/patterns.md

Design-Aware Mode

If a Stitch design blueprint exists (.claude/docs/{featurename}/designs/{featurename}_blueprint.md with blueprintConsumed == false in stitch-project.json.features[featurename]), implementation skills auto-detect it and use the blueprint's component tree for UI implementation. This skill provides component mappings for existing code.

Core Rule

X-components ONLY in features. NO Material3 components.

Common Replacements

Material3X-component
ButtonXButton (7 variants)
TextFieldXTextField
TextXText
Scaffold (feature screen)XScreen (Rule 13 — XScaffold is app-shell only)
CircularProgressIndicatorXCircularProgressIndicator
coil3.compose.AsyncImage{CORE_DESIGNSYSTEM_PKG}.AsyncImage

Full mappings: @references/component-mappings.md Usage examples: @references/usage-examples.md

Key Rules

  1. Imports: import {CORE_DESIGNSYSTEM_PKG}.* (avoid Material3 in features)
  2. 4-State UI: Uninitialized → Loading → Success → Failed (mandatory)
  3. Theme: Never wrap screens in XTheme (app-level only). Feature screens use XScreen (Rule 13) — never a Scaffold/XScaffold, which would nest a second Scaffold and double the insets
  4. Navigation: Use XNavHost (pre-configured animations)
  5. ScreenRoot Pattern: {Feature}Screen + {Feature}ScreenRoot pair required
  6. Strings (Rule 12): XText/XIcon text args take stringResource(Res.string.*), never literals. Shared strings via DesignSystemResources; ViewModel-origin via UiText. See @../_shared/patterns.md → "Strings & Localization (Rule 12)".
  7. Typography (app-global type scale): text picks an M3 type-scale role — style = MaterialTheme.typography.{role} (or an XTextDefaults preset) — never raw fontSize/fontWeight/fontFamily, except a blueprint-recorded override (…typography.{role}.copy(...)). The font family is global (wired in XTheme.kt), never set per-screen. See @../_shared/patterns.md → "Typography".

Allowed Exceptions

Material3 allowed only in:

  • :core:designsystem module (for creating wrappers)
  • MaterialTheme.colorScheme/typography (accessing theme values)
  • Compose Foundation (Row, Column, Box, Spacer)
  • Animation APIs (androidx.compose.animation.*, animation.core.*, foundation.interaction.*) — not Material3, required for motion. Not a violation.

Motion

Animation = captured from the Stitch design, in dedicated motion/ files (never inline in Screen.kt/components). The generic motion primitives ship in :core:designsystem motion/ — Modifier.shimmer(), PulseDot, AmbientMeshBackground, BokehCanvas, Modifier.pulseGlow(), RevealOnAppear, rememberReducedMotion(). Reuse them (pass the design's magnitude as a parameter); write only feature-specific one-offs in feature/.../presentation/ui/motion/{Feature}Motion.kt. Press/hover feedback is dropped (android+ios). Full policy: @../_shared/motion.md.

Validation Checklist

  • No Material3 component imports in feature files
  • All buttons use XButton variants
  • All text uses XText
  • Text uses MaterialTheme.typography.{role} / XTextDefaults — no raw fontSize/fontWeight/fontFamily except recorded overrides
  • No hardcoded display strings — stringResource/UiText only (Rule 12)
  • Screen uses XScreen (NOT XScaffold/Scaffold, NOT XTheme) — Rule 13
  • XTopAppBar from {CORE_DESIGNSYSTEM_PKG}.toolbar
  • AsyncImage uses url parameter (not model)
  • 4-state pattern implemented
  • ScreenRoot pattern: Screen + ScreenRoot pair exists

Download now (ZIP)

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. ThisIsSadeghi/Loupe★ 1100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.