better-code
FreeNo executable scriptsNot checkedRules for writing simple, direct, and correct code, including TypeScript and React. MUST USE for writing, editing, fixing, reviewing, or refactoring code in…
by NazmusSayad★ 137 GitHub starsAbout this skill
Writing code
Follow the project's existing patterns. Give each piece of state one owner and derive the rest. Fix the data shape instead of piling up flags and branches.
Use the simplest clean, readable, and direct solution that fully satisfies the request. Prioritize simplicity, readability, and directness over reusability, abstraction, and all other forms of overengineering. Follow YAGNI principles: do not add features, flexibility, or complexity before they are required. Do not introduce variables, functions, helpers, interfaces, types, or other abstractions unless they simplify complex logic or remove substantial repetition.
Use explicit logic to prevent ambiguity and implicit fallbacks. For example, avoid if "yes": true; else: false; use if "yes": true; if "no": false; else: exception. Do not hide errors with fallbacks, retries, or empty catches. Handle errors explicitly and fail fast.
Changes
Keep changes focused. Change only what is necessary to satisfy the user's request and produce a correct result.
Do not refactor, clean up, reformat, rename, or otherwise improve unrelated work. Remove code made unused by your changes, but don't remove pre-existing dead code unless asked.
Comments and Tests
Do not write comments unless the code contradicts how it reads.
Do not add tests (eg: unit, integration, regression, or smoke tests) to the project unless explicitly requested.
TypeScript
Before working with TypeScript (.ts, .tsx, .mts), read references/typescript.md.
React
Before working with React code, components, hooks, or JSX (.jsx, .tsx), read references/react.md.
Install better-code in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the better-code skill do?
Rules for writing simple, direct, and correct code, including TypeScript and React. MUST USE for writing, editing, fixing, reviewing, or refactoring code in any language.
How do I install the better-code skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the better-code skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
by Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
by Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
by Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
by Anthropic