CtrlK
BlogDocsLog inGet started
Tessl Logo

polymorphic-parent-resources

Serve a child resource that hangs off many different parents — comments, reports, duplications, attachments — from a single Rails controller, using a route concern plus `resource_for` from the rolemodel_rails gem. Use when a child resource needs to attach to several parent models, when about to write a second or third namespaced controller that differs only by its parent (`Estimates::CommentsController`, `Widgets::CommentsController`), when a route concern passes a `*_type` route default such as `commentable_type` or `reportable_type`, when a controller looks up its parent with a hard-coded `Parent.find(params[:parent_id])` that now needs to support more parents, or when consolidating duplicated per-parent controllers.

75

Quality

94%

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

93%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 dense, executable skill body that assumes Rails knowledge, leads with copy-paste code, and offloads the audit/retrofit process to a well-signaled reference file. The only gap is the absence of an explicit validation feedback loop in the main build sequence.

DimensionReasoningScore

Conciseness

Lean and assumes Rails competence throughout — never explains what polymorphic associations or route concerns are; every section (models, routing, controller, gotchas table) earns its tokens.

5 / 5

Actionability

Fully executable, copy-paste-ready Rails code for models, routing concern, controller actions, views, and an allowlist guard, covering the common cases concretely.

5 / 5

Workflow Clarity

Numbered pattern steps (Models, Routing, Controller, Views) with a prerequisite version-check checkpoint and a gotchas table for error recovery, but the main build lacks an explicit validate-then-proceed feedback loop.

4 / 5

Progressive Disclosure

Clear sectioned overview with the retrofit/audit workflow split into a single one-level-deep reference (references/retrofit.md), signaled twice and verified to exist; navigation is easy.

5 / 5

Total

19

/

20

Passed

Description

95%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, specific description that explicitly states both capability and trigger conditions with natural phrasing and concrete Rails terminology. Only minor: the action list centers on one mechanism rather than enumerating several distinct operations.

DimensionReasoningScore

Specificity

Names the domain and concrete actions ('Serve a child resource... from a single Rails controller, using a route concern plus resource_for') plus consolidation, but the actions cluster around one core mechanism rather than a broad list.

4 / 5

Completeness

Explicitly answers both what ('Serve a child resource... from a single Rails controller, using a route concern plus resource_for') and when ('Use when a child resource needs to attach to several parent models...') with concrete trigger phrases.

5 / 5

Trigger Term Quality

Rich natural trigger phrases a Rails dev would say — 'comments on multiple models', 'one controller many parents', 'consolidate controllers', plus synonyms (commentable/reportable, *_type defaults) and the gem/method names.

5 / 5

Distinctiveness Conflict Risk

Carves a clear niche (polymorphic parent resources via rolemodel_rails resource_for) with distinct triggers unlikely to fire for unrelated skills.

5 / 5

Total

19

/

20

Passed

Validation

93%

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

Validation15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

metadata_version

'metadata.version' is missing

Warning

Total

15

/

16

Passed

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.