# Marco code style

> Marco code style is an open-source agent skill for developer tools. Guides agents to write and review TypeScript and React code in one developer's conventions. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/tonyghiani/ai-essentials/tree/main/skills/marco-code-style
- **Repository:** https://github.com/tonyghiani/ai-essentials
- **GitHub stars:** 7
- **License:** MIT
- **Skill name:** marco-code-style
- **Collection:** https://github.com/tonyghiani/ai-essentials
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill packages a set of TypeScript and React conventions drawn from a developer's commit history and a follow-up style interview. It tells the agent how to structure components, hooks, types, error handling, async code, tests, comments and folder layout, and it says where those preferences override patterns that already exist in a codebase. It also explains which rules are better enforced by lint and formatter config than by the agent.

The instructions are organised as a set of checks the agent applies while writing or reviewing code: prefer declarative array methods over index loops, use named error helpers, keep fail-open and fail-closed decisions explicit, prefer deletion over new abstraction when refactoring, and keep tests focused on behaviour and edge cases. Project documentation and neighbouring files take precedence when they conflict with the guidance.

The skill is a single Markdown file with no scripts. It expects a TypeScript or TSX project and, where relevant, Jest with Testing Library and react-query, and it applies only to the parts of a project that use those technologies.

## When your agent uses it

> Marco's TypeScript and React conventions, extracted from 748 authored commits and confirmed by a 69-question style interview. Invoke before writing or reviewing substantial TS/TSX, when scaffolding a new module, when writing tests, or when a reviewer disagrees with a style choice. Covers components, hooks, types, errors, async, testing, comments, and folder layout with evidence from real code.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/tonyghiani/ai-essentials/tree/HEAD/skills/marco-code-style)
- [License: MIT](https://github.com/tonyghiani/ai-essentials/tree/HEAD/skills/marco-code-style)

## Features

- **Component and hook patterns:** Rules for named exports, props interfaces, guard-return rendering, context providers and one-hook-per-file layout.
- **Type conventions:** Guidance on interfaces versus type aliases, string-literal unions, exhaustive record keys and avoiding enums and any.
- **Error and async handling:** Named error helpers, custom error classes, partial-success summaries and explicit fail-open or fail-closed choices.
- **Testing style:** Colocated tests, behaviour-focused it() phrasing, hand-rolled fakes and negative assertions for contracts.
- **Comments and naming:** Guidance to explain why rather than what, JSDoc on exports, and verb prefixes and unabbreviated names.
- **Folder and server layout:** Feature folders instead of layer folders, no barrels in app code, and a reference shape for server modules.

## Good for

- Write a new React component that follows the project's props and rendering conventions
- Review a TypeScript pull request for type and error-handling style
- Scaffold a new feature module with the expected folder layout
- Write Jest tests for a hook or service in colocated test files
- Refactor a helper and remove unnecessary abstraction

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/marco-code-style` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/marco-code-style &&
cp -R "$tmp/skills/marco-code-style" ~/.claude/skills/marco-code-style &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/marco-code-style` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/marco-code-style` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/marco-code-style &&
cp -R "$tmp/skills/marco-code-style" ~/.agents/skills/marco-code-style &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/marco-code-style` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/marco-code-style` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/marco-code-style &&
cp -R "$tmp/skills/marco-code-style" ~/.cursor/skills/marco-code-style &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/marco-code-style` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/tonyghiani/ai-essentials.git --path skills/marco-code-style
```

Or copy the folder to `~/.gemini/skills/marco-code-style` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/marco-code-style`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/marco-code-style &&
cp -R "$tmp/skills/marco-code-style" ~/.copilot/skills/marco-code-style &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/marco-code-style` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git
```

Then copy `ai-essentials/skills/marco-code-style` into your agent's skills folder as `marco-code-style`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to work?

It is a single SKILL.md file with no scripts, and it targets TypeScript and TSX code. Some rules assume Jest, Testing Library and react-query, and they should be skipped where a project does not use them.

### Does Marco code style override a project's existing code style?

Project conventions and neighbouring files win when they conflict with it. The skill says to follow the surrounding file in existing projects and to apply its rules mainly to new modules.

### When is the skill meant to be invoked?

According to its description, it should be used before writing or reviewing substantial TypeScript or TSX, when scaffolding a module, when writing tests, or when a reviewer disagrees with a style choice.

### How do I install Marco code style in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/marco-code-style to use it in all your projects, or to .claude/skills/marco-code-style in one project.

### Does Marco code style run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Marco code style?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Marco code style?

The closest alternatives to Marco code style are Coding standards, TypeScript, Coding standards, Coding standards and TypeScript best practices.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Coding standards](https://ai-powered.com/skills/coding-standards-abdullayevtemurmalik): Coding standards is an open-source agent skill for developer tools.
- [TypeScript](https://ai-powered.com/skills/typescript): TypeScript is an open-source agent skill for developer tools.
- [Coding standards](https://ai-powered.com/skills/coding-standards-fmarzochi): Coding standards is an open-source agent skill for developer tools.
- [Coding standards](https://ai-powered.com/skills/coding-standards-smartworldarafath): Coding standards is an open-source agent skill for developer tools.
- [TypeScript best practices](https://ai-powered.com/skills/typescript-best-practices): TypeScript best practices is an open-source agent skill for developer tools.
- [Readable code](https://ai-powered.com/skills/readable-code): Readable code is an open-source agent skill for developer tools.
- [JavaScript TypeScript jest](https://ai-powered.com/skills/javascript-typescript-jest): JavaScript TypeScript jest is an open-source agent skill for developer tools.
- [Code](https://ai-powered.com/skills/code): Code is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/marco-code-style
