agentsclimarketplace

Build

Skill AnotherSava/claude-code-common/claude/skills/build

Configure build script and run itFrom its SKILL.md

Install
npx -y skills add AnotherSava/claude-code-common --skill build

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

7.1 KB, ~1.9k tokens by cl100k_base, as published. Nobody here has run it

See ~/.claude/learnings/shell-environment.md for the expected bash functions and verification checklist.

Context

  • Shell rc target: !case "$(uname -s)" in Darwin) echo "~/.zshrc" ;; MINGW*|MSYS*|CYGWIN*) echo "~/.bashrc" ;; *) [ -n "$ZSH_VERSION" ] || [ "${SHELL##*/}" = "zsh" ] && echo "~/.zshrc" || echo "~/.bashrc" ;; esac
  • Build function in shell rc: !cat ~/.bashrc ~/.zshrc ~/.bash_profile ~/.zprofile 2>/dev/null | grep -c "build()" || echo 0
  • run_repo_script helper in shell rc: !cat ~/.bashrc ~/.zshrc ~/.bash_profile ~/.zprofile 2>/dev/null | grep -c "run_repo_script()" || echo 0
  • Wrapper script exists: !test -f scripts/build.sh && echo yes || echo no
  • GitHub workflow: !ls .github/workflows/*.yml 2>/dev/null || echo none

1. Check prerequisites

  1. If Build function in shell rc is 0, append the build wrapper to the file in Shell rc target (i.e. ~/.zshrc on macOS, ~/.bashrc on Windows Git Bash / Linux-bash). It delegates to the shared run_repo_script helper, which walks up from the current directory to the repo's scripts/build.sh and runs it from the directory that holds it — so build works from any subdirectory. If run_repo_script helper in shell rc is 0, append the helper too (the deploy skill installs the same one — add it only when missing, so it isn't duplicated):
    run_repo_script() { local rel="$1"; shift; local d="$PWD"; while [ "$d" != "/" ] && [ ! -f "$d/$rel" ]; do d="$(dirname "$d")"; done; if [ -f "$d/$rel" ]; then ( cd "$d" && bash "$rel" "$@" ); else echo "No $rel in this directory or any parent"; fi; }
    build() { run_repo_script scripts/build.sh "$@"; }
    

2. Set up quick build shortcut

  1. If Wrapper script exists is no, create scripts/build.sh:
    #!/bin/bash
    bash ~/.claude/skills/build/scripts/build.sh "$@"
    
  2. Keep the wrapper out of git via the global excludes file — never the project's .gitignore (it's a per-machine artifact only this skill generates). Ensure the global excludes file contains the line scripts/build.sh:
    gi="$(git config --global core.excludesfile)"; gi="${gi/#\~/$HOME}"; gi="${gi:-$HOME/.gitignore}"
    grep -qxF 'scripts/build.sh' "$gi" 2>/dev/null || {
      grep -qF 'per-machine wrappers written by Claude Code' "$gi" 2>/dev/null \
        || printf '\n# per-machine wrappers written by Claude Code deploy/build skills — never committed\n' >> "$gi"
      printf 'scripts/build.sh\n' >> "$gi"
    }
    

3. Configure GitHub Actions CI (optional)

If GitHub workflow is none:

  1. Ask the user: "No GitHub Actions workflow found. Set up CI for push/PR builds?"
  2. If declined, skip to step 4.
  3. Detect project type and parameters (see below).
  4. Generate the workflow, show it to the user for approval.
  5. On approval: mkdir -p .github/workflows, then write .github/workflows/build.yml.

Project type detection

CheckHowType
test -d src-tauridirectory existsTauri
test -f package.jsonfile exists (and not Tauri)npm
find . -maxdepth 2 -name '*.csproj'csproj founddotnet

Parameter detection

npm:

  • Node version: if .nvmrc exists → use node-version-file: .nvmrc (stays in sync). Else read engines.node from package.json → use minimum major. Else default 24 (current active LTS).
  • Lint: include npm run lint step only if package.json has a scripts.lint entry.
  • Test: include npm test step only if package.json has a scripts.test that is not the default echo "Error: no test specified" && exit 1.

dotnet:

  • .NET version: global.json sdk.version{major}.x. Else parse TargetFramework from csproj (net9.09.x). Default 9.x.
  • Runner: if csproj contains <RuntimeIdentifier>win- or <UseWPF> or <UseWindowsForms>windows-latest. Else ubuntu-latest.
  • Test: include test step only if tests/ directory exists.

Tauri:

  • Node version: same logic as npm.
  • Runner: matrix build — windows-latest and macos-latest. Each runner uses its native Rust target (x86_64 on Windows, aarch64 on macOS ARM runners).
  • Rust cache: always include Swatinem/rust-cache@v2 with workspaces: src-tauri -> target.

Reference workflows

Generate .github/workflows/build.yml following these patterns. Omit commented lines that don't apply; do not leave comments in the output.

npm (reference: bga-assistant):

name: Build

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5

      - uses: actions/setup-node@v5
        with:
          node-version-file: .nvmrc  # or node-version: '24' if no .nvmrc
          cache: npm

      - run: npm ci

      - run: npm run lint    # omit if no lint script

      - run: npm run build

      - run: npm test        # omit if no real test script

dotnet (reference: crop-stage):

name: Build

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest  # or windows-latest for Windows-only targets
    steps:
      - uses: actions/checkout@v5

      - uses: actions/setup-dotnet@v4
        with:
          dotnet-version: '9.x'

      - run: dotnet restore

      - run: dotnet build -c Release --no-restore

      - run: dotnet test tests/ -c Release --no-restore  # omit if no tests/ dir

Tauri (reference: tauri-dashboard):

name: Build

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    strategy:
      matrix:
        os: [windows-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v5

      - uses: actions/setup-node@v5
        with:
          node-version: '24'  # or node-version-file: .nvmrc
          cache: npm

      - uses: dtolnay/rust-toolchain@stable

      - uses: Swatinem/rust-cache@v2
        with:
          workspaces: src-tauri -> target

      - run: npm ci

      - run: cargo test --manifest-path src-tauri/Cargo.toml --lib

      - run: npm run build

4. Build

If step 1 or 2 made changes, tell the user:

The build shortcut has been configured. Restart Claude Code for ! build to work — the shell reads its rc file only at startup, so new functions aren't available until the next session.

For now, running the build directly:

Run the build script directly (bypassing the shell function):

bash ~/.claude/skills/build/scripts/build.sh

Report the output to the user. If it fails, analyze the error and suggest a fix. On success, remind the user to restart Claude Code if they haven't already, then ! build will work.

What ships with it: 1 file

437 B alongside SKILL.md, 1 of them executable

scripts/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.