Code Structure

Split shared operations from product rules.

By

Michael Shimeles

Price

Free

Code Structure is an agent skill by Michael Shimeles that helps an agent decide where shared logic belongs. Actions keep the business rules and a service layer holds the reusable operations, but only when the project has no pattern of its own.

What it does

  • Follows the project's existing services, repositories, and transaction boundaries first.
  • Separates what a product flow means, like auth checks, state changes, and retries, from how an operation runs, like SDK calls and health checks.
  • Designs services as small composable functions with explicit inputs and structured results.
  • Moves one caller at a time and verifies it before migrating the rest.
  • Flags god services, hidden side effects, and layers that add indirection with no real benefit.

When to use it

Use it when several workflows copy the same operational code, or when a new feature shares mechanics with an existing one.

How to get it

The skill is free on GitHub, in Michael Shimeles's rstack repo. Install it with npx skills add michaelshimeles/rstack -s code-structure, or drop -s to get the whole stack.

more skills

Matt Pocock

Code Review

Matt Pocock

Review a branch against your standards and the spec.

Matt Pocock

Prototype

Matt Pocock

Answer a design question with throwaway code.

Jakub Krehel

Better Typography

Jakub Krehel

Set the type scale, spacing, and wrapping right.

Matt Pocock

Improve Codebase Architecture

Matt Pocock

Find the refactors that make a codebase easier to change.

Code Structure

Split shared operations from product rules.

By

Michael Shimeles

Price

Free

Code Structure is an agent skill by Michael Shimeles that helps an agent decide where shared logic belongs. Actions keep the business rules and a service layer holds the reusable operations, but only when the project has no pattern of its own.

What it does

  • Follows the project's existing services, repositories, and transaction boundaries first.
  • Separates what a product flow means, like auth checks, state changes, and retries, from how an operation runs, like SDK calls and health checks.
  • Designs services as small composable functions with explicit inputs and structured results.
  • Moves one caller at a time and verifies it before migrating the rest.
  • Flags god services, hidden side effects, and layers that add indirection with no real benefit.

When to use it

Use it when several workflows copy the same operational code, or when a new feature shares mechanics with an existing one.

How to get it

The skill is free on GitHub, in Michael Shimeles's rstack repo. Install it with npx skills add michaelshimeles/rstack -s code-structure, or drop -s to get the whole stack.

more skills

Matt Pocock

Code Review

Matt Pocock

Review a branch against your standards and the spec.

Matt Pocock

Prototype

Matt Pocock

Answer a design question with throwaway code.

Jakub Krehel

Better Typography

Jakub Krehel

Set the type scale, spacing, and wrapping right.

Matt Pocock

Improve Codebase Architecture

Matt Pocock

Find the refactors that make a codebase easier to change.

Code Structure

Split shared operations from product rules.

By

Michael Shimeles

Price

Free

Code Structure is an agent skill by Michael Shimeles that helps an agent decide where shared logic belongs. Actions keep the business rules and a service layer holds the reusable operations, but only when the project has no pattern of its own.

What it does

  • Follows the project's existing services, repositories, and transaction boundaries first.
  • Separates what a product flow means, like auth checks, state changes, and retries, from how an operation runs, like SDK calls and health checks.
  • Designs services as small composable functions with explicit inputs and structured results.
  • Moves one caller at a time and verifies it before migrating the rest.
  • Flags god services, hidden side effects, and layers that add indirection with no real benefit.

When to use it

Use it when several workflows copy the same operational code, or when a new feature shares mechanics with an existing one.

How to get it

The skill is free on GitHub, in Michael Shimeles's rstack repo. Install it with npx skills add michaelshimeles/rstack -s code-structure, or drop -s to get the whole stack.

more skills

Matt Pocock

Code Review

Matt Pocock

Review a branch against your standards and the spec.

Matt Pocock

Prototype

Matt Pocock

Answer a design question with throwaway code.

Jakub Krehel

Better Typography

Jakub Krehel

Set the type scale, spacing, and wrapping right.

Matt Pocock

Improve Codebase Architecture

Matt Pocock

Find the refactors that make a codebase easier to change.