Λογότυπο Production Ready

Production Ready

Κοινότητα
LuckyOneTwoThree
production-ready

Χρησιμοποιήστε το για να προετοιμάσετε ένα έργο frontend για κυκλοφορία στην παραγωγή. Συνδυάζει την προετοιμασία για παραγωγή με τη διαμόρφωση του build, τη δημιουργία δοκιμών και τη βελτιστοποίηση απόδοσης, ώστε τα έργα frontend να είναι έτοιμα για ανάπτυξη, δοκιμή και υψηλές επιδόσεις. Λέξεις-κλειδιά: ανάπτυξη build, βελτιστοποίηση απόδοσης, δοκιμές frontend, έτοιμο για παραγωγή, προετοιμασία κυκλοφορίας, bundling, βελτιστοποίηση.

Επισκόπηση

ΕκδότηςLuckyOneTwoThree
Αποθετήριοvibe-skill
Όνομα δεξιότηταςproduction-ready
Αστέρια
34
Διακλαδώσεις
8
Συνοδευτικά αρχεία
Μόνο οδηγίες
Άδεια χρήσηςMIT
Σύνδεσμοι
  • Οδηγίες σε Markdown

    Ένα αρχείο SKILL.md που το μοντέλο φορτώνει όταν χρειάζεται, ώστε να καταναλώνει token μόνο όταν ένα αίτημα είναι πράγματι σχετικό.

  • Λειτουργεί με οποιοδήποτε LLM

    Οι δεξιότητες AI είναι απλό Markdown, όχι κώδικας για συγκεκριμένο πάροχο, επομένως αυτή η δεξιότητα λειτουργεί με GPT, Claude, Gemini, Grok ή ένα τοπικό μοντέλο.

  • Αυτοτελής

    Όλα όσα χρειάζεται το μοντέλο περιλαμβάνονται στις οδηγίες — χωρίς επιπλέον αρχεία για συγχρονισμό.

  • Ανοιχτού κώδικα

    Δημοσιεύτηκε στο GitHub από τον λογαριασμό LuckyOneTwoThree. Ελέγξτε τα αρχεία της δεξιότητας στο αποθετήριο πριν την εγκαταστήσετε.

Εγκατάσταση

Εγκαταστήστε τη δεξιότητα AI Production Ready στο TypingMind για να τη χρησιμοποιείτε με οποιοδήποτε LLM ή προσθέστε τη σε άλλον πράκτορα AI που διαβάζει αρχεία SKILL.md.

1

Εγκατάσταση στο TypingMind

Το TypingMind εγκαθιστά μια δεξιότητα απευθείας από τον φάκελό της στο GitHub — διαβάζει το SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία σε πακέτο και αποθηκεύει το αποτέλεσμα τοπικά.

  1. Ανοίξτε την εφαρμογή και μεταβείτε στα Πρόσθετα → Δεξιότητες.
  2. Επιλέξτε «Εγκατάσταση από GitHub».
  3. Επικολλήστε το παρακάτω URL του φακέλου της δεξιότητας και επιβεβαιώστε.
    https://github.com/LuckyOneTwoThree/vibe-skill/tree/main/.codex/skills/production-ready
  4. Ενεργοποιήστε τη δεξιότητα σε κάθε συνομιλία όπου θέλετε να είναι διαθέσιμη.
Πρόσθετα → Δεξιότητες → Προσθήκη δεξιότητας → Από URL του GitHub, έπειτα επικολλήστε το URL του φακέλου και πατήστε «Συνέχεια».
2

Εγκατάσταση σε άλλον πράκτορα AI

Κάθε πράκτορας AI που υποστηρίζει τη μορφή Agent Skills μπορεί να χρησιμοποιήσει αυτή τη δεξιότητα — αντιγράψτε τον φάκελο στον κατάλογο δεξιοτήτων του.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LuckyOneTwoThree/vibe-skill.git /tmp/vibe-skill
mkdir -p .claude/skills
cp -r /tmp/vibe-skill/.codex/skills/production-ready .claude/skills/production-ready
Επανεκκινήστε το Claude Code μετά την αντιγραφή, ώστε να εντοπίσει τη νέα δεξιότητα.

Χρησιμοποιήστε τη στο TypingMind

Ενεργοποιήστε τη δεξιότητα Production Ready σε οποιαδήποτε συνομιλία στο TypingMind και το μοντέλο αναλαμβάνει τα υπόλοιπα. Το όνομα και η περιγραφή της περιλαμβάνονται στην προτροπή συστήματος και, μόλις προκύψει ένα σχετικό αίτημα, το μοντέλο φορτώνει μόνο του τις πλήρεις οδηγίες — δεν χρειάζεται ποτέ να την καλείτε χειροκίνητα και δεν καταναλώνει token μέχρι να χρησιμοποιηθεί πραγματικά.

Το μοντέλο φορτώνει αυτόματα τη δεξιότητα Production Ready μόλις λάβει ένα σχετικό αίτημα.

Λειτουργεί με οποιοδήποτε μοντέλο AI

