Let $X = (x_{i,j})_{i,j = 1}^n$ and let $X_{i,j}$ be the matrix obtained from $X$ by deleting the $i$-th row and $j$-th column. Then the expansion by minors formula is
$$ \det X = \sum_{j = 1}^n (-1)^{i + j} x_{i,j} \det X_{i,j}. $$
It follows that the partial derivative of $X \mapsto \det X$ with respect to $x_{i,j}$ is $(-1)^{i + j}\det X_{i,j}$ or more accurately, it is the map $A \mapsto \left( (-1)^{i + j}\det X_{i,j} \right) a_{i,j}$.
Hence the derivative at $X$ is the linear map
$$ A = (a_{i,j}) \mapsto \sum_{i,j = 1}^n \left. \frac{\partial \det}{\partial x_{i,j}} \right|_{X}(A) = \sum_{i,j = 1}^n \left( (-1)^{i + j} \det X_{i,j} \right)a_{i,j} = \operatorname{tr}\left( \operatorname{cof}(X)^T A \right). $$
So $(d\det)_XA = \operatorname{tr}( \operatorname{cof}(X)^T A )$.