project-structure — project-structure directory layout project-structure, Challenge, community, project-structure directory layout, ide skills, project-structure install for AI agents, project-structure and AppKit integration, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Code Analysis Agents needing comprehensive project organization and directory structure guidance. project-structure is a skill that provides guidance on organizing project directories and files, including App and Tests folders, and Assets.xcassets management

Features

Creates a minimal entry point with AppKit imports in AppNameApp.swift
Organizes files into Sources, Resources, and Tests directories
Manages UI tests in the Tests/UI folder
Supports extensions to existing types
Provides a directory structure for App and Tests folders

# Core Topics

vjr2005 vjr2005
[0]
[0]
Updated: 3/7/2026

Agent Capability Analysis

The project-structure skill by vjr2005 is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for project-structure directory layout, project-structure install for AI agents, project-structure and AppKit integration.

Ideal Agent Persona

Perfect for Code Analysis Agents needing comprehensive project organization and directory structure guidance.

Core Value

Empowers agents to create modular and scalable codebases using standardized directory layouts, facilitating the addition of new feature modules and extensions to existing types, while ensuring correct file organization and codebase layout understanding through AppKit and Assets.xcassets.

Capabilities Granted for project-structure

Organizing files and directories for a new feature module
Creating a modular and scalable codebase structure
Understanding and navigating existing codebase layouts

! Prerequisites & Limits

  • Requires knowledge of AppKit and Assets.xcassets
  • Specific to Swift-based projects
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

project-structure

Install project-structure, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

Skill: Project Structure

Guide for project organization and directory structure.

When to use this skill

  • Create a new feature module
  • Organize files correctly
  • Understand the codebase layout
  • Add extensions to existing types

Project Overview

{AppName}/
├── App/
│   ├── Sources/
│   │   ├── {AppName}App.swift        # Minimal entry point (imports AppKit)
│   │   └── Resources/
│   │       └── Assets.xcassets/
│   └── Tests/
│       └── UI/                       # UI tests only
├── AppKit/                           # Testable app code (SPM local package)
│   ├── Package.swift
│   ├── Sources/
│   │   ├── AppContainer.swift        # Composition Root (centralized DI)
│   │   ├── Data/
│   │   │   └── AppEnvironment+API.swift
│   │   └── Presentation/
│   │       ├── Navigation/
│   │       │   └── AppNavigationRedirect.swift
│   │       └── Views/
│   │           └── RootContainerView.swift
│   └── Tests/
│       ├── Unit/                     # Unit tests
│       ├── Snapshots/                # Snapshot tests
│       └── Shared/                   # Shared resources
├── Features/                         # Each feature is an SPM local package
│   ├── {Feature}/
│   │   ├── Package.swift
│   │   └── ...
│   └── Home/
│       ├── Package.swift
│       └── ...
├── Libraries/                        # Each library is an SPM local package
│   ├── Core/
│   │   ├── Package.swift
│   │   └── ...
│   ├── Networking/
│   ├── DesignSystem/
│   └── SnapshotTestKit/
├── Shared/
│   └── Resources/
│       ├── Package.swift
│       └── ...
├── Derived/                          # Generated by Tuist (gitignored)
│   └── InfoPlists/
├── Tuist/
│   ├── ProjectDescriptionHelpers/
│   └── Package.swift               # External SPM dependencies + target settings
├── Project.swift                    # Root project (app + UI tests + module packages)
├── Workspace.swift                  # Workspace configuration (code coverage)
├── {AppName}.xctestplan            # Test plan aggregating all module test targets (SPM strategy only)
├── Tuist.swift
└── CLAUDE.md

Key Architecture:

  • App: Minimal entry point that imports ChallengeAppKit
  • AppKit: Framework containing testable app code (AppContainer, RootContainerView, AppNavigationRedirect). Tests run without TEST_HOST.

Feature Naming

Feature directory names must not contain the word "Feature". Use simple, descriptive names:

// RIGHT
Features/User/
Features/Character/
Features/Home/

// WRONG
Features/UserFeature/
Features/CharacterFeature/

Feature Module Structure

Each feature module follows this internal structure:

