Plummet said..
The first and safest thing is land the kite before the squall!...
....
That is true in principle, just don't time it wrong. The absolute worst thing you can do is try to land *during* a squall. Have you ever seen guys trying to land a kite in 35 knots? It's carnage.
Possibly the most important thing is to not panic. Most squalls blow through in 10 minutes. If it takes 2 minutes to get scared and 5 minutes trying to land on the beach then you only had to last another 3 minutes before the wind backed off.
If you're out on the water then the best thing to do is to ride as far out to sea as you can. Get far away from anything hard that is going to hurt you (or that you are going to hurt. Rocks, buildings, breakwaters, markers and sign posts(, people, houses, roads). Make sure you have several hundred metres of clear water downwind of you.
Keep the kite low and slow and you can continue to cruise around and ride as slowly as possible. Don't allow any speed to build up. You should have pulled in the trimmer as far as possible and the bar pushed all the way out.
If it is getting hairy then sit in the water with your board on your feet and your kite sitting on the water. It's not a bad idea to let go of the bar so that it is at full depower. Just dab the end of the bar to keep the kite down on the water.
You have two options at this point. If you have a lot of distance downwind then allow yourself to move slowly downwind with the kite. That will depower the kite a little. Alternatively you can dig your board in and edge to try and maintain your position. That causes pressure in the kite lines which causes power. If the kite surges towards the edge of the window then that's a good thing. If it starts bucking around that is bad.
If it gets really hairy then you can release the kite to the safety leash. Be really sure your fingers and no part of your body is in a position to get tangled. If you do then the hook knife is your only way out. Do not be afraid to use it and use it quickly.
If all else fails then release the kite completely. If you're on a big deserted ocean beach then this is usually the best option of all. Once the tension is released from the lines the kite will have no power at all. It will most likely just sit nose down on the water and get nicely swamped in the shore break. If there's anything for the bar to catch on (rocks or weed) or people/houses downwind then the kite can become an uncontrolled danger. This is not really an option.