• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdevelopment

new-app

プラグイン
atomic-agents
引数
[project-name]
ソース
GitHub で見る ↗
説明

新しいAtomic Agentsプロジェクトを最初から構築します。ディレクトリ、`pyproject.toml`、環境設定ファイル、最初のエージェント、実行可能なエントリーポイントを作成します。 **次のような場合に使用:** - ユーザーがAtomic Agentsプロジェクトを最初から始めたいと要望するとき - 「スキャフォルド(ひな形の自動生成)」「新規プロジェクト」「ゼロから開始」といった表現が使われたとき - `/atomic-agents:new-app` コマンドが実行されたとき

原文を表示

Scaffold a new Atomic Agents project from scratch — create the directory, `pyproject.toml`, env file, first agent, and a runnable entry point. Use when the user asks to start a new atomic-agents project from scratch, says "scaffold" / "new project" / "start from zero", or runs `/atomic-agents:new-app`.

ユースケース
  • Atomic Agentsプロジェクトを最初から始めたいとき
  • 新規プロジェクトのひな形を自動生成したいとき
  • ゼロから開発環境を構築したいとき
  • /atomic-agents:new-appコマンドを実行したとき
本文(日本語訳)

Atomic Agents プロジェクト新規作成

新しい Atomic Agents プロジェクトの骨組みを自動で作成します。1つの動作するエージェント、1組のスキーマ(データ形式)、プロバイダー(LLM提供元)対応クライアント、実行可能な main.py を備えた、完全な Python パッケージが完成します。

このスキルは意見を持った設計になっており、すぐに実行できる完全でテスト済みの骨組みを作ります。

フェーズ1 — 質問

以下の質問を1度に全て尋ねます。ユーザーが既に答えている項目($ARGUMENTS での指定も含む)はスキップします。

  1. プロジェクト名 — ディレクトリ名とパッケージ名の両方に使用。$ARGUMENTS があればそこからデフォルト値を取得。ディレクトリはケバブケース(単語をハイフンつなぎ)、パッケージはスネークケース(単語をアンダースコアつなぎ)に正規化します。
  2. LLM プロバイダー — OpenAI / Anthropic / Groq / Ollama / Gemini / OpenRouter / MiniMax のいずれか。デフォルト: OpenAI。
  3. エージェントの種類 — ざっくり1行で説明。デフォルトの SystemPromptGenerator の内容と初期スキーマペアの形状を決めます。デフォルト: 汎用チャットエージェント。
  4. ツール — uv(デフォルト。リポジトリが uv を使用)または pip + venv。

プロジェクトのディレクトリ構成、Python バージョン、依存ライブラリの詳細については聞きません。こちらで決めます。

フェーズ2 — 計画を確認

計画を短い1ブロックで示し、ユーザーの確認を待ちます。以下を含めます:

  • ディレクトリ: <プロジェクト名>/
  • パッケージ: <project_name>/
  • Python: >=3.12(Atomic Agents は PEP 695 ジェネリクスを使用)
  • 依存ライブラリ: atomic-agents>=2.7、instructor[<プロバイダー拡張>]>=1.14、python-dotenv、rich
  • 開発用依存: pytest、pytest-asyncio、ruff
  • 最初のエージェント: <エージェント種類> — カスタムスキーマが不要なら BasicChatInputSchema/BasicChatOutputSchema を使用
  • 選択したプロバイダーのデフォルトモデル(framework/references/providers.md を参照)
  • エントリーポイント: 対話型シェル付きの main.py

フェーズ3 — 骨組みを作成

以下の順番でファイルを作成します。各ステップを進める前に動作確認します。

ディレクトリとパッケージ構造

<プロジェクト名>/
├── pyproject.toml
├── .env.example
├── .gitignore
├── README.md
├── AGENTS.md
├── CLAUDE.md
└── <project_name>/
    ├── __init__.py
    └── main.py

pyproject.toml

framework/references/project-structure.md のテンプレートを使い、選択したプロバイダー拡張とプロジェクト名を置き換えます。

.env.example

プロバイダーの API キー変数をプレースホルダー付きで含めます。実際のキーは絶対に含めません。

.gitignore

framework/references/project-structure.md のテンプレートを使用します。

<project_name>/main.py

実行可能な対話型シェルを作成します。.env を読み込み、framework/references/providers.md に従ってプロバイダークライアントをインスタンス化、エージェントを構築、ChatHistory(会話履歴)をアシスタントメッセージで初期化し、console.input(...) でループします。

