Agent skill
gmacko-init-bootstrap
Use when (1) PROJECT_MANIFEST.json and INITIAL_PLAN.md exist, (2) ready to execute setup.sh to initialize the project, (3) renaming template to project name. Wraps setup.sh with preflight checks and validation.
Install this agent skill to your Project
npx add-skill https://github.com/gmackie/vercel-expo-app-template/tree/main/.opencode/skill/gmacko-init-bootstrap
Metadata
Additional technical details for this skill
- tier
- workhorse
- phase
- initialization
- permission
- ask
SKILL.md
Gmacko Bootstrap Executor
Execute scripts/setup.sh to initialize the project from the template.
Prerequisites
PROJECT_MANIFEST.jsonmust existINITIAL_PLAN.mdshould exist (rungmacko-init-planfirst)- Git working directory should be clean
Workflow
digraph bootstrap {
rankdir=TB;
node [shape=box];
start [label="Start" shape=ellipse];
preflight [label="1. Preflight Checks"];
confirm [label="2. Confirm Execution"];
approved [label="Approved?" shape=diamond];
execute [label="3. Execute setup.sh"];
validate [label="4. Validate Results"];
valid [label="Valid?" shape=diamond];
handoff [label="5. Write Handoff"];
done [label="Bootstrap Complete" shape=ellipse];
abort [label="Aborted" shape=ellipse];
fix [label="Fix Issues"];
start -> preflight -> confirm -> approved;
approved -> execute [label="yes"];
approved -> abort [label="no"];
execute -> validate -> valid;
valid -> handoff [label="yes"];
valid -> fix [label="no"];
fix -> validate;
handoff -> done;
}
Execution Steps
Step 1: Preflight Checks
Run these checks and report status:
# Check 1: PROJECT_MANIFEST.json exists
[ -f "PROJECT_MANIFEST.json" ] && echo "OK: Manifest found" || echo "FAIL: Manifest missing"
# Check 2: Git is clean (no uncommitted changes)
[ -z "$(git status --porcelain)" ] && echo "OK: Git clean" || echo "WARN: Uncommitted changes"
# Check 3: Node.js installed
node --version && echo "OK: Node.js found" || echo "FAIL: Node.js missing"
# Check 4: pnpm installed
pnpm --version && echo "OK: pnpm found" || echo "FAIL: pnpm missing"
# Check 5: Read project name from manifest
PROJECT_NAME=$(node -p "require('./PROJECT_MANIFEST.json').project.name")
echo "Project name: $PROJECT_NAME"
# Check 6: Determine if mobile is needed
MOBILE=$(node -p "require('./PROJECT_MANIFEST.json').platforms.mobile")
echo "Mobile platform: $MOBILE"
Report preflight summary:
PREFLIGHT CHECKS
================
[OK] PROJECT_MANIFEST.json found
[OK] Git working directory clean
[OK] Node.js v20.x installed
[OK] pnpm 9.x installed
Project: acme-saas
Mobile: false (will use --no-mobile flag)
Step 2: Confirm Execution
IMPORTANT: This step requires user confirmation because it makes irreversible changes.
Tell the user:
I'm about to run
scripts/setup.shwhich will:
- Rename all
@repo/*packages to@{project-name}/*- Update app metadata (titles, descriptions)
- Remove the template's git history
- Initialize a fresh git repository
- Delete
node_modulesand reinstall dependenciesThis cannot be undone.
Shall I proceed? (yes/no)
Step 3: Execute setup.sh
On user confirmation, execute:
# Build the command
PROJECT_NAME=$(node -p "require('./PROJECT_MANIFEST.json').project.name")
MOBILE=$(node -p "require('./PROJECT_MANIFEST.json').platforms.mobile")
if [ "$MOBILE" = "false" ]; then
./scripts/setup.sh "$PROJECT_NAME" --no-mobile
else
./scripts/setup.sh "$PROJECT_NAME"
fi
Monitor output and report progress:
- Package scope renamed
- App metadata updated
- Dependencies cleaned
- Fresh install running
- Git repository initialized
Step 4: Validate Results
After setup completes, run validation:
# Validation 1: Check package.json has correct name
node -p "require('./package.json').name" | grep -q "$PROJECT_NAME" && echo "OK: Root package renamed"
# Validation 2: Type check passes
pnpm typecheck && echo "OK: Type check passed" || echo "FAIL: Type errors"
# Validation 3: Lint passes
pnpm lint && echo "OK: Lint passed" || echo "FAIL: Lint errors"
# Validation 4: Build succeeds
pnpm build && echo "OK: Build succeeded" || echo "FAIL: Build failed"
# Validation 5: Git repo initialized
[ -d ".git" ] && echo "OK: Git initialized" || echo "FAIL: Git missing"
Report validation summary:
VALIDATION RESULTS
==================
[OK] Package renamed to @acme-saas/*
[OK] Type check passed (0 errors)
[OK] Lint passed (0 warnings)
[OK] Build succeeded
[OK] Git repository initialized
Bootstrap successful!
If validation fails, report errors and suggest fixes.
Step 5: Write Handoff Document
Write docs/ai/handoffs/init-bootstrap.md:
# Initialization Handoff: Bootstrap Complete
## Timestamp
[ISO timestamp]
## Status
- [x] Preflight checks passed
- [x] setup.sh executed successfully
- [x] Validation passed
## Changes Made
- Renamed `@repo/*` to `@{project-name}/*`
- Updated app titles and metadata
- Removed template git history
- Initialized fresh git repository
- Installed dependencies
## Validation Results
- Type check: PASSED
- Lint: PASSED
- Build: PASSED
## Next Steps
- [ ] Run `gmacko-init-provision` to configure external services
- [ ] Create initial commit with project files
- [ ] Push to gmacko/{project-name} repository
## Notes
[Any warnings or issues encountered]
Post-Bootstrap Actions
After bootstrap completes, suggest:
Bootstrap complete! Next steps:
- Review the changes: Check
package.jsonand app files- Provision services: Run the
gmacko-init-provisionskill- Create initial commit:
bashgit add . git commit -m "Initial commit: {project-name}"- Push to GitHub:
bashgh repo create gmacko/{project-name} --private --source=. --push
Red Flags
| Rationalization | Correction |
|---|---|
| "I'll skip the confirmation, it's just a rename" | ALWAYS require explicit "yes" before setup.sh |
| "Validation failed but it's probably fine" | STOP: Fix all validation errors before proceeding |
| "I'll skip typecheck to save time" | NEVER skip validation; it catches real issues |
| "Git is dirty but I'll proceed anyway" | WARN user; recommend committing first |
Error Handling
setup.sh fails
- Check error output
- Common issues:
- Invalid project name (must be lowercase, alphanumeric, hyphens)
- Disk space issues
- Permission problems
- Suggest fix and retry
Validation fails
- Report specific failure
- For type errors: Run
pnpm typecheckand show errors - For lint errors: Run
pnpm lint --fixif auto-fixable - For build errors: Check for missing dependencies
Dependencies
- Requires:
PROJECT_MANIFEST.json,scripts/setup.sh - Produces: Renamed project,
docs/ai/handoffs/init-bootstrap.md - Next skill:
gmacko-init-provision
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gmacko-dev-issue-create
Use when (1) creating GitHub issues from feature plans or bug reports, (2) documenting bugs found during development, (3) managing the project backlog. Creates well-structured GitHub issues with templates and labels.
gmacko-dev-pr-review
Use when (1) reviewing a pull request against coding standards, (2) verifying PR meets acceptance criteria from feature plan, (3) checking for common issues before merge. Reviews PRs against plan and project standards.
gmacko-release-prepare
Use when (1) preparing a release for staging or production, (2) generating release notes and changelog, (3) verifying environment readiness before deployment. Prepares all artifacts needed for a release.
gmacko-release-deploy-web
Use when (1) deploying web application to Vercel staging or production, (2) monitoring deployment progress, (3) running post-deployment verification. Manages Vercel deployment workflow with safety checks.
gmacko-init-plan
Use when (1) PROJECT_MANIFEST.json exists and you need to generate INITIAL_PLAN.md, (2) user wants a detailed implementation roadmap, (3) translating manifest into actionable milestones. Generates comprehensive project plan from the manifest.
gmacko-release-close
Use when (1) release is deployed and verified, (2) closing related issues and PRs, (3) creating GitHub release with changelog, (4) finalizing release documentation. Completes the release lifecycle.
Didn't find tool you were looking for?