Communitygithub.com

プロジェクトコンテキスト生成

`.claude/docs/project.md` ファイルを生成または更新し、Claudeにプロジェクト固有のコンテキストを提供します。このスキルは、ユーザーがプロジェクトコンテキストの作成、更新、再生成、リフレッシュを依頼した時、または「project.mdを更新して」「プロジェクトコンテキストを生成して」「このリポジトリにはproject.mdが必要」「Claudeがこのプロジェクトについて知らない」などと言った時に使用します。また、Claudeを新しいリポジトリに初めてオンボーディングする際にもトリガーされます。

プロジェクトコンテキスト生成 とは?

このスキルは、`.claude/docs/project.md` ファイルを自動生成または更新することで、Claudeが各会話でプロジェクト固有のコンテキストを即座に利用できるようにします。READMEが人間向けに書かれるのに対し、project.mdはClaude向けに設計されており、マーケティング的な表現を排し、技術スタック、テストコマンド、アーキテクチャなど、Claudeが効率的に動作するために必要な事実だけを密度高く記述します。このスキルはコードベースの分析(パッケージマネージャー、CI設定、ソースコード構造、データソースの特定)を三段階のプロセスで実行し、不確かな情報はユーザーに確認した上で、所定の構造に従ったproject.mdを出力します。Claude CodeやCodexなどのAIエージェントは、このスキルを呼び出すことで、新しいプロジェクトへの迅速な適応や、既存プロジェクトのコンテキスト更新を自動化でき、会話内での無駄な探索を削減します。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cdcoonce/Portfolio_Website/tree/HEAD/.claude/skills/project-context

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

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

ドキュメント

プロジェクトコンテキスト生成 は何をしますか?

.claude/docs/project.md を作成または更新します。これはClaudeがすべての会話で読み込む、簡潔なプロジェクトリファレンスです。README(人間向けに書かれる)とは異なり、project.mdはClaude向けに書かれます。密度が高く、事実に基づき、マーケティング的な表現はありません。

このスキルが存在する理由

.claude/docs/project.md は CLAUDE.md を介してすべてのClaude会話に自動ロードされます。これがないか古くなっていると、Claudeは技術スタック、テストコマンド、アーキテクチャを再発見するために余分なターンを浪費します。このスキルはその発見を自動化し、正確で簡潔なリファレンスファイルを生成します。

ワークフロー

ステップ 1: コードベースを分析する

プロジェクトの事実を収集するために、構造化された三段階の分析を実行します。すべての事実には確信度レベルをタグ付けします: [confirmed](ソースから読み取った)、[inferred-high](強い証拠がある)、[inferred-low](部分的な証拠がある)、[unknown]。

詳細なツールアクション、glob/grepパターン、レコードテンプレートについては、references/analysis-methodology.md を参照してください。

フェーズ 1 — プロジェクトメタデータ: パッケージマネージャーファイル、環境テンプレート、CI設定、ツールチェーンファイルをglob検索します。以下を抽出: プロジェクト名、言語、Pythonバージョン、依存関係(用途付き)、スクリプト/コマンド、環境変数、CIステージ、テストマーカー。

フェーズ 2 — アーキテクチャスキャン: すべてのソースファイルをglob検索します。エントリポイントを特定し、インポートグラフを構築し、モジュールを分類し(コア/リーフ/オーケストレーター)、アーキテクチャパターンを特定します。ソースコードから参照されている設定ファイルを読み取ります。

フェーズ 3 — データソースとインフラストラクチャ: 外部データソース(データベース、API、ファイル)、出力ターゲット(ファイル、アップロード、API)、テスト構造、カスタム例外階層を特定します。

ステップ 2: 明確化のための質問をする

