We'll start with a snake that is already somewhat gregarious, similar to the US Timber Rattlesnake, but before it developed it's infamous rattle. Since snakes like these already have a modicum of social structure and are not individually territorial, they have an ability to share behaviours.
Early on, long before the first ape picked up a stick, one family of our snakes had bit of a medical problem; they had a genetic tendency towards a mild form of palsy. It wasn't severe enough to be debilitating, except when hunting. They weren't very good at sitting still, and tended to twitch a little when they tried. Often, this led to dislodging pebbles or other debris in their vicinity, giving away their location. It was an unfortunate trait, and as it spread throughout the family, it seemed likely that it would lead to them being culled from the genetic pool.
Happily, their dry, gravelly environment gave them a solution. Quite by accident, a few of the stronger snakes would actually flick rocks with their tails while convulsing, and throw pebbles far away. This would be confusing for prey species, who would detect the movement and noise as further attackers, and often led to the prey dashing straight into the snake to escape the noise of the false attacker. Other snakes learned the behaviour from their siblings. Soon enough, size and tail dexterity were selectors of successful snake populations, and the Rockchucker was established. Flattened tails, sometimes even with an indentation to facilitate scooping up a pebble, began to appear about this time.
As apex predators, the venomous Rockchuckers had existed for some time without really having another species prey on them specifically. There were some pesky mammals, however, that tried to prey on unprotected nests, and it was only a matter of time before one evolved an immunity to Rockchucker venom. This was the Banded Monduck. Fast, big, and unafraid of being bitten, they were a force to be reckoned with.
By this time, though, Rockchucker evolution had also moved forward. They'd gotten somewhat bigger, and supported the appropriate brain functions for long-range binocular vision. They could now aim those rocks they at a considerable distance. Nevertheless, one snake was unlikely to take out or scare off a Monduck alone, so those Rockchucker families that stayed around their nests and defended it as a group fared considerably better than their less-gregarious counterparts. By now, the tail tip of a Rockchucker was almost prehensile, flattened and flexible enough to grasp rocks and sticks.
Bigger prey, and the first buildings
Rockchuckers continued to grow, and so did their brains. Upper ribs flared out and fused to make a secondary skull to cover this expanding grey matter. Rockchuckers could no longer burrow, but were now big enough to eat mid-sized creatures like coyotes, from whom dens could then be stolen.
The next big step came with the collecting useful things, and transporting them to a work site. Building ramparts of debris around nests was a natural start, and true fingers began to appear to support this detailed work.
Musculature began to appear about this time that allowed both the head and the tail to stay reared up while the snake moved. In many ways, this was the defining step in their evolution to full sapience, in much the same way as human bipedalism. With the ability to carry objects by holding the tail aloft while slithering, many capabilities were enabled. In particular came the ability to collect burning bits of lightning strike and fire fuel. This enabled the cold-blooded reptiles to maintain body temperature through the night, and stave off seasonal hibernation. Crotalus Habilis is born.
Our snakes evolved from the same stock as rattlesnakes did, but instead of rattling, they developed the ability to throw rocks. This basic tool use, dominated their evolution, and favoured more and more manipulative tails. Ultimately, sapience and a snake civilization is the result.