# Component Script Designer

> Use when reading or modifying a script file under `scripts/` for the exact SmartCMP component selected by an embedded component-editor page Context, with rules routed by component resource type.

- Skill: `cloudchef/component-script-designer` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add cloudchef/component-script-designer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cloudchef/component-script-designer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: CloudChef (https://skillmd.com/u/cloudchef)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/cloudchef/component-script-designer

---


# component-script-designer

Read one file from the current saved component and produce a complete replacement for manual copying.

## Workflow

1. Call `smartcmp_read_current_component_file`. If several files are returned and the user did not identify one, ask for the exact listed `file_path`; never guess.
2. Use `componentFamily` to select the matching rules in `references/component-script-rules.md`.
3. Apply only the requested change and preserve the selected file's entrypoints, parameters, return shape, runtime version, line-ending expectations, and unrelated logic.
4. Return the exact file path and the complete updated file in one fenced block. Never return only a diff, partial snippet, or ellipsis placeholder.
5. State that the output is for manual review and copying into CMP. Do not claim that the component was saved, published, upgraded, or deployed.

## Type Routing

- `exporter`: Prometheus exporter and monitoring-agent components.
- `integration`: `resource.integration.*`.
- `software`: `resource.software.*`.
- `resource`: `resource.iaas.*`, `resource.paas.*`, and `resource.caas.*`.
- Unknown families fail closed; do not apply a different component family's assumptions.

## Safety

- No component write, publish, upgrade, import, export, or execution APIs.
- Do not invent third-party endpoints, cloud SDK fields, runtime variables, or credentials.
- Read `references/component-script-rules.md` before producing component code.

