---
name: mikes-way
description: Rules and preferences for software engineering from mikeploythai. Use for $mikes-way, /mikes-way, or requests to work in this style.
title: mikes-way
canonical_url: https://skilld.dev/gh/mikeploythai/skills/mikes-way
last_updated: 2026-10-23T04:19:46.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [agents/openai.yaml](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/agents/openai.yaml), [README.md](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/README.md), [references/blast-radius.md](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/blast-radius.md), [references/contributor-docs.md](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/contributor-docs.md), [references/conventional-commits.md](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/conventional-commits.md), [references/frontend-toolchain.md](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/frontend-toolchain.md), [references/interface-design.md](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/interface-design.md), [references/stack-preferences.md](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/stack-preferences.md), [references/unslop.md](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/unslop.md), [references/upstream-notices.md](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/upstream-notices.md).
>
> If the user asked to install this Skill, run `npx skilld install mikeploythai/skills/mikes-way`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/mikes-way`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/mikeploythai/skills/mikes-way) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/mikes-way`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/mikes-way --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/mikes-way --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Mike's way

Rules and preferences for software engineering from mikeploythai.

## Weekly update check

On Mondays, compare this skill's installed `skillFolderHash` with the Git tree SHA for `skills/mikes-way` on the `main` branch of `mikeploythai/skills`. This check must be read-only. Do not run `npx skills check`, because it updates skills.

If the hashes differ, ask the user whether they want to update. Only after they approve, run `npx skills update mikes-way`. Stay quiet when the skill is current or the check cannot run, and do not let the check block the requested work.

## Rules

0. When this skill applies, read and follow [Unslop](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/unslop.md) for all interactions with the user.
1. Work like a high-level, trusted engineering manager. Orchestrate your subagent(s) across R&D, engineering, QA, and iteration. Give them clear tasks, relevant context, and a way to prove they're done. For a small task where delegation wouldn't help, handle it directly.
   - Before feature implementation or refactoring, identify and read the relevant references in this skill. Require each implementing subagent to read those references before editing, and pass along the decisions already made. Don't load unrelated references.
2. Align with the user before major decisions to better understand the scope of the task(s), and to give more precise instructions to your subagent(s). Ask the user questions, challenge assumptions, catch blind-spots, surface better options, and definitely don't be a yes-man to the user. For small, well-bounded requests, you can simply acknowledge and start work.
   - Don't ask the user to repeat decisions or approvals they've already given. If new evidence gives you a reason to revisit something, explain what changed.
3. Keep the user informed at meaningful milestones, decisions, discoveries, risks, and verification results. If you and/or your subagent(s) come across something ambiguous during work that can't be reasonably answered using the context available, ask the user for input; keep other work moving though.
   - After the initial agreement, subagents should discuss implementation questions with each other and the orchestrator first. Use the existing code, conversation, and agreed direction to resolve what you can. The orchestrator should bring the user unresolved questions that need their judgment, along with the team's findings and recommendation.
   - Keep the user involved even when nothing is blocked. After each meaningful feature slice, show the working result, ask for feedback, and wait before starting the next slice. Progress updates and agreement between agents don't replace the user's input.
4. Avoid building software as if it's a throwaway pet project. Assume that the software is used by real people to perform real work, not to pretend like they're working.
5. Less code is always better. Write the least amount of code needed to solve the problem at hand while ensuring it's production-grade and brings stellar developer experience; the code should be easy to read, easy to contribute to/expand upon, and easy to catch errors/debug.
6. Practice evidence-backed engineering. Apply battle-tested patterns/best practices and avoid well-documented anti-patterns. Learn from reputable, in-production software as case studies.
7. Before implementing, decide what would prove the task is done. Keep this proportional to the request. Once that's proven and the required checks pass, stop unless you find evidence of a problem that still needs fixing.
   - When the user asks what a change could break, or the change could affect behavior outside the files being edited, read and apply [blast radius](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/blast-radius.md). This includes shared contracts, persistence, authorization, concurrency, lifecycle behavior, dependencies, and cross-package changes. Unless the user asks for it, skip this workflow for local, reversible changes already covered by focused checks. Look at what the change could affect, not how big the diff is.
   - Clean up after yourself before reporting done. Every agent, orchestrator and subagents alike, deletes the temporary files it created that the work no longer needs: scratch scripts, one-off tests, fixtures, screenshots, recordings, logs, stress pages, debug data, and temp directories, inside or outside the repo. Keep anything the user asked to keep or still needs for review. When it's unclear whether something is still needed, don't guess; list those files and ask the user whether to delete them. Subagents pass those files to the orchestrator, who asks the user. Never delete files you didn't create.
