Communitygithub.com

alfathafp/ポートフォリオWebデザイン

新しいスキルを作成するとき、既存のスキルを編集するとき、またはデプロイ前にスキルの動作を確認するときに使用します。

ポートフォリオWebデザイン とは?

このスキルは、テスト駆動開発(TDD)の原則をプロセスドキュメントに適用するためのガイドです。AIエージェントがスキルを作成、編集、検証する際に、RED-GREEN-REFACTORサイクルに従って正しい行動を学習できるように設計されています。Claude Code、Codex、Copilot CLI、Gemini CLIなど、複数のAIランタイムで動作し、スキルの発見性(SDO)を最適化するための記述ルールやキーワード戦略も含まれます。エージェントがスキルなしで失敗する様子を観察してからドキュメントを作成するという「鉄の掟」が核心であり、これにより効果的なスキル育成が実現します。

対応✓Claude Code✓Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/alfathafp/portofolio-web-design/tree/HEAD/.agents/skills/writing-skills

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

スキルの作成

概要

スキル作成は、テスト駆動開発をプロセスドキュメントに適用したものです。

個人スキルは、ランタイムのスキルディレクトリ(Claude Codeの場合は~/.claude/skills/)に配置されます。他のランタイムのパスについては、codex-tools.mdまたはgemini-tools.mdを参照してください。Codex、Copilot CLI、Gemini CLIはすべて、クロスランタイムエイリアスとして~/.agents/skills/も認識します。

テストケース(サブエージェントを用いた圧力シナリオ)を作成し、失敗を観察し(ベースライン動作)、スキルを作成し(ドキュメント)、テストがパスすることを確認し(エージェントが準拠)、リファクタリングします(抜け穴を塞ぐ)。

基本原則: スキルなしでエージェントが失敗するのを観察しなければ、そのスキルが正しいことを教えているかどうかはわかりません。

必須の前提知識: このスキルを使用する前に、superpowers:test-driven-developmentを理解している必要があります。このスキルは、基本的なRED-GREEN-REFACTORサイクルを定義しています。このスキルは、TDDをドキュメントに適用します。

公式ガイダンス: Anthropicの公式スキル作成のベストプラクティスについては、anthropic-best-practices.mdを参照してください。このドキュメントは、TDDに焦点を当てたこのスキルを補完する追加のパターンとガイドラインを提供します。

スキルとは何か?

スキルとは、実証済みのテクニック、パターン、ツールのためのリファレンスガイドです。スキルは、将来のエージェントが効果的なアプローチを見つけて適用するのに役立ちます。

スキルとは: 再利用可能なテクニック、パターン、ツール、リファレンスガイドです。

スキルではありません: かつてどのように問題を解決したかというナラティブです。

スキルのためのTDDマッピング

TDDの概念スキル作成
テストケースサブエージェントを用いた圧力シナリオ
プロダクションコードスキルドキュメント (SKILL.md)
テスト失敗 (RED)スキルなしでエージェントがルールに違反する(ベースライン)
テストパス (GREEN)スキルがある状態でエージェントが準拠する
リファクタリング準拠を維持しながら抜け穴を塞ぐ
最初にテストを書くスキルを書く前にベースラインシナリオを実行する
失敗を観察するエージェントが使用する正確な理屈を文書化する
最小限のコードそれらの特定の違反に対処するスキルを書く
パスを観察するエージェントが準拠していることを確認する
リファクタリングサイクル新しい理屈を見つける → 塞ぐ → 再確認する

スキル作成プロセス全体は、RED-GREEN-REFACTORに従います。

いつスキルを作成するか

作成する場合:

  • テクニックが直感的に明らかではなかった場合
  • プロジェクト間で再度参照する場合
  • パターンが広く適用できる場合(プロジェクト固有ではない)
  • 他の人が恩恵を受ける場合

作成しない場合:

  • 一度きりの解決策
  • 他の場所で十分に文書化されている標準的なプラクティス
  • プロジェクト固有の規約(instructionsファイルに記述)
  • 機械的な制約(正規表現やバリデーションで強制できる場合は、自動化してください。判断が必要なもののためにドキュメントを残しておいてください)

スキルの種類

テクニック

従うべきステップがある具体的な方法(condition-based-waiting、root-cause-tracing)

パターン

問題の考え方(flatten-with-flags、test-invariants)

リファレンス

APIドキュメント、構文ガイド、ツールドキュメント(office docs)

ディレクトリ構造

skills/
  skill-name/
    SKILL.md              # メインリファレンス(必須)
    supporting-file.*     # 必要な場合のみ

