code-style
Fifteen TypeScript code rules for modules, names, doc comments, types, boundaries, errors and side effects.
Skill by andabove
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/andabove-code-style
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/code-style
What's inside
- Skill name
code-style- Description
- Fifteen TypeScript code rules for modules, names, doc comments, types, boundaries, errors and side effects. Use when you write or change TypeScript, or when you review a TypeScript diff.
- License
- MIT
- Instructions
- 42 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Code style
## Read the local facts first
The repository's code style doc supplies what these rules leave open. Find it from `AGENTS.md` or `CLAUDE.md`. It names:
- the paths that the rules cover,
- the lint configs that enforce part of the rules, and where a file override goes,
- the schema library for the boundary parse,
- the seam module for each external service,
- the environment helper and the request logger,
- where history and provenance go, such as a decision log.
Where the local doc and these rules disagree, the local doc wins.
## Write code
Apply every rule to each file that you change. Before you commit, run the linters: they enforce part of the rules. Check the other rules against your diff yourself.
## Review code
Mark each rule pass or fail for the diff, with the `file:line` of each failure. Done when every rule has a mark. A rule that the diff does not touch passes.
## Rules
1. **Give each module one job.** Keep a file to at most 250 code lines. Keep framework entry files (routes, plugins, config files) declarative, and move their logic into a named module.
2. **Move a helper to a shared module when a second caller needs it.** Do not copy it.
3. **Keep functions to at most 30 code lines.** Name actions with a verb and values with a noun. Add `OrThrow` to the name of a function that throws where a reader expects a return value.
4. **Put a `/** */` doc comment on every exported symbol.** Line one says what it is. `@remarks` says why it exists, the hazard it prevents, and what fails without it. Point to a related module that handles the same hazard.
5. **Write comments that give a reason, not a narration, a history or a provenance.** A `//` comment inside a function is only for a value or an order that is not obvious. Ticket IDs, incident stories and design references go in the commit message, the pull request or the decision log.
6. **Declare the parameter and return types of every exported function**, `Promise<…>` included. Use `import type` for imports that are only types.
7. **Use no `any` and no `as` type assertion** (`as const` is permitted). Narrow `unknown` with `instanceof`, a type guard or a schema parse. When a third-party type forces a cast, put the cast in one named adapter function with a doc comment, and give that file a lint override.
8. **Use `satisfies` for configuration objects**, and literal discriminants (`ok: true`, `ok: false`) on returned results.
9. **Parse every value from outside the process with a schema at the boundary:** request bodies, tool inputs and outputs, database documents and environment values.
10. **Choose the error channel by the reader of the failure.** Throw a typed error for a configuration or infrastructure fault. Return a typed result for a fault that a model or a user can correct. Keep the two channels apart in one function.
11. **Write each error message so that it names the action, the evidence (an id, a status, trimmed and sanitised output) and the fix when one is known.** When you translate an error, keep the original as `{ cause }`.
12. **Check the result of every external call before you use it.** Add a fallback only with a comment that gives the reason.
13. **Undo each temporary side effect in `finally`.** Use `await` in sequence unless the steps are independent and the parallel version is measured to be faster.
14. **Put each external service behind one seam module** that owns its client, its keys and its access check. Derive keys and ownership from server state, never from model or user input.
15. **Read required environment values once, at module load, through one throwing helper.** Keep named constants in one constants module. Write units as arithmetic (`14 * 24 * 60 * 60 * 1000`). Log only through the request logger, never through `console`.From andabove/skills, MIT.
More from andabove/skills
- 0.570score
effect-testing
andabove
Testing Effect code with @effect/vitest, TestClock and test layers.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-concurrency
andabove
Effect concurrency - fibers, interruption, coordination and Schedule.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-data
andabove
Effect 4 data types, equality, caching and batching.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-errors
andabove
Effect error handling, for expected errors, defects and interruptions.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-observability
andabove
Effect 4 logging, tracing and metrics, and their export.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-schema
andabove
Effect 4 Schema for parsing and modelling data.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-services
andabove
Effect 4 services, layers and resources.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-streams
andabove
Effect Stream, Sink and Channel.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-v3-to-v4
andabove
Effect v3 to v4 migration.
SkillAFreshness: AClaude Code +9 - 0.570score
effect
andabove
Effect (the TypeScript library) core and router to the other Effect skills.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-adoption
andabove
Adopting Effect in an existing Promise codebase one module at a time.
SkillAFreshness: AClaude Code +9 - 0.565score
linear-comment
andabove
Write a comment on a Linear issue as a status record against its acceptance criteria and QA notes.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 8, 2026 (21 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/andabove/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from andabove
- 0.570score
effect-data
andabove
Effect 4 data types, equality, caching and batching.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-concurrency
andabove
Effect concurrency - fibers, interruption, coordination and Schedule.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-testing
andabove
Testing Effect code with @effect/vitest, TestClock and test layers.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-adoption
andabove
Adopting Effect in an existing Promise codebase one module at a time.
SkillAFreshness: AClaude Code +9 - 0.570score
effect
andabove
Effect (the TypeScript library) core and router to the other Effect skills.
SkillAFreshness: AClaude Code +9 - 0.570score
effect-errors
andabove
Effect error handling, for expected errors, defects and interruptions.
SkillAFreshness: AClaude Code +9
Cite this page
code-style skill. Agent Mart. https://agentmart.dev/skills/andabove-code-style (last updated 2026-10-24)