分析後、[inferred-low] と [unknown] の項目についてユーザーに質問します。焦点を絞ってください — すでにわかっていることについて質問しないでください。よくあるギャップ:

  • プロジェクトの目的: これはどのような問題を解決するのか?(コードから明らかでない場合)
  • データソース: どのシステムがデータを入力し、どこが出力を受け取るのか?
  • デプロイ: これはどのように/どこで実行されるのか?(ローカル、スケジュール実行、クラウド)

コードベースが単純な場合、質問は1〜2個、またはまったく不要なこともあります。

ステップ 3: project.md を生成する

以下の構造を使用してファイルを書き込みます。.claude/docs/project.md がすでに存在する場合は、上書きする前にユーザーに確認します。


出力構造

生成される project.md は以下の構造に従う必要があります。プロジェクトに合わせて詳細度を調整してください — 小規模プロジェクトではセクションをスキップしてもよく、複雑なプロジェクトではサブセクションを追加しても構いません。

# {プロジェクト名} — プロジェクトコンテキスト

{一文の説明: それが何か、何をするか、主要技術。}

## 技術スタック

- **{言語/ランタイム}** — {バージョン制約(既知の場合)}
- **{フレームワーク}** — {用途}
- **{主要ライブラリ}** — {目的}
- ...箇条書き、ツール名を太字にし、目的を注釈する

## プロジェクトレイアウト

```text
{注釈付きディレクトリツリー — エントリごとに短いフレーズ1つ}
```

データフロー

{ソース → 変換 → 出力パイプラインを示すASCII図}

データソース

  • {ソース名} — {それが提供するもの}
  • ...データベース、API、ローカルファイルなど

テストマーカー

  • {テストコマンド} — {実行する内容}
  • {マーカー名} — {ゲートする条件}

主要アーキテクチャパターン

  • {パターン名} ({ファイル}): {一文の説明}
  • ...呼び出す価値のある、明白でないパターンのみ

記述ガイドライン

  • 冗長より密度優先。 すべての行が存在する価値を持つべきです。Claudeに動機や背景説明は不要です — 事実だけで十分です。
  • 汎用より具体優先。 「外部依存関係を除外してテストを実行」よりも「uv run pytest -m 'not snowflake' を実行」の方が優れています。
  • パターンは一文で。 アーキテクチャパターンは各行1つ — 名前、ファイル、説明。
  • 実際のコマンドを使用。 テストコマンドは pyproject.toml やCI設定からコピーし、言い換えたバージョンは使いません。
  • 依存関係に注釈を付ける。 polars とだけリストするのではなく、polars — 高性能DataFrame のようにします。
  • データソースは重要。 Claudeはどのような外部システムが存在するかを知る必要があります。すべてのデータベース、API、ファイルソースをリストしてください。
  • 100行未満に保つ。 project.mdが約100行のコンテンツを超える場合は詳細すぎます — 詳細は専用のドキュメントに移動し、それらにリンクしてください。

出力

ファイルを .claude/docs/project.md として保存します(必要に応じてディレクトリを作成します)。ファイルがすでに存在する場合は、上書きする前に差分サマリーをユーザーに表示します。

project.mdの生成後、CLAUDE.md がそれを参照しているか確認します。参照していない場合は、次のような行を追加することを提案します:

プロジェクト固有の詳細(技術スタック、アーキテクチャ、テストマーカー)については [.claude/docs/project.md](.claude/docs/project.md) を参照してください。

Individual skills in this repo

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

cdcoonce/Portfolio_Website

Git commit workflow with enforced conventional commit style. Use when Claude needs to stage and commit changes, craft commit messages, or the user asks to commit, make a commit, or save their work. Ensures consistent commit message format, proper scoping, and atomic commits across the project.

cdcoonce/Portfolio_Website

AI-powered code quality analysis for Python, Markdown, and Mermaid diagrams. Use this skill when: (1) reviewing code for quality issues, (2) checking Python files for PEP8 violations, unused code, missing type hints, docstring problems, complexity issues, or potential runtime errors, (3) validating Markdown documentation for broken links, heading structure, or formatting issues, (4) validating Mermaid diagram syntax, (5) the user asks for a "code review" or "quality check", (6) analyzing code snippets pasted in conversation, or (7) suggesting and applying fixes for code quality issues.