FeatureName/
├── Package.swift                            # SPM local package definition
├── Sources/
│   ├── {Feature}Feature.swift              # Public entry point (navigation + deep links)
│   ├── {Feature}Container.swift            # Dependency composition (factories)
│   ├── Domain/
│   │   ├── Models/
│   │   │   └── {Name}.swift                # Domain models
│   │   ├── UseCases/
│   │   │   └── Get{Name}UseCase.swift      # Business logic
│   │   └── Repositories/
│   │       └── {Name}RepositoryContract.swift  # Repository contracts
│   ├── Data/
│   │   ├── DataSources/
│   │   │   ├── Remote/
│   │   │   │   ├── {Name}RemoteDataSourceContract.swift
│   │   │   │   └── {Name}RESTDataSource.swift
│   │   │   └── Local/
│   │   │       ├── {Name}LocalDataSourceContract.swift
│   │   │       └── {Name}MemoryDataSource.swift
│   │   ├── DTOs/
│   │   │   └── {Name}DTO.swift
│   │   ├── Mappers/
│   │   │   └── {Name}Mapper.swift
│   │   └── Repositories/
│   │       └── {Name}Repository.swift
│   └── Presentation/
│       ├── Navigation/                             # Feature-level navigation (inside Presentation)
│       │   ├── {Feature}IncomingNavigation.swift   # Navigation destinations
│       │   ├── {Feature}OutgoingNavigation.swift   # Cross-feature navigation (optional)
│       │   └── {Feature}DeepLinkHandler.swift      # Deep link handler
│       ├── {Name}List/
│       │   ├── Navigator/
│       │   │   ├── {Name}ListNavigatorContract.swift
│       │   │   └── {Name}ListNavigator.swift
│       │   ├── Tracker/
│       │   │   ├── {Name}ListTrackerContract.swift
│       │   │   ├── {Name}ListTracker.swift
│       │   │   └── {Name}ListEvent.swift
│       │   ├── Views/
│       │   │   └── {Name}ListView.swift
│       │   └── ViewModels/
│       │       ├── {Name}ListViewModel.swift
│       │       └── {Name}ListViewState.swift
│       └── {Name}Detail/
│           ├── Navigator/
│           │   ├── {Name}DetailNavigatorContract.swift
│           │   └── {Name}DetailNavigator.swift
│           ├── Tracker/
│           │   ├── {Name}DetailTrackerContract.swift
│           │   ├── {Name}DetailTracker.swift
│           │   └── {Name}DetailEvent.swift
│           ├── Views/
│           │   └── {Name}DetailView.swift
│           └── ViewModels/
│               ├── {Name}DetailViewModel.swift
│               └── {Name}DetailViewState.swift
├── Tests/
│   ├── Unit/                                # Unit tests (Swift Testing)
│   │   ├── Domain/
│   │   │   └── UseCases/
│   │   │       └── Get{Name}UseCaseTests.swift
│   │   ├── Data/
│   │   │   ├── Repositories/
│   │   │   │   └── {Name}RepositoryTests.swift
│   │   ├── Presentation/
│   │   │   ├── Navigation/
│   │   │   │   └── {Feature}DeepLinkHandlerTests.swift
│   │   │   └── {Name}List/
│   │   │       └── ViewModels/
│   │   │           └── {Name}ListViewModelTests.swift
│   │   └── Feature/
│   │       └── {Feature}FeatureTests.swift
│   ├── Snapshots/                           # Snapshot tests (ChallengeSnapshotTestKit)
│   │   └── Presentation/
│   │       └── {Name}List/
│   │           ├── {Name}ListViewSnapshotTests.swift
│   │           └── __Snapshots__/
│   └── Shared/                              # Shared resources
│       ├── Stubs/
│       │   └── {Name}+Stub.swift
│       ├── Mocks/
│       │   ├── Get{Name}UseCaseMock.swift
│       │   └── {Name}RepositoryMock.swift
│       ├── Fixtures/
│       │   └── {name}.json
│       ├── Extensions/
│       │   └── {Name}ViewState+Equatable.swift
│       └── Resources/
│           └── test-avatar.jpg
└── Mocks/                                   # Public mocks (if needed)
    └── {Name}RepositoryMock.swift

Presentation Layer Organization

The Presentation layer groups related Views and ViewModels by feature name:

Presentation/
├── CharacterDetail/            # Feature: Character detail screen
│   ├── Navigator/
│   │   ├── CharacterDetailNavigatorContract.swift
│   │   └── CharacterDetailNavigator.swift
│   ├── Tracker/
│   │   ├── CharacterDetailTrackerContract.swift
│   │   ├── CharacterDetailTracker.swift
│   │   └── CharacterDetailEvent.swift
│   ├── Views/
│   │   └── CharacterDetailView.swift
│   └── ViewModels/
│       ├── CharacterDetailViewModel.swift
│       └── CharacterDetailViewState.swift
├── CharacterList/              # Feature: Character list screen
│   ├── Navigator/
│   │   ├── CharacterListNavigatorContract.swift
│   │   └── CharacterListNavigator.swift
│   ├── Tracker/
│   │   ├── CharacterListTrackerContract.swift
│   │   ├── CharacterListTracker.swift
│   │   └── CharacterListEvent.swift
│   ├── Views/
│   │   └── CharacterListView.swift
│   └── ViewModels/
│       ├── CharacterListViewModel.swift
│       └── CharacterListViewState.swift
└── ...