Οι δεξιότητες AI είναι οδηγίες σε απλό κείμενο Markdown και όχι κώδικας για συγκεκριμένο πάροχο, οπότε η δεξιότητα Production Ready δεν περιορίζεται στο μοντέλο για το οποίο γράφτηκε. Εγκαταστήστε τη μία φορά στο TypingMind και χρησιμοποιήστε τη με GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ή ένα τοπικό μοντέλο που εκτελείτε εσείς — πάντα με τα δικά σας κλειδιά API.

  • Φόρτωση μόνο όταν χρειάζεται

    Η προτροπή συστήματος περιλαμβάνει μόνο το όνομα και την περιγραφή. Οι οδηγίες ανακτώνται με το πρώτο σχετικό αίτημα, οπότε μια δεξιότητα που δεν χρησιμοποιείται δεν έχει κόστος.

  • Αλλάξτε μοντέλο κατά τη διάρκεια της συνομιλίας

    Επειδή η δεξιότητα αποτελείται από οδηγίες και όχι από κώδικα, η αλλαγή μοντέλου δεν επηρεάζει τη λειτουργία της — το επόμενο μοντέλο διαβάζει το ίδιο αρχείο SKILL.md.

Οδηγίες δεξιότητας

Αυτό είναι το περιεχόμενο του αρχείου SKILL.md που φορτώνει το μοντέλο. Διαβάστε το πριν από την εγκατάσταση — μια δεξιότητα αποτελείται από οδηγίες που θα ακολουθήσει το μοντέλο σας.

Production Ready Integration

Engineering Delivery Boundary

Follow Engineering Boundary Protocol.

  1. Project first: inspect existing framework, router, state management, component library, styling, API client, and test stack before writing code; inherit by default.
  2. Design-system first: existing design system, component library, and brand rules override visual_policy unless the user explicitly asks to change them.
  3. Write scope: declare target directories and files before implementation; do not overwrite unrelated user code.
  4. Responsive acceptance: check desktop/mobile layout, text overflow, cramped controls, nested cards, accessibility basics, and design-token consistency.
  5. Verification record: report created/modified files, checks run, checks that could not run, and residual risks.

Core Principles

  1. Build as Validation -- Build process simultaneously validates code quality and performance
  2. Built-in Testing -- Tests generated alongside code, not added afterward
  3. Performance Budget -- Performance metrics have clear thresholds, exceeding auto-blocks
  4. Progressive Optimization -- Solve biggest bottlenecks first, then optimize incrementally

Interaction Mode

AI auto-executes

Input

Input ItemTypeRequiredSourceDescription
Frontend CodecodeYes{project_dir}/src/Page and component code (code in project src directory, metadata in output path)
API IntegrationJSONOoutput/ui-frontend-integration/api-integration/API integration metadata (code in {project_dir}/src/api/)
quality_debtJSONOoutput/ui-frontend/page-builder/quality_debt.jsonQuality debt list downgraded during page-builder stage
Target FrameworkstringYesPassed from upstream orchestratorReact/Vue/Svelte
Deployment TargetstringOUser providedVercel/Netlify/Self-hosted/CDN
Target LanguagestringOPassed from upstream orchestrator (default zh-CN)Target interface language
project_dirstringYesPassed from upstream orchestratorProject root directory absolute path

Execution Steps

quality_debt Consumption Rules: If quality_debt.json exists, prioritize handling critical-level debt before Step 1 (must fix), major-level debt included in test priority coverage.

Step 1: Build Configuration and Optimization [Deep]

Configure build tools and optimization strategies:

Configuration ItemContent
Build ToolVite/Webpack/Next.js built-in
Code SplittingRoute-level + component-level lazy loading
Asset OptimizationImage compression + font subsetting + SVG optimization
Cache StrategyContent hash + long-term caching + preloading
Environment VariablesDev/staging/production environment configuration

1a. Vite Build Configuration Template

typescript
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import viteCompression from 'vite-plugin-compression'
import { visualizer } from 'rollup-plugin-visualizer'

export default defineConfig(({ mode }) => ({
  plugins: [
    react(),
    viteCompression({ algorithm: 'gzip', threshold: 10240 }),
    mode === 'analyze' && visualizer({ open: true, gzipSize: true, brotliSize: true }),
  ].filter(Boolean),
  build: {
    target: 'es2020',
    outDir: 'dist',
    sourcemap: mode === 'production' ? 'hidden' : true,
    rollupOptions: {
      output: {
        manualChunks: {
          vendor: ['react', 'react-dom', 'react-router-dom'],
          ui: ['@/components/ui'],
          utils: ['lodash-es', 'dayjs', 'axios'],
        },
        chunkFileNames: 'assets/js/[name]-[hash].js',
        entryFileNames: 'assets/js/[name]-[hash].js',
        assetFileNames: 'assets/[ext]/[name]-[hash].[ext]',
      },
    },
    cssCodeSplit: true,
    minify: 'terser',
    terserOptions: {
      compress: { drop_console: mode === 'production', drop_debugger: true },
    },
    chunkSizeWarningLimit: 300,
  },
  resolve: {
    alias: { '@': '/src' },
  },
  server: {
    proxy: {
      '/api': { target: 'http://localhost:3000', changeOrigin: true },
    },
  },
}))

1b. Webpack Build Configuration Template (On-Demand)

Use when the project already has Webpack configuration or Vite is not applicable:

javascript
const path = require('path')
const TerserPlugin = require('terser-webpack-plugin')
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')

