In short.
code-structure is a refactoring skill for developers and coding assistants, but it requires project-specific judgment about where responsibilities belong. It proposes actions for workflow decisions and services for reusable operations, while preserving established domain services, repositories and transaction boundaries. Its practical strengths are concrete extraction criteria and incremental migration guidance; installation, compatibility and runtime outcomes are not established, and nothing was executed.
Researched and written by an AI model and checked by a second AI model. How it works
The selected scope is the code-structure folder in michaelshimeles/rstack, including SKILL.md, accompanying files and licence notices beside and above it. The supplied manifest marks the selected scope complete and lists only code-structure/SKILL.md. That file was available in full; no additional file or licence-notice text was supplied. Other repository content is outside this analysis. Installation, execution, integration, performance and application outcomes were not assessed.
The overview
Identity
code-structure is a SKILL.md instruction resource in michaelshimeles/rstack, titled Service Layer Architecture. It addresses duplicated operational logic and decisions about actions versus shared services. The source folder is [https://github.com/michaelshimeles/rstack/tree/main/code-structure]. It supplies architecture guidance and illustrative code rather than an implemented service library.
Assessment
The skill is useful when several workflows repeat the same operation and need consistent behavior. Its strongest feature is restraint: it asks for a concrete benefit before adding a layer and gives existing architectural boundaries priority over its default pattern.
It can guide a refactor, but it does not establish that a particular extraction is correct. Reduced duplication and more consistent fixes are intended benefits, with no measured results supplied.
Users
The intended use cases include developers and coding assistants handling repeated sandbox creation, email sending, payment processing or other shared mechanics. Beginners get a distinction between deciding what a workflow should do and implementing an operation. Experienced developers get guidance on dependency injection, persistence ownership, transactions and failure contracts.
Capabilities
The skill provides criteria for extracting operations, a responsibility map, service API design guidance, a migration checklist and common anti-patterns. It recommends small capabilities with explicit inputs and meaningful outputs instead of a single service method that controls an entire workflow.
It also recognizes reasons to extract code with only one caller, including testing, provider isolation, transactions or complexity. These are instructions for making design decisions; the file does not implement automated analysis, extraction or verification.
Using it
Requirements
Applying the guidance requires access to the affected workflows and an understanding of existing authentication, state changes, persistence and transaction ownership. Its migration checklist expects project verification through type checking, linting and checks that affected flows still work.
No assistant compatibility list, minimum runtime, package dependencies or required framework is specified. The examples use TypeScript syntax, but the architectural guidance does not declare a language requirement.
Mechanism
Under the default pattern, actions decide business rules, authorization, state transitions, failure classification, retries and user-facing errors. Services perform reusable operations such as provider calls, command execution and readiness checks, returning results that callers can use.
Service functions should expose dependencies through parameters and make failures explicit through typed results or documented exceptions. Persistence and transaction ownership follow the project's existing architecture; the skill does not require moving every database operation into a new service.
Setup
The supplied file does not document installation commands, an assistant-specific loading location or activation verification. How to install it in a particular coding assistant is therefore unknown.
For applying its guidance, the documented starting point is to identify existing responsibility boundaries and an operation whose extraction has a current benefit. Extract that operation, migrate one caller, verify its behavior and then migrate the remaining callers.
Example
The email example places message construction and the provider call in sendWelcomeEmail, accepting the recipient and name as parameters. Signup calls it only when marketingOptIn is true, while an administrator invitation calls the same function under its own workflow rule. The shared operation stays reusable because each caller decides when to invoke it.
The example illustrates responsibility separation. It does not supply provider configuration, a structured result or documented failure behavior, so it is not a complete implementation of every service-design recommendation in the file. It was not executed.
Assessment & evidence
Limitations
The skill leaves application-specific decisions to the developer, including which errors belong to which layer, how transactions work and when a new boundary earns its complexity. It names common failure modes but provides no enforcement tooling or complete reference application.
Its verification checklist does not include project-specific commands or tests. Framework compatibility, integration behavior, performance and successful preservation of authentication or transaction behavior were not assessed.
Reasoning
The design argument is that centralizing a shared operation gives multiple workflows one place to receive fixes, while keeping workflow decisions with their established owners. Explicit dependencies and visible side effects are intended to make those boundaries easier to understand.
A reasonable inference is that the skill offers its clearest value when several callers need the same mechanics but different policies. That inference follows from its examples and extraction criteria; the source supplies no comparative benchmark or empirical outcome.
Alternatives
The source explicitly supports retaining established domain services, repositories, transaction boundaries and framework patterns when they already fit. Keeping an operation in its current location is also consistent with the guidance when extraction adds indirection without a concrete benefit.
These are alternatives to introducing the proposed actions-and-services split. No named competing skills or libraries are compared in the supplied evidence.
Evidence
The available source is code-structure/SKILL.md at revision 11b15767d7587bab11f6c4957507b5f26d1785c7: [https://raw.githubusercontent.com/michaelshimeles/rstack/11b15767d7587bab11f6c4957507b5f26d1785c7/code-structure/SKILL.md]. Its recorded SHA-256 is aa2e0e88c3b3714898236d5f65e4102e21b43747de99ae503dfc15102aae6ba4.
The file supports findings about the stated architecture, checklist and example. It supplies no execution results, benchmarks or evidence of successful adoption in a working application.
Access & freshness
Costs
The supplied source contains no pricing or usage-cost information. The resource's cost is unknown. Any assistant or external-provider charges associated with applying it are also unspecified, and no cost estimate is supported.
Rights
No licence text or permission grant appears in the supplied material, and no separate licence notice is included in the manifest. Rights to copy, modify or redistribute the skill and its example code are unknown. Applicable folder and repository notices would need to be established before distributing a copy.
Freshness
The source snapshot was captured on 2026-11-16 at 03:11:55.395 UTC from the identified revision. This establishes the snapshot available for the report, not the file's last modification date or ongoing maintenance activity. Later changes and current assistant compatibility are unknown.
Actions
Start with one repeated operation and name the benefit of extracting it. Identify who currently owns authorization, policy, persistence and transactions; then define explicit inputs, outputs and failure behavior for a cohesive service operation.
Migrate one caller and verify the affected flow before changing the others. Preserve authentication, state transitions, error handling and transaction behavior. Use the project's type checking, linting and behavioral checks, and establish applicable licence permissions before redistributing the skill.