Naming conventions:

  • Folder name matches the feature (e.g., CharacterDetail)
  • Navigator: {Feature}Navigator.swift and {Feature}NavigatorContract.swift
  • Tracker: {Feature}Tracker.swift, {Feature}TrackerContract.swift, and {Feature}Event.swift
  • View: {Feature}View.swift
  • ViewModel: {Feature}ViewModel.swift
  • ViewState: {Feature}ViewState.swift

Extensions

Extensions of external framework types (Foundation, UIKit, SwiftUI, etc.) must be placed in an Extensions/ folder.

Location

Sources/
├── Extensions/
│   ├── URL+QueryItems.swift
│   ├── Date+Formatting.swift
│   └── String+Validation.swift
└── ...

Tests/
├── Extensions/
│   ├── URLSession+Mock.swift
│   ├── HTTPURLResponse+Mock.swift
│   └── URLRequest+BodyData.swift
└── ...

Naming Convention

Pattern: TypeName+Purpose.swift

swift
1// URL+QueryItems.swift 2extension URL { 3 func appendingQueryItems(_ items: [URLQueryItem]) -> URL { ... } 4} 5 6// URLSession+Mock.swift (in Tests) 7extension URLSession { 8 static func mockSession() -> URLSession { ... } 9} 10 11// Date+Formatting.swift 12extension Date { 13 func formatted(style: DateFormatter.Style) -> String { ... } 14}

Tests Directory Structure

Tests/
├── Unit/                         # Unit tests (Swift Testing)
│   ├── Domain/
│   │   └── UseCases/
│   │       └── Get{Name}UseCaseTests.swift
│   ├── Data/
│   │   ├── Repositories/
│   │   │   └── {Name}RepositoryTests.swift
│   │   └── DataSources/
│   │       ├── Remote/
│   │       │   └── {Name}RemoteDataSourceTests.swift
│   │       └── Local/
│   │           └── {Name}MemoryDataSourceTests.swift
│   ├── Presentation/
│   │   └── {ScreenName}/
│   │       └── ViewModels/
│   │           └── {ScreenName}ViewModelTests.swift
│   └── Feature/
│       └── {Feature}FeatureTests.swift
├── Snapshots/                    # Snapshot tests (ChallengeSnapshotTestKit)
│   └── Presentation/
│       └── {ScreenName}/
│           ├── {ScreenName}ViewSnapshotTests.swift
│           └── __Snapshots__/
├── UI/                           # UI tests (XCTest, App only)
└── Shared/                       # Shared resources (used by Unit, Snapshots, and UI)
    ├── Stubs/                    # Domain model test data
    │   ├── Character+Stub.swift
    │   └── Location+Stub.swift
    ├── Mocks/                    # Internal test mocks
    │   ├── Get{Name}UseCaseMock.swift
    │   └── {Name}RepositoryMock.swift
    ├── Fixtures/                 # JSON fixtures for DTOs
    │   ├── character.json
    │   └── character_list.json
    ├── Extensions/               # Test helpers (Equatable, etc.)
    │   └── {Name}ViewState+Equatable.swift
    ├── Scenarios/                # Reusable SwiftMockServer configurations (UI tests)
    │   └── UITestCase+Scenarios.swift
    └── Resources/                # Test images
        └── test-avatar.jpg

Mocks Location

LocationVisibilityUsage
Mocks/ (framework)PublicMocks used by other modules
Tests/Shared/Mocks/InternalMocks shared between Unit and Snapshot tests
FeatureName/
├── Mocks/                    # Public mocks ({AppName}FeatureNameMocks framework)
│   └── {Name}RepositoryMock.swift
└── Tests/
    └── Shared/
        └── Mocks/            # Internal test-only mocks
            └── {Name}DataSourceMock.swift

Core Module