module.exports = (env, argv) => ({
  mode: argv.mode || 'production',
  entry: { main: './src/main.tsx' },
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'assets/js/[name].[contenthash:8].js',
    chunkFilename: 'assets/js/[name].[contenthash:8].chunk.js',
    assetModuleFilename: 'assets/[ext]/[name].[contenthash:8][ext]',
    clean: true,
  },
  resolve: {
    extensions: ['.tsx', '.ts', '.jsx', '.js'],
    alias: { '@': path.resolve(__dirname, 'src') },
  },
  optimization: {
    minimize: true,
    minimizer: [new TerserPlugin({ extractComments: false }), new CssMinimizerPlugin()],
    splitChunks: {
      chunks: 'all',
      cacheGroups: {
        vendor: { test: /[\\/]node_modules[\\/]/, name: 'vendor', priority: 10 },
        ui: { test: /[\\/]src[\\/]components[\\/]ui[\\/]/, name: 'ui', priority: 20 },
        common: { minChunks: 2, name: 'common', priority: 5, reuseExistingChunk: true },
      },
    },
    runtimeChunk: 'single',
  },
  module: {
    rules: [
      { test: /\.tsx?$/, use: 'ts-loader', exclude: /node_modules/ },
      { test: /\.css$/, use: ['style-loader', 'css-loader', 'postcss-loader'] },
      { test: /\.(png|jpe?g|gif|webp|svg)$/, type: 'asset', parser: { dataUrlCondition: { maxSize: 8192 } } },
      { test: /\.(woff2?|eot|ttf|otf)$/, type: 'asset/resource' },
    ],
  },
  plugins: [
    argv.analyze && new BundleAnalyzerPlugin({ analyzerMode: 'server', openAnalyzer: true }),
  ].filter(Boolean),
  performance: {
    maxEntrypointSize: 300000,
    maxAssetSize: 250000,
    hints: argv.mode === 'production' ? 'warning' : false,
  },
})

1c. Environment Variable Configuration Template

VITE_APP_TITLE=App Name
VITE_API_BASE_URL=/api
VITE_API_MOCK=false
VITE_API_BASE_URL=http://localhost:3000/api
VITE_API_MOCK=true
VITE_ENABLE_DEVTOOLS=true
VITE_API_BASE_URL=https://staging-api.example.com/api
VITE_API_MOCK=false
VITE_ENABLE_DEVTOOLS=true
VITE_API_BASE_URL=https://api.example.com/api
VITE_API_MOCK=false
VITE_ENABLE_DEVTOOLS=false

Environment variable usage conventions:

  • All variables prefixed with VITE_ (Vite) / REACT_APP_ (CRA)
  • Never store secrets/tokens in environment variables; sensitive configuration injected at runtime
  • Access via import.meta.env.VITE_XXX (Vite) / process.env.REACT_APP_XXX (CRA)
  • Declare types in src/env.d.ts to ensure type safety

Build configuration written to {project_dir}/.

Step 2: Test Generation [Core]

Test Pyramid: Unit tests (70%) > Integration tests (20%) > E2E tests (10%)

Test TypeCoverage ContentTool (React)Tool (Vue)Tool (Svelte)Ratio
Render TestsComponent renders normally, each variant rendersJest+RTLVitest+Vue Test UtilsVitest+Svelte Testing Library30%
Interaction TestsClick/input/submit callbacksfireEvent/userEventfireEvent/userEventfireEvent/userEvent25%
State TestsState transitions, loading/errorJest+RTLVitest+Vue Test UtilsVitest+Svelte Testing Library15%
Boundary TestsEmpty data/long text/extreme valuesJestVitestVitest10%
Storybook StoriesOne Story per VariantStorybookStorybookStorybook20%

E2E tests: Core user flows 100% covered, using Playwright/Cypress.

Accessibility tests: WCAG 2.1 AA standard, using axe-core/jest-axe.

Visual regression tests (built-in capability): Playwright screenshot comparison + Storybook Chromatic, covering 375/768/1440 three viewports.

2a. Component Test Template (React Testing Library)

typescript
import { render, screen, fireEvent, waitFor } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { describe, it, expect, vi, beforeEach } from 'vitest'
import { {{ComponentName}} } from './{{ComponentName}}'

describe('{{ComponentName}}', () => {
  const defaultProps = {
    // default props
  }

  beforeEach(() => {
    vi.clearAllMocks()
  })

  it('renders normally', () => {
    render(<{{ComponentName}} {...defaultProps} />)
    expect(screen.getByRole('region')).toBeInTheDocument()
  })

  it('renders each variant', () => {
    const variants = ['default', 'primary', 'danger'] as const
    variants.forEach((variant) => {
      const { unmount } = render(<{{ComponentName}} {...defaultProps} variant={variant} />)
      expect(screen.getByRole('region')).toBeInTheDocument()
      unmount()
    })
  })

  it('triggers interaction callback', async () => {
    const onClick = vi.fn()
    render(<{{ComponentName}} {...defaultProps} onClick={onClick} />)
    await userEvent.click(screen.getByRole('button'))
    expect(onClick).toHaveBeenCalledOnce()
  })

  it('displays loading state', () => {
    render(<{{ComponentName}} {...defaultProps} loading={true} />)
    expect(screen.getByRole('status')).toBeInTheDocument()
  })

  it('displays error state', () => {
    render(<{{ComponentName}} {...defaultProps} error="Loading failed" />)
    expect(screen.getByText('Loading failed')).toBeInTheDocument()
  })

  it('handles empty data boundary', () => {
    render(<{{ComponentName}} {...defaultProps} data={[]} />)
    expect(screen.getByText(/No data/)).toBeInTheDocument()
  })

  it('long text does not overflow', () => {
    const longText = 'Very long text'.repeat(100)
    render(<{{ComponentName}} {...defaultProps} text={longText} />)
    const element = screen.getByText(longText)
    expect(element).toHaveStyle({ overflow: 'hidden', textOverflow: 'ellipsis' })
  })

  it('passes accessibility check', async () => {
    const { container } = render(<{{ComponentName}} {...defaultProps} />)
    const results = await axe(container)
    expect(results).toHaveNoViolations()
  })
})

