Install any skill in seconds. Free to start, no credit card required.
Get Started Free →opencti-platform/create-react-component
Use when: creating a new Relay-connected React component, defining a GraphQL fragment, or wiring a component to a query
Passed 21 of 22 test cases with the skill, and 13 of 22 without it.
and 7 more in the full report
8 fixed13 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 8 test cases the skill fixed. Same model, same prompt, with and without the skill.
When adding a React component for Channel entities in OpenCTI front, my team lead asked me to re-generate the GraphQL TypeScript bindings. What exact command executes the Relay compiler in this repository?
| Checked | Without skill | With skill |
|---|---|---|
| Specifies `yarn relay` as the command. | Missed | Passed |
The instructions your model reads when the skill loads.
Use the Codebase Pattern Finder agent to locate a similar existing component in opencti-platform/opencti-front/src/private/components/ that uses useFragment. Model the new component after the existing one to stay idiomatic.
Location: opencti-platform/opencti-front/src/private/components/....
Use graphql tag and useFragment.
import React from 'react';
import { graphql, useFragment } from 'react-relay';
import { MyComponent_data$key } from './__generated__/MyComponent_data.graphql';
const myComponentFragment = graphql`
fragment MyComponent_data on EntityType {
id
name
description
}
`;
interface MyComponentProps {
data: MyComponent_data$key;
}
const MyComponent: React.FC<MyComponentProps> = ({ data }) => {
const node = useFragment(myComponentFragment, data);
return (
<div>
<h1>{node.name}</h1>
test cases passed, vs 13 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.