twelve-factor

12 Factor App methodology for web applications and microservices.

$ 安裝

git clone https://github.com/Xantibody/dotfiles /tmp/dotfiles && cp -r /tmp/dotfiles/configs/claude/skills/twelve-factor ~/.claude/skills/dotfiles

// tip: Run this command in your terminal to install the skill


name: twelve-factor description: 12 Factor App methodology for web applications and microservices.

The Twelve-Factor App

Factors

#FactorPrinciple
ICodebaseOne codebase tracked in VCS, many deploys
IIDependenciesExplicitly declare and isolate dependencies
IIIConfigStore config in environment variables
IVBacking servicesTreat backing services as attached resources
VBuild, release, runStrictly separate build and run stages
VIProcessesExecute app as stateless processes
VIIPort bindingExport services via port binding
VIIIConcurrencyScale out via the process model
IXDisposabilityFast startup and graceful shutdown
XDev/prod parityKeep development and production similar
XILogsTreat logs as event streams
XIIAdmin processesRun admin tasks as one-off processes

Checklist

  • No hardcoded config (use env vars)
  • Dependencies in manifest (package.json, go.mod, etc.)
  • Stateless processes (no local session state)
  • Logs to stdout (no local log files)
  • Graceful shutdown handling
  • Health check endpoints