2b. Component Test Template (Vue Test Utils)

typescript
import { mount, VueWrapper } from '@vue/test-utils'
import { describe, it, expect, vi, beforeEach } from 'vitest'
import {{ComponentName}} from './{{ComponentName}}.vue'

describe('{{ComponentName}}', () => {
  const defaultProps = {
    // default props
  }

  const createWrapper = (props = {}) =>
    mount({{ComponentName}}, { props: { ...defaultProps, ...props } })

  beforeEach(() => {
    vi.clearAllMocks()
  })

  it('renders normally', () => {
    const wrapper = createWrapper()
    expect(wrapper.find('[data-testid="component-root"]').exists()).toBe(true)
  })

  it('renders each variant', () => {
    const variants = ['default', 'primary', 'danger'] as const
    variants.forEach((variant) => {
      const wrapper = createWrapper({ variant })
      expect(wrapper.find('[data-testid="component-root"]').exists()).toBe(true)
      wrapper.unmount()
    })
  })

  it('triggers interaction callback', async () => {
    const onClick = vi.fn()
    const wrapper = createWrapper({ onClick })
    await wrapper.find('button').trigger('click')
    expect(onClick).toHaveBeenCalledOnce()
  })

  it('displays loading state', () => {
    const wrapper = createWrapper({ loading: true })
    expect(wrapper.find('[role="status"]').exists()).toBe(true)
  })

  it('displays error state', () => {
    const wrapper = createWrapper({ error: 'Loading failed' })
    expect(wrapper.text()).toContain('Loading failed')
  })

  it('handles empty data boundary', () => {
    const wrapper = createWrapper({ data: [] })
    expect(wrapper.text()).toContain('No data')
  })

  it('passes accessibility check', async () => {
    const wrapper = createWrapper()
    const results = await axe(wrapper.element)
    expect(results).toHaveNoViolations()
  })
})

2c. API Integration Test Template

typescript
import { describe, it, expect, vi, beforeAll, afterAll, afterEach } from 'vitest'
import { setupServer } from 'msw/node'
import { http, HttpResponse } from 'msw'
import { {{endpointName}} } from '@/api/{{module}}'

const mockHandlers = [
  http.get('/api/{{module}}/{{resource}}', () => {
    return HttpResponse.json({
      code: 0,
      data: { /* mock response */ },
      message: 'success',
    })
  }),
  http.post('/api/{{module}}/{{resource}}', async ({ request }) => {
    const body = await request.json()
    return HttpResponse.json({
      code: 0,
      data: { id: 'mock-id', ...body },
      message: 'success',
    }, { status: 201 })
  }),
  http.get('/api/{{module}}/{{resource}}/:id', ({ params }) => {
    return HttpResponse.json({
      code: 0,
      data: { id: params.id, name: 'mock-name' },
      message: 'success',
    })
  }),
]

const errorHandlers = [
  http.get('/api/{{module}}/{{resource}}', () => {
    return HttpResponse.json({ code: 500, message: 'Server error' }, { status: 500 })
  }),
]

const server = setupServer(...mockHandlers)

beforeAll(() => server.listen())
afterEach(() => server.resetHandlers())
afterAll(() => server.close())

describe('{{endpointName}} API', () => {
  it('returns data on normal request', async () => {
    const result = await {{endpointName}}({ /* params */ })
    expect(result.code).toBe(0)
    expect(result.data).toBeDefined()
  })

  it('request parameter types are correct', async () => {
    const result = await {{endpointName}}({ /* params */ })
    expect(typeof result.data.id).toBe('string')
  })

  it('server error triggers error handling', async () => {
    server.use(...errorHandlers)
    await expect({{endpointName}}({ /* params */ })).rejects.toThrow()
  })

  it('network timeout triggers retry', async () => {
    server.use(
      http.get('/api/{{module}}/{{resource}}', async () => {
        await new Promise((resolve) => setTimeout(resolve, 15000))
        return HttpResponse.json({ code: 0, data: {} })
      })
    )
    await expect({{endpointName}}({ /* params */ }, { timeout: 1000 })).rejects.toThrow()
  })

  it('401 unauthorized triggers auth refresh', async () => {
    server.use(
      http.get('/api/{{module}}/{{resource}}', () => {
        return HttpResponse.json({ code: 401, message: 'Unauthorized' }, { status: 401 })
      })
    )
    await expect({{endpointName}}({ /* params */ })).rejects.toThrow()
  })
})

2d. E2E Test Configuration Template (Playwright)

typescript
import { defineConfig, devices } from '@playwright/test'

export default defineConfig({
  testDir: './e2e',
  fullyParallel: true,
  forbidOnly: !!process.env.CI,
  retries: process.env.CI ? 2 : 0,
  workers: process.env.CI ? 1 : undefined,
  reporter: [['html', { open: 'never' }], ['github']],
  use: {
    baseURL: process.env.E2E_BASE_URL || 'http://localhost:5173',
    trace: 'on-first-retry',
    screenshot: 'only-on-failure',
    video: 'retain-on-failure',
  },
  projects: [
    { name: 'chromium', use: { ...devices['Desktop Chrome'] } },
    { name: 'mobile-chrome', use: { ...devices['Pixel 5'] } },
    { name: 'tablet', use: { ...devices['iPad Pro'] } },
  ],
  webServer: {
    command: 'npm run dev',
    url: 'http://localhost:5173',
    reuseExistingServer: !process.env.CI,
    timeout: 30000,
  },
})

