Walking Skeleton
A walking skeleton is the smallest version of a system that performs one function end to end. That function crosses the main components of the architecture and links them. Each component stays incomplete. Alistair Cockburn came across the practice around 1994 and described it in 2004 in Crystal Clear. The skeleton is production code. The team adds functions to it one at a time and revises the architecture while the skeleton runs. Steve Freeman and Nat Pryce include automated build, deployment and testing in it.
Goal
The walking skeleton is the first executable version of a system. According to Cockburn, it can use a provisional architecture provided that it links the main components.
Freeman and Pryce note that a system's interaction with its external environment is often one of the riskiest areas of its development. They therefore start with integration so that the uncertainties surface early.
The technique addresses the risk of components that are built separately and assembled at the end of the project. The skeleton asks early whether the components of the chosen architecture connect. Cockburn notes that his first skeleton tested the team, the process, the technologies and the architecture at the start of the project.
The deliverable is a running system in which one function crosses and links every main component. An automated pipeline builds, deploys and tests it. This code stays in place. The team builds the next functions on it.
The skeleton does not have to deliver value to users. Even so, Cockburn's first skeleton served users from the day it went live.
Usage
When to use it
- A new system with several components: link the components before writing the first real function.
- A new system that talks to a live system: the skeleton reaches that system in its test environment before the first function.
- Several teams or suppliers that each deliver a component: a weekly check of the skeleton keeps the teams in sync.
- A technology stack the team has never assembled: the skeleton tests the technologies and the team from the first week.
- A build and deployment pipeline to set up: the skeleton runs it before the first function.
- A business process to automate end to end: one simple transaction crosses every step before the variants.
- An architecture expected to change during the project: the team revises it while the system runs.
When not to use it
- An isolated feasibility question about a library or an interface: run a spike and throw its code away.
- A market hypothesis to test: release a minimum viable product.
- A live system whose components are already linked: deliver the function in an ordinary increment.
Description
What the skeleton links
One end-to-end function. The team chooses the smallest function that crosses the whole system. The team only needs to pass a single value from one end to the other.
The main components of the architecture. The skeleton links the components that the rest of the work depends on: the interface, the application logic, the database, the neighbouring systems. Each subsystem stays incomplete but linked from that point on.
The analyst's work. For a business process, the analyst chooses the transaction that the skeleton runs end to end. The analyst lists the neighbouring systems that the skeleton must reach and requests access to their test environments early. At a bank where Gojko Adzic worked, internal procedures required weeks of paperwork before a team could deploy an application connected to a production database.
The minimal behaviour of each component. Cockburn asks one question for each component of a new system: what "(actually or nearly) empty" behaviour is enough to connect it to the others? A page displays a value. A service passes it on. A table stores it.
The automated pipeline. Freeman and Pryce define the skeleton as the thinnest slice of real functionality that the team can build, deploy and test end to end automatically. It contains just enough automation, components and communication mechanisms to start the first feature. For Cockburn, the components are linked. For Freeman and Pryce, an automated pipeline also builds, deploys and tests them.
Choosing the function by system type
| System type | The skeleton |
|---|---|
| Client-server | A single capability that goes from the screen to the database and back. |
| Multi-tier or multi-platform | A working connection between the tiers or the platforms. |
| Compiler | Compiling the simplest element of the language. Sometimes that is a single token. |
| Business process | The walk through one simple business transaction. |
Cockburn's first large client-server project was due to deliver a first version after three months and was moving slowly. To meet the deadline, the team cut the scope to "read a number, write a number". The system went live on schedule and the users entered numbers into it. The server software was linked to the database. The team then built further functions on this architecture.
A skeleton loaded with several functions delays the first end-to-end connection. In practice, when the team cannot decide between two functions, it takes the one that crosses the most components with the least business logic.
Building the skeleton
This method combines Cockburn's definition, his answers to readers and the definition by Freeman and Pryce.
- Choose the smallest end-to-end function for the system type.
- List the main components that the function crosses and the connections between them. The neighbouring systems count as components.
- Give each component its minimal behaviour and link the components.
- Pass a value in both directions. In Cockburn's example, the team first writes "Hello World" into the one and only cell of a new database. The team brings that text up through every layer to the screen. It then sends an input down the same path and gets the database's response back. According to Cockburn, each step often takes twenty minutes.
- Automate building, deploying and testing end to end. The test checks at every build that the value gets through.
- Keep the skeleton linked at every cycle.
Keeping the skeleton linked
Cockburn learned the idea from a lead designer. The designer's project passed messages between several systems arranged in a ring. In the first week, the lead designer and the other technical lead linked the systems so that a null message went round the ring. At the end of every week, the ring had to pass all the previous weeks' messages without failure. The system grew in a controlled way and the teams stayed in sync.
Cockburn pairs the skeleton with Incremental Rearchitecture. The team develops new functions while it makes the architecture more robust. The system keeps running for the whole project, even when the architecture changes.
Pitfalls
The skeleton written like a spike. A team that writes the skeleton fast and without tests produces a prototype. That team then discards the prototype or keeps it with its defects. Cockburn describes the skeleton as permanent code. The team writes it as production code and covers it with regression tests.
The unplugged component. A team unplugs a component to rebuild it cleanly. The team plugs it back in weeks later. The integration defect that the skeleton was meant to show early reappears at the end of the project. The team prevents this by requiring the skeleton to pass its check at every cycle. The technical leads of the ring project required the same thing at the end of every week.
The mocked component. The hardest component to reach is often an external system. A team is tempted to replace it with a mock or a hard-coded response. The end-to-end test then passes without proving the connection.
The deployment pipeline left for later. A skeleton linked by hand on a developer's machine proves the connection once. An automated pipeline repeats that proof at every cycle.
How long a skeleton takes
In a reply to a reader, Cockburn describes a 1994 project in Smalltalk and COBOL on a relational database. His team of 24 people took weeks to build the skeleton and months to deploy it. In 2008, on a web project in SQL and .NET, the skeleton took 40 minutes. In the same reply, Cockburn considers a range of 20 minutes to two weeks normal. He attributes the slowness of his first skeletons to a lack of practice.
The skeleton and its neighbours
The spike, the skeleton and the minimum viable product each produce a little code early.
| Technical spike | Walking skeleton | Minimum viable product | |
|---|---|---|---|
| Question | Are we headed in the wrong direction? | Do the components of the architecture connect? | Do customers want the product? |
| Code | Written fast without production standards, then thrown away | Written as production code with regression tests, then kept | Released and measured |
| Duration | A few hours to a few days | 20 minutes to two weeks | As long as measuring usage takes |
| Audience | The team | The team and sometimes users | Early adopters |
Cockburn separates the skeleton from the spike. He quotes the spike's definition: "the smallest implementation that demonstrates plausible technical success".
A skeleton that runs can carry a product that nobody buys. The minimum viable product tests demand with real customers.
Throw-away prototyping follows the logic of the spike. According to Dave Thomas, a prototype is designed to be thrown away. Like the skeleton, evolutionary prototyping keeps its code. Unlike the skeleton, it delivers a first usable increment to the stakeholders. The skeleton only has to link the components.
Andy Hunt and Dave Thomas describe a related idea under the name tracer bullets. Hunt bases it on a skeleton application in which one thin line of execution goes end to end. Cockburn lists tracer bullets among the names for similar ideas.
Gojko Adzic proposes a variant for a team that wants to deliver value before it links the architecture. In his skeleton on crutches, the team first ships the user interface on a simple back end. The team then replaces this back end step by step with the target architecture. Adzic claims that the variant cuts the time to the first delivered value by an order of magnitude. The variant gives up what the skeleton tests: whether the components of the target architecture connect.
AI considerations
A coding assistant generates the scaffolding of each layer, the end-to-end test and the configuration of the continuous integration pipeline within minutes. From an architecture diagram, it lists the components and proposes a minimal behaviour for each one. The analyst describes the system to it and asks for the smallest function that crosses every component.
A skeleton is only as good as its real connections. A language model tends to reproduce the mocked-component pitfall. The team checks that every connection in the diagram reaches the real component in the target environment.
The generated code stays in the system. It goes through the same review and the same tests as the rest of the production code. The team keeps connection strings, access keys and infrastructure configuration out of the prompts that it sends to an external AI service. A dummy value is enough to prove the connection. The skeleton therefore needs no production data.
Examples
A health insurer in French-speaking Switzerland builds a portal where policyholders upload a physiotherapy invoice. The portal forwards each claim to the existing benefits management system. For the skeleton, the team picks the smallest function that crosses the five components: record an invoice number and receive the acknowledgement from the benefits system.
The skeleton leaves invoice checking and the reimbursement calculation to later increments. It proves that the portal reaches the benefits system in its test environment and that the response comes back up to the screen. The team then builds the real invoice upload on this path.
Visualisations
The team draws the skeleton on its architecture diagram. On it, the path of the end-to-end function crosses every main component. A main component that the path does not cross signals a gap in the skeleton. At every cycle, the dashboard of the integration pipeline then shows whether the end-to-end test passes.
Cost
| Phase | Level | Justification |
|---|---|---|
| Preparation | Low | One session with the architect to choose the function and list the components to link. |
| Execution | Medium | From under an hour on a familiar stack to two weeks on a new one. Setting up the deployment pipeline adds to this duration when the team does not have one yet. |
| Documentation | Low | The code and its end-to-end test. The architecture diagram carries the path of the function. |
Tooling
A continuous integration server (GitLab CI, GitHub Actions, Jenkins, Azure DevOps and their equivalents) builds, deploys and tests the skeleton at every change. The skeleton is production code. The team keeps it in the product's repository.
Framework project generators (Spring Initializr, dotnet new, Angular CLI) create the layer structure of a web application in a few minutes. An end-to-end testing tool (Playwright, Selenium) drives the screen and checks that the value comes back. Containers (Docker, Testcontainers) bring up the database and the services in a reproducible environment.
A modelling tool or a digital whiteboard holds the architecture diagram and the path of the skeleton.
Sources
The technique rests on the description by Alistair Cockburn, who named it.
- Alistair Cockburn, Walking skeleton, archived copy of 5 December 2017: the definition, the two origin stories, the content of the skeleton by system type, the boundary with the spike and the pairing with Incremental Rearchitecture. The author's replies to readers give the "Hello World" example and the durations. They say that the technique is mostly applied to new systems.
- Alistair Cockburn, Crystal Clear: A Human-Powered Methodology for Small Teams, Addison-Wesley, 2004, ISBN 978-0-201-69947-0: the book in which the description reproduced on the author's page first appeared.
- Steve Freeman and Nat Pryce, Growing Object-Oriented Software, Guided by Tests, Addison-Wesley, 2009, chapter 4 "Kick-Starting the Test-Driven Cycle" (p. 32) and chapter 10 "The Walking Skeleton": the skeleton built, deployed and tested end to end by automation.
- Bill Venners, Tracer Bullets and Prototypes: A Conversation with Andy Hunt and Dave Thomas, Part VIII, Artima, 21 April 2003: tracer bullets and the prototype designed to be thrown away.
- Gojko Adzic, Forget the walking skeleton – put it on crutches, 9 June 2014: the skeleton-on-crutches variant.

