AI Assistant Guide
If you work with an AI coding assistant (Claude Code or Codex), SMLMAnalysis can install a hierarchical, version-stamped guide to the whole JuliaSMLM ecosystem — the analyze() pipeline plus the API reference of every sub-package. The guide is assembled at install time from the package versions resolved in your environment (each package's api_overview.md, or its README as a fallback), so it never describes an API you do not actually have.
using SMLMAnalysis
install_agent_guide() # Claude Code skill in ./.claude (gitignored by default)
install_agent_guide(track = true) # …and committed, to share with the repo
install_agent_guide(tool = :codex) # Codex: AGENTS.md block + reference bundle in this repo
install_agent_guide(scope = :user) # once for all your projects (~/.claude or ~/.codex)tool is :claude or :codex; scope is :project (into dir, default the current directory) or :user (your home). At project scope the guide is added to .gitignore unless track = true.
What gets installed
| tool | files | discovery |
|---|---|---|
:claude | .claude/skills/smlma-ecosystem/SKILL.md + reference/<Package>.md per package | Claude Code loads the skill by directory |
:codex | smlm-agent-guide/GUIDE.md + reference/, plus one managed block in AGENTS.md | Codex reads AGENTS.md; your existing content is preserved |
Every installed wrapper carries a provenance stamp (x-installer, x-source-version, x-source-commit, x-installed-format) that identifies it as SMLMAnalysis's own install. Installed copies are never meant to be hand-edited — re-run the installer to refresh them.
Refresh, status, uninstall
- Re-running
install_agent_guide()refreshes an install the stamp identifies as ours, with no extra flag. A hand-made or foreign directory at the target path is refused unless you passoverwrite = true. agent_guide_status()is the doctor: it reports whether a guide is installed, which SMLMAnalysis version and commit produced it, and whether it isstalerelative to the version now resolved.uninstall_agent_guide()removes only what the installer wrote (SKILL.md/GUIDE.md,reference/, and theAGENTS.mdblock). The directory itself is removed only if nothing else remains, so files you placed alongside are kept.
This installer follows the lab-wide convention for package-shipped assistant guides (namespaced install directory, x- provenance stamp, own-install idempotent refresh, stamp-scoped uninstall), so it coexists with guides installed by other packages.
API
SMLMAnalysis.install_agent_guide — Function
install_agent_guide(; tool=:claude, scope=:project, track=false,
overwrite=false, dir=pwd()) -> StringInstall a hierarchical, version-stamped guide to the JuliaSMLM ecosystem for an AI coding assistant, so it has the APIs of SMLMAnalysis and every sub-package on hand.
The guide is assembled at call time from the versions resolved in the current environment — each package's api_overview.md (falling back to README.md) is read from its pkgdir and copied into a reference/ bundle, with a top-level map linking them. Re-running refreshes it against whatever is currently installed.
Follows the lab skills-installer convention: the install carries a provenance stamp (x-installer, x-source-version, x-source-commit), so re-running refreshes only this installer's own install, and uninstall_agent_guide / agent_guide_status act only on stamped installs. Ownership of a reference file is decided per file, not by a manifest: a file counts as ours iff it is a regular (non-symlink) file whose first line carries the install header this package has always written, so a refresh regenerates only files it wrote and anything you add inside reference/ yourself survives. An existing file at one of our names that lacks that header is refused unless overwrite=true. A symlinked target, wrapper, reference directory, reference file, .gitignore, or AGENTS.md is never written through — it is refused with an ArgumentError rather than mutated; a directory (or any other non-regular file) at one of those paths is refused the same way, and the .gitignore / AGENTS.md side-effect files are checked before anything is written, so a refusal never leaves a half-installed guide behind. All installer writes are atomic (temp file
- rename), so an existing hardlink at one of our paths is replaced as a directory entry
rather than truncated in place.
Keyword arguments
tool::Symbol = :claude— target assistant::claudewrites a Claude Code skill (.claude/skills/smlma-ecosystem/SKILL.mdreference/*.md).
:codexwrites asmlm-agent-guide/bundle and a managed block inAGENTS.md.
scope::Symbol = :project—:project→ intodir(the repo);:user→ into your home (~/.claude/~/.codex, applying to every project you open).track::Bool = false— project scope only. Whenfalse(default) the installed files are added to the repo's.gitignore, keeping the guide out of history. Passtrack=trueto commit and share it. Ignored (with a warning) forscope=:user.overwrite::Bool = false— replace a target that was not installed by this installer (a hand-made skill, or another package's install). Refreshing our own stamped install never needs it.dir::AbstractString = pwd()— the repo root forscope=:project.
Returns the path of the installed skill/bundle directory.
Examples
using SMLMAnalysis
install_agent_guide() # Claude skill in ./.claude, gitignored
install_agent_guide(track=true) # …and committed to the repo
install_agent_guide(tool=:codex) # Codex AGENTS.md + bundle in this repo
install_agent_guide(scope=:user) # Claude skill for all your projectsSMLMAnalysis.uninstall_agent_guide — Function
uninstall_agent_guide(; tool=:claude, scope=:project, dir=pwd()) -> Vector{String}Remove a guide previously installed by SMLMAnalysis. Acts only on a target carrying SMLMAnalysis's own provenance stamp — a hand-made skill or another package's install is left untouched — and even then removes only SKILL.md/GUIDE.md, the reference files carrying this package's per-file install header, and — for tool=:codex — this package's managed block in AGENTS.md. Anything else, including files you added inside reference/ yourself, is preserved; reference/ and the install directory are removed only when nothing else remains in them, and a non-empty directory is left in place and reported with @info. A symlinked target, SKILL.md/GUIDE.md, or reference/ directory is never followed — it is left untouched with a @warn (and, for tool=:codex, the AGENTS.md block is then also left in place). Returns the paths removed (empty if nothing of ours was found, including when the target is unsafe to touch).
SMLMAnalysis.agent_guide_status — Function
agent_guide_status(; tool=:claude, scope=:project, dir=pwd()) -> NamedTupleDoctor: report an installed guide's state — (; installed, path, source_version, source_commit, current_version, stale). stale is true when the stamped source_version differs from the version currently resolved in this environment (re-run install_agent_guide to refresh).