E2E core flow test template:

typescript
import { test, expect } from '@playwright/test'

test.describe('Core User Flows', () => {
  test('User login flow', async ({ page }) => {
    await page.goto('/login')
    await page.fill('[data-testid="username"]', 'testuser')
    await page.fill('[data-testid="password"]', 'testpass')
    await page.click('[data-testid="login-button"]')
    await expect(page).toHaveURL(/\/dashboard/)
    await expect(page.locator('[data-testid="user-avatar"]')).toBeVisible()
  })

  test('List browsing flow', async ({ page }) => {
    await page.goto('/items')
    await expect(page.locator('[data-testid="item-list"]')).toBeVisible()
    await page.click('[data-testid="item-card"]:first-child')
    await expect(page).toHaveURL(/\/items\/\d+/)
    await expect(page.locator('[data-testid="item-detail"]')).toBeVisible()
  })

  test('Form submission flow', async ({ page }) => {
    await page.goto('/items/new')
    await page.fill('[data-testid="input-name"]', 'Test Item')
    await page.click('[data-testid="submit-button"]')
    await expect(page.locator('[data-testid="success-message"]')).toBeVisible()
  })
})

Test files written to {project_dir}/tests/.

Step 3: Performance Optimization [Deep]

Establish performance baselines:

MetricExcellentNeeds OptimizationPoor
LCP<=2.5s2.5-4s>4s
FCP<=1.8s1.8-3s>3s
FID<=100ms100-300ms>300ms
CLS<=0.10.1-0.25>0.25
First Screen JS<=200KB200-500KB>500KB
First Screen CSS<=50KB50-100KB>100KB

3a. Performance Optimization Checklist

Optimization DimensionSpecific MeasuresAffected MetricPriority
LCP OptimizationCritical resource preloading <link rel="preload">LCPP0
LCP OptimizationAbove-the-fold images use <img loading="eager"> + fetchpriority="high"LCPP0
LCP OptimizationInline critical CSS to <head>, avoid render blockingLCP/FCPP0
LCP OptimizationServer-side rendering (SSR) or static generation (SSG) for above-the-fold contentLCP/FCPP1
LCP OptimizationUse font-display: swap to avoid font loading blocking text renderingLCP/CLSP1
FCP OptimizationInline critical CSS, async load non-critical CSSFCPP0
FCP OptimizationReduce above-the-fold JS size (code splitting + Tree Shaking)FCPP0
FCP OptimizationPreconnect to critical domains <link rel="preconnect">FCPP1
CLS OptimizationSet explicit width and height attributes on images/videosCLSP0
CLS OptimizationReserve placeholder space for dynamic content (skeleton/placeholder)CLSP0
CLS OptimizationUse size-adjust + ascent-override for fonts to avoid layout shiftsCLSP1
CLS OptimizationAvoid dynamically inserting content above the viewportCLSP1

3b. Bundle Size Analysis and Optimization

Optimization MethodImplementationExpected Benefit
Code SplittingRoute-level React.lazy/defineAsyncComponent + dynamic import()First screen JS reduced 40-60%
Tree ShakingEnsure ESM imports, package.json configure sideEffects:falseDead code elimination 10-30%
On-demand ImportComponent library on-demand import (e.g. import { Button } from 'antd')Single library reduced 50-80%
Bundle Analysisrollup-plugin-visualizer / webpack-bundle-analyzer generate visual reportIdentify large dependencies
Dependency Replacementmoment->dayjs, lodash->lodash-es, native replacement librariesSingle item reduced 50-200KB
Duplicate Dependenciesnpm dedupe / pnpm auto-deduplicationReduced 5-15%
External CDNReact/Vue and other large frameworks via CDN + externals configurationReduced build size

3c. Image/Font Optimization

Optimization TypeSpecific MeasuresTool/Configuration
Image FormatPrefer WebP/AVIF, <picture> tag fallbackvite-plugin-webp / sharp
Image SizingResponsive images srcset + sizes, provide appropriate sizes per deviceManual configuration
Image Lazy LoadingBelow-the-fold images loading="lazy" + decoding="async"Native attributes
Image PlaceholderLQIP (Low Quality Image Placeholder) or SVG placeholder, avoid layout shiftsvite-plugin-lqip
SVG OptimizationRemove metadata, merge paths, compresssvgo / vite-plugin-svgo
Font SubsettingInclude only used characters, Chinese fonts on-demand chunked loadingfontmin / subset-font
Font PreloadingCritical fonts <link rel="preload" as="font" crossorigin>HTML configuration
Font Displayfont-display: swap or optionalCSS @font-face
Icon SolutionSmall icons use SVG sprite or icon font, avoid multiple image requestsvite-plugin-svg-icons

3d. Cache Strategy

Resource TypeCache StrategyCache-Control ConfigurationDescription
HTML EntryNegotiation cacheno-cacheValidate each time, ensure timely updates
JS/CSS (with hash)Strong cachepublic, max-age=31536000, immutableContent hash change = new file, can be cached long-term
Images/Fonts (with hash)Strong cachepublic, max-age=31536000, immutableSame as above
API ResponsesShort-term cacheprivate, max-age=60, must-revalidateAdjust based on business needs
Service WorkerOffline-firstWorkbox strategyStatic assets CacheFirst, API NetworkFirst

ext enhancement results consumed through upstream design_brief.json, this step focuses on core logic

Step 3b: Security Audit

Security Checklist:

