12-factor-app
Skill4 starsChanged 3 months agoApache-2.0View on GitHub
Load when designing, building, or reviewing SaaS, cloud-native apps, microservices, containerized workloads, or serverless functions — or when the user mentions 12-factor, config in env, stateless processes, or dev/prod parity.
- Reads credentials
- Installs packages
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- caveman-commitSkill
- caveman-reviewSkill
- cavemanSkill
- conventional-commitsSkill
- creating-pull-requestsSkill
- deep-researchSkill
- dispatching-parallel-agentsSkill
- domain-modelingSkill
- finishing-a-development-branchSkill
- forge-cleanupSkill
- forge-docsSkill
- forge-eu-accessibilitySkill
- forge-flowSkill
- forge-initSkill
- forge-seoSkill
- forge-setupSkill
- forgeSkill
- forge-tailwindcss-conventionsSkill
- frontend-designSkill
- git-issue-trackerSkill
- grillingSkill
- kiss-principleSkill
- loopsSkill
- planning-and-task-breakdownSkill
- prototypeSkill
- pr-resolveSkill
- pr-reviewSkill
- resolving-merge-conflictsSkill
- ste100Skill
- subagent-driven-developmentSkill
- use-git-identitySkill
- using-git-worktreesSkill
- verification-before-completionSkill
- wayfinderSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
Check each factor systematically against the checklist above
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
12-Factor App
Heroku's methodology for building portable, scalable, maintainable SaaS apps. Language-agnostic. Modern extensions: observability, API-first, security, progressive delivery, auth, sustainability.
The 12 Factors (Original)
| # | Factor | Core Rule | Agent Check |
| I | Codebase | One repo per app, many deploys | Single source of truth; IaC in same repo |
| II | Dependencies | Explicitly declare and isolate | Manifest + lockfile; no system-wide deps; exact Docker base image versions |
| III | Config | Store in environment | Env vars / config systems; secrets in Vault/K8s Secrets; never in code |
| IV | Backing Services | Treat as attached resources | URL-based config; swappable local → managed; circuit breakers + retries |
| V | Build, Release, Run | Strictly separate stages | Immutable releases tagged with unique ID; no builds in production |
| VI | Processes | Stateless, share-nothing | No in-memory sessions; no local persistent writes; multiple instances concurrent |
| VII | Port Binding | Self-contained, export via port | Configurable port; standalone without external web server |
| VIII | Concurrency | Scale out via process model | Horizontal scaling; separate web/worker process types; no single points of failure |
| IX | Disposability | Fast startup, graceful shutdown | <30s startup (ideally <10s); SIGTERM handling; cattle, not pets |
| X | Dev/Prod Parity | Keep environments similar | Same DB type/version; Docker/IaC for parity; one-command local dev |
| XI | Logs | Treat as event streams | stdout only; structured (JSON); no log file management in app code |
| XII | Admin Processes | Run as one-off processes | Same codebase/config as app; never inside web/worker processes |
Modern Extensions
| # | Factor | Core Rule |
| XIII | Observability | OpenTelemetry, metrics, traces, structured logs, SLIs/SLOs |
| XIV | API-First | Contract-first design (OpenAPI/gRPC); consumers generate from spec |
| XV | Security | SBOM, image signing, zero-trust, secrets rotation, dependency scanning |
| XVI | Progressive Delivery | Feature flags, canary releases, blue/green deployments |
| XVII | Auth/AuthZ | Externalized identity (OIDC/OAuth2), RBAC/ABAC, service-to-service mTLS |
| XVIII | Sustainability | FinOps, right-sizing, carbon-aware computing |
Agent Evaluation Flow
- Identify deployment model (VM, container, serverless, edge)
- Check each factor systematically against the checklist above
- Distinguish violations from mitigations
- Prioritize by impact: Config, Processes, Build/Release/Run are most critical
- Suggest concrete fixes: "replace X with Y using Z approach"
Common Mistakes
| Mistake | Fix |
Secrets in .env committed to git | Use Vault, K8s Secrets, or cloud provider secret managers |
const sessions = {} in memory | Redis or database for session storage |
npm install && npm build && npm start in Dockerfile | Multi-stage Docker build; compile in stage 1, run pre-built artifact in stage 2 |
| Hardcoded DB URLs | os.environ.get("DATABASE_URL") |
| File-based logging | ConsoleHandler() → stdout |
| 2+ minute startup times | Lazy-load heavy resources; defer to background workers |
Related Principles
- KISS — simplicity in design and implementation
- Unix Philosophy — do one thing well, compose with text streams
- Infrastructure as Code — declarative infrastructure management
- DRY — eliminate duplication without over-abstraction
- YAGNI — defer unnecessary features
Source
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.

