text
stringlengths
3
8.33k
repo
stringclasses
52 values
path
stringlengths
6
141
language
stringclasses
35 values
sha
stringlengths
64
64
chunk_index
int32
0
273
n_tokens
int32
1
896
# Secrets and local environment .env .env.* !.env.example *.pem *.p12 *.key credentials.json secrets.json .credentials/ # Generated caches and temporary research .cache/ .tmp/ tmp/ temp/ firecrawl-cache/ research-crawls/ *.crawl.json # Python caches __pycache__/ *.py[cod] .pytest_cache/ .mypy_cache/ .ruff_cache/ # C...
openai-build-week
.gitignore
Git Ignore
1eb1e6349277842f07126f04919b4938d74aeb6576c3f6f602dc19885c84a2b4
0
170
# ReRoom repository instructions Status: **GSD 1.7 planning ready; no product implementation yet** These instructions govern the repository unless a genuinely narrower `AGENTS.md` applies below the working directory. Direct system, developer, and user instructions take precedence. ## Start with authority, then plann...
openai-build-week
AGENTS.md
Markdown
c52ffeba4c8669b34a4e82cde23bd78467a77faebe7e447ac3f635e0c5de6950
0
896
SKU. ## Planning and evidence discipline - Preserve requirement, contract, ADR, gate, test, evaluation, claim, and glossary IDs. Do not silently redefine or reuse them. - Every behavior needs a requirement and acceptance evidence. A load-bearing architecture change needs an ADR; a human-lock change needs explicit...
openai-build-week
AGENTS.md
Markdown
59d557b5dd77057164f314fe639fc341456c8e8b2f46a77f3a2ce9166e19f86d
1
644
# ReRoom Status: **GSD 1.7 planning ready; product implementation has not started.** ReRoom is a controlled camera-grounded room editor. The native SwiftUI iPhone experience uses ARKit authority to place, replace, remove, and restore one freestanding chair or small table. A separate Next.js Mode B0 client provides de...
openai-build-week
README.md
Markdown
c298c41c5e1f80d588db3d4562a20c542e763f845eec9f174c5ab2194cd9f2ef
0
733
--- name: agent-browser description: Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website",...
openai-build-week
.agents/skills/agent-browser/SKILL.md
Markdown
bb6b4c5aae49ff88addb31312437f94242a3e5aae950503ab4f332e28186c261
0
667
--- name: find-skills description: Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an ...
openai-build-week
.agents/skills/find-skills/SKILL.md
Markdown
1d227e443faef93679d9425b8234d2f4494232a3b849178a571836d442cc1552
0
896
``` I found a skill that might help! The "react-best-practices" skill provides React and Next.js performance optimization guidelines from Vercel Engineering. (185K installs) To install it: npx skills add vercel-labs/agent-skills@react-best-practices Learn more: https://skills.sh/vercel-labs/agent-skills/react-best-pr...
openai-build-week
.agents/skills/find-skills/SKILL.md
Markdown
e04bf46fe83f3573789365883814ee4ea4e7d7357a2b8c132a3e2304aec04aea
1
521
# HTML Report Format The architectural review is rendered as a single self-contained HTML file in the OS temp directory. Tailwind and Mermaid both come from CDNs. Mermaid handles graph-shaped diagrams reliably; hand-built divs and inline SVG handle the more editorial visuals (mass diagrams, cross-sections). Mix the tw...
openai-build-week
.agents/skills/improve-codebase-architecture/HTML-REPORT.md
Markdown
6b10447aa743b162883bc99fc7bf049f63d0031cfdecc1d701e69ae0e4200940
0
896
to colour leakage edges red and the deep module dark. Sequence diagrams work well for "before: 6 round-trips; after: 1." ```html <div class="rounded-lg border border-slate-200 bg-white p-4"> <pre class="mermaid"> flowchart LR A[OrderHandler] --> B[OrderValidator] B --> C[OrderRepo] C -.leak.-> ...
openai-build-week
.agents/skills/improve-codebase-architecture/HTML-REPORT.md
Markdown
8d32985f9a1b5e4cb4afce44f5b1516b4064c8495c943a8e17c0b84b61370659
1
861
--- name: improve-codebase-architecture description: Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick. disable-model-invocation: true --- # Improve Codebase Architecture Surface architectural friction and propose **deepening opportunities** —...
openai-build-week
.agents/skills/improve-codebase-architecture/SKILL.md
Markdown
d70d70bf29a037962770cd62ef96b62ef0419b8f06e4751d4aa0eb15ea7e99c4
0
896
— which files/modules are involved - **Problem** — why the current architecture is causing friction - **Solution** — plain English description of what would change - **Benefits** — explained in terms of locality and leverage, and how tests would improve - **Before / After diagram** — side-by-side, custom-drawn, illustr...
openai-build-week
.agents/skills/improve-codebase-architecture/SKILL.md
Markdown
854bfbd223a63ae5decfb424b9715d84ee743f9b22b77a55f45bb6d0609d637d
1
583
interface: display_name: "Improve Codebase Architecture" short_description: "Find and grill architecture improvements" policy: allow_implicit_invocation: false
openai-build-week
.agents/skills/improve-codebase-architecture/agents/openai.yaml
YAML
c8cb20f68ebf0edb4e497bc11ae5fcaa196004e661cd189015b04f4109ced7f1
0
23
# shadcn CLI Reference Configuration is read from `components.json`. > **IMPORTANT:** Always run commands using the project's package runner: `npx shadcn@latest`, `pnpm dlx shadcn@latest`, or `bunx --bun shadcn@latest`. Check `packageManager` from project context to choose the right one. Examples below use `npx shadc...
openai-build-week
.agents/skills/shadcn/cli.md
Markdown
f90d11f387698fc0bc7af78480ffee6afa5c00910cc4dda40417c9fae5ce290c
0
896
URL) | — | | `--yes` | `-y` | Skip confirmation prompt | `false` | | `--cwd <cwd>` | `-c` | Working directory | current | | `--silent` | `-s` | Mute output | `false` | `[preset]` is a shorthand for `--preset <...
openai-build-week
.agents/skills/shadcn/cli.md
Markdown
619d55aa7ac2a89df82fd268488d8892c4a47940bf4aeaf0d447bf2803cd5f58
1
896
Works with public GitHub registries too. npx shadcn@latest add owner/repo/item --dry-run # CSS diffs. npx shadcn@latest add button --diff globals.css ``` **When to use dry-run:** - When the user asks "what files will this add?" or "what will this change?" — use `--dry-run`. - Before overwriting existing components —...
openai-build-week
.agents/skills/shadcn/cli.md
Markdown
4854900a3832445db5648579df4e3e92f63a8769bfda8d3a3ea14996c70fdc8e
2
896
://ui.shadcn.com/docs/components/radix/input examples https://raw.githubusercontent.com/.../examples/input-example.tsx button docs https://ui.shadcn.com/docs/components/radix/button examples https://raw.githubusercontent.com/.../examples/button-example.tsx ``` Some components include an `api` link to the...
openai-build-week
.agents/skills/shadcn/cli.md
Markdown
9c63fef6c0e4b00eec15ae8a3b11131ef8d194e62b2f121f563b7db8423e96ef
3
896
| Tailwind config path | | `tailwind.css` | `string` | Global CSS path — this is where custom CSS variables go | | `iconLibrary` | `string` | Icon library — determines icon import package (e.g. `lucid...
openai-build-week
.agents/skills/shadcn/cli.md
Markdown
210fb34ab68b00bf2eb55a7ad53113a913cc775f8e9aa835e98f1d2e09ce7ca2
4
896
code>` and let the CLI handle resolution. > Use `npx shadcn@latest apply --preset <code>` when overwriting an existing project's preset. ## Switching Presets Ask the user first: **overwrite**, **merge**, or **skip** existing components? - **Overwrite / Re-install** → `npx shadcn@latest apply --preset <code>`. Overwr...
openai-build-week
.agents/skills/shadcn/cli.md
Markdown
88266207aef23074bfb320ab6caaf7712f4bb557baef318844996b3f9e935fd8
5
335
# Customization & Theming Components reference semantic CSS variable tokens. Change the variables to change every component. ## Contents - How it works (CSS variables → Tailwind utilities → components) - Color variables and OKLCH format - Dark mode setup - Changing the theme (presets, CSS variables) - Adding custom ...
openai-build-week
.agents/skills/shadcn/customization.md
Markdown
fddc4bdc7321aa0b7d56b22b1f3a8fab9201d614628d2377ee4766017f04b923
0
896
84); --warning-foreground: oklch(0.28 0.07 46); } .dark { --warning: oklch(0.41 0.11 46); --warning-foreground: oklch(0.99 0.02 95); } ``` ```css /* 2a. Register with Tailwind v4 (@theme inline). */ @theme inline { --color-warning: var(--warning); --color-warning-foreground: var(--warning-foreground); } ``` ...
openai-build-week
.agents/skills/shadcn/customization.md
Markdown
d785fdea61156dc11963c228702bc7f4bfa815f3a14fc3390b3562c1bd88f711
1
738
# shadcn MCP Server The CLI includes an MCP server that lets AI assistants search, browse, view, and install items from registries. --- ## Setup ```bash shadcn mcp # start the MCP server (stdio) shadcn mcp init # write config for your editor ``` Editor config files: | Editor | Config file ...
openai-build-week
.agents/skills/shadcn/mcp.md
Markdown
aa0d42852201f39b142cf9b162a9f102f851905f2fea905fbdf17d3d3dbd5cae
0
896
https://acme.com/r/{name}.json", "@private": { "url": "https://private.com/r/{name}.json", "headers": { "Authorization": "Bearer ${MY_TOKEN}" } } } } ``` - Names must start with `@`. - URLs must contain `{name}`. - `${VAR}` references are resolved from environment variables. Community registry i...
openai-build-week
.agents/skills/shadcn/mcp.md
Markdown
8e5152a22f3e0d63993c745a6cf56e87d06e4a6e3912910711d00422a4071da2
1
122
# Registry Authoring and Addresses Use this reference when the user wants to create, fix, publish, or reason about a shadcn registry. ## Mental Model A registry has two forms: - **Source registry**: an authored `registry.json` in a project or repository. It may use `include` and file paths that point at source fi...
openai-build-week
.agents/skills/shadcn/registry.md
Markdown
4a004b108e4e298a8d30d0350d483b7057647da5b4f07d3094f9da862fa26497
0
896
{ "brand": "oklch(0.72 0.16 250)" } } } ``` Important fields: - `name`: the installable item name. It is not necessarily a file path. - `type`: one of the registry item types, such as `registry:ui`, `registry:block`, `registry:lib`, `registry:hook`, `registry:file`, `registry:page`, `registry:theme`, ...
openai-build-week
.agents/skills/shadcn/registry.md
Markdown
ef243973461564fd7c58cbdffb2d806e89dcb280f0821b772907de8707915ce1
1
896
acme/ui/data/schema.json` is treated as a file path, not a GitHub item address. ## GitHub Registries A public GitHub repository can act as a source registry when it has a root `registry.json`. ```txt owner/repo/item-name[#ref] ``` Rules: - The first two path segments are GitHub owner and repo. - All remaining path...
openai-build-week
.agents/skills/shadcn/registry.md
Markdown
05dd54c534d2acceb8be0690755f83ac4db3607faf027789ae5d6ff577eaed7f
2
598
--- name: shadcn description: Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any proj...
openai-build-week
.agents/skills/shadcn/SKILL.md
Markdown
8726d8331b3d64a5675cf65e623de0ff83143ed13c55964bf8c09323b3f521ef
0
896
. - **`FieldSet` + `FieldLegend` for grouping related checkboxes/radios.** Don't use a `div` with a heading. - **Field validation uses `data-invalid` + `aria-invalid`.** `data-invalid` on `Field`, `aria-invalid` on the control. For disabled: `data-disabled` on `Field`, `disabled` on the control. ### Component Structur...
openai-build-week
.agents/skills/shadcn/SKILL.md
Markdown
c5833049bf738acd049fb0978aaaf2b0c4d2781a621bf5987916ed065b6c88ab
1
896
URLs manually.** Use `npx shadcn@latest preset decode <code>`, `preset url <code>`, or `preset open <code>`. For project-aware preset detection, use `npx shadcn@latest preset resolve`. - **Apply preset codes directly with the CLI.** Use `npx shadcn@latest apply <code>` for existing projects, or `npx shadcn@latest init ...
openai-build-week
.agents/skills/shadcn/SKILL.md
Markdown
0afab063159ea74864b2c063b161235e5a36acfff034d115a8bca72b1c39dacc
2
896
, `Attachment`, `Marker` | ## Key Fields The injected project context contains these key fields: - **`aliases`** → use the actual alias prefix for imports (e.g. `@/`, `~/`), never hardcode. - **`isRSC`** → when `true`, components using `useState`, `useEffect`, event handlers, or ...
openai-build-week
.agents/skills/shadcn/SKILL.md
Markdown
54a68df10e9fff36cb5bcf3c2d8a8492add9a9218b6a5feee030baed00999a83
3
896
. These won't match the project's actual aliases. Use `npx shadcn@latest info` to get the correct `ui` alias (e.g. `@workspace/ui/components`) and rewrite the imports accordingly. The CLI rewrites imports for its own UI files, but third-party registry components may use default paths that don't match the project. 7. **...
openai-build-week
.agents/skills/shadcn/SKILL.md
Markdown
7b9f766a9cf3b57a36f70dcfb849525e5b761ab0daf56eeedf76510e3de41c54
4
896
> --diff <file>` to see what changed upstream vs local. 3. Decide per file based on the diff: - No local changes → safe to overwrite. - Has local changes → read the local file, analyze the diff, and apply upstream updates while preserving local modifications. - User says "just update everything" → use `--overw...
openai-build-week
.agents/skills/shadcn/SKILL.md
Markdown
ee2c28b3415c5abf4223f289e435c8d401541c6457efe06c0154d987cf29c955
5
896
/styling.md) — Semantic colors, variants, className, spacing, size, truncate, dark mode, cn(), z-index - [rules/base-vs-radix.md](./rules/base-vs-radix.md) — asChild vs render, Select, ToggleGroup, Slider, Accordion - [cli.md](./cli.md) — Commands, flags, presets, templates - [registry.md](./registry.md) — Authoring so...
openai-build-week
.agents/skills/shadcn/SKILL.md
Markdown
d0626b4f89573524a464dd1abbaa847161cca569cbd978832931c34ba100956a
6
138
interface: display_name: "shadcn/ui" short_description: "Manages shadcn/ui components — adding, searching, fixing, debugging, styling, and composing UI." icon_small: "./assets/shadcn-small.png" icon_large: "./assets/shadcn.png"
openai-build-week
.agents/skills/shadcn/agents/openai.yml
YAML
35db91b1eef58b2abe01da9b88577de5a44e233b740cd93d692ddeeadd2afe4d
0
57
{ "skill_name": "shadcn", "evals": [ { "id": 1, "prompt": "I'm building a Next.js app with shadcn/ui (base-nova preset, lucide icons). Create a settings form component with fields for: full name, email address, and notification preferences (email, SMS, push notifications as toggle options). Add vali...
openai-build-week
.agents/skills/shadcn/evals/evals.json
JSON
bc84ddef13736504eeed7a276c0d45c5aeb6af352acfe2e518b4572f87ad596e
0
896
MessageScroller, Message, Bubble, Attachment, and Marker from the registry instead of hand-rolled bubble/divider/attachment markup.", "files": [], "expectations": [ "Uses MessageScroller (MessageScrollerProvider, MessageScrollerViewport, MessageScrollerContent, MessageScrollerItem) for the scrollabl...
openai-build-week
.agents/skills/shadcn/evals/evals.json
JSON
29c29d35713e56c0101f296fa504656b70ab8bf63141b3ee07669c61faf47f4e
1
539
# Base vs Radix API differences between `base` and `radix`. Check the `base` field from `npx shadcn@latest info`. ## Contents - Composition: asChild vs render - Button / trigger as non-button element - Select (items prop, placeholder, positioning, multiple, object values) - ToggleGroup (type vs multiple) - Slider (s...
openai-build-week
.agents/skills/shadcn/rules/base-vs-radix.md
Markdown
c58cdfeb71625df6fe7baee9a66667de6c11fdeb538084873ba6b0de13c04e0a
0
896
null }` item in the items array. Radix uses `<SelectValue placeholder="...">`. **Content positioning.** Base uses `alignItemWithTrigger`. Radix uses `position`. ```tsx // base. <SelectContent alignItemWithTrigger={false} side="bottom"> // radix. <SelectContent position="popper"> ``` --- ## Select — multiple select...
openai-build-week
.agents/skills/shadcn/rules/base-vs-radix.md
Markdown
2839e85cd31d7e8a799e94f299b9bb382a37300316754bccc6204a64cd8b950d
1
896
1} /> ``` Both use arrays for range sliders. Controlled `onValueChange` in base may need a cast: ```tsx // base. const [value, setValue] = React.useState([0.3, 0.7]) <Slider value={value} onValueChange={(v) => setValue(v as number[])} /> // radix. const [value, setValue] = React.useState([0.3, 0.7]) <Slider value={v...
openai-build-week
.agents/skills/shadcn/rules/base-vs-radix.md
Markdown
b141be849d9d1c6807807df867268bee162f63a054d603ded7fe0683fb7f2dbd
2
395
# Chat & Messaging Components for conversation and chat UI. Compose these instead of hand-rolling bubbles, scroll containers, dividers, or attachment cards. Install: `npx shadcn@latest add message-scroller message bubble attachment marker` The same component names and props ship for both `base` and `radix`; only com...
openai-build-week
.agents/skills/shadcn/rules/chat.md
Markdown
a468d44a07021588c301bab3f75250c9be3d4088d69006c9bf77541ffc5def7c
0
896
Badge`s. **Incorrect:** ```tsx <div className="w-fit rounded-2xl bg-primary px-3 py-2 text-primary-foreground"> {text} </div> ``` **Correct:** ```tsx <Bubble variant="default" align="end"> <BubbleContent>{text}</BubbleContent> <BubbleReactions side="bottom" align="end"> <Badge variant="secondary">👍 2</Ba...
openai-build-week
.agents/skills/shadcn/rules/chat.md
Markdown
38d3d8fd916add39ba1413599da26de46477f85c1f24645612be2a27159d0934
1
896
't expose, read state from the hooks rather than re-implementing the scroller: `useMessageScroller`, `useMessageScrollerVisibility`, and `useMessageScrollerScrollable`. They come from the auto-installed `@shadcn/react` dependency, so there's nothing extra to install. Reach for them only when composition can't express w...
openai-build-week
.agents/skills/shadcn/rules/chat.md
Markdown
4e4c6d7fa35ae4ad796e7737a3550fb7f8133c80a2d0e175e5b9e59a732c341d
2
68
# Component Composition ## Contents - Items always inside their Group component - Callouts use Alert - Empty states use Empty component - Toast notifications use sonner - Choosing between overlay components - Dialog, Sheet, and Drawer always need a Title - Card structure - Button has no isPending or isLoading prop - ...
openai-build-week
.agents/skills/shadcn/rules/composition.md
Markdown
7021276b7e8f947f7e393446e37c8c057d78eca91c826003e3b17241b00f655c
0
896
.</CardDescription> </CardHeader> <CardContent>...</CardContent> <CardFooter> <Button>Invite</Button> </CardFooter> </Card> ``` --- ## Button has no isPending or isLoading prop Compose with `Spinner` + `data-icon` + `disabled`: ```tsx <Button disabled> <Spinner data-icon="inline-start" /> Saving... ...
openai-build-week
.agents/skills/shadcn/rules/composition.md
Markdown
093ce9976a2e34abc4b8c547c248d399a962835b0a1d131fed61ea75517a2041
1
380
# Forms & Inputs ## Contents - Forms use FieldGroup + Field - InputGroup requires InputGroupInput/InputGroupTextarea - Buttons inside inputs use InputGroup + InputGroupAddon - Option sets (2–7 choices) use ToggleGroup - FieldSet + FieldLegend for grouping related fields - Field validation and disabled states --- ##...
openai-build-week
.agents/skills/shadcn/rules/forms.md
Markdown
e16f00cf39c77038c32e43002452423788cf3c1ff123513f178b1354abaa0ff7
0
896
`tsx <Field orientation="horizontal"> <FieldTitle id="theme-label">Theme</FieldTitle> <ToggleGroup aria-labelledby="theme-label" spacing={2}> <ToggleGroupItem value="light">Light</ToggleGroupItem> <ToggleGroupItem value="dark">Dark</ToggleGroupItem> <ToggleGroupItem value="system">System</ToggleGroupIte...
openai-build-week
.agents/skills/shadcn/rules/forms.md
Markdown
ee80230722d012e759714253345cd82d76c17353191e5bedb1b120ca3990171a
1
457
# Icons **Always use the project's configured `iconLibrary` for imports.** Check the `iconLibrary` field from project context: `lucide` → `lucide-react`, `tabler` → `@tabler/icons-react`, etc. Never assume `lucide-react`. --- ## Icons in Button use data-icon attribute Add `data-icon="inline-start"` (prefix) or `dat...
openai-build-week
.agents/skills/shadcn/rules/icons.md
Markdown
d4a58266648872d9ee07d0c2368843a1cb88b8253b7f528dd7bda9d68b6c2535
0
569
# Styling & Customization See [customization.md](../customization.md) for theming, CSS variables, and adding custom colors. ## Contents - Semantic colors - Built-in variants first - className for layout only - No space-x-* / space-y-* - Prefer size-* over w-* h-* when equal - Prefer truncate shorthand - No manual da...
openai-build-week
.agents/skills/shadcn/rules/styling.md
Markdown
5a83ee6f2da47f272cfe399e3cbaa54d4a3f9bb3e91fd9d854d29b388aa5a2de
0
896
. ```tsx <div className="flex flex-col gap-4"> <Input /> <Input /> <Button>Submit</Button> </div> ``` --- ## Prefer size-* over w-* h-* when equal `size-10` not `w-10 h-10`. Applies to icons, avatars, skeletons, etc. --- ## Prefer truncate shorthand `truncate` not `overflow-hidden text-ellipsis whitespace-...
openai-build-week
.agents/skills/shadcn/rules/styling.md
Markdown
0bd2b1a6705c8b050f51558c907d3503540b3295c568bb9964fb54245c8a6638
1
596
--- name: swift-concurrency description: Diagnose Swift Concurrency issues, refactor callback-based code to async/await, and guide Swift 6 migration when working with tasks, actors, @MainActor, Sendable, data races, thread safety, or concurrency-related compiler and linter warnings. --- # Swift Concurrency ## Fast Pat...
openai-build-week
.agents/skills/swift-concurrency/SKILL.md
Markdown
1131cbc827382df02d178825cb8da1021e089469cc39701286897b9c64885a13
0
896
.md` | | `Sending value of non-Sendable type ... risks causing data races` | What isolation boundary is being crossed? | Keep access inside one actor, or convert the transferred value to an immutable/value type. | `references/sendable.md`, `references/threading.md` | | `SwiftLint async_without_await` | Is `async` actua...
openai-build-week
.agents/skills/swift-concurrency/SKILL.md
Markdown
eb89169be2b12e04ab57862b9d3db8c1010731e6e6b65f384b07e7927da931da
1
896
results.append(result) } } ``` ## Task entry isolation Match a `Task`'s entry isolation to its synchronous prefix (everything from `{` to the first `await`). - If anything in that prefix needs `@MainActor`, keep the inherited `@MainActor` start. - If nothing in that prefix needs `@MainActor`, prefer `Task { @co...
openai-build-week
.agents/skills/swift-concurrency/SKILL.md
Markdown
99c6ee099c64ef97859af89633aebc17af3c8686bad720b1a59d547de5e75e8e
2
896
, especially actor-, lifetime-, and cancellation-sensitive tests. 4. Use Instruments for performance claims instead of guessing. 5. Verify deallocation and cancellation behavior for long-lived tasks. 6. Check `Task.isCancelled` in long-running operations. 7. Never use semaphores or ad hoc locking in async contexts when...
openai-build-week
.agents/skills/swift-concurrency/SKILL.md
Markdown
d6ee9092bf560a820e3c1d78f28bb9bb596f74c286c635335a278fbbfbf2a2f0
3
131
# Reference Index Quick navigation for the Swift Concurrency skill. ## Foundations | File | Use it for | |---|---| | `async-await-basics.md` | closure-to-async bridges and foundational async/await usage | | `tasks.md` | `Task`, cancellation, task groups, structured vs unstructured work | | `actors.md` | actor isolat...
openai-build-week
.agents/skills/swift-concurrency/references/_index.md
Markdown
73716755b10ccd00a6b4c8cab6c6845b342d3dd59dff1fe2398c6555f62d2315
0
537
# Actors Use this when: - You need to protect class-based mutable state from concurrent access. - You are choosing between `actor`, `@MainActor`, `nonisolated`, or `Mutex`. - You are resolving protocol conformance issues on actor-isolated types. Skip this file if: - You mainly need to make a value safe to transfer ...
openai-build-week
.agents/skills/swift-concurrency/references/actors.md
Markdown
d980c58aaf868245adcf59ed7b95a8dca0cd09d5ecb65317eaf8c7928512122b
0
896
way await MainActor.run { // Update UI } // Better: Use attribute @MainActor func updateUI() { // Automatically on main thread } ``` ### MainActor.assumeIsolated **Use sparingly** - assumes you're on main thread, crashes if not: ```swift func methodB() { assert(Thread.isMainThread) // Validate assumptio...
openai-build-week
.agents/skills/swift-concurrency/references/actors.md
Markdown
dede9abe3080ddaefb05cd44b2ee1002afd45c4b93c3c41bf66da70bca190e71
1
896
> **Course Deep Dive**: This topic is covered in detail in [Lesson 5.6: Adding isolated conformance to protocols](https://www.swiftconcurrencycourse.com?utm_source=github&utm_medium=agent-skill&utm_campaign=lesson-reference) ## Actor Reentrancy **Critical**: State can change between suspension points. ```swift actor...
openai-build-week
.agents/skills/swift-concurrency/references/actors.md
Markdown
a843c6011ef926a5cecc6a748cc6f1f5a1d9f0eb66921c3f4737b71744783910
2
896
**: This pattern keeps the `non-Sendable` value alive and accessible within the `Task`. The `Task` runs on the caller's isolation domain, so no cross-isolation "sending" occurs. > **Course Deep Dive**: This topic is covered in detail in [Lesson 5.8: Inheritance of actor isolation using the #isolation macro](https://ww...
openai-build-week
.agents/skills/swift-concurrency/references/actors.md
Markdown
eb96564b4275f9a6f48cd3b2e150059d455404b569e699963f10781bfbd5499b
3
896
DataStore { private var items: [Item] = [] func add(_ item: Item) { items.append(item) } nonisolated func itemCount() -> Int { // ❌ Can't access items return 0 } } ``` ### Transaction pattern ```swift actor Database { func transaction<T>( _ operation: ...
openai-build-week
.agents/skills/swift-concurrency/references/actors.md
Markdown
311371344181639cac7a084af1bf87f99f203b59bd9e3be396ba36af58dfe53a
4
391
# AsyncAlgorithms Package Use this when: - You need time-based operators (debounce, throttle, timers). - You need to combine multiple async sequences (merge, combineLatest, zip). - You are migrating from Combine or RxSwift operators to Swift Concurrency equivalents. Skip this file if: - You need basic `AsyncStream`...
openai-build-week
.agents/skills/swift-concurrency/references/async-algorithms.md
Markdown
45c3c98f8dd35d77de70a7fbb941ac308dbea021d859ca3d4700883835ad97d4
0
896
:reducing:) Emit at most one value per interval. Use for repeated actions like button taps. #### Example: Like Button ```swift import AsyncAlgorithms struct LikeButton: View { @State private var tapStream = AsyncStream<Void> { continuation in // Continuation stored externally } @State private va...
openai-build-week
.agents/skills/swift-concurrency/references/async-algorithms.md
Markdown
5c428afe23de02b8d580a1a1f7ba5ea8265e139cdb452aa14737da2107ad96dc
1
896
State private var passwordStream = AsyncStream<String> { /* ... */ } @State private var formState = FormState.incomplete var body: some View { Form { TextField("Username", text: $username) TextField("Email", text: $email) SecureField("Password", text: $password) ...
openai-build-week
.agents/skills/swift-concurrency/references/async-algorithms.md
Markdown
427d6d5de70302d970a62b88ad8420471c713f610e974aa3092f9f023459987c
2
896
### AsyncChannel AsyncSequence with backpressure. **Stable operator ✅** Use for producer-consumer patterns with flow control. #### Example: Message Queue ```swift import AsyncAlgorithms actor MessageQueue { private let channel = AsyncChannel<Message>() func getMessages() -> AsyncStream<Message> { ...
openai-build-week
.agents/skills/swift-concurrency/references/async-algorithms.md
Markdown
4b977a5ab98ad0470a0a99b05eff137c5052a22311dbd9f5f809198bfcbb4442
3
896
{ _ in Just([]) } } .receive(on: DispatchQueue.main) .assign(to: &$results) } } ``` **After: AsyncAlgorithms** ```swift import AsyncAlgorithms @Observable final class ArticleSearcher { @MainActor private(set) var results: [Article] = [] private var searchQueryContinuat...
openai-build-week
.agents/skills/swift-concurrency/references/async-algorithms.md
Markdown
64dd4df40c03309038f11f1b38267350c0fe497da9b0fd2e8645dfb2536fa92c
4
896
)`. - **Looking for a `.flatMap` equivalent**: Use `TaskGroup` for fan-out; the semantics differ from Combine/Rx `flatMap`. - **Looking for `.receive(on:)` equivalent**: Use `@MainActor` or `Task` context for isolation instead. ## Best Practices 1. **Use time-based operators** for rapid inputs: debounce() for search,...
openai-build-week
.agents/skills/swift-concurrency/references/async-algorithms.md
Markdown
940d784a40b5e03c66c711931510ff0a59dfe4b36a6e6fecd6ad5ed17c923ec2
5
260
# Async/Await Basics Use this when: - You are starting fresh with async/await and need foundational patterns. - You are converting callback-based code to async/await. - You need to understand execution order and the sync-to-async bridge. Skip this file if: - You need parallel execution with task groups or `async le...
openai-build-week
.agents/skills/swift-concurrency/references/async-await-basics.md
Markdown
62d61657e88546f5702824ef2b1eb0b166664efd1caba2e6417a6396bb87fa57
0
896
.shared.dataTask(with: request) { data, response, error in guard let data = data, error == nil else { return } // handle response }.resume() // Async/await (modern) let (data, response) = try await URLSession.shared.data(for: request) ``` ### Benefits over closures - No optional `data` or `response` to unwra...
openai-build-week
.agents/skills/swift-concurrency/references/async-await-basics.md
Markdown
3d939f43d804f1b82dc07d50949327b1069d858c46a6102bd9a25b777008cbcc
1
896
fetch related data in parallel async let posts = fetchPosts(userId: user.id) async let followers = fetchFollowers(userId: user.id) async let following = fetchFollowing(userId: user.id) let profile = Profile( user: user, posts: try await posts, followers: try await followers, following: try await follow...
openai-build-week
.agents/skills/swift-concurrency/references/async-await-basics.md
Markdown
bd97a5025b827ac36fcf13076fd9ccaa779f2ffdf3821fabf3c3dfd2520094a6
2
115
# Async Sequences and Streams Use this when: - You need to iterate over values that arrive over time. - You are bridging callback-based or delegate-based APIs to async/await. - You need to choose between `AsyncSequence`, `AsyncStream`, or a regular async method. Skip this file if: - You need time-based operators li...
openai-build-week
.agents/skills/swift-concurrency/references/async-sequences.md
Markdown
48657a74d1e7e5a4bd93e216ad9a592b8cbb53fa87678c960d10d20db1f03d8f
0
896
Result<Data, Error>) -> Void ) throws { // Implementation } } // Modern stream-based API extension FileDownloader { func download(_ url: URL) -> AsyncThrowingStream<Status, Error> { AsyncThrowingStream { continuation in do { try self.download(url, progressHandler...
openai-build-week
.agents/skills/swift-concurrency/references/async-sequences.md
Markdown
fe6d213ff42f17bfe540589beed2461c7aa6713b275b56b66e1eb6f9649a915a
1
896
stream { print(value) // Prints only: 5 } ``` ### .bufferingOldest(n) Keeps only the oldest N values: ```swift let stream = AsyncStream(bufferingPolicy: .bufferingOldest(1)) { continuation in (0...5).forEach { continuation.yield($0) } continuation.finish() } try await Task.sleep(for: .seconds(1)) for a...
openai-build-week
.agents/skills/swift-concurrency/references/async-sequences.md
Markdown
20530dc6062ce1285b18d5e958f1a1d931a35e2fa4e620f606e95f5b7c1bee85
2
896
Standard Library ### Use AsyncAlgorithms when: - **Time-based operations** need debounce/throttle/timer - **Combining multiple async sequences** (merge, combineLatest, zip) - **Multi-consumer scenarios** require backpressure (AsyncChannel) - **Complex operator chains** that Combine would handle naturally - **Need spe...
openai-build-week
.agents/skills/swift-concurrency/references/async-sequences.md
Markdown
efabe16937dc1248b40b000240147d78c1a9993f8d90f5dda057a6c0b323a5ba
3
896
Task.isCancelled** - Respect cancellation in custom sequences 7. **Use throwing variant** - When operations can fail 8. **Consider regular async** - If only returning single value ## Debugging ### Add termination logging ```swift continuation.onTermination = { reason in print("Stream ended: \(reason)") } ``` ##...
openai-build-week
.agents/skills/swift-concurrency/references/async-sequences.md
Markdown
20f71df7b5484b5c867f5b9ea50f820dbbc3f617af458a5069f024dc9f276c3e
4
450
# Core Data and Swift Concurrency Use this when: - You need to use Core Data with async/await or actors. - `NSManagedObject` instances are crossing context or actor boundaries. - You are resolving default `@MainActor` isolation conflicts with generated NSManagedObject subclasses. Skip this file if: - The issue is g...
openai-build-week
.agents/skills/swift-concurrency/references/core-data.md
Markdown
8d59556b91818bf1f6d31a351dff56b3fd771db15d82bb5d9ecaa6aff6027360
0
896
loadPersistentStores() async throws { try await withCheckedThrowingContinuation { continuation in self.loadPersistentStores { description, error in if let error { continuation.resume(throwing: error) } else { continuation.resume...
openai-build-week
.agents/skills/swift-concurrency/references/core-data.md
Markdown
a01763f1f08e8bc072608f59a20f773bc8f360a7a7d1cd94afbf76f75b0a98be
1
896
`Main actor-isolated initializer has different actor isolation from nonisolated overridden declaration` ### Solution: Manual code generation 1. Set entity to "Manual/None" code generation 2. Generate class definitions 3. Mark as `nonisolated`: ```swift nonisolated class Article: NSManagedObject { @NSManaged publ...
openai-build-week
.agents/skills/swift-concurrency/references/core-data.md
Markdown
aa79e04d7674949fa6befca19f911cfc44d7f5beefc1e36bfdfe1966007ccc35
2
896
} on background context │ └─ Batch operation? → NSBatchDeleteRequest/NSBatchUpdateRequest │ ├─ Pass between contexts? │ └─ Use NSManagedObjectID only │ └─ Need Sendable type? ├─ Can refactor? → Use DAO pattern └─ Can't refactor? → Pass NSManagedObjectID ``` ## Migration Strategy ### For existing projects 1. ...
openai-build-week
.agents/skills/swift-concurrency/references/core-data.md
Markdown
6112ac4b02899030405f5410f6b3bdb6e477c3efc984682c9d33dd5bd9626a6b
3
530
# Glossary Use this when: - You need a quick definition of a Swift Concurrency term. - You encounter unfamiliar terminology in other reference files. Skip this file if: - You need implementation patterns, not definitions. Use the relevant reference file instead. ## Actor isolation A rule enforced by the compiler:...
openai-build-week
.agents/skills/swift-concurrency/references/glossary.md
Markdown
a8858db7bef0e116cd82a3d789dc88696e66074d6b4cd59a519fd846c95ce821
0
896
The scheduling mechanism that determines where and when actor code runs. `MainActor` uses the main thread executor. Custom actors use the default executor unless a custom executor is specified. ## Structured concurrency A pattern where child tasks have a well-defined relationship to parent tasks. Child tasks must com...
openai-build-week
.agents/skills/swift-concurrency/references/glossary.md
Markdown
feda5407d0ef27981e52760adfbcbbaaa9a6d9f66a83387ec3e05c7d213d0d21
1
508
# Linting & Concurrency Use this when: - SwiftLint flags `async_without_await` or other concurrency-related warnings. - You need to decide whether to suppress, fix, or reconfigure a concurrency lint rule. Skip this file if: - The issue is a compiler diagnostic, not a lint rule. Use `actors.md`, `sendable.md`, or `t...
openai-build-week
.agents/skills/swift-concurrency/references/linting.md
Markdown
0efd9dfc8420c825fdbc34237d60548bf8c21617299e51f11e8c0113d9046443
0
896
Non-sendable type 'MyResult' returned by implicitly async call let result = await actor.getData() // Returns non-Sendable type ``` **Fixes:** 1. Make the return type Sendable 2. Return Sendable projections (IDs, copies of data) 3. Keep processing within the actor's isolation ### Actor Isolation Warnings **"Main acto...
openai-build-week
.agents/skills/swift-concurrency/references/linting.md
Markdown
9817628e10a3c56cf1b7abe8020d058fa48b656b40521846e5b0138863542a72
1
460
# Memory Management Use this when: - A task or async sequence is keeping objects alive longer than expected. - You suspect a retain cycle between a task and its owner. - You need to verify deallocation behavior or use `isolated deinit`. Skip this file if: - You mainly need to protect mutable state from races. Use `...
openai-build-week
.agents/skills/swift-concurrency/references/memory-management.md
Markdown
0ede857a25b22c1f1a20154ffe2013cbe0f7709905f6efd987850afdeb97088a
0
896
Short-lived tasks that complete quickly: ```swift func saveData() { Task { await database.save(self.data) // OK - completes quickly } } ``` ### When to use weak self Long-running or indefinite tasks: ```swift func startMonitoring() { Task { [weak self] in for await event in eventStream {...
openai-build-week
.agents/skills/swift-concurrency/references/memory-management.md
Markdown
3a4c1499ac54bab5c31bf7b3ebd4ff212ba5699ced0596f704ef5ad6de8eb96f
1
896
infinite? │ ├─ Can use weak self? → Use [weak self] │ ├─ Need manual control? → Store task, cancel explicitly │ └─ Async sequence? → [weak self] + guard │ └─ Self owns task? ├─ Yes → High risk of retain cycle └─ No → Lower risk, but check lifetime ``` ## Best Practices 1. **Default to weak self** for long-ru...
openai-build-week
.agents/skills/swift-concurrency/references/memory-management.md
Markdown
14c02cebd2c36acb02e7252e719307019820406b4851e62b6a4be70536f6f348
2
896
? func start(interval: Duration, action: @Sendable () async -> Void) { task = Task { while !Task.isCancelled { await action() try? await Task.sleep(for: interval) } } } func stop() { task?.cancel() } } ``` ## Comm...
openai-build-week
.agents/skills/swift-concurrency/references/memory-management.md
Markdown
129ca2f017f7a178705bd06b7b9442df056df6aa2b29c9d396f6938b2a5af0f4
3
387
# Migration to Swift 6 and Strict Concurrency Use this when: - You are moving an existing codebase toward Swift 6 or stricter concurrency checking. - Compiler diagnostics depend on language mode, default isolation, or upcoming features. - You need the smallest safe migration sequence instead of a full architectural r...
openai-build-week
.agents/skills/swift-concurrency/references/migration.md
Markdown
af5baccda23039195832453cfe6f0138b23e4eff79f115ec2c29056254651677
0
896
Fix more warnings // Day 3: Revert to minimal checking if needed // Build Settings → Strict Concurrency Checking = Minimal ``` Allow yourself 30 minutes per day to migrate gradually. Don't expect completion in a few days for large projects. ### 2. Sendable by Default for New Code When writing new types, make them `...
openai-build-week
.agents/skills/swift-concurrency/references/migration.md
Markdown
7a7d4c4d912e6e7842179ff1670eae5993a07ae7250e2545c286ec4c75f8f4bb
1
896
Swift Package Manager**: ```swift .target( name: "MyTarget", swiftSettings: [ .defaultIsolation(MainActor.self) ] ) ``` This drastically reduces warnings in app code where most types need main thread access. ### 5. Enable Strict Concurrency Checking **Xcode Build Settings**: Search for "Strict Co...
openai-build-week
.agents/skills/swift-concurrency/references/migration.md
Markdown
aded6513441e1e49839740e8eb793ef560619e424a84eb931708a6963c4724f0
2
896
``` **Output**: ``` > Applied 24 fix-its in 11 files (0.016s) > Updating manifest ``` The tool automatically: - Applies all fix-its - Updates `Package.swift` to enable the feature **Available migrations** (as of Swift 6.2): - `ExistentialAny` (SE-335) - `InferIsolatedConformances` (SE-470) - More features will add m...
openai-build-week
.agents/skills/swift-concurrency/references/migration.md
Markdown
519ae92c8b53592619b3e2f2b5c00067be0858f589c931991932db79b53ed71a
3
896
` is unused: ``` '@preconcurrency' attribute on module 'SomeModule' is unused ``` > **Course Deep Dive**: This topic is covered in detail in [Lesson 12.8: How and when to use @preconcurrency](https://www.swiftconcurrencycourse.com?utm_source=github&utm_medium=agent-skill&utm_campaign=lesson-reference) --- ## Migrati...
openai-build-week
.agents/skills/swift-concurrency/references/migration.md
Markdown
b8874f4fc14f64c1235bcec9bb27cf873c39ce41b04e955d5136e73b21a6ffbb
4
896
self?.handleNotification() } } ``` > **Course Deep Dive**: This topic is covered in detail in [Lesson 12.9: Migrating away from Functional Reactive Programming like RxSwift or Combine](https://www.swiftconcurrencycourse.com?utm_source=github&utm_medium=agent-skill&utm_campaign=lesson-reference) --- ## When to Us...
openai-build-week
.agents/skills/swift-concurrency/references/migration.md
Markdown
9130deeb28e586785c6d8f16de9ade4f9296cd5438ff1dca784fd378a3db2bb8
5
896
() { NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification) .compactMap { notification in notification.object as? AppNotification } .receive(on: DispatchQueue.main) .assign(to: &$notifications) } } ``` **After: St...
openai-build-week
.agents/skills/swift-concurrency/references/migration.md
Markdown
025b2b0b3167648f4c2dd2cd0c20af0051a5bd4fc92079bb71b2ae44b8c49351
6
896
checkForm() } func updateEmail(_ email: String) { currentEmail = email checkForm() } func updatePassword(_ password: String) { currentPassword = password checkForm() } private func checkForm() { let state = validate( username: currentUsernam...
openai-build-week
.agents/skills/swift-concurrency/references/migration.md
Markdown
ca5b7d87be6d31acdf3a751f0ac60f043bfa836934ef3b7415026821edd07e28
7
896
# "Dependencies Aren't Ready" Options: - Update to latest versions first - Use `@preconcurrency` temporarily - Contribute fixes to open-source dependencies - Wrap third-party APIs in your own concurrency-safe layer ### "I Keep Going in Circles" This is the "concurrency rabbit hole": - Take breaks and revisit later -...
openai-build-week
.agents/skills/swift-concurrency/references/migration.md
Markdown
02b1102498e2b48d71dd570802dca1adb1c9b428eb495071c295275bcf24a351
8
548
# Performance Use this when: - Async code is slower than expected or causing UI hangs. - You need to choose between synchronous, asynchronous, and parallel execution. - You are profiling concurrency overhead with Instruments. Skip this file if: - The issue is a compiler diagnostic about isolation or Sendable. Use `...
openai-build-week
.agents/skills/swift-concurrency/references/performance.md
Markdown
ac4c881fb0a6550bab8bd79172b36222bf82c0260db797832a1fe5d84b88316e
0
896
not suspend. ### Suspension surface area Code between suspension points. Larger = harder to reason about: - Actor invariants - Performance - Thread hops - Reentrancy - State consistency ### Goal - Do work before crossing isolation - Cross once - Finish job - Only cross again when necessary ## Reducing Suspensions ...
openai-build-week
.agents/skills/swift-concurrency/references/performance.md
Markdown
ffa2bedc731a2ee2f9be3ecd46797555911cd474d802e94ea9017fbc6b2c989b
1
896
avoidable executor wait before reaching `Task.sleep`, especially when scheduled from another executor or while the main actor is busy. ```swift // ✅ Sleep off-main, hop back only for the UI-owned work registrationRetryTask = Task { @concurrent [weak self] in do { try await Task.sleep(for: .milliseconds(100...
openai-build-week
.agents/skills/swift-concurrency/references/performance.md
Markdown
56dc232fd52f923b3bf4d4384ee3b68550b285a66dbae37c5697ff2ab4bcf799
2
896
detail in [Lesson 10.4: How to choose between serialized, asynchronous, and parallel execution](https://www.swiftconcurrencycourse.com?utm_source=github&utm_medium=agent-skill&utm_campaign=lesson-reference) // - Work scales with collection size // - Proven beneficial by profiling ``` ## Parallelism Costs ### Tradeoff...
openai-build-week
.agents/skills/swift-concurrency/references/performance.md
Markdown
2c36cc894503f90d7c1dd19e595c97f935edce649d04a17794d8f67f6274ab89
3
896
. **Name tasks** - easier debugging in Instruments 5. **Check suspension count** - reduce unnecessary awaits 6. **Avoid premature parallelism** - has costs 7. **Consider UX** - smooth > fast 8. **Batch actor work** - reduce contention 9. **Test on real devices** - simulators lie 10. **Monitor in production** - real usa...
openai-build-week
.agents/skills/swift-concurrency/references/performance.md
Markdown
f5ab5a5412441b44062e0d1da119e818dbdd8d0a8fad9ff69e2c89cb133ca8a7
4
218
# Sendable Use this when: - A value or reference type must cross an isolation boundary safely. - You are resolving "non-Sendable type" compiler diagnostics. - You need to decide between value types, `@unchecked Sendable`, actors, or region-based isolation. Skip this file if: - The issue is about which actor should ...
openai-build-week
.agents/skills/swift-concurrency/references/sendable.md
Markdown
1c7d05a0d20555885d24602a59719e6f3b9b77cdf646617df441547ea7e3e94b
0
896
Person: Sendable { var name: String var hometown: Location // Must also be Sendable } public struct Location: Sendable { var name: String } ``` > **Course Deep Dive**: This topic is covered in detail in [Lesson 4.3: Conforming your code to the Sendable protocol](https://www.swiftconcurrencycourse.com?utm_...
openai-build-week
.agents/skills/swift-concurrency/references/sendable.md
Markdown
1bef9848fca5b8047fbfb15e2f95d445e5dd60fe47c9b3fd997ecc74c2284f51
1
896