Check ItemImplementationBlock Level
CSP ConfigurationGenerate Content-Security-Policy header, restrict script-src/style-src/img-srcP0
XSS ProtectionEnsure all user input is escaped, React default escaping + DOMPurifyP0
CSRF ProtectionSameSite Cookie + CSRF Token (if using Cookie authentication)P1
SRIAdd integrity attribute to external CDN resourcesP1
Sensitive Info LeakageCheck code for no hardcoded keys/tokens/passwordsP0
Dependency Vulnerabilitiesnpm audit / pnpm audit, high-severity vulnerabilities must be fixedP0
HTTPS EnforcementForce HTTPS in production, HSTS header configurationP0

P0 level failure blocks output.

Step 4: Performance Budget and CI Configuration [Core]

Establish performance budgets and CI blocking:

Budget ItemThresholdBlock Level
First Screen JS<=200KBExceeding blocks merge
First Screen CSS<=50KBExceeding blocks merge
LCP<=2.5sExceeding blocks release
CLS<=0.1Exceeding warns
Single chunk size<=300KBExceeding warns

CI configuration written to {project_dir}/.

Output Depth Grading

Depth LevelOutput ScopeDescription
quickdeployment readiness checklist and critical issuesCore conclusions + minimum viable deliverable
standardFull deliverables (default)Complete output including all Steps
deepFull deployment + real runtime validation + performance benchmarking + operational readiness assessmentFull deliverables + extended analysis + deep simulation

Output

Code File Output: {project_dir}/ (build configuration, test files, CI configuration, performance budgets)

Metadata Output: output/ui-frontend-integration/production-ready/

Output Files: production-ready.json

Output Schema:

json
{
  "type": "object",
  "required": ["build_config", "test_report", "performance_report", "performance_budget", "project_dir"],
  "properties": {
    "build_config": {
      "type": "object",
      "description": "Build configuration information",
      "properties": {
        "bundler": {"type": "string", "description": "Build tool (Vite/Webpack/Next.js)"},
        "code_splitting": {"type": "boolean", "description": "Whether code splitting is enabled"},
        "chunk_count": {"type": "number", "description": "Code splitting chunk count"},
        "env_configs": {"type": "array", "description": "Environment configuration list (dev/staging/prod)"},
        "compression": {"type": "string", "description": "Compression algorithm (gzip/brotli)"},
        "cdn_externals": {"type": "array", "description": "CDN externalized dependency list"}
      }
    },
    "test_report": {
      "type": "object",
      "description": "Test report",
      "properties": {
        "unit_coverage": {"type": "number", "description": "Unit test coverage (%)"},
        "integration_coverage": {"type": "number", "description": "Integration test coverage (%)"},
        "e2e_pass_rate": {"type": "number", "description": "E2E test pass rate (%)"},
        "a11y_pass": {"type": "boolean", "description": "Whether accessibility tests passed"},
        "total_tests": {"type": "number", "description": "Total test case count"},
        "failed_tests": {"type": "number", "description": "Failed test case count"},
        "visual_regression_pass": {"type": "boolean", "description": "Whether visual regression tests passed"}
      }
    },
    "performance_report": {
      "type": "object",
      "description": "Performance report",
      "properties": {
        "lcp": {"type": "number", "description": "LCP time (s)"},
        "fcp": {"type": "number", "description": "FCP time (s)"},
        "fid": {"type": "number", "description": "FID time (ms)"},
        "cls": {"type": "number", "description": "CLS score"},
        "first_screen_js_kb": {"type": "number", "description": "First screen JS size (KB)"},
        "first_screen_css_kb": {"type": "number", "description": "First screen CSS size (KB)"},
        "bottlenecks": {"type": "array", "description": "Performance bottleneck list"},
        "optimization_applied": {"type": "array", "description": "Applied optimization measures list"}
      }
    },
    "performance_budget": {
      "type": "object",
      "description": "Performance budget thresholds",
      "properties": {
        "max_lcp": {"type": "number", "description": "LCP threshold (s)"},
        "max_fcp": {"type": "number", "description": "FCP threshold (s)"},
        "max_cls": {"type": "number", "description": "CLS threshold"},
        "max_first_screen_js_kb": {"type": "number", "description": "First screen JS threshold (KB)"},
        "max_first_screen_css_kb": {"type": "number", "description": "First screen CSS threshold (KB)"},
        "ci_blocking": {"type": "boolean", "description": "Whether CI blocks on threshold exceedance"}
      }
    },
    "project_dir": {"type": "string", "description": "Project root directory path"}
  }
}

Decision Rules

ConditionDecision
LCP>4sP0, must optimize before release
First screen JS>500KBP0, mandatory code splitting
CLS>0.25P0, layout shift must be fixed
Component coverage <80%Supplement missing test cases
Core flow E2E failureP0, blocks release
Accessibility test failureP0, blocks release
Target language != en-USE2E assertions use target language text, mock data uses target language
Target framework=ReactUse Jest/Vitest + React Testing Library
Target framework=VueUse Vitest + Vue Test Utils
Target framework=SvelteUse Vitest + Svelte Testing Library
Deployment target=Vercel/NetlifyGenerate platform-specific configuration files (vercel.json/netlify.toml)
Deployment target=CDNGenerate CDN externals configuration + SRI hash
Single chunk>300KBSplit into smaller chunks or lazy load

Quality Checks

P0 Checks (must pass for quick/standard/deep)

  • Build succeeds, no TypeScript errors
  • No hardcoded keys/tokens/passwords

