← ClaudeAtlas

new-mixinlisted

Scaffold a new Gerillass mixin or utility function with the project's conventions, wire it into the folder index, describe it in meta/, and test it. Use when adding a new mixin, helper function, list or map to the library.
selfishprimate/gerillass · ★ 171 · Web & Frontend · score 77
Install: claude install-skill selfishprimate/gerillass
# Add a member to the Gerillass library Six steps. Two of them fail loudly if you skip them — the manifest suite checks that a new mixin has metadata and a smoke-test call. The other four fail silently, which is worse. Do all of them. ## 1. Pick the layer | Adding | Folder | Naming | |---|---|---| | public mixin | `scss/library/` | `kebab-case` | | helper function | `scss/utilities/` | `camelCase` | | value list | `scss/lists/` | `$list-of-…`, with `!default` | | keyed config | `scss/maps/` | `$map-for-…`, with `!default` | One member per file, and **the filename must match the member name** — `_border-radius.scss` holds `@mixin border-radius`. This holds for all 53 existing mixins and 22 utilities; do not be the exception. ## 2. Write the file Start every file with `@charset "UTF-8";`, then a blank line. Two-space indent, double quotes. ```scss @charset "UTF-8"; @mixin your-mixin($required, $optional: null) { // ... } ``` Declare what the file uses, right after the `@charset` line — see step 4. This reversed in 2.0.0: library partials used to be forbidden from carrying a `@use` rule, because a Gulp task concatenated them into one bundle and a `@use` landing mid-file made Sass reject the whole thing. That generator is gone. Validate arguments and fail loudly. 37 of the 47 mixins that take arguments do this, and the message should name what is acceptable: ```scss @error "The argument must be one of the following: #{$list}."; ``` If you interpolate a list into an