What you need to know about living aboard a sailboat in San Francisco can best be summarized in one sentence:
You can't afford San Francisco proper or Marin (>$1,500/month if you're lucky and know someone), so it's down to San Mateo County or Alameda County, and there you sneak-aboard.
In my own damn case, I work in SoMa, so I've opted to leave behind Berkeley ("since you mentioned live-aboard, watch your ass") and Emeryville ("We can definitely accomodate you") for a marina barely north of the airport, name withheld to omit inclusion in search results :)
Bottom line: don't be a dick, and you'll be tolerated in Alameda county marinas (Berkeley) and San Mateo County marinas if you're an upstanding citizen. Both Alameda and San Mateo counties have ordinances that state that no more than 10% of the slips in marinas can be live-aboard, save for Half Moon Bay, because it's on the Pacific coast (????). Were the shit to hit the fan, that's where I'd go, or maybe Emeryville.
Bottom line: my 50' slip is costing me under $450 a month, and it's less than 15 minutes from work in SoMa.
(Now if only the wind didn't blow so hard in the afternoon!)