CtrlK
BlogDocsLog inGet started
Tessl Logo

dynamic-nested-attributes

Implement Rails nested attributes with dynamic add/remove functionality using Turbo Streams and Simple Form. Use when building forms where users need to manage multiple child records (has_many associations), add/remove nested items without page refresh, or create bulk records inline.

64

Quality

81%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

68%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-structured, code-forward skill body: every component has a concrete example and the sequence is easy to follow. The main gap is the absence of validation/verification steps for what are batch and destructive operations (nested record creation and `_destroy` removal), which caps workflow clarity; there is also slight redundancy between the overview/when-to-use sections and the frontmatter.

Suggestions

Add a validation checkpoint to the workflow: show how nested-attribute validation errors are rendered back into the form (e.g., re-rendering item_fields with errors) and how to verify `_destroy` marking works before save, ideally in the Implementation Checklist as explicit verify steps.

Complete the `new` action example by including the documented `index` parameter handling (e.g., `@index = params[:index]`), since the turbo_stream view depends on it.

Tighten the body by merging the 'Overview' and 'When to Use' sections (which restate the frontmatter description) and cutting the non-actionable 'Related Patterns' list.

DimensionReasoningScore

Conciseness

The body is lean: no explanation of what Rails, Turbo, or Stimulus are, and each component is a short bullet list plus a code example. Minor redundancy costs it a point — the 'Overview' and 'When to Use' sections largely restate the frontmatter description, and 'Related Patterns' adds little actionable value. Not the padded verbosity of the 2/3 anchors, so 4 fits.

4 / 5

Actionability

Concrete, near-executable code is given for every key component: the Slim form and add-button partial, the `_item_fields` partial with the `_destroy` hidden field, the `new` controller action, the `new.turbo_stream.slim` view, and the full Stimulus controller. Small gaps keep it below 5 — the `new` action example doesn't show the index param it is documented as accepting, and placeholders like `resource`/`item` require adaptation.

4 / 5

Workflow Clarity

The Implementation Checklist provides a clear step sequence (model -> form -> partial -> controller -> turbo_stream view -> Stimulus -> routes -> params -> policy), but there are no validation or verification checkpoints anywhere. Per the rubric guideline, a skill involving batch and destructive operations (bulk nested record creation, `_destroy`-based removal) without validation steps is capped at 3; the 4 anchor requires most checkpoints present, which this does not meet.

3 / 5

Progressive Disclosure

No bundle files exist (no references/, scripts/, or assets/ directories), so the skill is a single-file structure scored on its own organization. Sections are well-labeled and each is short with the bulk being code, matching the 'good structure; most content appropriately placed' anchor. It falls short of 5 only in that a ~170-line file with a full Stimulus controller and parameter/route examples could arguably split some material into reference files.

4 / 5

Total

15

/

20

Passed

Description

83%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: concrete, stack-specific, and written in appropriate imperative voice with an explicit multi-scenario 'Use when' clause. Its only weakness is modest keyword breadth — a few common synonyms like 'nested forms' or 'dynamic fields' are absent.

DimensionReasoningScore

Specificity

Quotes like "Implement Rails nested attributes with dynamic add/remove functionality using Turbo Streams and Simple Form" name the domain and several concrete technical actions (add/remove nested items, Turbo Streams, Simple Form). It falls just short of the 5 anchor's comprehensive multi-action list — the what-side of the description centers on a single implementation task rather than enumerating multiple distinct capabilities.

4 / 5

Completeness

The description explicitly answers both: what — "Implement Rails nested attributes with dynamic add/remove functionality using Turbo Streams and Simple Form" — and when — "Use when building forms where users need to manage multiple child records (has_many associations), add/remove nested items without page refresh, or create bulk records inline." It matches the 5 anchor's pattern of a concrete what followed by an explicit multi-trigger when-clause; the 4 anchor requires a weaker or less specific 'when', which does not apply here.

5 / 5

Trigger Term Quality

Natural phrases users would say are present: "nested attributes", "add/remove nested items", "has_many associations", "without page refresh", "bulk records inline". A few common variations are missing — e.g. "nested forms", "dynamic fields", "cocoon-style" — so it matches the 'good keyword coverage; a few natural terms missing' anchor rather than the comprehensive 5.

4 / 5

Distinctiveness Conflict Risk

The stack-specific framing ("Rails nested attributes", "Turbo Streams", "Simple Form", "has_many") gives it a clear niche with minimal conflict against non-Rails or non-form skills. Minor overlap remains with closely related Rails form skills (generic form building, Turbo Frame editing), placing it at 'mostly distinct' rather than the 5 anchor's fully distinct trigger set.

4 / 5

Total

17

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
RoleModel/rolemodel-skills
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.