SwiftUI Agent Skill — Scoping What NOT to Include
A rare example that spends most of its length defining boundaries: what the skill must exclude (architecture opinions, formatting, tool…
- Type
- CLAUDE.md Example
- Repository
- AvdLee/SwiftUI-Agent-Skill
- GitHub stars
- 3.6k
- License
- MIT
- Repo last updated
- Sep 18, 2026
- Source file
- AGENTS.md
What SwiftUI Agent Skill — Scoping What NOT to Include is
SwiftUI Agent Skill — Scoping What NOT to Include is a claude.md example published in the AvdLee/SwiftUI-Agent-Skill repository on GitHub, which has about 3.6k stars. The repository describes itself as: “Add expert SwiftUI Best Practices guidance to your AI coding tool (Agent Skills open format).”
A CLAUDE.md file holds standing instructions that Claude Code reads at the start of every session in a project, such as conventions, commands, and rules. Examples like SwiftUI Agent Skill — Scoping What NOT to Include show how other teams structure theirs.
In Claude Cowork, the equivalent places for this kind of guidance are your global instructions, project instructions, and folder instructions.
How to install SwiftUI Agent Skill — Scoping What NOT to Include
Claude Code
- Copy the parts that fit your project into CLAUDE.md at the project root, or into ~/.claude/CLAUDE.md for rules that apply everywhere.
- Keep it short and specific; remove anything that doesn't match how your team works.
Claude Cowork
- Put personal rules in Settings → Instructions for Claude (global instructions).
- Put project or folder rules in the project's instructions or the folder instructions for that directory.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from AGENTS.md, shared under the repository's MIT license. Read the full file on GitHub.
This document provides guidance for AI agents working with this skill to ensure consistency and avoid common pitfalls.
Core Principles
1. SwiftUI Focus Only
This is a SwiftUI skill. Do not include:
- Swift concurrency patterns (use .task for SwiftUI-specific needs only)
- General Swift language features unrelated to SwiftUI
- Backend or server-side Swift patterns
- UIKit patterns (except when bridging is necessary)
2. No Code Formatting or Linting
Do not include formatting/linting rules. Avoid:
- Property ordering requirements (environment, state, body, etc.)
- Code organization mandates
- Whitespace or indentation rules
- Naming convention enforcement
- File structure requirements
Exception: Mention organization patterns as optional suggestions for readability, never as requirements.
3. No Architectural Opinions
Stick to facts, not architectures. Avoid:
- Enforcing MVVM, MVC, VIPER, or any specific architecture
- Mandating view model patterns
- Requiring specific folder structures
- Dictating dependency injection patterns
- Prescribing router/coordinator patterns
Exception: Suggest separating business logic for testability without enforcing how.
4. Keep Tooling SwiftUI-Specific and Consent-Aware
The skill includes focused Instruments tooling for SwiftUI performance work. Tool-specific instructions are allowed only when they directly support the bundled trace recording and analysis workflows. Do not add unrelated IDE, debugging, build-system, or general command-line guidance.
Agents using the trace tooling must:
- Prefer app-scoped --attach or --launch recordings.
- Explain the privacy implications and obtain explicit user approval before a system-wide recording.
- Pass --allow-system-wide-recording with --all-processes after approval.
- Avoid exposing environment-variable values or other secrets in output.
- Treat trace files and extracted logs as potentially sensitive user data.
Content Guidelines
Suggestions vs Requirements
Use "suggest" or "consider" for optional optimizations:
- ✅ "Consider downsampling images when using UIImage(data:)"
- ❌ "Always downsample images"
Use "always" or "never" only for correctness issues:
- ✅ "Never use .indices for dynamic ForEach content"
- ✅ "Always mark @State as private"
Performance Optimizations
Present performance optimizations as optional improvements:
- Image downsampling: Suggest when UIImage(data:) is encountered
- POD view wrappers: Mention as advanced optimization technique
- Equatable conformance: Suggest for expensive views
Do not automatically apply optimizations. Let developers decide based on their performance needs.
What to Include
✅ Include These Topics:
- Property wrapper selection (@State, @Binding, @Observable, etc.)
- View composition and extraction patterns
- Performance patterns (stable identity, lazy loading, etc.)
- Common pitfalls and how to avoid them
- Sheet, navigation, and list patterns
- Liquid Glass API usage (iOS 26+)
- Accessibility best practices
❌ Exclude These Topics:
- Swift concurrency deep dives (actors, sendable, etc.)
- Code formatting and style rules
- Architectural patterns and mandates
- Tool usage unrelated to the bundled SwiftUI Instruments workflows
- File organization requirements
- Testing frameworks and patterns
- Build system configuration
- Project structure mandates
Language and Tone
Use Clear, Direct Language:
- "Consider X when Y" (for optimizations)
- "Avoid X because Y" (for anti-patterns)
- "X is preferred over Y" (for best practices)
Avoid Prescriptive Language:
- ❌ "You must organize properties in this order"
- ❌ "Always use MVVM architecture"
- ❌ "Run unrelated debugger or build-system commands"
- ❌ "Structure your project like this"
Examples
Good Example:
## ForEach Identity
**Always provide stable identity for `ForEach`.** Never use `.indices` for dynamic content.
When you encounter `UIImage(data:)`, consider suggesting image downsampling as a performance optimization.Bad Example:
## View Organization
**Always organize view properties in this order:**
1. Environment
2. State
3. Body
4. Helpers
**Use unrelated tooling:**
1. Reconfigure the build system
2. Run a general-purpose debugger workflow Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is SwiftUI Agent Skill — Scoping What NOT to Include?
SwiftUI Agent Skill — Scoping What NOT to Include is a claude.md example for Claude Code and Claude Cowork from the AvdLee/SwiftUI-Agent-Skill repository on GitHub. A rare example that spends most of its length defining boundaries: what the skill must exclude (architecture opinions, formatting, tool…
How do I install SwiftUI Agent Skill — Scoping What NOT to Include in Claude Code?
Copy the parts that fit your project into CLAUDE.md at the project root, or into ~/.claude/CLAUDE.md for rules that apply everywhere. Keep it short and specific; remove anything that doesn't match how your team works.
Can I use SwiftUI Agent Skill — Scoping What NOT to Include in Claude Cowork?
Put personal rules in Settings → Instructions for Claude (global instructions). Put project or folder rules in the project's instructions or the folder instructions for that directory.
Is SwiftUI Agent Skill — Scoping What NOT to Include safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Swiftui Expert Skill Write, review, or improve SwiftUI code following best practices for state management, view composition, performance, macOS-specific APIs… Skill · AvdLee/SwiftUI-Agent-Skill
- Swiftui Expert Expert SwiftUI guidance for state management, view composition, performance, modern SDK APIs, and Liquid Glass adoption. Plugin · AvdLee/SwiftUI-Agent-Skill
- Supabase Agent Skills — Symlinked Config + Task Runner Shows the pragmatic way to serve multiple agents from one file — CLAUDE.md is a symlink to AGENTS.md, noted up front — and routes all… CLAUDE.md Example · supabase/agent-skills
- Beads — Deliberately Short Entry Point A model of restraint: the file opens by stating it is intentionally short, links the canonical AGENTS.md / instructions / architecture… CLAUDE.md Example · gastownhall/beads
- Tiger pg-aiguide — MCP Server Code Style Guide A tight, transferable style guide for a TypeScript MCP server: ESM with .js import extensions, zod for tool-input validation, and the… CLAUDE.md Example · timescale/pg-aiguide
- Vercel Labs Agent Skills — Skill-Authoring Template One of the most-copied skill-authoring references: a full SKILL.md skeleton (How It Works / Usage / Output / Present Results /… CLAUDE.md Example · vercel-labs/agent-skills
- Callstack Agent Skills — Quick Checklist & 'Good Skill' Rubric Distills skill authoring to a numbered quick checklist plus a 'What Makes a Good Skill' rubric (concise, third-person description… CLAUDE.md Example · callstackincubator/agent-skills
- Ponytail — Lazy Senior Dev Persona A persona file that is actually a decision procedure: the 'lazy senior dev' framing resolves into a concrete 7-rung ladder (YAGNI → reuse… CLAUDE.md Example · DietrichGebert/ponytail