Libraries/Core/
├── Sources/
│   ├── AppEnvironment/
│   │   └── AppEnvironment.swift      # Base environment enum
│   ├── Feature/
│   │   └── FeatureContract.swift      # Feature protocol
│   ├── Navigation/
│   │   ├── NavigationCoordinator.swift   # @Observable path manager
│   │   ├── NavigatorContract.swift       # Navigation protocol
│   │   ├── NavigationRedirectContract.swift
│   │   ├── Navigation.swift              # Base navigation protocol
│   │   ├── AnyNavigation.swift           # Type-erased wrapper
│   │   └── DeepLinkHandler.swift
│   ├── ImageLoader/
│   │   ├── ImageLoaderContract.swift
│   │   ├── CachedImageLoader.swift
│   │   ├── ImageLoaderEnvironment.swift
│   │   ├── DiskCache/
│   │   │   ├── ImageDiskCacheContract.swift
│   │   │   ├── ImageDiskCache.swift
│   │   │   ├── DiskCacheConfiguration.swift
│   │   │   ├── FileSystemContract.swift
│   │   │   └── FileSystem.swift
│   │   └── MemoryCache/
│   │       ├── ImageMemoryCacheContract.swift
│   │       └── ImageMemoryCache.swift
│   ├── Tracking/
│   │   ├── TrackerContract.swift
│   │   ├── Tracker.swift
│   │   ├── TrackingEventContract.swift
│   │   └── Providers/
│   │       ├── TrackingProviderContract.swift
│   │       └── ConsoleTrackingProvider.swift
│   └── Extensions/
│       └── ...
├── Tests/
│   └── Unit/
│       ├── AppEnvironment/
│       │   └── AppEnvironmentTests.swift
│       ├── Navigation/
│       │   └── NavigationCoordinatorTests.swift
│       └── Tracking/
│           ├── TrackerTests.swift
│           └── ConsoleTrackingProviderTests.swift
└── Mocks/
    ├── NavigatorMock.swift
    ├── TrackerMock.swift
    ├── ImageLoaderMock.swift
    └── Bundle+JSON.swift

Networking Module

Libraries/Networking/
├── Sources/
│   ├── HTTP/
│   │   ├── HTTPClient.swift
│   │   ├── HTTPClientContract.swift
│   │   ├── Endpoint.swift
│   │   ├── HTTPMethod.swift
│   │   └── HTTPError.swift
├── Tests/
│   └── Unit/
└── Mocks/
    └── HTTPClientMock.swift

Shared Directory

The Shared/ directory contains app-specific modules (not reusable across apps).

Resources Module

Shared/Resources/
├── Package.swift
├── Sources/
│   ├── Extensions/
│   │   └── String+Localized.swift    # localized() extension
│   └── Resources/
│       └── Localizable.xcstrings
└── Tests/

The Resources module provides:

  • Localization: Centralized Localizable.xcstrings and String.localized() extension
  • Bundle.module: Auto-generated by SPM for targets with resources

Derived Directory

Tuist generates files in Derived/ (gitignored):

Derived/
└── InfoPlists/
    ├── {AppName}-Info.plist
    └── {AppName}UITests-Info.plist

Contents: Only Info.plist files for the app and UI tests targets. Module Info.plists are managed by SPM.

No generated Swift code: disableBundleAccessors and disableSynthesizedResourceAccessors are enabled in Project.swift.


App and AppKit Directories

The app code is split into two modules:

  • App: Minimal entry point with UI tests only
  • AppKit: Testable app code (unit and snapshot tests run here without TEST_HOST)
App/
├── Sources/
│   ├── {AppName}App.swift        # Minimal entry point (imports AppKit)
│   └── Resources/
│       └── Assets.xcassets/
│           ├── AppIcon.appiconset/        # Production icon
│           ├── AppIconDev.appiconset/     # Development icon
│           └── AppIconStaging.appiconset/ # Staging icon
└── Tests/
    ├── Shared/
    │   ├── Robots/               # Robot pattern for UI interactions
    │   ├── Scenarios/            # Reusable SwiftMockServer configurations
    │   ├── Stubs/                # Test data helpers
    │   ├── Fixtures/             # JSON fixtures
    │   └── Resources/            # Test images
    └── UI/                       # UI tests only (XCTest)

AppKit/
├── Sources/
│   ├── AppContainer.swift        # Composition Root (centralized DI)
│   ├── Data/
│   │   └── AppEnvironment+API.swift  # API configuration extension
│   └── Presentation/
│       ├── Navigation/
│       │   └── AppNavigationRedirect.swift
│       └── Views/
│           └── RootContainerView.swift    # Root view with navigation
└── Tests/
    ├── Unit/                     # Unit tests (Swift Testing)
    │   ├── Data/
    │   │   └── AppEnvironment+APITests.swift
    │   └── Presentation/
    │       └── Navigation/
    │           ├── AppContainerNavigationTests.swift
    │           └── AppNavigationRedirectTests.swift
    ├── Snapshots/                # Snapshot tests
    │   └── Presentation/
    └── Shared/                   # Shared resources
        └── Stubs/

