Agent skill

Jaspr Component Fundamentals

by rodydavis in rodydavis/signals.dart

Teaches the agent Jaspr's Flutter-like component model and typed HTML elements, with strict rules on build methods and helper syntax.

Apache-2.0Auto-check passedFrontend & Design

Install Jaspr Component Fundamentals

skills CLI
$ npx skills add rodydavis/signals.dart --skill jaspr-fundamentals -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rodydavis/signals.dart jaspr-fundamentals --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rodydavis/signals.dart.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/jaspr-fundamentals .claude/skills/jaspr-fundamentals && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
jaspr-fundamentals
GitHub stars
819
Token cost
~1.8k tokens
SKILL.md length
562 words
Files
86 (incl. references)
Skills in repo
15
Repo updated
First seen
Licence
Apache-2.0

At a glance

Teaches the agent Jaspr's Flutter-like component model and typed HTML elements, with strict rules on build methods and helper syntax.

  • Works in 3 steps: Accessing Browser APIs → Handling Events → Accessing Elements (GlobalNodeKey)
  • Writing or reviewing a Jaspr component
  • SKILL.md covers Components, HTML Components, Styling Components and Interactivity and Events, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

This skill covers Jaspr's StatelessComponent, StatefulComponent, and InheritedComponent base classes, and enforces that build() must return a single Component rather than the legacy sync* generator pattern. It also requires dot-shorthand syntax for fragments, text nodes, and empty nodes instead of capitalized component names.

For typed HTML elements such as div(), p(), and button(), it requires putting the children list last after named parameters and preferring typed parameters like href or onClick over raw attributes or events maps. When a component's exact signature is unclear, it points to a matching references/html/<tag>.md file bundled with the skill rather than guessing.

When your agent uses it

  • Writing or reviewing a Jaspr component
  • Building typed HTML elements in a Jaspr project
  • Checking the correct Jaspr API for a specific HTML tag

Example prompts

  • “Write a StatefulComponent in Jaspr that toggles a dark mode class.”
  • “Convert this JSX button into a typed Jaspr button() component.”
  • “What parameters does the Jaspr dialog component take?”

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Accessing Browser APIs
  2. Handling Events
  3. Accessing Elements (GlobalNodeKey)

What it can do on your machine

Read from SKILL.md and the folder at commit 81d64e8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are dart).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • jaspr.site

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Jaspr Component Fundamentals loads about 1.8k tokens when it runs, and up to ~9.3k if it reads all its reference files. Until then it costs about 46 tokens; SKILL.md has 562 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rodydavis/signals.dart at commit 81d64e8, republished under its Apache-2.0 licence (© rodydavis). 562 words, ~1,789 tokens.