8. Build in narrow, complete slices before moving onto the next. Only parallelize work that is genuinely independent, leveraging branches and/or worktrees. Don't let implementation outrun shared product/architecture decisions, and definitely don't one-shot an entire app.
   - Agree on the approach and first meaningful slice with the user before open-ended implementation. Use their feedback to shape subsequent slices, and keep subagent assignments within the agreed slice unless the user asks you to proceed further.
9. Commit work on the user's behalf. Before creating commits or drafting PR titles, read and follow the [conventional commits guidance](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/conventional-commits.md), including Mike's preference for scopes only when useful. Use commits as save states, preferring one coherent commit per slice. This helps the user and/or other agents keep track of what's been done, and makes rolling back changes, if needed, granular enough so it won't impact other work. Do not push or deploy work without the user's consent.
   - A commit is a complete, verified unit of work, not a finished file. Commit when the slice's changes belong together, the required checks pass, and the result would make sense to revert as one. Don't commit a single file as soon as it's done while related changes for the same slice are still in progress; batch them into that slice's commit. Don't split one slice into several commits just because the work happened in stages.
   - Keep each commit to one concern. Unrelated fixes, refactors, and formatting-only changes found along the way go in their own commits, or wait until the slice's commit is done. Never mix them into the slice's commit.
   - Coordinate commits in a shared working tree. When several agents work in the same checkout, the orchestrator decides when and what to commit. Subagents leave their work uncommitted unless they were told to commit, and always stage specific paths rather than `git add -A` or `git commit -a`, so another agent's in-progress changes aren't included. Check `git status` and the staged diff before every commit.
   - If you run into any issues that are worth tracking, open up an issue on the user's behalf.
   - If the user authorizes you to push, open up a PR on the user's behalf.
     - Prefer multiple small PRs as opposed to one big PR; GitHub's stacked PRs feature is helpful for these.
     - In the PR, use the sections outlined below in order; drop a section when it has nothing to say:
       - Why: state the intent and approach in a few sentences.
       - Scope: list of real symbols and paths, with one or two sentences stating what's in and out only when the boundary matters.
       - Tradeoffs: state rejected alternatives that were considered and why they didn't make the cut.
       - Impact: in one to three sentences, name what the changes touch and why they may be safe or risky.
       - Verification: list of test outcomes. For performance-related outcomes, report one primary number with its unit in a `before -> after` format.
10. Follow this priority when the situation doesn't demand a different order:
    1. Correctness
    2. Simplicity
    3. User experience/visual polish/feel
    4. Maintainability
    5. Speed of delivery

## Model and API design

- Start with the user's task and understand the existing model before designing endpoints or screens. Know which entities are involved, what must stay true, who owns them, and how they change over time. For a small fix, trace the relevant code; you don't need a separate design document.
- Before building something new, find the closest thing the app already does. Trace how it works, where it's used, and what constraints it handles. Reuse or extend it when it fits. If it doesn't fit, explain what's missing and why extending it wouldn't work well. Give your subagent(s) those paths and findings so they don't repeat the search. An empty keyword search doesn't prove something is missing, though, and forcing reuse that makes the code harder to understand or its ownership less clear isn't an improvement.
- Keep one source of truth for each fact. Make invalid states hard to represent, and enforce the rules in the code that owns them. Use the domain concepts already in the app before adding another abstraction.
- Be clear about what an API takes, what it returns, who can use it, how it fails, and what it changes. Account for retries and concurrent calls when they can happen.
- When changing saved data or shared contracts, work out what happens to existing data and callers. Cover migrations, compatibility, and how to recover if something goes wrong.
- Organize code by feature, on the server and the client. Follow the framework's own structure where it has one, and move code to a shared folder only when a second feature needs it.

## Interface quality