Why AppKit? Unit and snapshot tests for app-level code can run without launching the app (no TEST_HOST required).


File Naming Summary

ComponentNaming PatternExample
Feature folder{Name}/Character/
Public entry{Feature}Feature.swiftCharacterFeature.swift
Container{Feature}Container.swiftCharacterContainer.swift
NavigationPresentation/Navigation/{Feature}IncomingNavigation.swiftPresentation/Navigation/CharacterIncomingNavigation.swift
Domain model{Name}.swiftCharacter.swift
DTO{Name}DTO.swiftCharacterDTO.swift
UseCase{Action}{Name}UseCase.swiftGetCharacterUseCase.swift
Repository{Name}Repository.swiftCharacterRepository.swift
Mapper{Name}Mapper.swiftCharacterMapper.swift
Contract{Name}Contract.swiftCharacterRepositoryContract.swift
DataSource Contract{Name}{Type}DataSourceContract.swiftCharacterRemoteDataSourceContract.swift
DataSource Implementation{Name}{Impl}DataSource.swiftCharacterRESTDataSource.swift, CharacterMemoryDataSource.swift
Navigator{ScreenName}Navigator.swiftCharacterDetailNavigator.swift
NavigatorContract{ScreenName}NavigatorContract.swiftCharacterDetailNavigatorContract.swift
Tracker{ScreenName}Tracker.swiftCharacterDetailTracker.swift
TrackerContract{ScreenName}TrackerContract.swiftCharacterDetailTrackerContract.swift
Event{ScreenName}Event.swiftCharacterDetailEvent.swift
View{ScreenName}View.swiftCharacterDetailView.swift
ViewModel{ScreenName}ViewModel.swiftCharacterDetailViewModel.swift
ViewState{ScreenName}ViewState.swiftCharacterDetailViewState.swift
Test{Component}Tests.swiftCharacterRepositoryTests.swift
Feature Test{Feature}FeatureTests.swiftCharacterFeatureTests.swift
Stub{Name}+Stub.swiftCharacter+Stub.swift
Mock{Name}Mock.swiftCharacterRepositoryMock.swift
Extension{Type}+{Purpose}.swiftURL+QueryItems.swift
Package definitionPackage.swiftPackage.swift
JSON fixture{name}.jsoncharacter.json

Checklist

  • App contains only {AppName}App.swift and UI tests (with Robots, Scenarios, Stubs, Fixtures)
  • AppKit contains testable code: AppContainer.swift, RootContainerView.swift, AppNavigationRedirect.swift
  • Feature folder does not contain "Feature" suffix
  • {Feature}Container.swift for dependency composition
  • {Feature}Feature.swift as public entry point with makeMainView() and resolve()
  • Sources organized by layer: Domain, Data, Presentation
  • Navigation folder inside Presentation/Navigation/
  • Presentation organized by screen: {ScreenName}/Navigator/, {ScreenName}/Tracker/, {ScreenName}/Views/, {ScreenName}/ViewModels/
  • Unit tests in Tests/Unit/ mirroring Sources structure
  • Snapshot tests in Tests/Snapshots/
  • Feature tests in Tests/Unit/Feature/
  • Extensions in dedicated Extensions/ folder
  • Extension files named {Type}+{Purpose}.swift
  • Public mocks in Mocks/, internal mocks in Tests/Shared/Mocks/
  • Stubs in Tests/Shared/Stubs/
  • JSON fixtures in Tests/Shared/Fixtures/
  • Test resources in Tests/Shared/Resources/
  • Module has its own Package.swift with source, mocks, and test targets
  • Module's test target is included in the Dev scheme (Framework: via testableTargets, SPM: via Challenge.xctestplan)
  • Module's target settings are configured in Tuist/Package.swift

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is project-structure?

Perfect for Code Analysis Agents needing comprehensive project organization and directory structure guidance. project-structure is a skill that provides guidance on organizing project directories and files, including App and Tests folders, and Assets.xcassets management

How do I install project-structure?

Run the command: npx killer-skills add vjr2005/Challenge/project-structure. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for project-structure?

Key use cases include: Organizing files and directories for a new feature module, Creating a modular and scalable codebase structure, Understanding and navigating existing codebase layouts.

Which IDEs are compatible with project-structure?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for project-structure?

Requires knowledge of AppKit and Assets.xcassets. Specific to Swift-based projects.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add vjr2005/Challenge/project-structure. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use project-structure immediately in the current project.

Related Skills

Looking for an alternative to project-structure or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI