/luismc-project-setup:claude-setupfrom luismc-project-setup
Apply the Claude Code config (statusline, settings, model split, rules, CLAUDE.md, the luismc plugins) to a project or ~/.claude/, then offer the dev-standards setups. Use to set up Claude, configure the statusline, fix Claude settings, add a CLAUDE.md, or on /luismc-project-setup:claude-setup.
Ships in luismc-project-setup. 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.
Read when SKILL.md points to them.
Applies the Claude Code configuration in assets/ (alongside this file) to one
or both of:
.claude/ and CLAUDE.md in the current repo, committed,
shared with anyone who clones it~/.claude/, machine-wide, applies to every projectThese are different decisions. The skill covers both because the configuration splits across them unevenly. A statusline and an auto-compact window are machine preferences that most people want once, globally. Instructions and a pinned output style are usually per-project.
Everything defaults to project level. The scope question below keeps project,
user and both as choices, with project preselected and marked
(Recommended). Existing ~/.claude/ files are never removed or changed unless
the owner picks user or both.
One piece is always user level: the two transcript-folds chords in
~/.claude/keybindings.json, because keybindings have no project scope. Every
run plans them, whatever target was picked (see "The transcript-folds pieces" in
references/plugins.md). Step 3 shows them in the confirmation, like every other write outside
the repo.
The rule files agents-and-integration.md and delivery-timing.md go to the
project's .claude/rules/ only. Never
install the same rules file at both ~/.claude/rules and the project's
.claude/rules: Claude loads both, so every request pays for the text twice.
Write to ~/.claude/rules/ only when the target is not a project (no repository
to hold .claude/). When the owner picks user or both inside a project,
the rule files still go to the project only. If ~/.claude/rules/ already holds
a copy of one of these files and the project gets it, queue the user copy as a
removal the owner confirms in step 3; never delete it silently.
clarifying-questions.md is the exception. Its source is the delivery plugin's
rules/clarifying-questions.md, which that plugin's SessionStart hook injects
in every opted-in project. So this skill writes its copy only to a user-level
target (~/.claude/rules/). See "rules/clarifying-questions.md" in
references/rules-and-delivery.md.
350000, so one request never
re-reads a very large context.Every project this skill touches gets the same division of labour. The main
session runs on Sonnet. The owner switches it to Opus with /model, only
for planning or a risky review, and back afterwards. Subagents run on Sonnet
and write the code. Opus is the default for no session: it costs several times
more per token, and a session re-reads its whole context on every request. Each
model also gets an effort level, medium or high, chosen by the user
on every run. The owner's default is medium for both, Opus and Sonnet. The
question below preselects it, and the shipped files carry it. These pieces carry
the split, and all are needed:
| Piece | Enforces |
|---|---|
settings.json model: "sonnet" | the main loop's model |
settings.json env.CLAUDE_CODE_SUBAGENT_MODEL: "sonnet" | the default model of every subagent that does not pin its own |
settings.json modelSettings.<Opus ID>.effortLevel | the main loop's effort |
settings.json modelSettings.<Sonnet ID>.effortLevel | the Sonnet effort for the session itself; subagent effort comes from the rule file, because the docs do not say this entry reaches subagents |
.claude/rules/agents-and-integration.md | the behaviour — the main loop hands implementation to subagents instead of writing it itself, and passes the chosen effort on each Agent call |
.claude/hooks/effort_drift.py | the warning when a model has no saved effort (see "The alias-drift warning" in references/effort-drift.md) |
.claude/agents/Explore.md | lookups on Haiku at medium: it replaces the built-in Explore, which would run on Sonnet (MP14: same answers on 10 of 10 lookups, about a seventeenth of the cost) |
~/.claude/hooks/questions_stop.py | the Stop hook that enforces Q-1 and Q-5, user level only, silent in a project with .delivery/ (see "The questions Stop hook") |
Settings alone pick only models and effort. Without the rule, the main session
still writes all the code itself, and the subagent default is rarely used. The
rule alone is advice with nothing behind it. An agent whose definition pins a
model (e.g. luismc-agents:architect → opus) keeps it. A frontmatter model
takes precedence over CLAUDE_CODE_SUBAGENT_MODEL. This is intended:
judgment-call agents stay on Opus. Forked subagents always inherit the parent's
model. That is acceptable, because a fork continues the parent's reasoning and
is not for implementation.
The rule file does more than the split. agents-and-integration.md is the
plugin's one rule file for how agents run and how work is integrated. It holds
role lines for the orchestrator, code agents, scripts and log triage; the
integrate-once, deploy-once workflow; and where docs live. Its workflow lines
cite scripts/delivery/* by path. Those scripts exist only where
delivery_ci_install.py installed them. In any other repo, the lines name
tools that are not there, and tech-stack-setup puts them there. The file is
the same for every target and is never edited per repo. It replaces
model-delegation.md, which earlier versions of this skill wrote.
Why effort is carried twice. Claude Code saves per-model effort as
modelSettings.<model ID>.effortLevel, and that entry beats a top-level
effortLevel. The docs do not say whether it applies to subagents. For a
non-fork subagent, they document this order: the Agent call's effort
parameter, then the agent definition's effort frontmatter, then the session's
effort. So the Opus entry and the Sonnet entry set the session, and the rule
file tells the main loop to pass the subagent effort explicitly. Anything that
overrides saved settings also overrides these entries: the env var
CLAUDE_CODE_EFFORT_LEVEL (every model, every setting), and --effort or
/effort for the session. The skill offers only medium (the default for
Opus 5.5 and Sonnet 5.5, and the owner's default for both) and high (more
tokens and time). effortLevel also accepts low and xhigh; the user sets
those by hand.
The shipped settings also carry a top-level "effortLevel": "medium". A
per-model modelSettings entry beats it, so the main session runs at the
effort chosen for its model. The top-level key applies to sessions whose model has no
entry, such as cloud agents. Cloud agents run Opus, so they get the Opus
default, medium.
Repo and product tooling — .githooks/pre-commit, .gitleaks.toml,
.github/workflows/ci.yml, playwright.config.ts, and the
package.json/core.hooksPath activation — belongs to the sibling skill in
this plugin, tech-stack-setup, which generates them from STACKSPEC, not from
a stack-neutral baseline. The split is deliberate. This skill sets up the agent
that works in the repo. The other skills set up the repo: tech-stack-setup its
structure and gates, auth-setup its authentication.
Read references/offers.md in two cases: when the owner asks for claude-setup status, and after step 2, before the step 3 summary. It holds status mode, the status scan, the grouped questions of every offer, what each yes adds to the change plan, the plugin update offer (SO9) and the docs Stop hook (D4).
Do not assume. Ask whether to apply project, user, or both.
Preselect project and mark it project (Recommended): rules, CLAUDE.md,
statusline, output style, the effort_drift hook, the model and effort split and
the auto-compact env all default to the project's .claude/ (and CLAUDE.md at
the project root). Existing ~/.claude/ files are never removed or changed
unless the owner picks user or both. This is a real question, for two
reasons:
~/.claude/settings.json changes a file outside the repo. That file
affects every other project on the machine. It needs explicit confirmation
every time, even if the user has run this skill before..claude/settings.json and ~/.claude/settings.json both set a
key, the project one wins. Applying to both can make the user-level value dead
for this repo, with no warning. Say so if the user picks both.Then, whatever target was picked, ask a second question: should the model
split also be enforced for all projects — i.e. written to
~/.claude/settings.json (model, env.CLAUDE_CODE_SUBAGENT_MODEL, the two
effort entries, the drift-hook registration) and ~/.claude/hooks/effort_drift.py?
Rule files are never part of it (see "Rules live at one level"). Ask it even when the user
chose project only. The project target always gets the split. This
question asks whether every other repo on the machine gets it too. A "yes" adds
just those pieces to the user target (not the statusline, output style or
CLAUDE.md, unless the user also picked user or both). A "no" leaves
~/.claude/ untouched, apart from the two transcript-folds chords. Those are
always planned (see the intro), and the owner can still decline them in step 3.
Skip the question only when the user already picked user or both,
because the split is then applied there anyway.
Then ask the effort question, once for each model of the split:
Preselect medium for both models and say that this is the owner's default.
High costs more tokens and time. If a target's settings already hold a
modelSettings.<model ID>.effortLevel for that model (see step 2 for the IDs),
show it too, and still mark the recommended answer. Ask both every run, even
when a value is already saved. Effort is the user's per-run choice, and one
answer covers every target that gets the split. If the targets disagree on a
saved value, show each. The recommended answer stays preselected.
For a project target that has no .delivery/config.json, ask a last question
in the same message: the delivery values (work_root, tz, caps,
no_attribution), or the neutral defaults. See ".delivery/config.json" in
references/rules-and-delivery.md.
For each chosen target, compare the templates against what is on disk and classify. Never write during this step.
statusline.sh — overwrite unconditionally.claude/statusline.sh (project) or ~/.claude/statusline.sh (user) is a
display script that this plugin owns outright. A project owner does not
hand-edit it, so replace it without asking. It has no jq dependency by design,
because jq is not guaranteed on PATH. It parses the statusline JSON with
grep/sed. Do not "simplify" that to jq when copying.
Make it executable after copying: chmod +x <target>/statusline.sh.
For a project target, make sure the repository's .gitattributes has a rule that
keeps .claude/*.sh in LF, for example .claude/*.sh text eol=lf. A CRLF
checkout (Windows, core.autocrlf=true) breaks the script and the status line
goes blank. Append the line when no existing rule covers the file; never replace
the file. Create .gitattributes when it is absent.
settings.json — add whole if absent, field-level if presentRead references/settings.md now. It holds the settings key table, the effort keys, the model keys, the hooks and enabledPlugins merges, and the per-target statusLine and drift-hook commands.
Read references/plugins.md now, on every run, whatever target was picked. It holds which plugins, the marketplace name and entry, the install step, the first-run configuration of each plugin, and the transcript-folds chords in ~/.claude/keybindings.json.
output-styles/caveman.md — add if missingCopy it alongside the outputStyle setting. The setting names a style that
must exist as a file. If it does not, Claude falls back to the default with no
error.
agents/Explore.md — project target, overwrite unconditionallyCopy assets/.claude/agents/Explore.md to the project's .claude/agents/.
Plugin-owned: replace it without asking. Its frontmatter pins model: haiku
and effort: medium and denies every editing tool. A project agent named
Explore replaces the built-in one. Never write it to ~/.claude/agents/.
Keep its description short: every session loads it.
hooks/effort_drift.py — overwrite unconditionally.claude/hooks/effort_drift.py (project) or ~/.claude/hooks/effort_drift.py
(user). Plugin-owned like the statusline: replace it without asking. A local
edit is drift. Python 3, standard library only. Create the hooks/ directory
when absent. No chmod is needed, because the registered command runs it
through python3. See "The alias-drift warning" in references/effort-drift.md for what it does.
Q-1 and Q-2 say: gather every open question and ask them in one
AskUserQuestion batch, never as plain text. hooks/questions_stop.py checks
that at every Stop. It is installed at user level only, so it applies in
every project. A project target never gets it. In a project with a
.delivery/ folder it does nothing: the delivery plugin's Stop hook checks there (D371).
Plan these two steps for the user target, on every run, and list them in step 3 under "writes outside the repo":
assets/.claude/hooks/questions_stop.py to
~/.claude/hooks/questions_stop.py. Overwrite unconditionally, like
effort_drift.py. Create hooks/ when absent.~/.claude/settings.json, with the command
if command -v python3 2>/dev/null | grep -qv WindowsApps; then python3 "$HOME/.claude/hooks/questions_stop.py"; else python "$HOME/.claude/hooks/questions_stop.py"; fi.
Append it to hooks.Stop. Never remove or change another Stop hook (the
delivery plugin has one, and so may the owner). Add nothing when a Stop
entry already runs questions_stop.py.The hook blocks (exit 2, reason on stderr) when the final reply ends with a
question to the owner or lists options to pick from, or says questions are
parked or will be asked later, and the turn made no AskUserQuestion call. It
lets a park through while agents of the wave still run (Q-5: a running agent in
.delivery/ledger.json). It never blocks when stop_hook_active is true,
ignores code blocks, inline code and quoted lines, and fails open on any error.
flowchart TD
S[Stop] --> A{stop_hook_active or off?}
A -- yes --> OK[allow]
A -- no --> B{AskUserQuestion in turn?}
B -- yes --> OK
B -- no --> C{plain question or options at end?}
C -- yes --> X[block: ask in one batch]
C -- no --> D{says parked or later?}
D -- no --> OK
D -- yes --> E{agents still run?}
E -- yes --> OK
E -- no --> X
Turn it off with CLAUDE_QUESTIONS_STOP=off in the settings env block or the
shell, or "questionsStop": "off" in ~/.claude/settings.json. Tell the owner
this in the report.
.delivery/config.json, the old Stop hook and the memory mapRead references/rules-and-delivery.md now. It holds rules/agents-and-integration.md, rules/clarifying-questions.md, rules/delivery-timing.md, .delivery/config.json, the retired no-tomorrow.mjs Stop hook and the memory-to-rule map (DELIVERYSPEC D7).
CLAUDE.md — add if missing, NEVER overwriteInstructions loaded into every session: CLAUDE.md at the repo root for a
project target, ~/.claude/CLAUDE.md for a user target.
If it exists, leave it alone entirely. Do not overwrite it, do not merge into
it, do not append. This file is hand-written prose, and its value is that
someone chose every line. A user-level ~/.claude/CLAUDE.md in particular is
usually well-developed and may @-include other files. This plugin cannot
recover a lost file. Report it as already present and move on.
If the user explicitly asks to add the template's guidance to an existing
CLAUDE.md, show them the template text and let them place it themselves. Do
not edit the file for them.
If the target repo has its own AGENTS.md and CLAUDE.md does not reference it,
offer to add the @AGENTS.md line. This is a convenience, but only when the
file it points at exists.
This is the plan first part of the setup pattern. Show one plan before any change: what it will install, configure and write (with paths), what it changes outside the repository, what needs the owner (a yes, an administrator shell, a sign-in, a web setting, a secret) and about how long it takes. Do not change anything before the owner says yes.
Also list every offer the owner said yes to (see "Offers and enforcement"): the commands, the CI workflow file, the branch-protection step, and the setups and audits that will run.
Group every queued change by target and by file. List what is being added, what
is being overwritten unconditionally, what is being removed (a target's old
rules/model-delegation.md), and which individual settings keys are being
added, including the hooks.SessionStart entry and, for a project target, the
enabledPlugins entry for each of the 6 plugins (or that it is already there).
For a project target also list:
claude plugin install <name>@<marketplace> --scope project (asking for confirmation)extraKnownMarketplaces.<marketplace> entry (or that it is already there)init --apply, or the migrate dry-run plan)record_dir docs/project)caps changes as current → new.delivery/config.json and .gitignore linerules/delivery-timing.mdno-tomorrow.mjs Stop entry (which lives in the
user's settings, so state that it lands outside the repo)Always list, under the user target, the chords to add to
~/.claude/keybindings.json (or that they are already there, or that the file
will be created). List each model-split conflict
separately as key: current → policy, and each chord bound to another action as
chord: current action → wanted action. List the two effort keys per target as
modelSettings.<ID>.effortLevel: current → chosen (none → chosen when
absent), and any CLAUDE_CODE_EFFORT_LEVEL conflict with where it is set. Ask
for one confirmation: apply everything (conflicts included), apply a named
subset, or cancel.
State plainly which writes land outside the repo. If the user declines part of it, leave those files untouched and report them as skipped. Never quietly drop a piece because the rest succeeded.
One line per step. While applying, print one line per step: what you are doing, then done, or failed with the reason and the fix. Do every install and configuration you can yourself (the plugin installs, the file writes, the setups the owner picked). Leave to the owner only what you cannot do, each with exact steps and a check after.
Apply what was confirmed. Then check the result. Do not assume it worked:
settings.json parses as JSON after editing. A merge that produces invalid
JSON makes Claude Code ignore the whole file. That looks the same as settings
that were not applied.statusline.sh is executable.statusLine.command resolves for the target you wrote.model resolving to Sonnet,
env.CLAUDE_CODE_SUBAGENT_MODEL resolving to Sonnet, and
rules/agents-and-integration.md present — or the conflicting key is
listed as declined. A project model key shadows the user one, so a project
left on a declined non-Sonnet value defeats a user-level enforcement. Say so.modelSettings entries, under the
canonical IDs, with the value medium or high.effortLevel (unless an existing
value was left alone) and still parse as JSON.rules/agents-and-integration.md contains no
{{SUBAGENT_EFFORT}} placeholder and names the chosen Sonnet effort.rules/model-delegation.md remains in a target that was applied.rules/clarifying-questions.md, identical to the delivery plugin's file (or
the skip is reported when that plugin is not installed). An applied project
target has no .claude/rules/clarifying-questions.md, unless an edited copy
was kept and reported.hooks/effort_drift.py, and its
hooks.SessionStart holds the command for that target (project form
with $CLAUDE_PROJECT_DIR, user form with $HOME), once, next to any
hooks that were already there.~/.claude/hooks/questions_stop.py is identical to the asset and ~/.claude/settings.json hooks.Stop runs it once, next to every Stop hook that was there before. A project settings.json has no questions_stop.py entry.enabledPlugins holds luismc-delivery@<marketplace>, .delivery/config.json parses as JSON with none of the _ keys, .gitignore ignores .delivery/* but not .delivery/config.json, every applied target has rules/delivery-timing.md identical to the template, and no hooks.Stop entry naming no-tomorrow.mjs remains unless the removal was declined.enabledPlugins holds an entry for every plugin in the
marketplace file (true, or the owner's existing value), next to every entry
that was there before, with no {{MARKETPLACE}} left in the file, and the
file still parses as JSON.claude plugin list, or
its failure is reported..claude/artifacts.json parses and names record_dir docs/project (or the
owner's existing value), and docs/docs.json, when present, names the same..delivery/config.json has caps at least cloud 50, local 3, total 53..claude/settings.json has extraKnownMarketplaces.<marketplace>
(or the owner's existing entry, unchanged).~/.claude/keybindings.json parses as JSON, its Global context binds
ctrl+x d to theme:toggleSyntaxHighlighting and ctrl+x f to
theme:editCustom (or the conflicting chord is listed as declined), and every
binding that was there before is unchanged.CLAUDE_CODE_EFFORT_LEVEL remains in the target's env block, unless the
user chose to keep it. In that case, say it overrides the saved efforts./model switches it now).Safe to run again. A second run says what is already set and changes only what is missing.
Finish with three parts, in this order, under these headings: Done, Left for you and What you can do now. The paragraph below is the content of Done.
Report what was applied, per target. Report what already had a value and was
therefore left alone. That list matters, because "already set" and "just set by
me" look identical afterwards. Report what the user declined, including any
model-split conflict left in place. Say whether the model split is now enforced
for this project only or for all projects. Give the effort chosen for each model
(Sonnet main session, Opus by /model, Sonnet subagents) and where it was written, and the
top-level effortLevel (added as medium, or the existing value left alone)
that cloud agents fall back to. Say which of the 6 plugins were enabled for the
project, which were installed, and which install commands the owner still has to
run, with the marketplace name used and where it came from (run the install yourself after the owner's yes; list a command here only when it failed). Tell the owner to
run /reload-plugins. Say what was configured for docs (init applied, or the
migrate plan shown and left unapplied), the artifacts record, and the delivery
caps changes. Say whether the two transcript-folds chords were added, already there or
declined. Say whether the extraKnownMarketplaces entry was added or already
there. Say that every missing plugin, luismc-transcript-folds included, is
installed with claude plugin install <name>@<marketplace> --scope project, and
that the chords and the plugins take effect after /reload-plugins or a restart. Report
anything removed (the old model-delegation.md), and whether the project has
scripts/delivery/, which the rule file cites. Say whether the questions Stop hook was installed at user level, and that
CLAUDE_QUESTIONS_STOP=off turns it off. Say whether .delivery/config.json
was written or already present, whether the no-tomorrow.mjs entry was removed
or declined, and give the memory-to-rule table for the orchestrator. If both
targets were written, note which keys the project file now shadows.
Under the heading Left for you, before the enforcement table, give one numbered list. Keep only the steps that need the owner, in order. Each has its exact command or link and one line on why. Typical entries:
<task>-integration (for example DL423-integration): setup opens the one ready pull request, and the session guard refuses a ready pull request from any other branch name (DL-08).references/offers.md, "CI, Another service").Do not mix done or skipped items into this list. Report those above it.
Read references/report.md now. It holds the What you can do now table per plugin and the enforcement report that follows it.
Read references/effort-drift.md when you plan or explain hooks/effort_drift.py, or when a skill's model: or effort: changes. It holds what the hook reads, checks and prints, how to turn it off, and assets/model-profiles.json.
assets/CLAUDE.md (opens in a new tab)assets/ci/github-actions/dev-standards.yml (opens in a new tab)assets/docs/guides/agent-delivery-details.md (opens in a new tab)assets/keybindings.json (opens in a new tab)assets/model-profiles.json (opens in a new tab)references/effort-drift.md (opens in a new tab)references/offers.md (opens in a new tab)references/plugins.md (opens in a new tab)references/report.md (opens in a new tab)references/rules-and-delivery.md (opens in a new tab)references/settings.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
sonnetmediumnpx claudepluginhub luis-mc/dev-standards --plugin luismc-project-setup3 skills in this plugin
/auth-setupAuth setup — build and checkBuild or audit authentication per AUTHSPEC in a repo set up by tech-stack-setup. Use to add authentication, login, signup, sessions, passkeys, MFA or admin access, for an auth audit, or on /luismc-project-setup:auth-setup. Refuses a repo that tech-stack-setup has not set up./tech-stack-setupTech stack setup — a guided wizard, then a generatorPick a coherent tech stack and generate a repo that conforms to STACKSPEC, or audit a repo for drift. Use to start a new product, pick a stack, scaffold or bootstrap a conforming repo, set up the tech stack, check conformance, or on /luismc-project-setup:tech-stack-setup. Not for auth.Other plugins' skills for the same job