エージェント自体は atomic-agents:create-atomic-agent スキルのワークフローに従います — 標準的なインポート、プロバイダー別の mode 設定、同じ形の SystemPromptGenerator を使用。

カスタムエージェント種類が指定された場合、atomic-agents:create-atomic-schema スキルに従い、フィールドに description= を付けたカスタム InputSchema / OutputSchema サブクラスを作成。そうでなければ BasicChatInputSchema / BasicChatOutputSchema を使用。

常に以下の標準インポートを使用:

from atomic_agents import (
    AtomicAgent, AgentConfig,
    BasicChatInputSchema, BasicChatOutputSchema,
)
from atomic_agents.context import ChatHistory, SystemPromptGenerator
from instructor import Mode

プロバイダー別の AgentConfig 設定 — Instructor ファクトリーの mode を AgentConfig.mode と一致させます:

  • OpenAI: デフォルト設定で動作。mode は省略(または Mode.TOOLS を指定)。
  • Anthropic: mode=Mode.TOOLS; model_api_parameters に max_tokens を含める。
  • Groq / Ollama / MiniMax: mode=Mode.JSON(Instructor ファクトリーも Mode.JSON を使用)。
  • Gemini: assistant_role="model" と mode=Mode.GENAI_TOOLS(Instructor ファクトリーは Mode.GENAI_TOOLS を使用)。
  • OpenRouter: mode=Mode.TOOLS。

README.md

短く簡潔に。プロジェクト説明、インストール方法(uv sync または pip install -e .[dev])、API キーの設定方法(.env.example をコピーして編集)、実行方法(uv run python -m <project_name>.main など)を含めます。

AGENTS.md と CLAUDE.md

スキャフォルディングされたプロジェクトにはエージェント向け指示が含まれるので、どのコーディングアシスタント(Cursor、Copilot、Gemini CLI など)でも最初のコミットからフレームワークの慣例を理解できます。CLAUDE.md には正確に1行 @AGENTS.md だけを記載し、Claude Code が重複なしで同じファイルを読めるようにします。

AGENTS.md テンプレート(プロジェクト固有の内容を置き換え):

# <プロジェクト名>

<エージェント種類の回答から得た1行説明。>

