AppBootstrapAI
AGENTS.md8 starsChanged 12 days agoMITView on GitHub
For AI agents. This file tells you how to operate this package — AppBootstrapAI — to set up / update / improve another repository. It is not the AGENTS.md that install.sh --agents codex writes into a target repo (that one carries the bundle's coding rules). Humans: see README.md. AppBootstrapAI is a drop-in bundle of AI agent steering — rules, skills (Claude), and MCP recipes — copied into a target app repo by install.sh. It covers Apple (Swift 6 / SwiftUI…
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,117 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository40 other files it gives its agents.
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- android-accessibility-proSkill
- android-adaptive-layout-proSkill
- android-compose-proSkill
- android-coroutines-proSkill
- android-design-system-proSkill
- android-gradle-architecture-proSkill
- android-library-proSkill
- android-memory-storage-proSkill
- android-modularization-proSkill
- app-intents-proSkill
- beta-deployment-proSkill
- coredata-swift6-proSkill
- cross-platform-parity-proSkill
- flaky-tests-proSkill
- foundation-models-proSkill
- instruments-profiling-proSkill
- linting-proSkill
- localization-proSkill
- motion-design-proSkill
- r8-shrink-proSkill
- store-compliance-proSkill
- swift-accessibility-proSkill
- swift-adaptive-layout-proSkill
- swift-concurrency-proSkill
- swiftdata-proSkill
- swift-design-system-proSkill
- swift-docc-proSkill
- swift-error-handling-proSkill
- swift-library-proSkill
- swift-logging-proSkill
- swift-memory-storage-proSkill
- swift-modularization-proSkill
- swift-package-proSkill
- swift-testing-proSkill
- swiftui-proSkill
- visionos-proSkill
- xcode-security-proSkill
- xml-to-compose-migration-proSkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
If the user wants their package, app, or repo audited against these rules ("use kelvinkosbab/AppBootstrapAI to audit my package"), follow …
- Very specific: line 55
After an install, users start it with /appbootstrap-sync (Claude Code, Cursor, Copilot, Gemini CLI).
- Very specific: line 122
Prefer --dry-run / the preview_* tools before any write.
- Very specific: line 123
Don't broaden --features past what the repo uses — extra categories cost the user context tokens.
- Very specific: line 137
Don't hand-copy rules or skills — always go through install.sh.
- Very specific: line 138
Don't re-install over a managed repo — use upgrade.
- Very specific: line 139
Don't skip the preview step on a destructive action (uninstall, upgrade --apply --force-conflicts --prune).
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — operating AppBootstrapAI
For AI agents. This file tells you how to operate this package — AppBootstrapAI — to set up / update / improve another repository. It is not the
AGENTS.mdthatinstall.sh --agents codexwrites into a target repo (that one carries the bundle's coding rules). Humans: see README.md.
AppBootstrapAI is a drop-in bundle of AI agent steering — rules, skills (Claude),
and MCP recipes — copied into a target app repo by install.sh. It covers Apple
(Swift 6 / SwiftUI / visionOS / Testing / Core Data / Foundation Models) and
Android (Kotlin / Compose / Gradle / Hilt).
Asked to audit a repo with this package? (no install)
If the user wants their package, app, or repo audited against these rules
("use kelvinkosbab/AppBootstrapAI to audit my package"), follow
playbooks/audit.md. It's read-only on their repo:
git clone --depth 1 https://github.com/kelvinkosbab/AppBootstrapAI "${TMPDIR:-/tmp}/AppBootstrapAI"
"${TMPDIR:-/tmp}/AppBootstrapAI/install.sh" audit <their-repo> --no-install-check --jsonThen triage each finding against its rule_path, run the skills_to_run,
review their AI steering files (CLAUDE.md, AGENTS.md, Cursor / Copilot
rules) against .claude/rules/ai-steering-files.md, and report in chat. For
"audit my AI rules" alone, add --steering-only. Don't install unless they ask. The rest of this file covers
installing the bundle.
Golden path — do this
# 1. Analyze the target. Read-only. Returns JSON with a ready-to-run command.
./install.sh recommend <dir> --json
# 2. Preview. Run the returned `preview_command` (= command + --dry-run). Writes nothing.
# 3. Apply. Run the returned `command`. Then report what changed.recommend introspects the directory and tells you exactly what to run — one
call replaces grepping the tree yourself. Trust its command / preview_command.
recommend --json returns:
{ state, platform, apple_language, features, action, feature_reasons, command[], preview_command[], notes[] }.
Sync and audit an existing project
To update a repo to the latest bundle and audit it, follow
playbooks/sync-and-audit.md: recommend →
preview → apply, then audit --json, triage each finding against its rule, run
the listed skills, and write a report. It's vendor-neutral; any agent that can
run a shell can follow it.
After an install, users start it with /appbootstrap-sync (Claude Code,
Cursor, Copilot, Gemini CLI). The command finds the bundle through bundle.path
/ bundle.repo in .claude/.appbootstrap-manifest.json (or
$APPBOOTSTRAP_BUNDLE), so no path is needed. /appbootstrap-audit <topic>
runs a read-only audit of one area (install.sh audit --topic), loading only
that topic's rules and skills from lib/topics.json. Accepted findings live in
.claude/appbootstrap-audit-baseline.json and don't fail --fail-on.
Commands (verbs; each has a --flag alias, so old scripts keep working)
| Verb | Does | Alias |
recommend [dir] [--json] | analyze a dir → suggested command | --recommend |
audit [dir] [--json] [--fail-on high] [--write-baseline] [--no-install-check] | rule hotspots → findings + skills to run (read-only unless --write-baseline); kind is package or app | --audit |
install [dir] [flags] | copy the bundle in (default verb — may be omitted) | — |
upgrade <dir> [--apply] | 3-way diff vs. the current bundle; preserves local edits | --upgrade |
uninstall <dir> | reverse an install | --uninstall |
list [--json] | preview the catalog | --list |
list-mcps | list MCP recipes | --list-mcps |
setup | guided interactive flow | -i / --interactive |
Key install flags: --platform apple|android|both (auto-detected if omitted),
--apple-language swift|objc|both, --features recommended|all|<csv>,
--agents claude,copilot,cursor,gemini,codex,kiro|all, --with-mcps <csv>,
--new (create the dir + git init), --dry-run.
The three situations recommend resolves
- missing dir →
install <dir> --new …— makes the dir +git init(it does not generate an Xcode/Gradle project). - fresh / unmanaged dir →
install <dir> …— adopt; refreshes files and writes a manifest (becomes upgrade-able). - managed dir (has
.claude/.appbootstrap-manifest.json) →upgrade <dir> --apply.
A plain install over a managed dir is refused (use upgrade; --force overrides). recommend picks the right one for you.
What recommend keys on (framework → feature category)
import FoundationModels → ai · Core Data / SwiftData / .xcdatamodeld →
persistence · RealityKit / .usdz → spatial · Room → persistence ·
R8 / ProGuard → shrinking · XML layouts / Fragments → migration ·
fastlane / CI → deployment, *Repository types → architecture. The recommended set is always included.
Scaffolding a local Swift package (separate tool)
To help an Apple app modularize — move logic out of the .xcodeproj into a
local package, KozBon-style — use the standalone scaffolder (not an install.sh
verb):
./scripts/scaffold-spm-package.sh <repo> --modules Core,Models,UI,AppCore [--dry-run]It generates <repo>/<Name>Packages/ with a makeTargets() Package.swift plus
a compiling source + passing test per module; a module named AppCore becomes
the umbrella the app target links. Non-destructive (never overwrites; --force
fills only missing files). It does not move existing code — that's the
incremental, leaf-first step (see .claude/rules/apple-modular-architecture.md).
The swift-modularization-pro skill drives that migration and audits the
resulting graph; android-modularization-pro does the same for a multi-module
Gradle build (there is no Android scaffolder; use convention plugins).
Guardrails (respect these)
- The installer never overwrites
CLAUDE.md,settings.json, or existing agent files — it prints what it skipped. Don't work around that. upgradekeeps locally-edited files (3-way diff); only--force-conflictsoverrides.- Committing and pushing are the user's call. Edit the working tree freely;
do not
git commit/git pushunless the user explicitly asks. - Prefer
--dry-run/ thepreview_*tools before any write. - Don't broaden
--featurespast what the repo uses — extra categories cost the user context tokens. Trustrecommend's feature list.
Via MCP
This repo ships an MCP server (mcp-server/) exposing the same surface as typed
tools — call recommend_setup first, then preview_install / install,
preview_upgrade, preview_uninstall / uninstall, plus list_categories /
list_rules / list_skills, and audit_project (skip_install_check for an
audit-only run). The audit prompt runs the audit playbook; sync_and_audit
runs the sync-and-audit playbook. See mcp-server/README.md.
Don't
- Don't hand-copy rules or skills — always go through
install.sh. - Don't re-install over a managed repo — use
upgrade. - Don't skip the preview step on a destructive action (
uninstall,upgrade --apply --force-conflicts --prune).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

