بنقرة واحدة
new-component
Create a new React component following project conventions with PropTypes and test attributes
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Create a new React component following project conventions with PropTypes and test attributes
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | new-component |
| description | Create a new React component following project conventions with PropTypes and test attributes |
| user-invocable | true |
| allowed-tools | Read, Write, Edit, Grep, Glob |
Create a new React component following project conventions.
/new-component <ComponentName> [directory]
This should typically be done as part of implementing a feature. Ensure:
src/components/{directory}/{ComponentName}.jsx// src/components/{directory}/{ComponentName}.jsx
import { useState } from 'react';
import PropTypes from 'prop-types';
function {ComponentName}({ prop1, prop2 }) {
// Component logic here
return (
<div data-testid="{component-name}">
{/* Component content */}
</div>
);
}
{ComponentName}.propTypes = {
prop1: PropTypes.string.isRequired,
prop2: PropTypes.number
};
{ComponentName}.defaultProps = {
prop2: 0
};
export default {ComponentName};
StepEditor.jsx)data-testid="step-editor")step-editor__input)Add data-testid attributes for elements that acceptance tests need to interact with:
<button data-testid="add-step-button">Add Step</button>
<input data-testid="step-name-input" />
<div data-testid="metrics-dashboard">...</div>
Components should be designed to support acceptance testing:
// In step definitions
When('I click the add step button', async function () {
const button = await this.page.$('[data-testid="add-step-button"]');
await button.click();
});
Then('I should see the step editor', async function () {
const editor = await this.page.$('[data-testid="step-editor"]');
expect(editor).to.exist;
});
Create a new feature file for ATDD workflow - must be done BEFORE any implementation
Implement an approved feature file using ATDD workflow with test-first development
Analyze code with Semgrep for security vulnerabilities and code quality issues, then create a prioritized fix plan
Add a new calculated metric to the VSM dashboard with test-first development
Add a new type of process step to the VSM builder with custom visualization
Create or run simulation features for analyzing work flow through value streams