Download SKILL.mdSave it as .claude/skills/jaspr-fundamentals/SKILL.md (or your agent's skills folder). This skill also uses 85 other files; get the full folder from GitHub.
name
jaspr-fundamentals
description
Use when working in a Jaspr project, on Jaspr components, or other Jaspr-related tasks. Contains fundamentals of writing Jaspr components and using HTML components.
metadata.jaspr_version
0.23.1

Components

Jaspr uses a component-based architecture very similar to Flutter's widgets. Concepts like ui composition, architecture and state management are transferable.

  • StatelessComponent: For components that don't need mutable state. You must override Component build(BuildContext context).
  • StatefulComponent: For components with mutable state. Requires an associated State class. The state has lifecycle methods like initState() and dispose(). You must override Component build(BuildContext context) in the state class.
  • InheritedComponent: For propagating context or state efficiently down the component tree.
Returning Components from build

Building UIs in Jaspr requires you to return a single Component from build().

  • Rule 1: You MUST NOT use Iterable<Component> build(BuildContext context) sync*. This is legacy code.
  • Rule 2: You MUST use dot-shorthands instead of capitalized component names for fragments, text, and empty nodes.
    • Use .fragment([...]) (Do NOT use Fragment([...]) or fragment([...])).
    • Use .text('...') (Do NOT use Text('...') or text('...')).
    • Use .empty() to return an empty space safely.

Example Usage:

dart
import 'package:jaspr/jaspr.dart';
import 'package:jaspr/dom.dart';

class MyComponent extends StatelessComponent {
  const MyComponent({super.key});

  @override
  Component build(BuildContext context) {
    // 1. Return a single component (e.g. div)
    // 2. Use dot-shorthand (.text) instead of Text()
    return div(classes: 'my-class', [
      .text('Hello World'),
    ]);
  }
}

HTML Components

Jaspr provides typed components for standard HTML elements (e.g., div(), p(), a(), button()). To use these add the package:jaspr/dom.dart import.

All HTML components take standard named Key? key, String? id, String? classes, Styles? style, Map<String, String>? attributes and Map<String, void Function(Event)>? events parameters. Most HTML components take a positional List<Component> children parameter (except for self-closing tags like img, input, br, etc.).

  • Rule 1: ALWAYS put the children list LAST, after all named parameters.
  • Rule 2: You MUST prefer available typed parameters (e.g., href, src, onClick) over using the raw attributes: or events: maps.
  • Rule 3: When you are unsure about which typed parameters exist for an HTML component, you MUST read the respective reference file provided alongside this skill:
    • references/html/<tag>.md contains the full signature and example usage of the component for the given tag. (e.g. references/html/div.md for div(), references/html/button.md for button(), etc.)
  • Rule 4: When a respective reference file does not exist for a tag (and therefore the component itself doesn't exist), you MUST use the generic .element(tag: '...', /* other standard params, */ children: [ /* ... */ ]) constructor instead.

Example Usage:

dart
import 'package:jaspr/jaspr.dart';
import 'package:jaspr/dom.dart';

class MyHtmlComponent extends StatelessComponent {
  const MyHtmlComponent({super.key});

  @override
  Component build(BuildContext context) {
    return div(id: 'my-container', classes: 'my-class', [ 
      p(attributes: {'aria-label': 'Example Paragraph'}, [
        .text('Hello World'),
      ]),
      // E.g. signature as found at 'references/html/a.md'
      a(href: 'https://example.com', [
        .text('Click me'),
      ]),
    ]);
  }
}

Styling Components

Jaspr has built-in support for styling components using CSS-in-Dart. See the jaspr-styling skill for more information.

Show full SKILL.md (216 more words)Show less

Interactivity and Events

1. Accessing Browser APIs
  • Rule 1: In server or static mode, you MUST use package:universal_web/web.dart to access browser APIs and package:universal_web/js_interop.dart to access js interop APIs.
  • Rule 2: When using package:universal_web in server or static mode, you MUST wrap all API calls in an if (kIsWeb) check to prevent crashing the server render.
  • Rule 3: In client mode, you can use dart:js_interop and package:web directly.
  • Rule 4: For global events, you MUST use web.EventStreamProviders to listen to events on the window or document as they provide a typed Dart Stream of events.
dart
// Example of safe usage in server/static mode:
import 'package:universal_web/web.dart' as web;

void logSize() {
  if (kIsWeb) {
    print('Window size: ${web.window.innerWidth}x${web.window.innerHeight}');

    // Example of global event listener
    final sub = web.EventStreamProviders.resizeEvent.forTarget(web.window).listen((event) {
      print('Window resized');
    });
  }
}
2. Handling Events

All DOM components support an events: parameter, and interactive components feature typed event callbacks (like onClick, onChange).

  • Rule 1: You MUST use web.Event when typing raw events.
  • Rule 2: Use the events() helper function for type-safe callback creation when needed.
dart
import 'package:jaspr/jaspr.dart';
import 'package:jaspr/dom.dart';
import 'package:universal_web/web.dart' as web;

class MyButton extends StatelessComponent {
  @override
  Component build(BuildContext context) {
    return div(
      // Using raw events
      events: {'click': (web.Event event) {
        print('Div clicked');
      }},
      [
        // Using typed parameters
        button(
          onClick: () => print('Button clicked'),
          [.text('Click me')]
        )
      ]
    );
  }
}
3. Accessing Elements (GlobalNodeKey)

If you need direct reference to an underlying DOM element rendered by Jaspr, you can assign it a GlobalNodeKey.

dart
import 'package:jaspr/jaspr.dart';
import 'package:jaspr/dom.dart';
import 'package:universal_web/web.dart' as web;

class MyInput extends StatefulComponent {
  @override
  State<MyInput> createState() => _MyInputState();
}

class _MyInputState extends State<MyInput> {
  final GlobalNodeKey<web.HTMLInputElement> inputKey = GlobalNodeKey();

  void focusInput() {
    inputKey.currentNode?.focus();
  }

  @override
  Component build(BuildContext context) {
    return input(key: inputKey, type: .text);
  }
}

Further Resources

© rodydavis, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 85 other files (references) in .agents/skills/jaspr-fundamentals of rodydavis/signals.dart.

  • SKILL.md
  • references/html/a.md
  • references/html/article.md
  • references/html/aside.md
  • references/html/audio.md
  • references/html/b.md
  • references/html/blockquote.md
  • references/html/body.md
  • references/html/br.md
  • references/html/button.md
  • references/html/caption.md
  • references/html/circle.md
  • references/html/code.md
  • references/html/col.md
  • references/html/colgroup.md
  • references/html/datalist.md
  • references/html/dd.md
  • references/html/details.md
  • references/html/dialog.md
  • … and 67 more

Open the folder on GitHubat commit 81d64e8

Compare with similar skills

Jaspr Component Fundamentals next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Jaspr Component Fundamentals compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Jaspr Component Fundamentals this skillrodydavis/signals.dart819—~1.8kAutomated safety check: PassApache-2.0
Frontend UI StandardsMaxHan7/frontend-ui-standards-skill106—~2.4kAutomated safety check: PassMIT
InternationalizationVeryGoodOpenSource/vgv-ai-flutter-plugin170—~1.6kAutomated safety check: PassMIT
Flutter Riverpod State Managementandrewyng/context-hub14k—~1.1kAutomated safety check: PassMIT
BlocVeryGoodOpenSource/vgv-ai-flutter-plugin170—~2kAutomated safety check: PassMIT
Flutter Dart Code Reviewaffaan-m/ECC277k2 repos~5.8kAutomated safety check: NotesMIT

Similar skills

  • Frontend UI Standards

    MaxHan7/frontend-ui-standards-skill

    A skill your agent uses when implementing, refactoring, or reviewing frontend UI across SwiftUI, React, React Native, Flutter, web, or mobile apps.

    106 GitHub stars~2.4k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Internationalization

    VeryGoodOpenSource/vgv-ai-flutter-plugin

    Best practices for internationalization (i18n) and localization (l10n) in Flutter, using the built-in flutterlocalizations and intl setup with ARB files as the single source of truth.

    170 GitHub stars~1.6k tokensUpdated 5 days ago
    Frontend & DesignAuto-check passed
  • Guides Flutter state management with Riverpod: choosing provider types, wiring ConsumerWidgets, handling async state and lifecycle, and overriding providers in tests.

    14k GitHub stars~1.1k tokensUpdated 4 mo ago
    MobileAuto-check passed
  • Bloc

    VeryGoodOpenSource/vgv-ai-flutter-plugin

    Best practices for Bloc state management in Flutter/Dart, covering Cubit versus Bloc, event and state naming, sealed classes with Equatable, the Page/View split with BlocProvider, BlocBuilder…

    170 GitHub stars~2k tokensUpdated 5 days ago
    MobileAuto-check passed
  • Library-agnostic Flutter/Dart code review checklist covering widget best practices, state management patterns (BLoC, Riverpod, Provider, GetX, MobX, Signals), Dart idioms, performance…

    277k GitHub starsUsed in 2 repos~5.8k tokens
    MobileAuto-check: notes
  • Flutter Bloc and Cubit

    andrewyng/context-hub

    Helps choose between Bloc and Cubit in Flutter and sets defaults for packages, lifecycle, widget binding and tests.

    14k GitHub stars~998 tokensUpdated 4 mo ago
    MobileAuto-check passed

More from rodydavis/signals.dart

All 15 skills in this repo
  • Jaspr CSS-in-Dart Styling

    rodydavis/signals.dart

    Guides styling of Jaspr web components with the type-safe Styles API in Dart, covering @css annotations, inline styles and global stylesheets.

    819 GitHub stars~1.7k tokensUpdated 27 days ago
    Auto-check passed
  • Jaspr JS Interop

    rodydavis/signals.dart

    Rules for calling JavaScript from Jaspr web apps in Dart: which interop libraries to import in server, static and client modes, and how to wrap functions, objects and libraries.

    819 GitHub stars~823 tokensUpdated 27 days ago
    Auto-check passed
  • Jaspr Pre-Rendering and Hydration

    rodydavis/signals.dart

    Sets the rules for static or server mode Jaspr apps in Dart, covering dual entrypoints, the client annotation and data hydration.

    819 GitHub stars~1.2k tokensUpdated 27 days ago
    Auto-check passed
  • Update Dart Examples Dependencies

    rodydavis/signals.dart

    Upgrades every package under ./examples to the repository's latest signals version, runs pub upgrade on third-party dependencies, and fixes the resulting analysis problems.

    819 GitHub stars~514 tokensUpdated 27 days ago
    Auto-check passed
  • Jaspr HTML Converter

    rodydavis/signals.dart

    Use when you need to convert / rewrite existing HTML (from a file or url) into Jaspr code.

    819 GitHub stars~378 tokensUpdated 27 days ago
    Auto-check passed
  • Dart Monorepo Coverage Booster

    rodydavis/signals.dart

    Runs, merges, and analyzes Dart and Flutter test coverage across a Melos monorepo, then targets the exact uncovered lines.

    819 GitHub stars~1.1k tokensUpdated 27 days ago
    Auto-check passed

Works with

Questions about Jaspr Component Fundamentals

What does Jaspr Component Fundamentals do?

Teaches the agent Jaspr's Flutter-like component model and typed HTML elements, with strict rules on build methods and helper syntax. This skill covers Jaspr's StatelessComponent, StatefulComponent, and InheritedComponent base classes, and enforces that build() must return a single Component rather than the legacy sync* generator pattern. It also requires dot-shorthand syntax for fragments, text nodes, and empty nodes instead of capitalized component names.

When should I use Jaspr Component Fundamentals?

Jaspr Component Fundamentals fits situations like: writing or reviewing a Jaspr component; building typed HTML elements in a Jaspr project; checking the correct Jaspr API for a specific HTML tag.

How do I install Jaspr Component Fundamentals in Claude Code?

Run `npx skills add rodydavis/signals.dart --skill jaspr-fundamentals -a claude-code`. Or copy the skill folder (.agents/skills/jaspr-fundamentals in rodydavis/signals.dart) into .claude/skills/jaspr-fundamentals in your project. Claude Code loads it when a task matches its description.

How do I install Jaspr Component Fundamentals in Codex?

Run `npx skills add rodydavis/signals.dart --skill jaspr-fundamentals -a codex`. Or copy the skill folder (.agents/skills/jaspr-fundamentals in rodydavis/signals.dart) into .agents/skills/jaspr-fundamentals in your project. Codex loads it when a task matches its description.

Can I use Jaspr Component Fundamentals in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rodydavis/signals.dart --skill jaspr-fundamentals -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/jaspr-fundamentals, .gemini/skills/jaspr-fundamentals, .github/skills/jaspr-fundamentals and .opencode/skills/jaspr-fundamentals in your project.

What does Jaspr Component Fundamentals need to run?

SKILL.md names no scripts, command-line tools or credentials: Jaspr Component Fundamentals is instructions for the agent only.

Does Jaspr Component Fundamentals access the network?

SKILL.md names 1 domain. As links in the text: jaspr.site. This is read from the text; nothing was executed.

Is Jaspr Component Fundamentals safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Jaspr Component Fundamentals use?

Jaspr Component Fundamentals is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Jaspr Component Fundamentals use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.5k tokens, read only when the agent opens those files.

What are the alternatives to Jaspr Component Fundamentals?

Skills that share tags, products or a category with Jaspr Component Fundamentals: Frontend UI Standards (MaxHan7/frontend-ui-standards-skill, 106 stars), Internationalization (VeryGoodOpenSource/vgv-ai-flutter-plugin, 170 stars), Flutter Riverpod State Management (andrewyng/context-hub, 14k stars) and Bloc (VeryGoodOpenSource/vgv-ai-flutter-plugin, 170 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Jaspr Component Fundamentals?

rodydavis (a GitHub user) maintains it in rodydavis/signals.dart, which has 819 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on September 14, 2026.

Source: rodydavis/signals.dart on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.