agentleFS
aws-solutionsaws-solutions/konductor/skills/frontend-development/SKILL.md

frontend-development

Skill11 starsChanged 49 days agoApache-2.0View on GitHub

Implements frontend code changes for React/TypeScript applications using AWS Cloudscape Design System. Use when fixing type safety issues, form patterns, component extraction, or adding UI features. Follows Cloudscape-only component rules with no native HTML.

13 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 8 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 16
  2. Very specific:

    No native HTML elements in UI code.

    line 32
  3. Distinctive:

    Use React Hook Form — not custom state hooks for form management

    line 42
  4. Distinctive:

    Use Zod for validation — not manual validation logic

    line 43
  5. Very specific:

    Use .refine() for cross-field validation, not .transform()

    line 46
  6. Distinctive:

    Use constraint constants for validation messages — not hardcoded strings

    line 47
  7. Very specific:

    Only Cloudscape components — no native HTML (<div>, <span>, <input>, <button>, <a>)

    line 51
  8. Very specific:

    No inline styles (style={{}})

    line 52
  9. Very specific:

    Use utility types: Pick<T, K>, Omit<T, K>, Partial<T>

    line 63
  10. Distinctive:

    No redundant type assertions

    line 64
  11. Distinctive:

    Add defensive checks for array index access

    line 69
  12. Distinctive:

    No unnecessary wrapper components

    line 70
  13. Distinctive:

    Test assertions check actual values — not just existence

    line 77

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “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

Frontend Development

Overview

Implements frontend changes with surgical precision — only the specific issue, nothing more. Covers React Hook Form + Zod validation patterns, Cloudscape component compliance, TypeScript type safety, component extraction, and test improvements.

Usage

Use this skill when:

  • Fixing type safety issues (removing any, adding explicit types)
  • Implementing or fixing form validation patterns
  • Extracting reusable components
  • Ensuring Cloudscape-only component usage (no native HTML)
  • Adding or improving test coverage

Core Concepts

Form Architecture

React Hook Form manages form state (not useState). Zod handles validation (not manual checks). Sub-components access form via useFormContext (no prop drilling). Wizard pages wrap in FormProvider.

Cloudscape-Only Rule

No native HTML elements in UI code. Use Box instead of <div>/<span>, Input instead of <input>, Button instead of <button>, Link instead of <a>, SpaceBetween instead of margin/padding.

Core Principles

Always read the complete file before making changes. Make minimal changes — only fix the specific issue. Follow established patterns. Maintain backward compatibility.

Implementation Standards

Form Patterns

  • Use React Hook Form — not custom state hooks for form management
  • Use Zod for validation — not manual validation logic
  • Form sub-components use useFormContext — no prop drilling
  • Wizard pages wrapped in FormProvider
  • Use .refine() for cross-field validation, not .transform()
  • Use constraint constants for validation messages — not hardcoded strings

Cloudscape Compliance

  • Only Cloudscape components — no native HTML (<div>, <span>, <input>, <button>, <a>)
  • No inline styles (style={{}})
  • Box instead of <div> or <span>
  • SpaceBetween for spacing — not margin/padding
  • KeyValuePairs for label-value display
  • FormField wraps all form inputs with labels
  • Fixed column counts in ColumnLayout — no dynamic column counts

Type Safety

  • No any types in production code
  • Explicit types on useForm<FormType>() calls
  • Use utility types: Pick<T, K>, Omit<T, K>, Partial<T>
  • No redundant type assertions

Component Quality

  • Memoize event handlers with useCallback
  • Add defensive checks for array index access
  • No unnecessary wrapper components
  • Imperative array building for 3+ conditional items (not ternary chains)

Testing

  • Unit tests for helper functions (100% coverage target)
  • Component tests for forms (80%+ coverage target)
  • Test assertions check actual values — not just existence
  • Error states and edge cases tested

Output Format

For each change, provide:

  1. File path
  2. Issue (with line numbers)
  3. Exact code changes
  4. How to verify the fix
  5. What else might be affected

Quality Gate

CRITICAL (must fix before done):

  • TypeScript compilation fails
  • Tests fail
  • Native HTML element used instead of Cloudscape component
  • Inline style used (style={{}})
  • Form state managed with useState instead of React Hook Form

CRITICAL (blocks approval):

  • any type in production code

IMPORTANT (should fix):

  • Missing explicit type on useForm call
  • Hardcoded validation message instead of constraint constant
  • Event handler not memoized with useCallback (causes unnecessary re-renders)
  • Dynamic column count in ColumnLayout

SUGGESTION:

  • Could extract repeated form field pattern into reusable RHF wrapper component
  • Could strengthen test assertions to check actual error messages
  • Could add missing edge case tests

Present findings as: CRITICAL → IMPORTANT → SUGGESTION. Ask: "Fix these issues? [y/n]" — unless scope_confirmed is true, in which case report all the findings and leave fixing to the caller, without asking.

Download now (ZIP)

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.