Skip to content
Agentmart
Submit a tool

code-style

You are required to load this before writing code.

Skill by liangmiQwQ

IndexedMIT★ 1
Write a review

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/liangmiqwq-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.

We use your email only for this newsletter. Privacy

About

You are required to load this before writing code. Do not use this skill for reading code or analyzing tasks unless users require to care about codestyle.

Use cases: writing

No 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
You are required to load this before writing code. Do not use this skill for reading code or analyzing tasks unless users require to care about codestyle.
License
MIT
Instructions
70 lines in SKILL.md · view on GitHub

Files (3)

  • SKILL.md
  • js-ts.md · languages/
  • rust.md · languages/

SKILL.md (first lines)

Load $precise-minor-adjustment skill as needed, it is used to tell agents how to make code simple and consistent with other parts in codebase.

After you finish your task, also run a round of simplify according to $precise-minor-adjustment before commit or summarizing.

# Code Style

Read the corresponding file below as needed:

| Language                | Reference            |
| ----------------------- | -------------------- |
| JavaScript / TypeScript | `languages/js-ts.md` |
| Rust                    | `languages/rust.md`  |

The most important rule of my code style is always to find the regular patterns emerging from irregular logic. You can change the way you organize the code, and use comment to achieve this goal.

## Organize

One goal to achieve when coding is to make the code more structured and predictable. That will make humans easy to control and review your code.

For example, you can use a big `match`(Rust), and handle different branches for different cases with simple lines.

A thousand lines of structured, predictable, regular code is better than five hundred lines of messy code.

## Comments

**Comments are necessary for complex logic.** Do not wrap a sentence's comment into multiple lines unless the linter / checker requires.

We should keep comments simple and short. If the next reader can infer it from the code in three seconds, the comment is unnecessary.

Keep comments that capture what the code cannot express on its own:

- A non-obvious constraint or external requirement
- Why a seemingly better approach was rejected
- Context that only exists outside the codebase (a spec, a quirk of an upstream service, a compliance rule)

And the comments there should explain why, not what.

Never write a doc comment that only restates the function name — it adds nothing and will drift out of sync.

---

Another acceptable form of annotation is a flow comment for complex functions. For a part of complex, multiple phases logic, we can add comments like `// 1. Check environment` `// 2. Read config` to help human divide code into different parts.

If a piece of logic can be clearly divided into multiple stages and exceeds 50 lines, then it needs flow comments.

---

After finishing your whole implementation, check the code diff, if the diff is more than 50 lines while there are no comments added, there are problems.

## Visibility

**Start with nothing visible. Add visibility only when another module needs it.**

Every export or public item is a contract: a name that must stay stable, a surface that must stay compatible. Keep that surface as small as possible.

## Diagnostics Handling

In my project, I have a set of strict linting rules. It's normal to meet the diagnostics.

When meeting diagnostics, the first thing you do is to think, not to change the code. You should check whether the diagnostic's purpose fit the current code's purpose and behavior target. You should check whether following diagnostic will make the code more complex, more confusing or more simple.

You should reject some unreasonable diagnostics, and keep the reasonable ones. Follow the code style.

When you are rejecting an unreasonable diagnostics, prefer use comment (`// oxlint-disable-...`, `#[allow(...)]`) to disable it, instead of disabling it globally and modifying config files. You can also check the codebase to know whether there is other cases disable the same rules, if a rule is disabled too many time, you can suggest me to adjust config file in the response. But do not modify them urself unless I required.

## After writing

After finishing the goal, you need to review your own code. Especially focus on the code organization.

From liangmiQwQ/skills, MIT.

More from liangmiQwQ/skills

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Sep 30, 2026 (28 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

More from liangmiQwQ

Cite this page

code-style skill. Agent Mart. https://agentmart.dev/skills/liangmiqwq-code-style (last updated 2026-10-24)