structuring-projects_skill

This skill enforces universal architectural patterns for organizing code, ensuring domain-focused structure and clear public APIs across projects.
  • Shell

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill gpolanco/skills-as-context --skill structuring-projects

  • SKILL.md12.1 KB

Overview

This skill enforces universal architectural patterns for organizing project code across languages and frameworks. It defines mandatory reference reads for each project type and prescribes feature-based, DDD/hexagonal, and shared-infrastructure patterns to ensure clear module boundaries and inward dependency flow.

How this skill works

Before creating or moving files, the skill requires reading the exact reference for your project type to avoid inventing structure from memory. It inspects the project type, enforces a single source root (src/ or equivalent), and validates feature-level public APIs, path aliases, and dependency direction. It provides migration steps, audit commands, and concrete anti-patterns to correct dangerous layouts.

When to use it

  • Setting up a new project structure or monorepo apps
  • Creating new features, modules, or public APIs
  • Refactoring codebase organization or moving files
  • Defining import boundaries, path aliases, or module contracts
  • Implementing DDD, Hexagonal, or Clean Architecture patterns

Best practices

  • Always group code by domain/feature under src/, not by technical layer
  • Expose only a feature's public API via an index file; keep internals private
  • Use a single path alias (e.g. @/* → src/*) to avoid deep relative imports
  • Keep shared/ for cross-cutting infra (logging, config, errors), not business logic
  • Prevent circular dependencies and avoid global utils; keep helpers feature-scoped

Example use cases

  • Scaffold a simple CRUD service using the feature-based layout for quick delivery
  • Audit and migrate a legacy codebase: find deep relative imports and redistribute utils
  • Set up a large DDD-backed backend: read the DDD reference, then create domain/application/infrastructure layers
  • Organize a monorepo: apply the appropriate pattern per app under apps/ and keep shared packages isolated
  • Refactor a frontend Next.js app to follow the frontend reference with feature boundaries

FAQ

Yes. For each project type you must read the exact reference before creating or reorganizing structure; never invent the layout from memory.

Where should shared utilities live?

Place reusable cross-cutting concerns in shared/ (logging, config, errors). Domain-specific logic and types remain inside their feature.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
structuring-projects skill by gpolanco/skills-as-context | VeilStrat