agentleFS
garthcodesgarthcodes/claude-skills/skills/build-feature-remote/SKILL.md

build-feature-remote

Skill2 starsChanged 35 days agoMITView on GitHub

Kick off /build-feature as a one-shot cloud routine on Opus, given a PRD path — for builds you don't want to babysit locally

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Read the PRD at ${1}.

    line 16
  2. Very specific:

    If ${1} is empty or not provided, fall back to the most recent PRD:

    line 18
  3. Very specific:

    If no PRD is found, tell the user and stop (suggest /prd).

    line 22
  4. Very specific:

    If the file is untracked, has uncommitted changes, or has commits that haven't reached origin, put it on its own docs branch and push that …

    line 39
  5. Very specific:

    If the PRD is already on origin/main, push nothing and tell the cloud run to branch off main.

    line 50
  6. Distinctive:

    If the push is rejected, stop and tell the user rather than forcing anything (never force-push).

    line 51
  7. Very specific:

    Acceptance-criteria contract: check whether .claude/acceptance-criteria/${FEATURE_NAME}.md exists locally.

    line 54
  8. Distinctive:

    No browser-based QA/system-test verification will run remotely (no Playwright MCP connected) — those phases will be skipped and flagged in …

    line 149
  9. Distinctive:

    Do not poll or wait for it to complete — this skill's job ends once the routine is created.

    line 153

≈ “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

Build Feature Remote: Run /build-feature in the Cloud

Creates a one-time cloud routine (via the RemoteTrigger API) that runs the /build-feature pipeline against a PRD, entirely in Anthropic's cloud infrastructure on the Opus model. This skill only launches the remote run — it does not execute the pipeline itself and does not block waiting for it to finish.

Step 1: Resolve the PRD

Read the PRD at ${1}.

If ${1} is empty or not provided, fall back to the most recent PRD:

ls -t .claude/prds/*.md 2>/dev/null | head -1

If no PRD is found, tell the user and stop (suggest /prd).

From the PRD extract:

  • Feature slug — declared in the header (*Feature slug: feature-slug*) if present. Use it verbatim as FEATURE_NAME. Otherwise kebab-case the filename.
  • Feature name / executive summary — for the routine name and remote prompt context.

Step 2: Make sure the PRD exists on origin/main

The cloud routine clones your repository (https://github.com/<owner>/<repo>) fresh — it will not see any local uncommitted or unpushed files. Check the PRD's status:

git status --porcelain -- "${PRD_PATH}"
git log origin/main..HEAD -- "${PRD_PATH}"
  • If the file is untracked, has uncommitted changes, or has commits that haven't reached origin, put it on its own docs branch and push that branch — never push to main:
    git switch -c "docs/prd-${FEATURE_NAME}"        # or `git switch` to it if it already exists
    git add "${PRD_PATH}"
    git commit -m "docs: add PRD for cloud build (${FEATURE_NAME})"
    git push -u origin "docs/prd-${FEATURE_NAME}"
    git switch -                                     # back to where the user was
    The cloud run branches its feature branch off docs/prd-${FEATURE_NAME}, so the PRD commit ships inside the feature PR and gets reviewed with it.
  • If the PRD is already on origin/main, push nothing and tell the cloud run to branch off main.
  • If the push is rejected, stop and tell the user rather than forcing anything (never force-push).
  • Tell the user what you committed/pushed, if anything.

Acceptance-criteria contract: check whether .claude/acceptance-criteria/${FEATURE_NAME}.md exists locally. If it does, run the same status check on it and commit/push it alongside the PRD on the same docs branch (same docs-only commit is fine: docs: add PRD + acceptance criteria for cloud build (${FEATURE_NAME})) — the remote /build-feature gates on this file, so a reviewed contract left unpushed would be silently regenerated unreviewed. If it does not exist, note to the user that the remote /build-feature will generate it (/acceptance-criteria) and review it (/review-acceptance-criteria) itself before planning.

Step 3: Compose the remote prompt

The cloud agent starts with zero conversation context, so the prompt must be fully self-contained:

Run the /build-feature skill against the PRD at ${PRD_PATH}.
Invoke it as the slash command: /build-feature ${PRD_PATH}

Context (read before starting): this is the application's Rails 8 codebase.
Read CLAUDE.md and the full PRD at ${PRD_PATH} first, then follow /build-feature's own
pipeline and autonomous-execution policy end to end.

You are running unattended in a headless cloud environment:
- No local machine access.
- No Playwright/browser MCP connector is available here. If a pipeline phase needs
  browser-based verification (e.g. /execute-qa, /system-test-expert, /fix-system-test),
  skip only that phase, clearly note in the PR description that browser verification was
  skipped, and continue rather than aborting the pipeline. Fall back to the non-browser
  test suite (bin/ci, rspec) wherever possible instead.
- Start from the PRD's branch: `git fetch origin docs/prd-${FEATURE_NAME} && git switch -c
  feature/${FEATURE_NAME} origin/docs/prd-${FEATURE_NAME}` (or off origin/main if Step 2
  pushed nothing). Never commit or push directly to main.
- Carry the pipeline all the way through to opening a pull request against main on
  github.com/<owner>/<repo>. Nobody is watching, so don't wait for confirmation: where the
  pipeline would normally ask, take the recommended option and record it, and record
  unresolved issues in the PR's Known Issues section per /build-feature's own
  error-handling policy. The run's guards still apply: the PR is the only output, nothing
  is merged, and nothing touches production.

At the end, report what was built, what passed, what was skipped, and the PR URL.

Step 4: Create the one-time cloud routine

Load the tool if needed: ToolSearch select:RemoteTrigger.

Get the current time (do not guess):

date -u +%Y-%m-%dT%H:%M:%SZ

Set run_once_at to ~2 minutes after that, as an RFC3339 UTC timestamp.

Generate a fresh lowercase v4 UUID for events[].data.uuid.

Call RemoteTrigger:

{
  "action": "create",
  "body": {
    "name": "build-feature: ${FEATURE_NAME}",
    "run_once_at": "<computed timestamp>",
    "job_config": {
      "ccr": {
        "environment_id": "<your-environment-id>",
        "session_context": {
          "model": "<model-id>",
          "sources": [{"git_repository": {"url": "https://github.com/<owner>/<repo>"}}],
          "allowed_tools": ["Bash", "Read", "Write", "Edit", "Glob", "Grep", "Skill", "Task", "Agent", "Workflow", "WebFetch"]
        },
        "events": [{"data": {
          "uuid": "<fresh uuid>",
          "session_id": "",
          "type": "user",
          "parent_tool_use_id": null,
          "message": {"content": "<composed prompt from Step 3>", "role": "user"}
        }}]
      }
    }
  }
}

<your-environment-id> is the id of the cloud environment you set up for this repo (list yours with RemoteTrigger action: "list" and ask the user if there is more than one). <model-id> is the most capable model available to you; a long unattended pipeline is where it pays for itself.

Task, Agent, and Workflow are included in allowed_tools because /build-feature launches its own sub-agents internally (nine sequential phase agents sharing one worktree — the first is worktree-isolated, the rest work in that same worktree — plus Sonnet implementation workers launched by the implement/review/trace agents).

Step 5: Report back

Relay the created routine's ID and link: https://claude.ai/code/routines/{id}. Tell the user:

  • It will fire in ~2 minutes
  • No browser-based QA/system-test verification will run remotely (no Playwright MCP connected) — those phases will be skipped and flagged in the eventual PR
  • They can check progress at the link above, or ask to run RemoteTrigger get on the routine

Do not poll or wait for it to complete — this skill's job ends once the routine is created.

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.