cdcoonce/Portfolio_Website

Deploy the portfolio chat agent Lambda function to AWS. Use when the user asks to deploy, redeploy, push to Lambda, update the chat agent, or after updating context files or lambda_function.py. Rebuilds the knowledge base, packages dependencies, and deploys to AWS Lambda.

cdcoonce/Portfolio_Website

Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".

cdcoonce/Portfolio_Website

Orchestrate the full GitHub-issues-driven development lifecycle. 7-phase pipeline from brainstorm through PR with state tracking and cross-conversation resume. Use when user says "dev cycle", "development workflow", "full development pipeline", or invokes /dev-cycle.

cdcoonce/Portfolio_Website

Production Python coding standards with automatic version detection (3.10-3.13). Use when writing, reviewing, or refactoring Python to ensure adherence to modern type syntax, LBYL exception handling, pathlib operations, ABC-based interfaces, and production-tested patterns. Not Dagster-specific - applies to any Python project.

cdcoonce/Portfolio_Website

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

cdcoonce/Portfolio_Website

GitHub CLI (gh) integration for managing issues, pull requests, branches,

cdcoonce/Portfolio_Website

Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".

cdcoonce/Portfolio_Website

Explore a codebase to find opportunities for architectural improvement, focusing on making the codebase more testable by deepening shallow modules. Use when user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more AI-navigable.

cdcoonce/Portfolio_Website

CEO/founder-mode plan review. Rethink the problem, find the 10-star product, challenge premises, expand scope when it creates a better product. Three modes: SCOPE EXPANSION (dream big), HOLD SCOPE (maximum rigor), SCOPE REDUCTION (strip to essentials). Use when the user asks for a plan review, CEO review, mega review, or wants a plan challenged/stress-tested before implementation.

cdcoonce/Portfolio_Website

Break a PRD into independently-grabbable GitHub issues using tracer-bullet vertical slices. Use when user wants to convert a PRD to issues, create implementation tickets, or break down a PRD into work items.

cdcoonce/Portfolio_Website

Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in docs/plans/. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions "tracer bullets".

cdcoonce/Portfolio_Website

Generate comprehensive, high-quality README.md files for code repositories. Use this skill whenever the user asks to create, write, generate, update, or improve a README for any project or repository. Also trigger when the user says things like "document this project", "write docs for this repo", "this repo needs a README", "help me onboard developers to this codebase", or asks for project documentation in markdown. Even if the user just says "README" or "readme" in the context of a codebase, use this skill.

cdcoonce/Portfolio_Website

Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

cdcoonce/Portfolio_Website

Set up pre-commit hooks for the current repo. Use when user wants to add pre-commit hooks, configure commit-time linting, formatting, type checking, or testing. Triggers on "pre-commit", "git hooks", "linting hooks", or /setup-pre-commit.

cdcoonce/Portfolio_Website

Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.

cdcoonce/Portfolio_Website

Triage a bug or issue by exploring the codebase to find root cause, then create a GitHub issue with a TDD-based fix plan. Use when user reports a bug, wants to file an issue, mentions "triage", or wants to investigate and plan a fix for a problem.

cdcoonce/Portfolio_Website

Rewrites the prose sections of wiki pages in-place. Reads source files to understand current context, then updates only the content inside <!-- claude:prose --> ... <!-- claude:prose:end --> markers. Never touches <!-- generated:start --> ... <!-- generated:end --> blocks. Supports targeting a single page with /update-wiki {PageName}.

cdcoonce/Portfolio_Website

Create a PRD through user interview, codebase exploration, and module design, then submit as a GitHub issue. Use when user wants to write a PRD, create a product requirements document, or plan a new feature.

関連スキル