Skip to content
Skills Library
Programming · Building & coding

code-layout

/code-layout

Lay out code for the reader and for one-line diffs. Use when writing, editing, or reviewing code or configuration in any language, including one-line edits, even when the request does not mention layout.

Repository
plugins ↗
Licence
MIT
Last repository change
12.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 12.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Lay out code for the reader and for one-line diffs. Use when writing, editing, or reviewing code or configuration in any language, including one-line edits, even when the request does not mention layout.

Original author description

Lay out code for the reader and for one-line diffs. Use when writing, editing, or reviewing code or configuration in any language, including one-line edits, even when the request does not mention layout.

How it works

  1. Line breaks
  2. Blank lines and order
  3. Embedded code and text
Original SKILL.md headings · 31 lines, 624 words
SKILL.md preview
---
name: code-layout
description: >-
  Lay out code for the reader and for one-line diffs. Use when writing, editing, or reviewing
  code or configuration in any language, including one-line edits, even when the request does
  not mention layout.
---

# Code Layout

Lay code out for the reader and for one-line diffs. Where a formatter decides, its decision wins.

The rules below serve that goal, so apply each by reading the construct, and keep the existing layout where a change would not clearly read better. A layout sweep judges each site the same way, and a brief for one states the goal with the current layout as the default and asks for a before / after list. Settle an ambiguous case by judgment, since tightening a rule to cover it is the user's choice.

## Line breaks

- Wrap code and comments at the project's line limit for the language, counting the indent. Hand-wrap comments because formatters rarely reflow them, and rewrap moved comments toward that limit at their new indent depth. Keep a one-line string literal and any table row holding one unbroken at any length.
- Keep each table row, and each record in a list of like records, on one line.
- When an external call or argument list has two or more options (bare flags included), keep the command, subcommands, and positionals on the first line, and put each option with its value on its own line one level deeper in the order its parser requires. A mode-selecting flag like `install -d` stays with the command like a subcommand, and a clustered bundle such as `tar -czf` stays whole. Options that the parser requires before a subcommand nest under the command, followed by the subcommand line. Keep a call with at most one option, and a builtin's switches, on one line.
- A wrapped command starts a deeper line, with its own options nested under it.
- Split an argument expression joined by operators the way you split options, keeping each parenthesized group, and each negation with its test, together.
- In a split call, put each redirection on its own line after the last option, and put a trailing `|| ...` or `&& ...` on its own line starting with the operator, like the next stage of a pipeline. Keep both inline in a one-line call, and keep order-dependent redirections together.
- Give a data pipeline one stage per line, keeping a short accessor chain whole.
- Put each branch of a multi-branch construct on its own lines, except a short two-way choice between plain values, which reads as a ternary.

## Blank lines and order

- Separate distinct blocks and sibling groups with a blank line, and keep closely related code and single-line siblings together. Where a long sequence's boundaries would otherwise blur, set off a multiline statement, field, or entry with blank lines, unless a related single-line sibling leads into it. A short set or list stays one block even when an entry spans a few lines.
- Once one branch holds a blank line, put a blank line between all branches.
- An entry added to an existing sequence follows the spacing and grouping its siblings use.
- Order parameters and fields for readability: group related items, put dependencies before dependents, fall back to alphabetical order, and let API and project conventions win.
- Group tests by behavior in the order the code runs, and within each behavior put the normal case first, even where a guard checks an error case before it.

## Embedded code and text

- Keep standalone helper programs, test support programs, code templates, and substantial prompts in separate files with their language's extension, so formatters and linters check them.
- Write multiline prompts, messages, and embedded documents with literal line breaks, indented with the code, and strip that indentation with the language's native support or a standard helper, keeping relative indentation. Escapes stay fine for delimiters and programmatic string operations.
Files in this package (2)
  • SKILL.md 4 KB
  • agents/openai.yaml 1 KB

Versions

The database has no other skills named code-layout.

Database snapshot: 13.11.2026 · package version 6140ee4d77ff (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90reviewing-code-diffs
    Use when reviewing code diffs is required during implementation work, especially when the result must be traceable, independently reviewable, and safe to hand to another agent.
  • 100cli
    Use when building, changing, or reviewing a command-line application in any language, including its arguments, help, output, errors, interactivity, configuration, testing, and distribution.
  • 100universal-patterns
    Code organization, error handling, data flow, naming and anti-patterns in any language. Use while writing or reviewing everyday code. Do not use to choose a system shape or a design pattern — read the architecture skill instead.
  • 90code-formatting
    Hand formatting to an opinionated tool run automatically so the team stops arguing style and diffs stay readable. Use when adopting a formatter, onboarding a repo, or cleaning up noisy review diffs.
  • 90docs-guidelines
    General documentation guidelines that apply across all languages. Use this when writing or reviewing comments, docstrings, or doc headers in any code.
  • 96small-prs-review
    Use when reviewing any complete diff immediately before opening a pull request.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.