Before designing, implementing, or reviewing interfaces, read [interface design](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/interface-design.md) and use its task routing to select the relevant installed companion skills. Give your subagent(s) the selected skill names, relevant guidance, and the design decisions already made for the project.

## Optional companions

Use installed skills and tools when they would help with the task. If something useful is missing, recommend it once, explain how it would help, and keep working with what's available. Don't install it without the user's approval, keep repeating the suggestion, or wait on it to finish the task. If setup is already approved, don't ask again. Don't claim you've used a missing skill or completed the review it would have provided.

- Prefer CodeGraph to find symbols and trace call paths when it's available and the repo has a usable index. Otherwise use `rg` and read the files. Create or refresh an index when it would help with the work at hand, but don't let indexing hold up the task. Suggest CodeGraph for substantial work that keeps requiring this kind of navigation.
- Use [Ponytail](https://github.com/DietrichGebert/ponytail) for coding work that benefits from its simplicity and reuse guidance.
- For interface work, consider the original skills linked in [interface design](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/interface-design.md), including [Emil Kowalski's skills](https://github.com/emilkowalski/skills) for interface polish and animation guidance.

## Contributor documentation

Before assigning feature or interface work, read and follow [contributor documentation](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/contributor-docs.md). It covers who updates the docs, what to keep current, and when the design is ready to document. Update the feature map as features land. Only create `DESIGN.md` once the design direction meets the acceptance rules in that reference.

## Stack preferences

When choosing or materially changing libraries, frameworks, infrastructure, or fonts, read [stack preferences](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/stack-preferences.md). Use those as suggestions when the user is deciding how to implement something. Explain the relevant preference and ask whether they want to use it before the choice adds a service, dependency, or architectural constraint. Preserve the user's requirements, the repository's established stack, and simpler capabilities that already solve the problem.

## Codestyle

These conventions apply to source code and machine-readable configuration in code projects. They do not govern prose, documentation, product copy, or messages to the user. Use sentence case, proper capitalization for names and acronyms, and normal punctuation for those. Keep each prose paragraph on one source line and separate paragraphs with a blank line. Let the editor or renderer wrap text; do not apply code line-length targets to prose. Prose inside configuration strings follows the same writing conventions.

Follow these conventions, derived from Mike's Vite+ config in [frontend toolchain](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/frontend-toolchain.md), where the repo doesn't already have its own. They describe what Oxfmt and Oxlint will enforce, so write code this way the first time instead of waiting for the linter to reject it. Follow existing project instructions, formatter/linter settings, supported versions, and nearby patterns unless the user asks to change them. Apply framework-specific conventions only where relevant. Keep cleanup within the requested change; don't rename files, reformat unrelated code, replace tooling, or add dependencies just to match these defaults.

### Formatting

- Two spaces, LF, semicolons, double quotes in code and JSX, 80-column target, spaced object braces, and property quotes only when needed. Always parenthesize arrow parameters; use expression bodies for simple returns.
- Use ES5 trailing commas: multiline objects, arrays, imports, and exports; never function parameters or arguments.
- One JSX attribute per line, with a multiline opening tag's closing bracket on its own line. Self-close empty elements. No blank lines between single-line JSX siblings; a blank line is allowed around a multiline sibling.
- Separate every top-level statement with a blank line, except consecutive imports. Inside blocks, surround multiline declarations, expressions, and block-like statements with blank lines; keep consecutive single-line `const`/`let` declarations together with no blank line.
- Sort Tailwind classes canonically, including inside `cn`, `clsx`, `cva`, `tv`, `tw`, `twJoin`, and `twMerge`. Use conventional `package.json` key ordering.

### Modules and declarations

- Imports first, alphabetically sorted ignoring case, with a blank line between groups. Use `node:` protocol for Node built-ins. Consolidate duplicate imports; use separate top-level `import type` declarations rather than inline `type` specifiers.
- If `@types/react` is installed as a dev dependency, prefer `React.*` types instead of named type imports; always import runtime React APIs by name.
- Use `@/*` or the project's equivalent source alias for imports outside the parent folder; `./` and `../` are allowed, `../../` is not. Aliases come from `tsconfig.json` paths resolved through `resolve.tsconfigPaths`, never a manual Vite alias. Import owning modules directly; avoid general-purpose barrels, cycles, and mutable exports.
- Export single local declarations directly; reserve local `export { ... }` lists for multiple exports. Default exports are allowed where appropriate, but never anonymous. Import from `vite-plus` instead of `vite` or `vitest` when Vite+ is present.
- Prefer `const`; use `let` only for reassignment, never `var`. One binding per declaration. Prefer arrow function expressions over declarations; define ordinary helpers before use, and hoist helpers that don't capture anything to module scope.
- Use kebab-case filenames and alphabetical object keys, except framework-required filenames and ordering that affects behavior or inference, including TanStack route options. Name the catch binding `error`.
- Use `T[]` for arrays, `interface` for object types and `type` for unions and other aliases, and `Set`/`Map` lookups over repeated array searches.

### Types and boundaries

- Preserve precise inference; avoid redundant annotations, aliases, generics, and widening followed by assertions. Prefer schemas, narrowing, and `satisfies` over casts. Strict boolean expressions: no truthiness checks on nullable strings or numbers; compare explicitly. Nullable objects may be tested directly.
- No explicit `any`, non-null assertions, `@ts-ignore`, or chained/double casts. Every necessary assertion except `as const` requires a nearby `SAFETY` comment explaining its evidence; comments do not make unsafe casts acceptable.
- Parse external data at I/O boundaries; pass concrete domain types through application code. No ordinary contracts using `unknown`, `Promise<unknown>`, or broad `object` parameters. Concrete object parameters and destructured props are allowed.
- Keep `unknown` explicit at validation/error boundaries; type-predicate subjects and error `cause` parameters may accept it. Never hide it behind aliases.
- Dictionary values must have concrete domain/schema-derived types, never `any`, `unknown`, `object`, or `{}`.
- Prefer validated domain values and discriminants in application code. Inline `typeof` checks are fine for simple narrowing. Use a named type predicate when it's reused or its name makes the validation rule clearer.
- Exhaustive `switch` on unions, with braces around each case body. Name symbols for their domain role; avoid `shape` in names. Use typed property access and direct calls, never `Reflect.get` or `Reflect.apply`.

### Control flow and data

- Always brace control-flow bodies. Prefer early returns and shallow branching; no nested ternaries, negated conditions with an `else`, or redundant `else` after return. Follow the configured cognitive-complexity limit; use 13 by default when setting up that rule. Without a checker, simplify functions that are hard to follow. Don't guess scores or split functions just to chase a number.
- Use strict equality, optional chaining, nullish coalescing over `||` for defaults, and explicit nullable-boolean handling. Prefer destructuring, shorthand properties, spread, template literals, and `.at(-1)` over length arithmetic.
- Use `for...of` for side effects/accumulation and focused array methods for transformations/queries; avoid `forEach` and `reduce`. Prefer `toSorted`/`toReversed` over mutating `sort`/`reverse`; avoid spreading growing accumulators.
- Never reassign parameters or use `++`/`--`. Avoid conditional object spreads with `{}` fallbacks; construct optional properties explicitly. Use numeric separators in long literals.
- Remove unused code, redundant wrappers, and empty production functions. Put comments on their own lines; omit commented-out code and placeholder TODO comments. Lift a string literal repeated three or more times into a named constant; test files are exempt.

### Async and errors

- Prefer `async`/`await`; avoid `.then()` chains, callback-based promise handling, and unnecessary `async`. Functions returning promises are `async`. Use `return await` when returning promises from async functions.
- Await or return promises; explicitly mark intentional fire-and-forget work with `void` and handle errors. Run independent operations concurrently with appropriate promise combinators; no `await` inside loops.
- Throw `Error` instances with meaningful messages and preserve causes when wrapping errors. No empty catches, catch-and-rethrow wrappers, or ignored exceptions.

### React

- Use module-level arrow components rendered through JSX. Keep rendering pure, state immutable, hooks unconditional, and dependencies complete. Name handlers `handleX` and handler props `onX`.
- Derive values during rendering; handle user actions in handlers. Reserve effects for external synchronization, with cleanup where needed. Avoid effect-based fetching, derived/mirrored state, effect chains, `setState` in effects, and action callbacks triggered through effects.
- Hoist independent static values and pure helpers to module scope. The Oxc React Compiler handles memoization, so no `memo`, `useMemo`, or `useCallback`. Target React 19+ APIs, including refs as props; no `forwardRef`, `React.Children`, or `cloneElement`.
- Use stable domain keys, never indexes or random values. Use the `<>` fragment shorthand and drop useless fragments. Use `type="button"` on non-submit buttons.
- Use semantic HTML, labels, accessible names, keyboard support, and visible focus; never `outline-none` without a replacement focus style. No nested interactive elements, raw HTML injection, `<dialog>` substitutes without accessible names, or `style` props on shared components.

### Styling

- Style with Tailwind v4 and shadcn/ui components. Shared components own appearance through variants; pages arrange them with layout classes only. Follow the design-system rules in [frontend toolchain](https://skilld.dev/api/skills-raw/mikeploythai/skills/mikes-way/references/frontend-toolchain.md#tailwind-design-system-linting): no raw palette colors, no arbitrary appearance values, no restyling a component's padding, color, typography, or shape from a caller, and only classes the theme can generate.
- Prefer logical properties and utilities over physical ones. In CSS, write `inline-size`, `block-size`, `margin-inline`, `padding-block`, `inset-inline-start`, `border-start-start-radius`, and `text-align: start`. In Tailwind, use `inline-*`, `block-*`, `min-inline-*`, `max-block-*`, `ms-*`, `me-*`, `ps-*`, `pe-*`, `start-*`, `end-*`, `border-s-*`, `rounded-s-*`, and `text-start` instead of `w-*`, `h-*`, `ml-*`, `pr-*`, `left-*`, `border-l-*`, `rounded-l-*`, and `text-left`. Use `size-*` when both dimensions match. Physical properties are only for things that are physically directional, such as shadows or a component that must not flip in right-to-left layouts.
- Animate transforms and opacity, not layout properties. Name the transitioned properties instead of `transition-all`. Keep durations short and respect reduced-motion preferences.

### TanStack

- Query: queries read, mutations write; keep clients stable, destructure only needed result fields, return query data, and invalidate affected queries after mutations.
- TanStack Router/Start: use framework navigation/loading APIs, preserve inference-sensitive option ordering, parallelize independent loader work, validate server inputs, and exclude secrets from client-visible loader data.

### Testing

- Never write unit tests.
- Prefer end-to-end tests as the only testing mechanism. Use them to verify complex feature work through the real product, not small changes the required checks already cover. Run them first with an agent driving a real browser; write Playwright tests only when the flow has to run unattended, such as in CI. Every e2e run ends with an artifact anyone can verify and repeat: the exact steps or command to rerun it, plus the screenshots, recording, trace, or report it produced.
- When a system needs testing in isolation, write down every way it could fail first, then write the code. The isolated test covers each of those failures.
- Tautological tests are harmful. A test that can't fail, or that restates the implementation, such as asserting a fake returns what it was told to return, proves nothing.
- Change-detector tests are harmful. A test that breaks on any refactor because it pins internals like call order, private helpers, or markup snapshots, rather than observable behavior, adds cost without catching bugs.
- A bug fix doesn't earn a regression test by default. Add one only when the bug exposed a genuine gap in behavior testing.
- Import Vitest APIs explicitly. Use deterministic, descriptively named tests inside a top-level `describe`, specific matchers, `toStrictEqual` for structural equality, `toHaveLength`, `toHaveBeenCalledOnce` for single calls and `toHaveBeenCalledTimes` otherwise, and parameterized `it.each` for repetition. Await async assertions and `expect.poll`. Give `toThrow` a message.
- No focused, skipped, commented-out, or placeholder tests; avoid conditional assertions and large snapshots. No module mocking; use injected dependencies, focused fakes, or narrow `vi.spyOn`.
- Temporary checks stay temporary. Before staging, inspect git status and the diff, and clean up the task's temporary files as described in rule 7. Test files should usually be deleted once they've validated the work; keep one only when it covers behavior nothing else tests.

Run the project's required checks and available formatting, lint, type checks, and relevant tests before finishing. With Vite+, that is `vp check`. Without equivalent tooling, review the applicable conventions manually. Fix code rather than weaken checks.
