Skip to content
cccskills
FreePublished on GitHub

add-script

install/ 配下に新しいセットアップ用シェルスクリプトを追加するスキル

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

add-script スキル

install/ 配下に冪等なセットアップ用シェルスクリプトを追加し、必要に応じて setup.sh に組み込む。

手順

1. 配置先を決める

2. スクリプトを作成する

以下のテンプレートをベースに対象ファイルを作成する。

#!/usr/bin/env bash
# <スクリプトの説明>
# Usage: ./install/<type>/<name>.sh

set -euo pipefail

# 冪等性チェック: 処理済みなら早期終了
if <already_done_condition>; then
  echo "<name>: already done. Skipping."
  exit 0
fi

# 本処理

必須ルール:

  • #!/usr/bin/env bash を使う
  • set -euo pipefail を入れる
  • 処理の先頭で「すでに適用済みか」を確認し、済みなら exit 0 する
  • CI で分岐が必要なら [ "${CI:-}" = "true" ] を使う

3. 実行権限を付与する

chmod +x install/<type>/<name>.sh

git は実行ビットを追跡するため、実行権限を付与した状態でコミットする。

4. shellcheck を実行する

shellcheck install/<type>/<name>.sh

警告とエラーを解消する。

5. 必要なら setup.sh に組み込む

セットアップフローに含める場合は該当する setup.sh に追記する。

echo "==> <説明>..."
"$REPO_DIR/install/<type>/<name>.sh"

6. 変更を検証してコミットする

必要に応じて関連するセットアップフローを確認し、コミットが必要なら git-commit 系のスキルや通常の git 手順を使う。

注意事項

  • sudo が必要な処理は CI でスキップする: [ "${CI:-}" = "true" ] && { echo "skip in CI"; exit 0; }
  • 外部コマンドに依存する場合は command -v <cmd> で存在確認する
  • REPO_DIR が必要なら REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)" のように階層に応じて組み立てる
  • echo より printf の方が shellcheck 的に安全な場面がある

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

modules/npm/packages/ に新しい npm/pnpm パッケージを追加するスキル

The English summary is being prepared. Showing the original description.

rito528/dotfiles2Updated Oct 18, 2026

GitHub issue を新規作成・下書きするとき、または既存 issue の本文を書き直すときに必ず使うスキル。「issue を作って」「issue 化して」「これを issue にまとめて」のような依頼で発火し、`gh issue create` を直接呼ぶ前に必ず参照する。人間が合意した内容だけを、意味を足さずに issue へ残すための基準を定める。

The English summary is being prepared. Showing the original description.

rito528/dotfiles2Updated Oct 18, 2026

GitHub に Pull Request を作成するスキル。ユーザーが「PRを作って」「プルリクエストを出して」「PR作成して」と言ったとき、またはコミット済みの変更をレビューに出したいときに使用する。

The English summary is being prepared. Showing the original description.

rito528/dotfiles2Updated Oct 18, 2026

ドメインモデル、可視性、操作可能性、不変条件、層境界、API 設計に関わる実装時に使う。不正な状態や誤った呼び出し方を、型、関数の境界、ドメイン語彙で表し、正しい使い方が自然になる設計へ寄せるためのスキル。

The English summary is being prepared. Showing the original description.

rito528/dotfiles2Updated Oct 18, 2026

コミットやPR作成の前に、作業ブランチが適切かどうかを確認・切り替えるスキル。git-commit や create-pr からサブルーチンとして呼び出される。

The English summary is being prepared. Showing the original description.

rito528/dotfiles2Updated Oct 18, 2026

コードを実装・修正・リファクタリングするすべてのタスクで使うスキル。純粋関数を中心に設計し、副作用(DB、HTTP、ファイル、時刻、乱数、ログなど)を境界へ寄せ、データ変換、エラー表現、コレクション操作、可変状態の扱いを既存コードに合う形で整理する。ユーザーが明示的に指示しなくても、言語を問わず、コードを書き始める前に発火する。設定値やドキュメントだけの変更では不要。

The English summary is being prepared. Showing the original description.

rito528/dotfiles2Updated Oct 18, 2026

See all skills by rito528

Report a problem with this skill