$f(x)=\left\{ \begin{aligned} \cos(x)\quad x \ne 0\\ 0 \quad x=0\\ \end{aligned} \right.$ is discontinuous but differentiable at $0$? According to wikipedia :

A function is said to be continuously differentiable if its derivative is also a continuous function;

I thought of the discontinuous function  :
$f(x)=\left\{
\begin{aligned}
\cos(x)\quad  x \ne 0\\
0 \quad x=0\\
\end{aligned}
\right.$
which doesn't exist for $x=0$ and is discontinuous .
it's derivative is :
$f'(x)=\left\{
\begin{aligned}
-\sin(x)\quad  x \ne 0\\
0 \quad x=0\\
\end{aligned}
\right.$
which exists for $x=0$ and is continuous .
Am I doing something wrong ? if not were my assumptions true that discontinuous function can have continuous derivatives ?

You claim that $f'(0)=0$ but that's not true since you cannot derive the function in a discontinuity point, so your derivative only exists in $\mathbb{R}-\{0\}$