P1 Checks (must pass for standard/deep)

  • npm audit has no high-severity vulnerabilities
  • LCP<=2.5s
  • CLS<=0.1
  • Core user flows 100% have E2E tests
  • Accessibility tests cover WCAG 2.1 AA
  • XSS protection configured (React default escaping + DOMPurify)
  • Component unit test coverage >=80%
  • First screen JS<=200KB
  • Performance budget written to CI configuration
  • CSP configuration generated
  • CSRF protection configured (when using Cookie authentication)
  • SRI configured (external CDN resources)
  • HTTPS enforcement + HSTS header configured
  • Image/font optimization executed
  • Cache strategy configured (at least 3 resource types)
  • Visual regression tests configured

P2 Checks (must pass for deep only)

  • Extended analysis complete (deep simulation and roadmap generated)
  • Decision records complete (key decisions have rationale and alternatives)

Real Runtime Validation Strategy

Define executable validation command list in Claude/Trae environment, replacing text-only acceptance rules.

Project Command Discovery Strategy:

  1. Read package.json scripts field to identify available build/test/lint commands
  2. Prioritize executing existing commands rather than assuming commands exist

Validation Command List:

Validation DimensionDiscovery StrategyExecution CommandPass CriteriaFailure Handling
Build Checkpackage.json scripts.buildnpm run build / pnpm buildZero-error exitMark build errors, block output
Type Checkpackage.json scripts.typecheck or tsconfig.jsonnpx tsc --noEmitZero type errorsMark type errors, suggest fixes
Lint Checkpackage.json scripts.lint or .eslintrcnpm run lintZero errors (warnings allowed)Mark lint errors
Unit Testspackage.json scripts.testnpm run test -- --coverageCoverage ≥80%Mark uncovered modules
Build Artifact CheckCheck dist/ directory after buildls dist/ or check output directoryArtifacts exist and non-emptyMark missing build artifacts
Responsive CheckBrowser DevTools or manualCheck viewport meta + CSS media queries3 breakpoints coveredMark missing breakpoints
Text Overflow CheckCode reviewCheck text-overflow/truncation usageKey text has overflow handlingMark overflow risks
a11y Checkpackage.json scripts.a11y or axe-corenpx axe-core or npm run a11yWCAG AA complianceMark non-compliant items

Validation Execution Order: Build Check → Type Check → Lint Check → Unit Tests → Build Artifact Check → Responsive/a11y Check

Degradation Strategy

Missing Upstream InputDegradation PlanOutput Impact
API integration missingSkip API-related tests, do not generate API integration test templateMissing API integration tests, mock data needs manual supplementation
quality_debt missingSkip debt handling, proceed directly to build and testCritical-level debt may be unfixed, production quality risk
Deployment target missingOutput generic build configuration, do not generate platform-specific configurationDeployment configuration needs manual adjustment, missing vercel.json/netlify.toml
Target language missingDefault zh-CN, test assertions and mock data use ChineseNon-Chinese projects need manual adjustment of text and assertions
project_dir missingOutput to output/ directory onlyConfiguration files need manual copying to project directory

Data Handoff with Stage-6

Input Consumption

production-ready serves as the core execution skill of stage-6 (step 6.1), consuming the following upstream data:

Data SourceConsumption MethodHandoff Path
stage-4 enhanced codeServes as code input for build and test{project_dir}/src/ + output/ui-frontend/page-builder/
stage-5 API integration (optional)Consumes API integration metadata, generates API-related testsoutput/ui-frontend-integration/api-integration/api-integration.json
quality_debt (optional)Prioritizes handling critical-level debtoutput/ui-frontend/page-builder/quality_debt.json

stage-5 skip scenario: When there is no backend API, stage-5 does not execute, production-ready directly consumes stage-4's enhanced code, skipping API integration test generation.

Output Delivery

After production-ready execution completes, output is delivered to subsequent stage-6 steps:

Subsequent StepConsumed ContentDelivery Method
6.2 ext-impeccable {harden|polish}Code + build configurationDirectly read build configuration and source code from {project_dir}/
6.3 ext-impeccable optimizePerformance reportRead performance_report from output/ui-frontend-integration/production-ready/production-ready.json

Human Gate

stage-6 has a [GATE] Release decision requires human confirmation after production-ready execution; production-ready's P0 quality check results serve as the gate decision basis:

  • All P0 passed -> Recommend passing gate
  • P0 has failures -> Block gate, must fix and re-execute

Upstream Change Response

Upstream Change Impact Table

Upstream ChangeImpact ScopeResponse Strategy
Frontend code change (component add/remove/page structure change/route change)Test cases, build configuration, code splitting strategyMark affected test files and build chunks, recommend regenerating corresponding tests and verifying build
API integration change (endpoint add/remove/type definition change/request layer selection change)API-related tests, mock data, dependency configurationMark affected API tests and dependencies, recommend updating test mocks and build configuration
quality_debt changeStep 1 debt handling planMark new/upgraded critical-level debt, prioritize fixing before executing build and test
Target framework changeBuild tool, test framework, dependency configurationMark build and test solutions needing replacement, recommend regenerating build configuration and tests
Deployment target changeCI/CD configuration, environment variables, cache strategyMark deployment configuration needing adjustment, recommend regenerating CI configuration

Upstream Feedback Mechanism Table

Issue Found by This SkillFeedback to Upstream SkillFeedback ContentTrigger Condition
Component rendering performance issuepage-builderComponent needs optimization (e.g. missing memo/virtual list)Single component render >16ms or list >100 items without virtualization
Build artifact size exceeds limitpage-builderComponent needs splitting or lazy loadingSingle chunk >300KB
TypeScript type errorpage-builder / api-integrationType definition missing or inconsistentBuild fails due to type errors
Accessibility test failurepage-builderComponent missing ARIA attributes or keyboard navigationaxe-core detects WCAG AA violation
API type mismatchapi-integrationRequest/response types inconsistent with actualAPI integration test type assertion failure

