newproject: extract scaffold logic into scripts/scaffold.sh#14
Open
nsmiller2501 wants to merge 2 commits into
Open
newproject: extract scaffold logic into scripts/scaffold.sh#14nsmiller2501 wants to merge 2 commits into
nsmiller2501 wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-on to #4. Hoists the deterministic project-scaffolding logic out of
SKILL.mdand into a standalone shell script at.claude/skills/newproject/scripts/scaffold.sh. SKILL.md now invokes the script and focuses on the conversational/CLAUDE.md authoring half of the protocol.What changed
.claude/skills/newproject/scripts/scaffold.sh: 168-line shell script that creates the project root, populates the directory tree, writes therequirements.txt/config.{do,py,R}stubs, and emits a README on first run.SKILL.mdshrinks from ~135 → ~50 lines. The deterministic scaffolding steps are replaced with a singlebash ~/.claude/skills/newproject/scripts/scaffold.sh <project-name>call. The interactive portions (CLAUDE.md authoring, collaborator prompts, philosophy framing) stay in SKILL.md.Why
The mkdir / heredoc / file-template logic is purely deterministic — there's no benefit to running it through an LLM each invocation. Extracting it to a shell script makes the scaffold step:
bash scripts/scaffold.sh /tmp/test-projectexits cleanly or doesn't).This mirrors the script-extraction pattern used elsewhere in the skills tree (e.g.
/bibcheck/scripts/split_bib.py).Testing
bash scaffold.sh /tmp/newproject-smoke-testand confirmed the resulting tree matches what the previous inline protocol produced.