Let's be cleaner by working more generally over an arbitrary (not necessarily perfect) field $k$ and with geometrically reduced closed subschemes $X$ in a fixed separated $k$-scheme $Y$ locally of finite type. (Note: now affine schemes are gone; can take $Y$ to be an affine space, but this is irrelevant.) The
${\rm{Gal}}(k_s/k)$-stable set $\Sigma = X(k_s)$ in $Y(k_s)$ recovers $X$ as follows. For a $k$-algebra $A$, $X(A)$ is the ${\rm{Gal}}(k_s/k)$-invariants in $X(A_{k_s})$, so we just need to describe $X(A_{k_s})$ as a ${\rm{Gal}}(k_s/k)$-stable subset of $Y(A_{k_s})$. The description in this latter case will be in terms of $\Sigma$, and the ${\rm{Gal}}(k_s/k)$-stability of $\Sigma$ inside of $Y(k_s)$ will ensure that the description we give for $X(A_{k_s})$ is ${\rm{Gal}}(k_s/k)$-stable inside of $Y(A_{k_s})$. That being noted, we rename $k_s$ as $k$ so that $k$ is separably closed and $\Sigma$ is simply a set of $k$-rational points of $Y$ (so the notation is now marginally cleaner). To detect if a point
First assume $y \in Y(A)$ lies$A$ is geometrically reduced in the sense that $A_K$ is reduced for any extension field $K/k$. Since $X(A)$, it is equivalent to do so with the local ringsdirect limit (inside $Y(A)$) of the $X(A_i)$ as $A_i$ varies through $k$-subalgebras of finite type in $A$ (all of which are geometrically reduced), so we now takemay assume $A$ to be local, say with closed pointis finitely generated over $s$$k$. Then
Then the subset $X(A)$ in$k$-points are Zariski-dense $Y(A)$ consists of those(as $k = k_s$) and so the condition on $y \in Y(A)$ such that for any local functionit lies in $f$ near$X(A)$ is that $y(s)$ which vanishes at$y(\xi) \in \Sigma$ for all points$k$-points $\xi$ of $\Sigma$ near$A$. That describes $y(s)$$X(A)$ for any (possibly not finitely generated) $k$-algebra $A$ that is geometrically reduced. In general, necessarilyto check if $f(y) = 0$$y \in Y(A)$ lies in $X(A)$ amounts to the same for each local ring of $A$, so we can assume $A$ is local. This formulation makes sense Then the condition for separated algebraic spaces locally$y$ to be in $X(A)$ is exactly that there is a local map of finite type overlocal $k$-algebras (where "local function"$B \rightarrow A$ with $B$ geometrically reduced such that $y$ is in the senseimage of $X(B)$ under the 'etale topology) and it works there too, even thoughinduced map $Y$$Y(B) \rightarrow Y(A)$. I don't claim this formulation is not generally covered by affine opensthe best way to think about it, but it "works".
Of course, one can apply this process to any ${\rm{Gal}}(k_s/k)$-stable subset $\Sigma$ of $Y(k_s)$, and what is provided that we first replace $\Sigma$ with with the meaningset of the resulting functor? It represents$k_s$-points of its Zariski-closure in $Y_{k_s}$. Then we just obtain the Galois descent $X$ of the Zariski closure in $Y_{k_s}$ of $\Sigma$. In general $X(k_s)$ may be larger than $\Sigma$, but nonetheless $\Sigma$ is Zariski-dense in $X_{k_s}$. This is perfectly interesting in practice, regardless of whether or not $\Sigma$ is equal to $X_{k_s}$, since it is what underlies the construction of derived groups, commutator subgroups, images, orbits, and related things in the theory of linear algebraic groups over a general field. For example, the $k$-group ${\rm{PGL}}_n$ is its own derived group in the sense of algebraic groups, but the commutator subgroup of ${\rm{PGL}}_n(k_s)$ is a proper subgroup whenever $k$ is imperfect and ${\rm{char}}(k)|n$.