I recommend a visit to Edinburgh Castle. If you intend to go - book your tickets online, it is cheaper.
I also recommend a few eateries near the Grassmarket area. There is Mary’s Milk Bar, an independent ice-cream parlour, they even have a tea and biscuit flavour ice-cream! On Victoria Street there is a Scottish restaurant called Howies, you can sample Scottish cuisine, such as Haggis! They also have a 2-course lunch for £12.50.
If you want to purchase cheaper cashmere or woollen products, I recommend a look in the Tartan Weaving Mill on Castlehill, they make the products on-site and often have good discounted rates.
In my opinion, the tour is best done in daylight. If you want to enter the Castle, plan your visit around 1pm. 6 days a week there will be a cannon fired at exactly one O’ clock, it is quite a spectacle!
If you’d like to visit the Writer’s Museum, it is open between 10am - 5pm. The city is generally quieter early in the morning.
Important information about August:
If you are visiting at the end of July or at any time during the month of August, the city will be very busy. The Castle esplanade will also look different. During the summer months, the esplanade is used as a concert stadium and for 25 nights in August for the Royal Edinburgh Military Tattoo show. Because this is a military event, access to the esplanade will be restricted after 16:45. Please bear this in mind when starting the tour.
Edinburgh is a safe city, just be careful of oncoming traffic on the Royal Mile and as you come out of the Greyfriars Kirkyard. Be prepared for the typical Scottish weather, it is advisable to pack waterproofs and sturdy footwear. The graveyard can be muddy.