I believe it is widely accepted the general definition for heat capacity is as follows
$$C \equiv \frac{\delta Q}{\textrm{d} T}.$$
One also finds that it is widely taken that
$$C_p = \left(\frac{\partial H}{\partial T}\right)_P,$$
and
$$C_V = \left(\frac{\partial U}{\partial T}\right)_V.$$
It seems to me these latter two results were derived for reversible processes. Is it then that heat capacities are intrinsic to the material and should be path independent, meaning that the path used in the derivation is irrelevant?
From the first law
$$ \textrm{d} U = \delta Q + \delta W,$$
and the Legendre transform variable enthalpy is
$$ \textrm{d} H = \delta Q + \delta W + p\textrm{d} V + V \textrm{d} p.$$
It seems then that you must assume reversible, and ignore composition, so that the work is only $\delta W = -pdV,$ then
$$ \textrm{d} U = \delta Q - p \textrm{d}V,$$
$$ \textrm{d} H = \delta Q + V \textrm{d} p.$$
The two heat capacities clearly follow.
Otherwise it is true that as long as the process is quasi-static
$$ \textrm{d} U = T \textrm{d}S - p \textrm{d}V,$$
$$ \textrm{d} H = T \textrm{d}S + V \textrm{d} p.$$
If one can write the heat capacity as
$$ C = T \frac{\textrm{d} S}{\textrm{d} T},$$
without having to assume a reversible process then again the relations could fall out. However, to do so seems to require a reversible process so that
$$T \textrm{d} S = \delta Q,$$
for it is known that for an irreversible process
$$T \textrm{d} S > \delta Q.$$
I would think that these results aren't path dependent, but I am not sure how to justify this thought.