Let $\Lambda$ be the von Mangoldt function and $\chi$ a primitive character mod $q$, then we have the explicit formula $$ \sum_{n \leq X} \Lambda(n) \chi(n) = \delta_{\chi} X  \sum_{ Im \ \rho \leq T} \frac{X^{\rho}}{\rho} + O((\frac{X}{T}+1) \log^2(qXT)), $$ where $\delta_{\chi}$ is $1$ if $\chi$ is the principal character and $0$ otherwise, and $\rho$'s are the nontrivial zeros of the $L$ function $L(s, \chi)$. I was interested in the explicit formula of $$ \sum_{n \leq X} \Lambda(n) \chi(n) \phi(n) $$ where $\phi$ is a smooth function. I would greatly appreciate a reference for this. Thank you very much.

1$\begingroup$ I recall IwaniecKowalski's book has some asymptotics on this kind of sums. $\endgroup$ – Wojowu Oct 7 '17 at 9:39

$\begingroup$ @Wojowu That was one of the sources I looked into, but I couldn't find it. Could you possibly let me know the page number if I had missed it? $\endgroup$ – Johnny T. Oct 7 '17 at 9:41

1$\begingroup$ I was thinking of results of section 5.7, but they all seem to be using a smoothing factor $\phi(n/X)$, so are probably not of use for you. $\endgroup$ – Wojowu Oct 7 '17 at 9:54

1$\begingroup$ $\Lambda(n)\chi(n)$ is just the von Mangoldt function $\Lambda_f(n)$ associated to the Dirichlet Lseries $L(\chi,s)$. $\endgroup$ – Wojowu Oct 7 '17 at 11:28

1$\begingroup$ There's also a discussion in Section 5.1 of Montgomery/Vaughan's "Multiplicative Number Theory. I" (smooth weighted sums of general arithmetic functions). $\endgroup$ – Greg Martin Oct 7 '17 at 16:54
The answer is addressed in SiegelWalfisz Theorem with smooth weights. A very particular smooth weight is used, but the ideas can be adapted to other smooth weights with minor changes.
Also, the answer is addressed in Theorem 5.11 in Iwaniec and Kowalski. Their answer may look slightly different from your first centered equation above because they do not "push the contour all the way to the left". Instead, they push the contour to the line $\mathrm{Re}(s)=c$ for some fixed $c>0$; then, they use the functional equation. However, one can indeed "push the contour all the way to the left" and achieve what is perhaps a more classicallooking result (like your first centered equation). But all of the key ingredients are indeed present in the setup of Section 5.5 in Iwaniec and Kowalski.
Several particular choices of weights are explored in MontgomeryVaughan (Chapter 5), as mentioned by @Greg Martin. Their socalled "abelian weights" correspond to with the answer to SiegelWalfisz Theorem with smooth weights. But for arbitrary smooth weights, the only result that comes to my mind is Theorem 5.11 in Iwaniec and Kowalski.