agentleFS
MrCipherSmithMrCipherSmith/goodai-base/skills/code-style-review/SKILL.md

code-style-review

Skill0 starsChanged 5 months agoMITView on GitHub

Detailed code style and architecture review using code-style-patterns.mdc. Reviews current branch changes. Checks naming, organization, patterns, TypeScript usage. Use when: style validation needed, architecture review.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the script from that file to determine MERGE_BASE and SCOPE before proceeding with the review.

    line 35
  2. Very specific:

    When dispatched by job-orchestrator as part of a job pipeline, the prompt MAY include:

    line 156
  3. Distinctive:

    If provided and the file exists, read the context document before starting the review.

    line 163
  4. Distinctive:

    If the file does not exist or is not provided, proceed normally — context is optional and non-blocking.

    line 168

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Style Review

Проводи ревью только изменений текущей ветки от момента отбранчевания от родительской ветки, строго по правилам из ~/goodai-base/rules/core/code-style-patterns.mdc.

Scope

  • Если пользователь не передал commit hash/range, ревьюируй полный срез от merge-base до текущего рабочего дерева:
    • закоммиченные изменения (BASE_SHA..HEAD)
    • локальные незакоммиченные (staged/unstaged/untracked)
  • Если пользователь явно передал commit hash/range, ревьюируй только запрошенный диапазон; незакоммиченные изменения не добавляй, если это отдельно не попросили.
  • Не обсуждай легаси вне изменённого скоупа.
  • Фидбек должен быть подробным: проблема -> почему это проблема -> где (файл/участок) -> что сделать -> пример исправления.
  • Исправления предлагай в виде unified diff-патчей, не вноси изменения в код напрямую.

Scope Detection

See shared script: skills/shared/git-merge-base.md

Run the script from that file to determine MERGE_BASE and SCOPE before proceeding with the review.

Собери входные данные:

A) Режим по умолчанию (без hash/range)

git status

# Закоммиченная часть ветки
git log --oneline "${BASE_SHA}..HEAD"
git diff --name-status --find-renames "${BASE_SHA}..HEAD"
git diff --find-renames "${BASE_SHA}..HEAD"

# Полный текущий срез от merge-base до рабочего дерева
# включает commit'ы + staged + unstaged
# (untracked смотри через git status / git ls-files)
git diff --name-status --find-renames "${BASE_SHA}"
git diff --find-renames "${BASE_SHA}"
git ls-files --others --exclude-standard

B) Режим с явным hash/range

git show --stat --name-status --patch <COMMIT_SHA>
git log --oneline <FROM_SHA>..<TO_SHA>
git diff --name-status --find-renames <FROM_SHA>..<TO_SHA>
git diff --find-renames <FROM_SHA>..<TO_SHA>

Используй только эти изменения как вход для ревью.

Review checklist (по ~/goodai-base/rules/core/code-style-patterns.mdc)

TypeScript Strictness

  • Запрещён any (предлагай unknown + type guards / корректные типы).
  • Props через interface, префикс I*.
  • Предпочитай ?. и ??, избегай ! (non-null assertion).

MobX

  • В сторах обязателен makeObservable(this) в конструкторе.
  • Для асинхронных мутаций после await - runInAction.
  • Методы экшенов: @action.bound.
  • Derived state: @computed.
  • Для коллекций/списков - @observable.shallow (когда применимо).
  • Inter-store callbacks (onChangeX, onFireX, handleX, syncX) обязаны быть private. Публичный @action.bound только для методов вызываемых из React-компонентов.

React Components

  • Компоненты, читающие observable, обязаны быть observer(...).
  • MVVM: логика и side effects в Store/Service, а не во View.
  • Запрещай бизнес-логику в useEffect (предлагай store actions/reactions).
  • Следи за порядком структуры файла: imports -> interfaces -> component -> helpers.

Architecture & Layers

  • API/IO не во View: в Service/Store.
  • Взаимодействие со Store - через actions (без прямых мутаций вне экшенов).

Anti-patterns severity

  • Critical: API во View, missing observer, direct store mutation, грубые нарушения MobX async.
  • Warnings: console.log вместо AppLogger, inline object props без memo/const, тяжёлая логика в render, спорные типы, public inter-store callbacks/handlers.

Output format (обязательный отчёт)

Сформируй отчёт в Markdown строго по шаблону:

## Summary
- [1-3 bullets] Что изменилось и общий уровень соответствия стилю

## Scope
- Branch: `<BRANCH>`
- Parent ref: `<PARENT>`
- Merge-base: `<BASE_SHA>`
- Scope mode: `<default-with-uncommitted | explicit-hash-range>`

## Critical issues (must fix)
### [Короткий заголовок проблемы]
- **Rule**: [ссылка/название секции из core/code-style-patterns.mdc]
- **Why**: [объяснение]
- **Where**: `path/to/file.tsx` (строки из diff)
- **Fix**: [что сделать]
- **Proposed patch**:
```diff
[unified diff]

Warnings

... (тот же формат, без "must fix")

Suggestions

... (тот же формат, improvements без обязательности)

File-by-file notes

  • path/to/file: [коротко, только по изменённым участкам]

## Rules of engagement

- Привязывай замечания к конкретным изменённым строкам (по diff).
- Если есть несколько вариантов, предлагай один default и короткий альтернативный.
- Не предлагай новые библиотеки без явного запроса.

---

## Scope Boundaries

This skill covers **code style and architecture patterns** — naming, organization, TypeScript usage, pattern compliance per `code-style-patterns.mdc`.

| Concern | This skill | Use instead |
|---------|-----------|-------------|
| Naming conventions, file organization, import order | ✅ YES | — |
| TypeScript patterns, component/hook structure | ✅ YES | — |
| Architecture pattern compliance | ✅ YES | — |
| Logic correctness, type safety deep dives | ❌ NO | `code-ai-review` or `code-boss-review` |
| MobX store internals | ❌ NO | `code-mobx-store-review` |

---

## Job Context Awareness

When dispatched by `job-orchestrator` as part of a job pipeline, the prompt MAY include:

JOB_NAME: <job-name> CONTEXT_PATH: <JOBS_ROOT>/<job-name>/ai/context.md


If provided and the file exists, read the context document before starting the review. Use it to:
- Understand which libraries and patterns were intentionally chosen for the implementation
- Validate code style against documented project conventions from the context
- Provide more accurate findings by understanding the project's architectural decisions

If the file does not exist or is not provided, proceed normally — context is optional and non-blocking.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.