Preservation of Limit by Hom: Naturality Question. $\DeclareMathOperator{\Hom}{Hom}$Let $D_{i}$ be a diagram in a category $C$,with d the limit. We have 
(1) $\lim \Hom_{C}(X,D_{i}) \cong \Hom_{C}(X,d)$.
Whenever I see this result used, it is always stated that the isomorphism is natural in $X$. I have never seen a proof so I want to do it from scratch. Here is my strategy:
I take $\lim : C^{I} \rightarrow C$ to be the functor defined on objects in the obvious way, and on arrows $D \rightarrow D'$ to be the unique morphism from d to d', that results from constructing the cone from d to $D_{i}'$. 
So LHS of (1) is $\lim \circ \Hom_{C}(-, D_{i}) : C^{op} \rightarrow Set$
Let $\lim \Hom_{C}(X, D_{i}) = S(X)$. Then letting $f : X' \rightarrow X$, I get a square whose top arrow is the iso $\phi : S(X) \rightarrow \Hom_{C}(X,d))$ and whose bottom arrow is the iso $\phi' : S(X') \rightarrow \Hom_{C}(X',d))$. The left arrow is the unique map from $S(X) \rightarrow S(X')$ and the right arrow is just the map between the two corresponding $\Hom_{C}$ functors.
But now I can't get the squares to commute. 
 A: Suppose that $\{D_i, \psi_i^j\}$ is your system, and for $i \leq j$ you have a map $\psi_i^j : D_j \to D_i$, and let $\alpha_i : lim D_i \to D_i$ be the maps of the limit (the ones with the universal property). Then you have for every $X$ an isomorphism:
$$ \begin{array}{cccc} \theta_X : & Hom(X, d)  & \to & lim Hom(X,D_i) \\
                                &    \varphi & \mapsto & (\alpha_i \circ \varphi)_{i}       \end{array} $$
Let $f:X \to Y$, then you have induced maps $f^* :Hom(Y,d) \to Hom(X,d)$ and
$$ \begin{array}{cccc}  \overline{f^*} : & lim Hom(Y,D_i) & \to & lim Hom(X,D_i)\\
                          & (\varphi_i)_i & \mapsto & (\varphi_i \circ f)_i     \end{array} $$
Now for every $ \varphi \in Hom(Y,d) $ we have:
$$ \begin{array}{lcl} \overline{f^*} \circ \theta_Y (\varphi) & = & \overline{f^*} \big( (\alpha_i \circ \varphi)_i \big) \\ & = & (\alpha_i \circ \varphi \circ f)_i      \end{array} $$
And in the other hand:
$$ \begin{array}{lcl} \theta_X \circ f^* (\varphi) & = & \theta_X(\varphi \circ f) \\
                       & = &  (\alpha_i \circ \varphi \circ f)_i   \end{array} $$
And that's the naturality.
A: There are many way to prove this, but I think the easiest (in some sense) is via yoneda embedding and using the definition of limits for a functor $D \colon \mathbf I \to \mathbf C$ as terminal objects in the category of cones over $D$.
We have that for every category $\mathbf C$ there's an embedding $y \colon \mathbf C \to [\mathbf C^\text{op},\mathbf{Set}]$ given by:


*

*on objects $y(X) = \hom_{\mathbf C}(-,X)$ is the (contravariant) hom-functor;

*on morphisms $f \colon X \to Y$ in $\mathbf C$ we have $y(f) = \hom(-,f)$, which is the natural transformation sending every $C \in \mathbf C$ in the function $\hom(C,f) \colon \hom(C,X) \to \hom(C,Y)$.


This functor is a fully faithful embedding, that's a consequence of yoneda lemma.
Using this fact we can prove your claim. Let be $D \colon \mathbf I \to \mathbf C$ be a an $I$-diagram (i.e. a functor with domain $I$).
Fully faithfulness of the functor $y$ implies that every cone diagram of the form ${p_i}_* \colon y(d) \to y(D_i)$ is obtained as the image of a uniquely determinated cone $\langle p_i \colon d \to D_i\rangle_{i \in \mathbf I}$ in $\mathbf C$.
That means the for every family ${p_i}_*$ as above there's a cone $\langle p_i \colon d \to D_i\rangle_{i \in \mathbf I}$ such that $y(p_i)={p_i}_*$ for every $i \in \mathbf I$.
In the same way it's easy to see that given $\langle {p_i}_* \colon y(d) \to y(D_i)\rangle$ and $\langle {q_i}_* \colon y(d') \to y(D_i)\rangle_{i \in \mathbf I}$ two cones, 
induced by the cones $\langle p_i \colon d \to D_i\rangle_{i \in \mathbf I}$ and $\langle q_i \colon d' \to D_i\rangle_{i \in \mathbf I}$ respectivley, and given an $f_* \colon y(d) \to y(d')$ such that ${q_i}_* = {p_i}_* \circ f_*$ then there's a necessarily unique $f \colon d \to d'$ in $\mathbf C$ such that $y(f)=f_*$ and $q_i=p_i \circ f$ for every $i \in \mathbf I$.
This implies that categories of cones over the diagram $D \colon \mathbf I \to \mathbf C$ and the one of the cones over the diagram $y \circ D \colon \mathbf I \to \mathbf {Set}$ are isomorphic via the functor induced by $y$ that sends every cone $\langle p_i \colon d \to D_i\rangle_{i \in \mathbf I}$ in the cone $\langle y(p_i) \colon y(d) \to y(D_i)\rangle_{i \in \mathbf I}$.
In particular this implies that $\langle\pi_i \colon d \to D_i\rangle_{i \in \mathbb I}$ is terminal object in the category of cones over $D$ iff 
$$y(\pi_i)\colon y(d) \to y(D_i)$$
that is 
$$\hom_{\mathbf C}(-,\pi_i) \colon \hom_{\mathbf C}(-,d) \to \hom_{\mathbf C}(-,D_i)$$
is a terminal object in the category of cones over the diagram $y \circ D$:
that means that the first cone is a limit cone iff the second one is a limit cone.
Hope this helps. 
