The project-wide house style guide focusing on readability, narrow column widths, and documentation clarity.
Install
mkdir -p .claude/skills/narrow && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19125" && unzip -o skill.zip -d .claude/skills/narrow && rm skill.zipInstalls to .claude/skills/narrow
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
The house style for EVERY file in this repo — source, tests, docs, configs. ~50-column lines (they fit Michael's phone preview pane), 2-space indent, flat structure, and rich explanatory comments that define every acronym. Load this before writing or editing any file.Key capabilities
- →Format source code, documentation, tests, and configurations to ~50-column lines
- →Apply a 2-space indent consistently across all file types
- →Flatten deep nesting in code by using early-returns or extracting named helpers
- →Define every acronym at its first appearance in a comment
- →Write rich and explanatory comments that teach and explain the 'why'
- →Ensure test files list numbered claims and test names are sentences
How it works
The skill enforces a house style with ~50-column lines, 2-space indents, flattened structures, and rich explanatory comments, including acronym definitions. It provides examples for wrapping patterns and comment placement.
Inputs & outputs
When to use narrow
- →Standardizing code formatting
- →Writing compliant documentation
- →Refining code readability
About this skill
narrow — the house style
Applies to all files: source, documentation, tests, configs, mailbox messages. No file type is exempt; only unbreakable tokens are (below).
1. The rule, verbatim
Source lines <= ~50 columns (they fit his phone preview pane). 2-space indent. Deep nesting is a design smell — flatten or extract.
And its two companions, also verbatim:
Define every acronym at its definition site in a comment the first time it appears (RPN = Reverse Polish Notation, TTS = Text To Speech, DHT = Distributed Hash Table, DI = Dependency Injection, etc.).
Comments are rich and explanatory on purpose — he loves reading the code. Match that voice.
2. Interpreting "~50"
-
Aim at 50. The
~is a small grace, not a loophole: the working checker in this repo flags anything past 52:awk 'length > 52 {print FILENAME":"FNR}' *.js -
Unbreakable tokens are exempt: a long URL, a base58 program id, a JSON string value, a markdown table row. Put the token on its own line; keep the prose around it narrow.
-
WHY 50: lines fit a phone preview pane. The code is read on a phone more often than on a monitor. If it wraps there, it's wrong here.
3. Wrapping patterns (examples)
Break after operators/commas, indent the continuation 2 spaces (or align into the call):
// BAD — 80 wide, unreadable on the phone
const e = { ...ev, _seq: seq, _at: ev._at || now(), _id: ev._id || nodeId + ':' + seq };
// GOOD — the same object, narrow
const e = {
...ev, _seq: seq,
_at: ev._at || now(),
_id: ev._id || nodeId + ':' + seq,
};
// GOOD — conditions split before operators
if (top.kind !== 'op') break;
if (tp > p || (tp === p && a === 'L'))
out.push(st.pop());
// GOOD — rust chains break at the dot
ben.balance = ben
.balance
.checked_add(amount)
.ok_or(LedgerError::Overflow)?;
Flatten instead of nesting: early-return, or extract a named helper. Three indent levels is the smell threshold.
// BAD — nesting as control flow
if (a.type === 'KEY') {
if (k === 'C') {
return [{ type: 'Cleared' }];
} else { ... }
}
// GOOD — guards, one level
if (action.type !== 'KEY') return [];
if (k === 'C') return [{ type: 'Cleared' }];
4. Comments — where they go
File header banner (every source file): a framed block stating what the file IS, the philosophy it carries, and any diagram worth drawing. Pattern:
/* ==============================================
* NAME — one-line role (<=50 col house)
* ----------------------------------------------
* Several sentences of real explanation. Why
* this exists, what doctrine it enforces, what
* the reader must not break.
* ============================================ */
Section rules split a file into named parts:
// -- the event tape -----------------------
// ---- instruction contexts -------------------
Block comments ABOVE the code they explain — a short paragraph before a function or a tricky region, never a novel inside it:
// fold one event, notify, return its effects.
// an event carries identity (_id) and origin
// (_origin = the node that first decided it) so
// sync can dedup and avoid echo loops.
function commit(ev) { ... }
Trailing comments only for tiny labels that fit the same line:
const log = []; // append-only facts
const RATE: u64 = 100; // tokens per cent
5. Comments — the voice
- Rich and explanatory on purpose. The comments teach; the reader is here for pleasure as much as reference. Explain WHY and the doctrine, not what the next line syntactically does.
- Define every acronym at first use, in a
comment, at its definition site:
PDA = Program Derived Address,SBF = Solana Bytecode Format. - State invariants in CAPS where they matter:
THE LOG IS NEVER REWRITTEN. - It's fine — encouraged — for a comment to carry personality ("a browser is enemy territory for secrets"), as long as it's also precise.
6. Tests and docs too
- Test files open with the same banner, and it
lists the numbered claims the file proves.
Test names are sentences:
ok('log keeps originals — never rewritten', ...). - Markdown prose wraps at ~50 like everything else; long links/table rows are the exempt tokens. Headers small and frequent; tables for status, prose for reasoning.
- 2-space indent everywhere, including YAML, JSON (where formatting is ours to choose), and shell.
When not to use it
- →When unbreakable tokens like long URLs or base58 program IDs are present and cannot be wrapped
- →When the user prefers a different code style or formatting standard
- →When the user does not want explanatory comments or acronym definitions
Limitations
- →Strictly enforces ~50-column line limit
- →Requires 2-space indent everywhere
- →Unbreakable tokens are exempt from line length rule
How it compares
This workflow applies a strict, mobile-first formatting standard across all repository files, emphasizing readability on small screens and detailed inline explanations, which is more prescriptive than typical code style guides.
Compared to similar skills
narrow side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| narrow (this skill) | 0 | 10d | No flags | Beginner |
| korean-skill-creator | 8 | 8mo | Review | Beginner |
| skill-forge | 11 | 8mo | Review | Intermediate |
| svelte-expert | 11 | 9mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
korean-skill-creator
clwmfksek
한글 기반 클로드 스킬 자동 생성 도구. 사용자가 "클로드 스킬을 만들어줘" 또는 "[요구사항] 스킬 만들어줘"라고 요청할 때 사용. Progressive disclosure 원칙을 따르는 한글 문서 구조(SKILL.md + references/)를 자동으로 생성하고, 실전 예시를 포함한 일관성 있는 스킬 템플릿을 제공.
skill-forge
WilliamSaysX
Automated skill creation workshop with intelligent source detection, smart path management, and end-to-end workflow automation. This skill should be used when users want to create a new skill or convert external resources (GitHub repositories, online documentation, or local directories) into a skill. Automatically fetches, organizes, and packages skills with proactive cleanup management.
svelte-expert
Raudbjorn
Expert Svelte/SvelteKit development assistant for building components, utilities, and applications. Use when creating Svelte components, SvelteKit applications, implementing reactive patterns, handling state management, working with stores, transitions, animations, or any Svelte/SvelteKit development task. Includes comprehensive documentation access, code validation with svelte-autofixer, and playground link generation.
readme-generator
aws-samples
This skill should be used when users want to create or improve README.md files for their projects. It generates professional documentation following the Deep Insight/Strands SDK style - comprehensive yet focused, with clear structure and practical examples.
build-free-types
paulirish
This skill should be used when the user asks to "set up types without a build step", "use vanilla JS with types", "configure erasable syntax", or mentions "JSDoc type checking". It provides instructions for modern type safety using JSDoc in browsers and native TypeScript execution in Node.js.
doc-author
mintlify
Write and maintain documentation autonomously. Use when assigned to create, update, or improve documentation without direct human oversight. Always opens PRs for review. Built by Mintlify.