[Atomic Agents](https://github.com/eigenwise/atomic-agents) で構築 — スキーマ駆動型フレームワーク
(Instructor + Pydantic ベース)。LLM 向けドキュメント:
https://eigenwise.github.io/atomic-agents/llms.txt

## フレームワーク慣例

- トップレベルパッケージからインポート: `from atomic_agents import AtomicAgent, AgentConfig, BaseIOSchema, BaseTool`; コンテキスト関連は `atomic_agents.context` から。
- エージェントは `AtomicAgent[InputSchema, OutputSchema](config=AgentConfig(...))`; 型パラメータは実行時情報を持つので、常に正確に保つ。
- LLM クライアントは Instructor でラップしてから `AgentConfig.client` に渡す。
- すべての `BaseIOSchema` サブクラスは空でないドキュメント文字列と各フィールドの `Field(..., description=...)` が必須 — 両方共 LLM プロンプトに含まれる。
- プロバイダー設定(`temperature`、`max_tokens` など)は `AgentConfig.model_api_parameters` に記述。
- プロバイダー: <選択プロバイダー>。<該当する場合、下表から対応する1行説明。>

## コマンド

- インストール: `uv sync`(スキャフォルディング時に選択した pip 相当)
- 実行: `uv run python -m <project_name>.main`
- テスト: `uv run pytest`

プロバイダー別の説明文:

  • Anthropic → "model_api_parameters に max_tokens が必須; mode=Mode.TOOLS。"
  • Gemini → "assistant_role='model' と mode=Mode.GENAI_TOOLS を指定。"
  • Groq/Ollama/MiniMax → "Instructor ファクトリーと AgentConfig 両方に mode=Mode.JSON を指定。"
  • OpenAI/OpenRouter → 記載不要。

フェーズ4 — インストールと動作確認

インストールステップを実行:

  • uv: uv sync
  • pip: python -m venv .venv && .venv/bin/pip install -e ".[dev]"(Windows: .venv\Scripts\pip)

実際の API キーがなくてもインポートできるか確認:

uv run python -c "from <project_name>.main import agent; print('ok')"

成功すれば骨組みは問題ありません。ユーザーに .env にキーを入れて REPL を実行するよう案内します。

フェーズ5 — 引き継ぎ

スキャフォルディング後、ユーザーに以下を伝えます:

  1. キーの設定方法(cp .env.example .env)。
  2. 実行方法(uv run python -m <project_name>.main)。
  3. 次のステップ(以下から選択):
    • 初期スキーマをドメイン固有のものに置き換え — atomic-agents:create-atomic-schema スキルを使用。
    • 別のエージェントを追加 — atomic-agents:create-atomic-agent スキルを使用。
    • ツールを追加 — atomic-agents:create-atomic-tool スキルを使用。
    • コンテキストプロバイダー(時刻、ユーザー、RAG、セッション)を追加 — atomic-agents:create-atomic-context-provider スキルを使用。
    • 複数エージェント体制に分割 — framework/references/orchestration.md を参照。
  4. framework(自動実行)と review(コミット前に自動実行)へのポインタ。

制約

  • .env をコミットしない。.env.example のみ。
  • グローバルインストールはしない。プロジェクトの仮想環境を使用。
  • 古いモデルを選ばない。現世代がデフォルト: OpenAI gpt-5-mini、Anthropic claude-haiku-4-5、Groq llama-3.3-70b-versatile、Ollama llama3.1、Gemini gemini-2.5-flash。
  • framework/references/project-structure.md が既にテンプレート化しているものは手作りしない。
原文(English)を表示

New Atomic Agents Project

Scaffold a fresh Atomic Agents project. The result is a single-package Python project with one working agent, one schema pair, a provider-wrapped client, and a runnable main.py.

This skill is opinionated. Produce a complete, tested skeleton the user can run immediately.

Phase 1 — Interrogate

Ask these questions in one message, not one-at-a-time. Skip any the user already answered (including via $ARGUMENTS).

  1. Project name — used as both directory name and package name. Default from $ARGUMENTS if provided. Normalize to kebab-case for the directory and snake_case for the package.
  2. LLM provider — OpenAI / Anthropic / Groq / Ollama / Gemini / OpenRouter / MiniMax. Default: OpenAI.
  3. Agent type — a rough one-liner. Shapes the default SystemPromptGenerator content and the starter schema pair. Defaults to a generic chat agent.
  4. Tooling — uv (default, because the repo uses uv) or pip + venv.

Do not ask about project layout, Python version, or dependency list. Pick them.

Phase 2 — Confirm the plan

State the plan in one short block and wait for a yes. Include:

  • Directory: <project-name>/
  • Package: <project_name>/
  • Python: >=3.12 (Atomic Agents uses PEP 695 generics)
  • Dependencies: atomic-agents>=2.7, instructor[<provider-extra>]>=1.14, python-dotenv, rich
  • Dev dependencies: pytest, pytest-asyncio, ruff
  • First agent: <agent-type> — uses BasicChatInputSchema/BasicChatOutputSchema unless the agent type calls for custom schemas
  • Default model for the chosen provider (see framework/references/providers.md)
  • Entry point: main.py with a REPL

Phase 3 — Scaffold

Create files in this order. Verify each step before proceeding.

Directory and package

<project-name>/
├── pyproject.toml
├── .env.example
├── .gitignore
├── README.md
├── AGENTS.md
├── CLAUDE.md
└── <project_name>/
    ├── __init__.py
    └── main.py

pyproject.toml

Use the template from framework/references/project-structure.md, substituting the chosen provider extra and project name.

.env.example

Include the provider's API-key variable with a placeholder. Never the real key.

.gitignore

Use the template from framework/references/project-structure.md.

<project_name>/main.py

Produce a runnable REPL. Load .env, instantiate the provider client per framework/references/providers.md, build an agent, wire a ChatHistory with a seed assistant message, loop on console.input(...).

For the agent itself, follow the workflow from the atomic-agents:create-atomic-agent skill — same canonical imports, same per-provider mode matrix, same SystemPromptGenerator shape.

When a custom agent type was requested, build custom InputSchema / OutputSchema subclasses with field description= populated, following the atomic-agents:create-atomic-schema skill. Otherwise use BasicChatInputSchema / BasicChatOutputSchema.

Always use the canonical imports:

from atomic_agents import (
    AtomicAgent, AgentConfig,
    BasicChatInputSchema, BasicChatOutputSchema,
)
from atomic_agents.context import ChatHistory, SystemPromptGenerator
from instructor import Mode

Per-provider AgentConfig knobs — match the Instructor factory mode on AgentConfig.mode:

  • OpenAI: defaults work. Omit mode (or set Mode.TOOLS).
  • Anthropic: mode=Mode.TOOLS; include max_tokens in model_api_parameters.
  • Groq / Ollama / MiniMax: mode=Mode.JSON (Instructor factory also uses Mode.JSON).
  • Gemini: assistant_role="model" and mode=Mode.GENAI_TOOLS (Instructor factory uses Mode.GENAI_TOOLS).
  • OpenRouter: mode=Mode.TOOLS.

README.md

Short. Include: what the project is, how to install (uv sync or pip install -e .[dev]), how to set the API key (cp .env.example .env and edit), how to run (uv run python -m <project_name>.main or equivalent).

AGENTS.md and CLAUDE.md

Every scaffolded project ships agent instructions so any coding assistant (Cursor, Codex, Copilot, Gemini CLI, ...) knows the framework conventions from the first commit. CLAUDE.md contains exactly one line — @AGENTS.md — so Claude Code reads the same file without duplication.

AGENTS.md template (substitute project specifics):

# <Project Name>

<One-line description from the agent-type answer.>

Built with [Atomic Agents](https://github.com/eigenwise/atomic-agents) — a schema-driven
framework on Instructor + Pydantic. Docs for LLMs:
https://eigenwise.github.io/atomic-agents/llms.txt

## Framework conventions

- Import from the top-level package: `from atomic_agents import AtomicAgent, AgentConfig,
  BaseIOSchema, BaseTool`; context pieces from `atomic_agents.context`.
- Agents are `AtomicAgent[InputSchema, OutputSchema](config=AgentConfig(...))` — the type
  parameters carry runtime information, keep them accurate.
- The LLM client must be wrapped with Instructor before it goes into `AgentConfig.client`.
- Every `BaseIOSchema` subclass needs a non-empty docstring and `Field(..., description=...)`
  on each field — both flow into the LLM prompt.
- Provider knobs (`temperature`, `max_tokens`, ...) go in `AgentConfig.model_api_parameters`.
- Provider: <chosen provider>. <Provider-specific line from the matrix below, if any.>

## Commands

- Install: `uv sync` (or the pip equivalent chosen at scaffold time)
- Run: `uv run python -m <project_name>.main`
- Test: `uv run pytest`

Provider-specific lines for the template: Anthropic → "Requires max_tokens in model_api_parameters; mode=Mode.TOOLS." Gemini → "assistant_role='model' and mode=Mode.GENAI_TOOLS." Groq/Ollama/MiniMax → "mode=Mode.JSON on both the Instructor factory and AgentConfig." OpenAI/OpenRouter → omit.

Phase 4 — Install and smoke-test

Execute the install step:

  • uv: uv sync
  • pip: python -m venv .venv && .venv/bin/pip install -e ".[dev]" (Windows: .venv\Scripts\pip)

Verify imports without a live API key:

uv run python -c "from <project_name>.main import agent; print('ok')"

If that works, the scaffold is sound. Tell the user to drop their key into .env and run the REPL.

Phase 5 — Hand off

After scaffolding, tell the user:

  1. How to set their key (cp .env.example .env).
  2. How to run (uv run python -m <project_name>.main).
  3. Next steps, picked from:
    • Replace the starter schemas with domain-specific ones — use the atomic-agents:create-atomic-schema skill.
    • Add another agent — use the atomic-agents:create-atomic-agent skill.
    • Add a tool — use the atomic-agents:create-atomic-tool skill.
    • Add a context provider (time, user, RAG, session) — use the atomic-agents:create-atomic-context-provider skill.
    • Split into multiple agents — see framework/references/orchestration.md.
  4. A pointer to framework (auto-triggered) and review (auto-triggered before commit).

Constraints

  • Never commit .env. Only .env.example.
  • Never install anything globally. Use the project venv.
  • Never pick an old model. Default to current generation: OpenAI gpt-5-mini, Anthropic claude-haiku-4-5, Groq llama-3.3-70b-versatile, Ollama llama3.1, Gemini gemini-2.5-flash.
  • Never hand-roll what framework/references/project-structure.md already templates.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。