agentleFS
chrille0313chrille0313/agentic-monorepo-template/.claude/skills/setup-stack/SKILL.md

setup-stack

Skill4 starsChanged 3 months agoMITView on GitHub

One-time template adaptation. Pick a language/framework, scaffold a minimal project, and fill in the command contract in CLAUDE.md that all agents verify against. Use right after creating a repo from this template, or to swap the stack later.

  • Reads credentials

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. gonimar/claude-web-studio★ 4same name
    2. evgenii-studitskikh/Claude-Code-SaaS-Studio★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add a tag ruleset making all tags immutable: creation stays open for release tooling.

    line 45
  2. Very specific:

    Create the agent and in-progress labels, and allow GitHub Actions to create pull requests, so the headless loop (agent-task.yml) can run.

    line 46
  3. Distinctive:

    Update the README title/intro to name the project (keep the loop documentation).

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/setup-stack: adapt the template to a stack

This template is stack-agnostic on purpose: the agentic loop only needs the command contract in CLAUDE.md (check / test / build / run / smoke). This skill makes those commands real, and sets the codebase up so agents can properly test the application. That is the template's core design goal.

1. Choose

Establish the stack with the user (language/framework, package manager, test runner) unless they already said. Offer sensible bundles (e.g. "TypeScript + Vite + Vitest", "Python + uv + pytest", "Go + std tooling") but accept anything.

2. Scaffold minimally

Use the stack's official initializer where one exists, scaffolding into the repo's fixed monorepo layout (see CLAUDE.md): the first app in apps/<name>, shared code in packages/<name>, even for a single app. Wire up the stack's workspace tooling when it has one (pnpm workspaces, cargo workspaces, uv workspaces, Nx, moon, ...); a plain directory layout is fine when it doesn't. Keep it minimal: the loop needs something to lint, test, build, and run, not a demo app. Include at least one real passing test, so the contract's test command is meaningful from day one. Extend .gitignore for the stack.

3. Make the app agent-testable

The part most templates skip. Agents must be able to verify behavior, not just that code compiles:

  • Run: the app starts with one command, on a stable port/URL (or deterministic CLI entrypoint), with seeded deterministic data. No interactive prompts, no manual setup steps.
  • Smoke: one command drives the running app through its critical user journeys (HTTP calls against real endpoints, CLI invocations checking real output, or a headless-browser check for UIs) and exits non-zero on failure. Today that is one journey, because the app has one; it grows with the app.

Both must be reliable enough that red means "the app is broken", never "the harness is flaky".

4. Fill the command contract

Replace every TODO in CLAUDE.md's command-contract section with real commands. Wire check/test/build into the gates job of .github/workflows/ci.yml, above the generated-file drift step that ends that job, and smoke into its smoke job; as a PR gate rather than a per-round command, smoke can afford to be slower, as long as it stays reliable. The drift step assumes a hermetic build, so confirm it passes on a clean tree: anything the contract rewrites on every run belongs in .gitignore, or the command needs fixing. Also add the stack's package ecosystem to .github/dependabot.yml if it introduces one that isn't covered (npm is already active for the repo's toolchain; keep updates grouped). Then verify each contract entry by running it; a command that hasn't run green doesn't go in. Keep check/test/build fast and deterministic: they gate every inner-loop round.

5. Releases and deploys

Releasing (versioning, notes, tags) and deploying (shipping an app somewhere) are separate lifecycles; set them up separately. Do this now if the stack makes it cheap, otherwise leave it to the "Set up releases and deploys" backlog item for when there is something to release. What done looks like:

  • Each releasable app/package can be versioned and released on its own, with tooling that fits the stack (changesets, release-please manifest mode, release-plz, ...).
  • Releasing collects the user-facing notes PRs ship with (a CLAUDE.md convention) into the release notes, so pick tooling with a place for such notes and wire up what "a note" concretely is (a changeset file, a changelog fragment, ...). The commit log never becomes release notes.
  • Each deployable app has its own deploy workflow with its own trigger and steps (cloud deploy, package publish, docs site, ...).
  • Any new action is pinned to a full commit SHA.

6. Configure the repo on GitHub

Skip if the repo has no GitHub remote. All of this is gh work:

  • Protect the default branch with a ruleset (rulesets, not classic branch protection): pull requests required before merging with review threads resolved, the ci.yml jobs required to pass and pinned to the GitHub Actions integration (so only real workflow runs can satisfy them), force pushes and branch deletion blocked. Require an approving review when more than one human maintains the repo. This turns the "agents open PRs; humans merge" convention into something enforced. (GitHub doesn't enforce rulesets on free-plan private repos; if that applies, say so and move on.)
  • Add a tag ruleset making all tags immutable: creation stays open for release tooling; moving or deleting a tag is blocked.
  • Create the agent and in-progress labels, and allow GitHub Actions to create pull requests, so the headless loop (agent-task.yml) can run.
  • Enable auto-delete of merged branches (gh repo edit --delete-branch-on-merge). Besides the hygiene, stacked PRs only retarget to the default branch when their base branch is deleted at merge.
  • Offer a kanban board: a GitHub Project linked to the repo, its Status field extended with "In Review" and "Blocked", built-in workflows enabled (auto-add from the repo, closed items to Done), and the PROJECT_URL repo variable set so board-sync.yml can mirror issue state onto it. Live status sync in CI additionally needs a classic PAT with project scope saved as the PROJECT_TOKEN secret (GITHUB_TOKEN cannot access Projects v2); the user creates that themselves. The board is a human view; the backlog rules in CLAUDE.md own what counts as truth.

The auth secret for the CI modes stays manual: the user adds CLAUDE_CODE_OAUTH_TOKEN (from claude setup-token, billing their subscription) or ANTHROPIC_API_KEY themselves.

7. Finish

  • Update the README title/intro to name the project (keep the loop documentation).
  • Mark the "Set up the stack" task done in BACKLOG.md (or close the issue).
  • Suggest next steps: add the auth secret if they want the CI modes, then /pm or /build to start the loop.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.