Ship

From tinh2/skills-hub-registry · View interactive version

Ship is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Fast autonomous build loop -- 4 iterations max. Ship it, quick build, fast implementation, just build it, ship fast.

How to use this skill

Skill file

You are in FULLY AUTONOMOUS MODE. Zero questions. Just build.

TASK:

$ARGUMENTS

RULES:

=== PRE-BUILD: VALIDATION GATE ===

Before writing any feature code, validate the project foundation.

This prevents wasting iterations on lint, platform, and config issues.

  1. STATIC ANALYSIS:
  1. PLATFORM CHECKS (Flutter):
  1. DEPENDENCY CHECK:
  1. RULES/CONFIG CHECK (if Firebase):
  1. DOCKER/INFRASTRUCTURE CHECK (if docker-compose.yml or Dockerfile exists):

Fix everything found. Commit: "chore: pre-build validation fixes"

If clean, skip the commit and proceed.

=== PER-SCREEN QUALITY CHECKLIST (CRITICAL — learned from metrics analysis) ===

Every screen you create or modify MUST satisfy these before committing.

Applying these at creation time prevents 46+ retrofit commits later:

a) A11Y: Every Icon/Image has semanticLabel. Every interactive element has

tooltip or Semantics label. All tap targets >= 48x48dp. Text uses theme styles.

b) DESIGN TOKENS: Colors from ColorScheme only (zero hardcoded Color(0xFF...)).

TextStyles from TextTheme only. Border radii from constants. Spacing on grid.

Fees/rates/limits from admin config, not hardcoded.

c) ASYNC SAFETY: Every async operation in StatefulWidget checks

if (!mounted) return; before calling setState.

d) SCALABILITY: Every Firestore query has .limit(). Batch writes for multi-doc

operations. Idempotent Cloud Function triggers.

e) STRUCTURAL HEALTH: If any file exceeds 500 lines, decompose it into

domain-specific modules. Do not let monolithic services grow across iterations.

MONOLITH DECOMPOSITION GATE (learned from Recipe AI recall — 69 modifications to 3 monolithic files):

Before adding ANY feature code to a file that exceeds 500 lines:

  1. STOP. Do not add the feature to the monolithic file.
  2. Extract the relevant section into its own file first (widget, service, mixin, module).
  3. Verify the extraction works (tests pass, build succeeds).
  4. Commit the extraction: "refactor: extract [component] from [monolith]"
  5. THEN implement the feature in the newly extracted file.

This is NOT optional. "Flag and plan" does not work — Recipe AI flagged

analyze_screen.dart (6,732 lines) but never decomposed it, resulting in 21 modifications

and a 62% fix-commit rate. Decompose BEFORE building, not after.

MINIMUM TEST REQUIREMENT (learned from Recipe AI — M8: Test Coverage = 0.00):

Every iteration that adds new functionality must include:

A feature is not complete until its tests exist and pass.

=== CO-COMMIT RULES (CRITICAL — learned from recall analysis) ===

These rules apply to EVERY iteration. Violating them is the #1 source of rework:

a) FIRESTORE RULES: When adding or modifying a Firestore collection, update

firestore.rules in the SAME commit. Never commit feature code without rules.

b) SERVER-SIDE VALIDATION: When adding client-side business logic (credit checks,

eligibility, permissions), wire up server-side enforcement in the SAME iteration.

c) MODEL SERIALIZATION: When a Cloud Function writes new fields, update the

client model (fields, fromMap/toMap, copyWith) in the SAME commit.

d) CLOUD FUNCTION TRIGGERS: When changing document structure, verify triggers

still match in the same commit.

e) SHARED CONFIGURATION (learned from ollama-server recall — 3 rework commits from

duplicated defaults): When 2+ files reference the same configurable value (model

name, base URL, API key, timeout, port), extract to a shared config module.

Never hardcode the same default in multiple files. Create src/config.ts (or

equivalent) with all shared defaults and env variable overrides centralized.

Duplicated config is the #1 source of co-change rework in backend projects.

=== ITERATION 1: MAKE IT EXIST ===

=== ITERATION 2: MAKE IT SOLID ===

=== ITERATION 3: DOMAIN ANALYSIS GATE ===

Run the /analyze skill scoped to everything you built or changed.

Include all analysis phases: consistency audit, server-side validation wiring,

model-to-Cloud-Function field completeness, Firebase rules, and platform compatibility.

Scope: All features/files touched across iterations 1-2.

Depth: Full analysis (all phases of /analyze).

Action: FIX everything rated Critical or Warning. Re-run affected checks to confirm.

Commit: "fix: resolve domain analysis issues"

=== ITERATION 4: FINAL PASS (only if needed) ===

=== POST-SHIP: WEB PREVIEW SMOKE GATE (CRITICAL — learned from deal-worthy recall 2026-05-22) ===

If the project has a deployable web target (Flutter web, Next.js, Vite, etc.) AND a configured preview channel (Firebase Hosting preview, Vercel preview, Cloudflare Pages preview), this gate runs BEFORE production promotion. It is not optional.

The 2026-04-25 deal-worthy hotfix cascade — Firebase init failure, missing /billing/success and /billing/cancel routes, broken Google Sign-In popup, and a dead-domain CTA — was 4 serial production hotfixes that a single preview-deploy smoke would have caught.

Procedure:

  1. Build for web: flutter build web / npm run build / framework equivalent. Must succeed.
  2. Deploy to a preview channel (NOT production):
  1. Capture the preview URL.
  2. Smoke-check the preview URL — at minimum hit every route the build added or modified plus all auth/billing/CTA routes. For each:
  1. If ANY smoke fails, STOP. Do not promote to production. Fix the failures and re-run the gate. Commit fixes as: "fix: preview smoke failures before production promote".
  2. Only after smoke passes, promote: firebase hosting:clone preview-... live or merge to production branch.

This gate does NOT replace /qa or /bug-sweep — it is a thin pre-production smoke that catches the deploy-time class of failures (init, routes, popups, dead CTAs) that local builds don't surface.

=== POST-SHIP: DOCUMENTATION ===

After all iterations complete and validation passes:

=== OUTPUT ===

One short summary:

## Shipped

NEXT STEPS:

Recommended pipeline after /ship:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.