This is the function: $$ f(x)=\begin{cases}\sin x& \text{if $x$ is rational}\\x &\text{if $x$ is irrational}\end{cases} $$
My attempt: It is continuous at $x=0$ which is easily verified using the sequential definition of continuity.
I claim that $f$ is differentiable at $x=0$ and $f'(0)=1$. Proof of claim: Let $\varepsilon >0$ be given. Since $\lim_{x \to 0 } \frac{\sin x}{x} = 1$, there exists a $\delta > 0$ such that if $0<|x| < \delta $ then we have $\left| \frac{\sin x}{x} -1 \right| < \varepsilon $. Using the same $\delta$, we will show that $\lim_{x \to 0} \frac{f(x)-f(0)}{x-0} =1$. Now if $x\in \mathbb{Q}$ and $0<|x|<\delta$, then we have $\left| \frac{f(x)-f(0)}{x-0} - 1 \right| = \left| \frac{\sin x}{x} - 1 \right| < \varepsilon$ and if $x\in \mathbb{R}\setminus \mathbb{Q}$ and $0<|x|<\delta$, then we have $\left| \frac{f(x)-f(0)}{x-0} - 1 \right| = 0 < \varepsilon $ and we are done.
Is this proof okay? Alternative ways to do it?
Well done. This is OK. You need not write that $f$ is continuous at $0$ becase you have proved considerably more. Differentiability implies continuity.