Let $(X,\mathcal{O}_X)$ be a quasi-compact ringed space which is locally isomorphic to an affine variety over an algebraically closed field $k$, and let $\mathcal{F}$ be a coherent sheaf on $X$.
For any $x\in X$, I'm trying to show that the minimum number of generators of the stalk $\mathcal{F}_x$ doesn't change depending on whether we look at it globally or within an open affine.
Specifically, we can define $$\mathcal{F}_x=\mathop{\lim_{\longrightarrow}}_{U\ni x}\mathcal{F}(U)$$ and look at the minimum number of generators of this as an $\mathcal{O}_{X,x}$-module, where $\mathcal{O}_{X,x}$ is the ring of germs at $x$.
But more concretely, in an open affine $U\subseteq X$ containing $x$, we have $\mathcal{O}_{U,x}\cong A_{\mathfrak{m}_x}$, where $A=\Gamma(U,\mathcal{O}_X)$ and $\mathfrak{m}_x=\{f\in A:f(x)=0\}$. Then $(\mathcal{F}\mid_U)_x=M_{\mathfrak{m}_x}$, and we can look at the minimum number of generators of this as an $A_{\mathfrak{m}_x}$-module.
I'm trying to show that these two numbers agree.
I've asked a question related to this before, but I don't think I explained myself clearly enough. I'm looking to show something similar to this question only for stalks.
So far I have tried to do this by showing that $\mathcal{O}_{X,x}\cong\mathcal{O}_{U,x}$ as rings, $\mathcal{F}_x\cong(\mathcal{F}\mid_U)_x$ as abelian groups, and that the respective actions are compatible with these isomorphisms.
I think that the isomorphisms follow since $$\{V\subseteq U:V\text{ open affine and }x\in V\}$$ is cofinal to $$\{V\subseteq X:V\text{ open affine and }x\in V\}$$ with respect to inclusion, so it doesn't matter which set we "start in", and the direct limits taken over them should be isomorphic.
For every open affine $V\subseteq X$, we have an action of $\Gamma(V,\mathcal{O}_X)$ on $\mathcal{F}(V)$ which is compatible with the direct system, and from a question I asked here, I know this gives rise to an action of the direct limit of the rings on the direct limit of the abelian groups.
I think these actions agree with the standard ones of $\mathcal{O}_{X,x}$ on $\mathcal{F}_x$ and $\mathcal{O}_{U,x}$ on $(\mathcal{F}\mid_U)_x$, but I'm not sure?
If they are, then I think the result should follow? Is this the correct approach, or is there a simpler way to show this?
Any help would be much appreciated.