フラットな名前空間 - すべてのスキルは1つの検索可能な名前空間にあります。

別ファイルにするもの:

  1. 重いリファレンス(100行以上)- APIドキュメント、包括的な構文
  2. 再利用可能なツール - スクリプト、ユーティリティ、テンプレート

インラインで維持するもの:

  • 原則と概念
  • コードパターン(50行未満)
  • その他すべて

SKILL.mdの構造

フロントマター(YAML):

  • 必須フィールドは2つ:name と description(サポートされているすべてのフィールドについては agentskills.io/specification を参照)
  • 合計最大1024文字
  • name: 文字、数字、ハイフンのみを使用(括弧、特殊文字は使用しない)
  • description: 第三人称で、いつ使用するかのみを記述(何をするかは記述しない)
    • 「Use when...」で始めて、トリガーとなる条件に焦点を当てる
    • 具体的な症状、状況、コンテキストを含める
    • スキルのプロセスやワークフローを決して要約しない(理由はSDOセクションを参照)
    • 可能であれば500文字未満に抑える
---
name: Skill-Name-With-Hyphens
description: Use when [具体的なトリガー条件と症状]
---

# スキル名

## 概要
これは何ですか? 1〜2文で核となる原則を。

## いつ使用するか
[判断が明白でない場合は、小さなインラインフローチャート]

症状とユースケースの箇条書きリスト
使用してはいけない場合

## コアパターン(テクニック/パターンの場合)
Before/Afterのコード比較

## クイックリファレンス
一般的な操作をスキャンするための表または箇条書き

## 実装
シンプルなパターンのためのインラインコード
重いリファレンスや再利用可能なツールのためのファイルへのリンク

## よくある間違い
何が問題になるか + 修正方法

## 現実世界での影響(オプション)
具体的な結果

スキル発見性最適化 (SDO)

発見性にとって重要: 将来のエージェントがあなたのスキルを見つける必要があります。

1. リッチな説明フィールド

目的: エージェントは説明を読んで、特定のタスクに対してどのスキルをロードするかを決定します。次の質問に答えさせてください:「今、このスキルを読むべきですか?」

形式: 「Use when...」で始めて、トリガー条件に焦点を当てる

重要: 説明 = いつ使用するか、スキルが何をするかではない

説明はトリガー条件のみを記述する必要があります。スキルのプロセスやワークフローを説明の中で要約してはいけません。

なぜこれが重要なのか: テストの結果、説明がスキルのワークフローを要約していると、エージェントがスキル全体の内容を読む代わりに説明に従ってしまう可能性があることが明らかになりました。「タスク間でコードレビューを行う」という説明により、エージェントはスキルのフローチャートが明確に2回のレビュー(仕様準拠、次にコード品質)を示しているにもかかわらず、1回のレビューしか行わなくなりました。

説明が「独立したタスクを持つ実装計画を実行するときに使用」というように変更されると(ワークフローの要約なし)、エージェントは正しくフローチャートを読んで2段階のレビュープロセスに従いました。

落とし穴: ワークフローを要約する説明は、エージェントが取る近道を作り出します。スキル本体は、エージェントがスキップするドキュメントになります。

# ❌ 悪い例: ワークフローを要約 - エージェントがこれを読んでスキルを読まない可能性がある
description: Use when executing plans - dispatches subagent per task with code review between tasks

# ❌ 悪い例: プロセスの詳細が多すぎる
description: Use for TDD - write test first, watch it fail, write minimal code, refactor

# ✅ 良い例: トリガー条件のみ、ワークフローの要約なし
description: Use when executing implementation plans with independent tasks in the current session

# ✅ 良い例: トリガー条件のみ
description: Use when implementing any feature or bugfix, before writing implementation code

内容:

  • このスキルが適用されることを示す具体的なトリガー、症状、状況を使用する
  • 言語固有の症状(setTimeout、sleep)ではなく、問題(競合状態、不安定な動作)を記述する
  • スキル自体が技術固有でない限り、トリガーは技術に依存しないようにする
  • スキルが技術固有の場合は、それをトリガーで明示する
  • 第三人称で書く(システムプロンプトに注入される)
  • スキルのプロセスやワークフローを決して要約しない
# ❌ 悪い例: 抽象的、曖昧、いつ使用するかが含まれていない
description: For async testing

# ❌ 悪い例: 一人称
description: I can help you with async tests when they're flaky

# ❌ 悪い例: スキルが特定の技術に依存していないのに技術に言及している
description: Use when tests use setTimeout/sleep and are flaky

