mcpbeat Sign in

Create Component Agent Skill

Create a new Fx component using the modern def/fx/impl pattern (NOT legacy)

965 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
3695
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/DataDog/datadog-agent --skill create-component

What it tells the agent to use

found in the instruction text
Bash runs shell commands — read the instruction before connecting

The instruction itself

3 sections, as written by the author

Create a new Fx component following the modern (new-style) pattern with separate def/, fx/, and impl/ sub-packages.

IMPORTANT: NEVER use the legacy pattern (single-directory with fx.Provide directly). Always use the new-style pattern described below.

Instructions

  • Parse $ARGUMENTS to determine:
  • <bundle>/<component-name>: e.g., core/remoteflags means bundle=core, component=remoteflags
  • --team <team-name>: optional team ownership tag (default: ask the user)
  • --with-params: include a Params struct in the def package
  • --with-lifecycle: include compdef.Lifecycle in the Requires struct
  • --with-mock: also generate a mock/ sub-package
  • Ask the user (if not provided via arguments):
  • What is the component's interface? (what methods should it expose?)
  • Which team owns it? (for the // team: comment)
  • Does it need lifecycle hooks (start/stop)?
  • Does it need a Params struct?
  • What are its dependencies (other components it requires)?
  • Read reference examples before writing any code. Find a recent component under comp/ using the def/fx/impl pattern (e.g. comp/core/remoteagentregistry/). Read:
  • def/component.go — interface definition with // team: comment
  • fx/fx.go — Module() with fxutil.ProvideComponentConstructor
  • impl/<name>.go — Requires/Provides structs, NewComponent constructor
  • Create the directory structure under comp/<bundle>/<component>/:
   comp/<bundle>/<component>/
   ├── def/
   │   ├── go.mod
   │   ├── component.go     # Interface definition + team tag
   │   └── params.go        # (optional) Params struct
   ├── fx/
   │   ├── go.mod
   │   └── fx.go            # Module() function
   └── impl/
       ├── go.mod
       └── <component>.go   # Requires, Provides, NewComponent()
  • Create each file following the patterns from the reference. Key rules:
  • def/component.go: Package name = component name, include // team: comment, only interfaces
  • fx/fx.go: Use fxutil.ProvideComponentConstructor (NEVER raw fx.Provide), returns fxutil.Module
  • impl/<component>.go: Plain Go constructor func NewComponent(deps Requires) (Provides, error), no fx.In/fx.Out/compdef.In/compdef.Out embedding in Requires/Provides, unexported implementation type
  • go.mod files: Use v0.0.0 for inter-module dependencies, match Go version from root go.mod
  • Register the modules in modules.yml — add entries for def, fx, and impl (use default or used_by_otel: true).
  • Run dda inv create-module --path=comp/<bundle>/<component>/def (and for fx, impl) or manually add to modules.yml and run dda inv tidy.
  • Wire into a bundle if appropriate — add the component's Module() to the relevant comp/<bundle>/bundle.go.
  • Validate:
   dda inv lint-components lint-fxutil-oneshot-test github.lint-codeowner

Fix any errors and re-run until clean.

Critical Rules (New-Style vs Legacy)

DO: def/fx/impl sub-packages, fxutil.ProvideComponentConstructor, plain Go constructor, plain Requires/Provides structs, thin def package.

DON'T: Single directory, fx.Provide(newComponent), fx.In/fx.Out embedding, implementation in def package.

Usage

  • /create-component core/myfeature --team agent-runtimes --with-lifecycle
  • /create-component metadata/hostinfo --team agent-metrics --with-params

Other skills for the same job

different authors, same section of the catalogue
Theme Factory
by anthropics
vendor ×16

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

36k tokens
Brand Guidelines
by anthropics
vendor ×13

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

3k tokens
Artifacts Builder
by JayZeeDesign
×8

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

11k tokens scripts
Web Artifacts Builder
by anthropics
vendor ×7

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

11k tokens scripts
Frontend Design
by Karanjot786
×6

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

1k tokens
Frontend Design
by anthropics
vendor ×4

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

5k tokens
Expo Tailwind Setup
by openai
vendor ×4

Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling

3k tokens
Use Dom
by openai
vendor ×3

Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.

3k tokens

How to use it

Copy the folder

Take datadog/create-component from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.