/archlang:archlang-edit-planfrom archlang
Edits existing ArchLang .arch floor plans by reading facts with the archlang CLI, making minimal changes, and re-verifying. For requests like "make bedroom wider" or "add bathroom next to hall".
Ships in archlang. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Change a .arch file without breaking what already works.
If archlang is not on the path, write npx -y @chanmeng666/archlang in its place.
Never run a bare arch: on Linux, macOS and Git Bash that name is the coreutils command.
This skill is a workflow, not a language reference. Run archlang spec for the language and
archlang <cmd> --help for a command's flags.
archlang CLI commands below and no other program..arch file the user asked you to edit (plan.arch below). If the user has not
named it, ask. Besides it, write only the drawings the CLI renders and the .bak copy that
--backup keeps.archlang validate plan.arch --json and
archlang describe plan.arch --select rooms,totals --json. Keep both results: they are what you
compare against at the end. If the plan already has errors, tell the user before you edit.let, ask first, with nothing written:
archlang impact plan.arch --set NAME=value --lock <ids> --json. For any other edit, make it in a
copy new.arch and check it after: archlang impact new.arch --against plan.arch --lock <ids> --json. Exit 2 with E_LOCKED_ELEMENT_CHANGED names a locked element the edit moves: change the
edit, not the lock. A lock names elements by the id= written in the source (an unnamed one is
refused with E_LOCK_UNNAMED).archlang describe plan.arch --room <ids> --json returns
those rooms with the doors, windows and furniture that touch them.
archlang describe plan.arch --select freedom --json says which positions the author typed
(absolute) and which the compiler derives. Change a typed number; a derived one moves by
itself when the thing it depends on moves.archlang spec.archlang compile plan.arch -o plan.svg --json. If ok is false, preview the
mechanical fixes with archlang fix plan.arch --dry-run --json and read the diff before you apply
them with archlang fix plan.arch --backup.archlang repair plan.arch -o plan.arch moves it. Read unresolved for the pieces
it could not move.impact check from step 2 on the edited file. The rooms you meant to change differ as
intended. Every other room has the same area and the same connections. No diagnostic is new unless the request causes it; if one is, tell the user.archlang finish plan.arch --dry-run --json shows what
is missing. If it reports that the drawing no longer fits the authored paper or scale,
archlang finish plan.arch --reissue may replace those two statements and nothing else.archlang score plan.arch --taste generic --json and
archlang preview plan.arch --review, which writes plan.review.png (one storey per sheet: add
--level <n> for each upper storey). Run them when
archlang validate plan.arch --strict --json exits 0, or you can name each remaining warning
as deliberate. If strict is not clean only because of warnings the plan carried before your
edit, still run them once: the score is then capped at 0.5 (capped is true). Do not fix
warnings the request did not cause to make it clean. The score is a sourced 0–1 taste score
(privacy gradient, daylight, proportion, corner doors, …) whose criteria[].advice A_* codes
name what to improve; coverage.weight says how much of it could be judged, and score is
null when nothing could. It never gates, and a score capped at 0.5 means a validity lint
warning still stands. The review image rings and numbers every warned element; on a lint-clean
plan it still shows the access graph (which rooms each door joins, which rooms the entrance
reaches) and which door is the main entrance or that the choice is a tie: check that the edit
did not change them unless the request asked for it. If it did, that is a fault in the edit, not
taste: go back to step 5, fix it, and run this step again. Taste advice is not an error, and it
may predate your edit: do not iterate on it and do not make edits the user did not ask for to
raise the score. Report it; the user decides.Pass the file's current revision as --expected-hash <hash>, as in
archlang fix plan.arch --expected-hash <hash> --json. The --json result of each command that
rewrites the file (fix, finish, repair -o plan.arch, fmt --write) says which hash that is:
source_hash is the file as the command read it, and written_hash the file once the command has
written it. A result that hands you rewritten text instead (repair --json, a --dry-run, or the
MCP repair, fix and finish tools) gives output_hash, the file's revision once you write that
text to it unchanged. archlang fmt plan.arch --json reports source_hash without writing, even
when it refuses a plan that does not parse (exit 2, ok: false, parsed: false). If the
file changed since, the command writes nothing and exits 4 with E_STALE_SOURCE: read the file
again, redo your edit on what is there now, and use the new hash. This narrows the window for a
clash; it is not a lock.
coverage.weight, as "judged 11/12 of
the weight") and, if it is capped, the warnings that cap it; or that nothing could be judged
(score is null). Each A_* advice code with its criterion's message, and plan.review.png.
Say that the advice is not an error, that it may predate your edit, that you made no edit for it,
and that acting on it is the user's choice.2 is a fault in the source: read the diagnostic, do not retry unchanged. 3 is a
wrong flag: run archlang <cmd> --help.archlang explain <CODE> --json explains a diagnostic code. It does not know the A_* advice
codes (it exits 3): a taste criterion's message and source are its explanation.archlang suggest plan.arch --json returns candidates with the reason for each.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub chanmeng666/archlang --plugin archlang5 skills in this plugin
/archlangUse when the user wants to create, edit, or inspect an architectural floor plan / building layout as code — e.g. "draw a 2-bedroom apartment", "add a bathroom to this plan", "make the bedroom 1 m wider", "lay out an office floor". ArchLang is a tiny text language that compiles a .arch file to a professional floor-plan drawing (SVG/PNG/PDF/DXF). Drive it entirely through the `archlang` CLI; do not hand-render./archlang-brief-to-planUse when the user gives a written brief for a new floor plan (rooms, areas, how rooms connect, a plot size) and wants the drawing, e.g. "design a two-bedroom flat of about 75 m²" or "lay out a small office with four rooms". Writes an ArchLang .arch file from the brief, checks it against the brief with the archlang CLI, and finishes it as a sheet. Not for changing an existing plan (archlang-edit-plan) or for exporting one (archlang-export)./archlang-exportOther plugins' skills for the same job