# ✅ 良い例: 「Use when」で始まり、問題を記述し、ワークフローなし
description: Use when tests have race conditions, timing dependencies, or pass/fail inconsistently

# ✅ 良い例: 特定の技術スキルで明示的なトリガー
description: Use when using React Router and handling authentication redirects

2. キーワードカバレッジ

エージェントが検索しそうな単語を使用する:

  • エラーメッセージ: 「Hook timed out」、「ENOTEMPTY」、「race condition」
  • 症状: 「flaky」、「hanging」、「zombie」、「pollution」
  • 同義語: 「timeout/hang/freeze」、「cleanup/teardown/afterEach」
  • ツール: 実際のコマンド、ライブラリ名、ファイルタイプ

3. 説明的な命名

能動態を使用し、動詞を先頭に:

  • ✅ creating-skills(skill-creation ではない)
  • ✅ condition-based-waiting(async-test-helpers ではない)

4. トークン効率(重要)

問題: getting-started や頻繁に参照されるスキルは、すべての会話にロードされます。すべてのトークンが重要です。

目標の単語数:

  • getting-started ワークフロー: 各150語未満
  • 頻繁にロードされるスキル: 合計200語未満
  • その他のスキル: 500語未満(それでも簡潔に)

テクニック:

詳細をツールヘルプに移動する:

# ❌ 悪い例: すべてのフラグをSKILL.mdに文書化する
search-conversations は --text, --both, --after DATE, --before DATE, --limit N をサポート

# ✅ 良い例: --help を参照する
search-conversations は複数のモードとフィルターをサポートしています。詳細は --help を実行してください。

相互参照を使用する:

# ❌ 悪い例: ワークフローの詳細を繰り返す
検索するときは、テンプレートを使用してサブエージェントをディスパッチします...
[20行の繰り返し指示]

# ✅ 良い例: 別のスキルを参照する
常にサブエージェントを使用します(50〜100倍のコンテキスト節約)。必須: ワークフローには [other-skill-name] を使用してください。

例を圧縮する:

# ❌ 悪い例: 冗長な例(42語)
あなたの人間のパートナー: 「以前、React Router で認証エラーをどのように処理しましたか?」
あなた: 過去の会話を検索して、React Router の認証パターンを探します。
[サブエージェントを検索クエリ「React Router authentication error handling 401」でディスパッチ]

# ✅ 良い例: 最小限の例(20語)
パートナー: 「React Router で認証エラーをどのように処理しましたか?」
あなた: 検索中...
[サブエージェントをディスパッチ → 統合]

冗長性を排除する:

  • 相互参照されたスキルにあることを繰り返さない
  • コマンドから明らかなことを説明しない
  • 同じパターンの複数の例を含めない

検証:

wc -w skills/path/SKILL.md
# getting-started ワークフロー: 各150語未満を目標
# その他の頻繁にロードされるもの: 合計200語未満を目標

あなたが行うことや核となる洞察に基づいて名前を付ける:

  • ✅ condition-based-waiting > async-test-helpers
  • ✅ using-skills > skill-usage
  • ✅ flatten-with-flags > data-structure-refactoring
  • ✅ root-cause-tracing > debugging-techniques

動名詞 (-ing) はプロセスに適しています:

  • creating-skills、testing-skills、debugging-with-logs
  • 能動的で、あなたが行っているアクションを説明します

5. 他のスキルへの相互参照

他のスキルを参照するドキュメントを書く場合:

スキル名のみを使用し、明示的な要件マーカーを付ける:

  • ✅ 良い例: **必須のサブスキル:** superpowers:test-driven-development を使用
  • ✅ 良い例: **必須の前提知識:** superpowers:systematic-debugging を理解している必要があります
  • ❌ 悪い例: skills/testing/test-driven-development を参照(必須かどうか不明瞭)
  • ❌ 悪い例: @skills/testing/test-driven-development/SKILL.md(強制ロード、コンテキストを消費)

@リンクがなぜダメか: @ 構文はファイルを即座に強制ロードし、必要になる前に20万以上のコンテキストを消費します。

フローチャートの使用

digraph when_flowchart {
    "情報を表示する必要がありますか?" [shape=diamond];
    "間違える可能性がある判断ですか?" [shape=diamond];
    "マークダウンを使用" [shape=box];
    "小さなインラインフローチャート" [shape=box];

    "情報を表示する必要がありますか?" -> "間違える可能性がある判断ですか?" [label="はい"];
    "間違える可能性がある判断ですか?" -> "小さなインラインフローチャート" [label="はい"];
    "間違える可能性がある判断ですか?" -> "マークダウンを使用" [label="いいえ"];
}

