# Ios Add Feature

> Scaffold a new feature with View, ViewModel, and tests following ios-std conventions.

- **Type:** Skill
- **Install:** `agentstack add skill-edfenton-claude-skills-ios-add-feature`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [edfenton](https://agentstack.voostack.com/s/edfenton)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [edfenton](https://github.com/edfenton)
- **Source:** https://github.com/edfenton/claude-skills/tree/main/ios/ios-add-feature

## Install

```sh
agentstack add skill-edfenton-claude-skills-ios-add-feature
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Purpose
Add a complete feature module to an existing iOS project with View, ViewModel, and tests.

## Arguments
- `feature-name` — Feature name in PascalCase (e.g., `Settings`, `UserProfile`)
- `--with-detail` — Include detail view for drill-down
- `--with-form` — Include form/edit view
- `--no-tests` — Skip test file generation

## What gets created

### Default
```
Features//
├── View.swift           # Main view
├── ViewModel.swift      # ViewModel with state + intents
└── Row.swift            # List row component (if list-based)

Tests/UnitTests/
└── ViewModelTests.swift # ViewModel tests
```

### With `--with-detail`
```
Features//
├── View.swift
├── ViewModel.swift
├── DetailView.swift     # Detail view
└── DetailViewModel.swift
```

### With `--with-form`
```
Features//
├── View.swift
├── ViewModel.swift
├── FormView.swift       # Create/edit form
└── FormViewModel.swift
```

## Conventions

### File naming
- Views: `View.swift`
- ViewModels: `ViewModel.swift`
- Rows/cells: `Row.swift`
- Tests: `ViewModelTests.swift`

### ViewModel pattern
- `@MainActor final class`
- `@Published private(set)` for state
- Public methods for intents
- Dependencies injected via init
- Uses `PersistenceStore` protocol (not SwiftData directly)

### View pattern
- `@StateObject` for owned ViewModel
- `@EnvironmentObject` for shared services
- No business logic in views
- Accessibility labels on controls

### Test pattern (Swift Testing)
- `struct` (not `XCTestCase` class)
- `init()` for setup (not `setUp()`)
- `@Test func methodName()` (no `test_` prefix)
- `#expect(condition)` for assertions
- `@Test(arguments:)` for parameterized tests

## Workflow
1. Create feature folder under `Features/`
2. Create View with basic layout
3. Create ViewModel with state and intents
4. Wire up to DependencyContainer
5. Create tests for ViewModel
6. Run `./scripts/lint.sh` and tests to verify

## Output
Summarize: files created, how to access the feature, test coverage.

## Reference
For templates and patterns, see `reference/ios-add-feature-reference.md`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [edfenton](https://github.com/edfenton)
- **Source:** [edfenton/claude-skills](https://github.com/edfenton/claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-edfenton-claude-skills-ios-add-feature
- Seller: https://agentstack.voostack.com/s/edfenton
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