Συχνές ερωτήσεις

Τι κάνει η δεξιότητα AI Production Ready;

Χρησιμοποιήστε το για να προετοιμάσετε ένα έργο frontend για κυκλοφορία στην παραγωγή. Συνδυάζει την προετοιμασία για παραγωγή με τη διαμόρφωση του build, τη δημιουργία δοκιμών και τη βελτιστοποίηση απόδοσης, ώστε τα έργα frontend να είναι έτοιμα για ανάπτυξη, δοκιμή και υψηλές επιδόσεις. Λέξεις-κλειδιά: ανάπτυξη build, βελτιστοποίηση απόδοσης, δοκιμές frontend, έτοιμο για παραγωγή, προετοιμασία κυκλοφορίας, bundling, βελτιστοποίηση.

Γιατί να χρησιμοποιήσετε τη δεξιότητα Production Ready στο TypingMind;

Επειδή την εγκαθιστάτε μία φορά και τη χρησιμοποιείτε με οποιοδήποτε μοντέλο. Η Production Ready είναι απλό Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως η ίδια δεξιότητα λειτουργεί με GPT-5, Claude, Gemini, Grok ή ένα τοπικό μοντέλο — και μπορείτε να αλλάξετε μοντέλο κατά τη διάρκεια της συνομιλίας χωρίς να διακοπεί η λειτουργία της. Το TypingMind λειτουργεί με τα δικά σας κλειδιά API, οπότε πληρώνετε απευθείας τους παρόχους αντί για συνδρομή ανά θέση χρήστη, ενώ οι δεξιότητες και οι συνομιλίες σας παραμένουν στον δικό σας χώρο αποθήκευσης.

Πώς εγκαθιστώ τη δεξιότητα Production Ready στο TypingMind;

Στο TypingMind, ανοίξτε Πρόσθετα → Δεξιότητες → Εγκατάσταση από το GitHub και επικολλήστε τη διεύθυνση https://github.com/LuckyOneTwoThree/vibe-skill/tree/main/.codex/skills/production-ready. Το TypingMind διαβάζει το αρχείο SKILL.md και εγκαθιστά τη δεξιότητα, την οποία μπορείτε να ενεργοποιείτε ανά συνομιλία.

Ποια μοντέλα AI μπορούν να χρησιμοποιήσουν τη δεξιότητα Production Ready;

Οποιοδήποτε μοντέλο συνδέετε στο TypingMind. Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως τα GPT, Claude, Gemini, Grok και τα τοπικά μοντέλα μπορούν όλα να φορτώσουν αυτή τη δεξιότητα όταν ένα αίτημα αντιστοιχεί σε αυτή.

Με πόσα μοντέλα AI μπορώ να χρησιμοποιήσω τη δεξιότητα Production Ready;

Με όσα θέλετε. Στο TypingMind μπορείτε να χρησιμοποιήσετε τη δεξιότητα Production Ready με οποιοδήποτε μοντέλο υποστηρίζει δεξιότητες, όπως τα GPT, Claude, Gemini, Grok, DeepSeek, Mistral και Llama, χρησιμοποιώντας τα δικά σας κλειδιά API.

Είναι δωρεάν η δεξιότητα AI Production Ready;

Ναι. Δημοσιεύεται στο GitHub από τον λογαριασμό LuckyOneTwoThree με την άδεια χρήσης MIT. Πληρώνετε μόνο τον δικό σας πάροχο AI για τα token που χρησιμοποιείτε.

Τι είναι οι δεξιότητες AI;

Μια δεξιότητα AI είναι ένα επαναχρησιμοποιήσιμο πακέτο οδηγιών που διδάσκει σε ένα μοντέλο AI πώς να εκτελεί μια συγκεκριμένη εργασία. Ακολουθεί την ανοιχτή μορφή Agent Skills: ένα αρχείο SKILL.md με όνομα και περιγραφή, μαζί με τυχόν σενάρια κώδικα, πρότυπα ή αρχεία αναφοράς που μπορεί να χρειαστεί το μοντέλο. Το μοντέλο διαβάζει τις οδηγίες μόνο όταν το αίτημά σας αντιστοιχεί στη δεξιότητα, οπότε μια εγκατεστημένη δεξιότητα δεν κοστίζει τίποτα μέχρι να χρησιμοποιηθεί.

Σε τι διαφέρουν οι δεξιότητες AI από τα πρόσθετα ή τους συνδέσμους MCP;

Ένα πρόσθετο ή ένας σύνδεσμος MCP παρέχει στο μοντέλο νέα εργαλεία που μπορεί να καλέσει — κώδικα που εκτελείται κάπου και επιστρέφει ένα αποτέλεσμα. Μια δεξιότητα AI παρέχει αντί γι’ αυτό γνώσεις και διαδικασίες στο μοντέλο: πώς να προσεγγίσει μια εργασία, ποια βήματα να ακολουθήσει και ποια χαρακτηριστικά έχει ένα καλό αποτέλεσμα. Οι δεξιότητες είναι απλό Markdown, επομένως δεν χρειάζονται διακομιστή, κλειδί API ή περιβάλλον εκτέλεσης και λειτουργούν με οποιοδήποτε μοντέλο.

Προβολή όλων

Δημιουργήστε τώρα τον δικό σας χώρο εργασίας AI

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