フローチャートは以下の場合にのみ使用する:

  • 明白でない判断ポイント
  • 途中で止めてしまう可能性のあるプロセスループ
  • 「AとBのどちらを使用するか」の判断

フローチャートを決して使用しない場合:

  • リファレンス資料 → 表、リスト
  • コード例 → マークダウンブロック
  • 線形の指示 → 番号付きリスト
  • 意味論的な意味のないラベル(step1、helper2)

グラフビューのスタイルルールについては、このディレクトリの graphviz-conventions.dot を参照してください。

人間のパートナーに可視化する: このディレクトリの render-graphs.js を使用して、スキルのフローチャートをSVGにレンダリングします:

node ./render-graphs.js ../some-skill           # 各図を個別に
node ./render-graphs.js ../some-skill --combine # すべての図を1つのSVGに

コード例

1つの優れた例は、多くの中程度の例に勝ります

最も関連性の高い言語を選択:

  • テストテクニック → TypeScript/JavaScript
  • システムデバッグ → Shell/Python
  • データ処理 → Python

良い例:

  • 完全で実行可能
  • なぜなのかを説明するコメントが適切
  • 実際のシナリオからのもの
  • パターンを明確に示している
  • 適応する準備ができている(汎用テンプレートではない)

しないこと:

  • 5つ以上の言語で実装する
  • 穴埋めテンプレートを作成する
  • こじつけの例を書く

あなたは移植が得意です - 1つの優れた例で十分です。

ファイル構成

自己完結型スキル

defense-in-depth/
  SKILL.md    # すべてインライン

いつ: すべてのコンテンツが収まり、重いリファレンスが不要な場合

再利用可能なツールを含むスキル

condition-based-waiting/
  SKILL.md    # 概要 + パターン
  example.ts  # 適応するための動作するヘルパー

いつ: ツールが再利用可能なコードであり、単なるナラティブではない場合

重いリファレンスを含むスキル

pptx/
  SKILL.md       # 概要 + ワークフロー
  pptxgenjs.md   # 600行のAPIリファレンス
  ooxml.md       # 500行のXML構造
  scripts/       # 実行可能なツール

いつ: リファレンス資料がインラインでは大きすぎる場合

バンドルされたスクリプトは、散文の中でインタプリタを介して呼び出してください(bash scripts/tool.sh、node scripts/tool.js)。ベアパスでは決して呼び出さないでください。一部のハーネスプラグインパッケージャーは実行可能ビットを削除するため、ベアパスのscripts/tool.shはそこで「Permission denied」で失敗します。

鉄の掟(TDDと同じ)

最初に失敗するテストなしにスキルはない

これは新しいスキルと既存のスキルへの編集の両方に適用されます。

テストせずにスキルを書きましたか? 削除してください。最初からやり直してください。 テストせずにスキルを編集しましたか? 同じ違反です。

例外はありません:

  • 「単純な追加」の場合でもダメ
  • 「セクションを追加するだけ」の場合でもダメ
  • 「ドキュメントの更新」の場合でもダメ
  • テストされていない変更を「参考」として保持しない
  • テストの実行中に「適応」しない
  • 削除は削除を意味します

必須の前提知識: superpowers:test-driven-development スキルはここで必須です。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

alfathafp/portofolio-web-design

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

alfathafp/portofolio-web-design

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.

alfathafp/portofolio-web-design

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

alfathafp/portofolio-web-design

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch. Use when asked to review a diff or a pull request, even when the diff is pasted inline.

alfathafp/portofolio-web-design

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

alfathafp/portofolio-web-design

Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.

alfathafp/portofolio-web-design

Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

alfathafp/portofolio-web-design

Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing.

alfathafp/portofolio-web-design

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

alfathafp/portofolio-web-design

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.

alfathafp/portofolio-web-design

Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

alfathafp/portofolio-web-design

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

alfathafp/portofolio-web-design

Records decisions and documentation. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.

alfathafp/portofolio-web-design

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production auth, security-sensitive logic, a high-stakes migration, irreversible operations), or any time a confident output would be cheaper to verify now than to debug later.

alfathafp/portofolio-web-design

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

alfathafp/portofolio-web-design

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

alfathafp/portofolio-web-design

Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.

alfathafp/portofolio-web-design

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple parallel streams. Use when cutting a release, choosing a semantic version bump, tagging, or writing a changelog.

alfathafp/portofolio-web-design

Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or "stress-test my plan".

alfathafp/portofolio-web-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

関連スキル