Token导航 LogoToken导航TokenDH.com
开发操作浏览器github未标认证来源可访问许可证需确认审计提醒

companion-project-creator同伴项目创建者

Agent Skill

companion-project-creator 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

346

周安装

14

GitHub Stars

29

下载量

109
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:companion-project-creator(同伴项目创建者)
来源仓库:https://github.com/mwguerra/claude-code-plugins
仓库路径:skills/companion-project-creator
安装命令:
npx skills add https://github.com/mwguerra/claude-code-plugins --skill companion-project-creator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mwguerra/claude-code-plugins --skill companion-project-creator

简介

companion-project-creator 用于创建可直接运行的完整项目,适合在 Codex、Claude、Cursor、Gemini CLI 中快速生成可克隆执行的代码项目。

  • 适用于需要完整 Laravel、Node.js 等项目结构或文档的场景,强调项目必须经过实际运行验证。
  • 通过 GitHub 安装,使用 npx skills add 命令添加指定仓库中的技能。
  • 安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Companion Project Creator

Create complete, executable companion projects that readers can clone and run immediately.

Core Principle

Companion projects must be COMPLETE and RUNNABLE, not snippets or partial code.

A Laravel companion project is a full Laravel installation. A Node companion project is a full Node project. A document companion project is a complete, usable document.

⚠️ CRITICAL: Mandatory Verification

Every code companion project MUST be verified by actually running it before it is considered complete.

This is NOT optional. A companion project that hasn't been executed and tested is NOT complete.

Verification Workflow

┌─────────────────────────────────────────────────────────────────────────────┐
│                    COMPANION PROJECT CREATION FLOW                           │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  1. SCAFFOLD          Create base project (composer/npm/etc)                │
│         ↓                                                                   │
│  2. CUSTOMIZE         Add article-specific code                             │
│         ↓                                                                   │
│  3. VERIFY ⭐         ACTUALLY RUN THE CODE                                 │
│         │                                                                   │
│         ├── Install dependencies    → Must succeed                          │
│         ├── Run application         → Must start without errors             │
│         └── Run tests               → All tests must pass                   │
│         │                                                                   │
│         ├── ✅ All pass → Companion project complete                        │
│         └── ❌ Any fail → Fix code, return to step 3                        │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Verification Commands by Type

TypeInstallRunTest
Laravelcomposer installphp artisan servephp artisan test
Node.jsnpm installnpm start or node src/index.jsnpm test
Pythonpip install -r requirements.txtpython src/main.pypytest
Reactnpm installnpm startnpm test
Vuenpm installnpm run devnpm test
Gogo mod downloadgo run.go test./...

What "Verify" Means

You must actually execute these commands and confirm they succeed:

# Example: Laravel verification
cd code

# 1. Install - MUST SUCCEED
composer install
# ✓ Check: No errors, vendor/ folder created

# 2. Setup - MUST SUCCEED
cp .env.example .env
php artisan key:generate
touch database/database.sqlite
php artisan migrate
# ✓ Check: No errors, database has tables

# 3. Run - MUST START
php artisan serve &
# ✓ Check: Server starts on localhost:8000
# ✓ Check: Can access in browser (if web app)
# Then stop the server

# 4. Test - ALL MUST PASS
php artisan test
# ✓ Check: "Tests: X passed" with 0 failures

If ANY step fails:

  1. Read the error message
  2. Fix the code
  3. Re-run verification from step 1
  4. Repeat until ALL steps pass

Verification Checklist

Before marking a companion project complete, confirm:

  • install_command executed successfully (no errors)
  • All dependencies installed (vendor/, node_modules/, etc. exists)
  • run_command starts the application without errors
  • Application is accessible (if web app, can load in browser)
  • test_command executed successfully
  • All tests pass (0 failures)
  • No warnings that indicate missing functionality

DO NOT proceed to the next phase until all boxes are checked.


Companion Project Types

1. Code Companion Projects (code)

Complete application installations that can be:

  • Cloned/copied
  • Installed with one command
  • Run immediately
  • Tested

Laravel Application

Creation Process:

# 1. Create full Laravel project
cd content/articles/YYYY_MM_DD_slug/
composer create-project laravel/laravel code --prefer-dist

# 2. Configure for SQLite (no external DB)
cd code
cp .env.example .env
sed -i 's/DB_CONNECTION=mysql/DB_CONNECTION=sqlite/' .env
touch database/database.sqlite
php artisan key:generate

# 3. Install Pest
composer require pestphp/pest --dev --with-all-dependencies
php artisan pest:install

# 4. Add article-specific code
# - Models, Controllers, Routes, Views
# - Migrations, Seeders
# - Tests

# 5. VERIFY - Run migrations and tests
php artisan migrate
php artisan test
# ⚠️ DO NOT CONTINUE IF TESTS FAIL

Required Files (auto-generated by Laravel):

code/
├── app/
│   ├── Http/Controllers/
│   ├── Models/
│   └── Providers/
├── bootstrap/
├── config/
├── database/
│   ├── migrations/
│   ├── seeders/
│   └── database.sqlite
├── public/
├── resources/views/
├── routes/
│   ├── web.php
│   └── api.php
├── storage/
├── tests/
│   ├── Feature/
│   └── Unit/
├── .env
├── .env.example
├── artisan
├── composer.json
├── composer.lock
├── package.json
├── phpunit.xml
└── README.md          # Custom: explains the companion project

Article-Specific Additions:

  • Custom models in app/Models/
  • Custom controllers in app/Http/Controllers/
  • Custom routes in routes/web.php or routes/api.php
  • Custom views in resources/views/
  • Custom migrations in database/migrations/
  • Custom seeders in database/seeders/
  • Feature tests in tests/Feature/

README.md Template:

# Companion Project: [Article Topic]

Complete Laravel application demonstrating [concept].

## Requirements

- PHP 8.2+
- Composer

## Installation

\`\`\`bash
cd code
composer install
cp .env.example .env
php artisan key:generate
touch database/database.sqlite
php artisan migrate --seed
\`\`\`

## Run the Application

\`\`\`bash
php artisan serve
\`\`\`

Visit http://localhost:8000 to see the example.

## Run Tests

\`\`\`bash
php artisan test
\`\`\`

## What This Demonstrates

1. [Concept 1] - See `app/Models/Example.php`
2. [Concept 2] - See `app/Http/Controllers/ExampleController.php`
3. [Concept 3] - See `tests/Feature/ExampleTest.php`

## Key Files

| File | Description |
|------|-------------|
| `app/Models/Post.php` | Demonstrates [concept] |
| `routes/web.php` | Routes for [feature] |
| `tests/Feature/PostTest.php` | Tests for [feature] |

## Article Reference

This companion project accompanies: "[Article Title]"

Node.js Application

Creation Process:

# 1. Create project
cd content/articles/YYYY_MM_DD_slug/
mkdir code && cd code
npm init -y

# 2. Install dependencies
npm install express
npm install --save-dev jest

# 3. Configure package.json
# Add scripts: "start", "test", "dev"

# 4. Add article-specific code
# 5. Run tests
npm test

Structure:

code/
├── src/
│   ├── index.js
│   ├── routes/
│   └── controllers/
├── tests/
│   └── example.test.js
├── package.json
├── package-lock.json
└── README.md

Python Application

Creation Process:

# 1. Create project
cd content/articles/YYYY_MM_DD_slug/
mkdir code && cd code
python -m venv venv

# 2. Create requirements.txt
# 3. Add article-specific code
# 4. Add tests with pytest

Structure:

code/
├── src/
│   └── main.py
├── tests/
│   └── test_main.py
├── requirements.txt
├── setup.py
└── README.md

2. Document Companion Projects (document)

Complete, usable documents that readers can adapt.

Types:

  • Project plans
  • Technical specifications
  • Process documents
  • Meeting templates
  • Report templates

Structure:

code/
├── templates/
│   ├── project-plan-template.md
│   └── sprint-planning-template.md
├── examples/
│   ├── project-plan-filled.md
│   └── sprint-planning-filled.md
└── README.md

Each template must be:

  • Complete (all sections present)
  • Well-commented (explain each section)
  • Ready to use (just fill in the blanks)

3. Diagram Companion Projects (diagram)

Complete Mermaid diagrams that render correctly.

Structure:

code/
├── diagrams/
│   ├── architecture.mermaid
│   ├── sequence.mermaid
│   └── flowchart.mermaid
├── rendered/           # Optional: PNG exports
│   └── architecture.png
└── README.md

Each diagram must:

  • Be valid Mermaid syntax
  • Include comments explaining components
  • Render correctly in GitHub/VS Code

4. Configuration Companion Projects (config)

Complete, working configuration files.

Structure:

code/
├── docker/
│   ├── Dockerfile
│   ├── nginx.conf
│   └── php.ini
├── docker-compose.yml
├── .env.example
└── README.md

Must be:

  • Complete (all required config present)
  • Runnable (docker-compose up works)
  • Well-commented

5. Script Companion Projects (script)

Complete, executable scripts.

Structure:

code/
├── scripts/
│   ├── deploy.sh
│   ├── backup.sh
│   └── setup.sh
├── lib/
│   └── helpers.sh
└── README.md

Must be:

  • Executable (chmod +x)
  • Include shebang (#!/bin/bash)
  • Handle errors properly
  • Include usage documentation

6. Data Companion Projects (dataset)

Complete datasets with schema.

Structure:

code/
├── data/
│   ├── sample-data.json
│   ├── sample-data.csv
│   └── seed.sql
├── schemas/
│   └── schema.json
└── README.md

7. Template Companion Projects (template)

Reusable file templates.

Structure:

code/
├── templates/
│   ├── component.tsx.template
│   ├── controller.php.template
│   └── model.php.template
├── generated/          # Example outputs
│   └── UserController.php
└── README.md

8. Spreadsheet Companion Projects (spreadsheet)

Complete spreadsheets with formulas.

Structure:

code/
├── spreadsheets/
│   ├── budget-tracker.xlsx
│   └── project-timeline.xlsx
├── csv/
│   └── raw-data.csv
└── README.md

Creation Workflow

Step 1: Determine Companion Project Type

Based on article content:

Article TopicCompanion Project TypeWhat to Create
Laravel featurecodeFull Laravel app
API designcodeFull API server
ArchitecturediagramMermaid diagrams
Project managementdocumentComplete templates
DevOpsconfigDocker setup
AutomationscriptExecutable scripts
Data analysisdataset + codeData + analysis code

Step 2: Create Base Project

For code companion projects, ALWAYS start with proper project scaffolding:

# Laravel
composer create-project laravel/laravel code

# Node.js
mkdir code && cd code && npm init -y

# Python
mkdir code && cd code && python -m venv venv

# React
npx create-react-app code

# Vue
npm create vue@latest code

Step 3: Add Article-Specific Code

After base project exists:

  1. Add models/classes
  2. Add controllers/routes
  3. Add views/templates
  4. Add tests
  5. Add seeders/sample data

Step 4: Verify Completeness

Code Companion Projects Checklist:

  • Can be cloned fresh
  • composer install / npm install works
  • Application starts without errors
  • Can be accessed in browser (if web app)
  • All tests pass
  • README explains setup and usage

Document Companion Projects Checklist:

  • All sections are complete
  • Placeholders are clearly marked
  • At least one filled example exists
  • README explains how to use

Step 5: Document the Companion Project

Every companion project needs a README.md with:

  1. What it demonstrates
  2. Requirements
  3. Installation steps
  4. How to run
  5. How to test
  6. Key files explained
  7. Article reference

Integration with Article

Referencing Companion Project in Article

## Setting Up the Project

Clone the example and install dependencies:

\`\`\`bash
cd code
composer install
cp .env.example .env
php artisan key:generate
\`\`\`

See the complete working companion project in the `code/` folder.

Code Snippets from Companion Project

When showing code in the article, reference actual files:

Here's our Post model (`code/app/Models/Post.php`):

\`\`\`php
// From: code/app/Models/Post.php
<?php

namespace App\Models;

class Post extends Model
{
    // ... actual code from example
}
\`\`\`

Settings Integration

ALWAYS load settings before creating companion projects.

Step 1: Load Settings

# View settings for your example type
bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/show.ts settings code

Or use article-stats.ts for programmatic access:

bun run "${CLAUDE_PLUGIN_ROOT}"/scripts/article-stats.ts --json

Step 2: Get Values from Settings

// Database settings → companion_project_defaults.code
{
  "technologies": ["Laravel 12", "Pest 4", "SQLite"],
  "scaffold_command": "composer create-project laravel/laravel code --prefer-dist",
  "post_scaffold": [
    "cd code",
    "composer require pestphp/pest pestphp/pest-plugin-laravel --dev --with-all-dependencies",
    "php artisan pest:install",
    "sed -i 's/DB_CONNECTION=.*/DB_CONNECTION=sqlite/' .env",
    "touch database/database.sqlite"
  ],
  "run_command": "php artisan serve",
  "test_command": "php artisan test"
}

Step 3: Merge with Article Overrides

If the article task has a companion_project field, those values override settings:

settings defaults          +    article.companion_project    =    final config
──────────────────────         ────────────────        ────────────
scaffold_command: X            scaffold_command: Y      Y (article wins)
technologies: [A, B]           (not set)                [A, B] (use default)
has_tests: true                has_tests: false         false (article wins)

Step 4: Execute Commands

# 1. Run scaffold_command
composer create-project laravel/laravel code --prefer-dist

# 2. Run each post_scaffold command
cd code
composer require pestphp/pest pestphp/pest-plugin-laravel --dev --with-all-dependencies
php artisan pest:install
# ... etc

Step 5: Verify with test_command

# From settings.companion_project_defaults.code.test_command
php artisan test

Global defaults from database settings:

{
  "companion_project_defaults": {
    "code": {
      "technologies": ["Laravel 12", "Pest 4", "SQLite"],
      "scaffold_command": "composer create-project laravel/laravel code",
      "post_scaffold": [
        "cd code",
        "composer require pestphp/pest --dev",
        "php artisan pest:install"
      ]
    }
  }
}

Article can override:

{
  "companion_project": {
    "type": "code",
    "technologies": ["Laravel 11", "PHPUnit", "MySQL"],
    "scaffold_command": "composer create-project laravel/laravel:^11.0 code"
  }
}

Common Mistakes to Avoid

❌ Wrong: Partial Code

code/
├── app/Models/Post.php      # Just one file!
└── README.md

✅ Correct: Complete Project

code/
├── app/                     # Full Laravel structure
├── bootstrap/
├── config/
├── database/
├── public/
├── resources/
├── routes/
├── storage/
├── tests/
├── .env.example
├── artisan
├── composer.json
└── README.md

❌ Wrong: Untested Code

// Example that might not work
class PostController {
    public function index() {
        return Post::all(); // Is Post even defined?
    }
}

✅ Correct: Tested, Working Code

// Tested with: php artisan test
class PostController extends Controller
{
    public function index()
    {
        return Post::with('comments')->paginate(10);
    }
}

// tests/Feature/PostTest.php exists and passes

Companion Project Task Recording

After creating companion project, update the article record in the database:

{
  "companion_project": {
    "type": "code",
    "path": "code/",
    "description": "Complete Laravel app with rate limiting",
    "technologies": ["Laravel 12", "Pest 4", "SQLite"],
    "has_tests": true,
    "scaffold_command": "composer create-project laravel/laravel code",
    "files": [
      "app/Http/Controllers/ApiController.php",
      "app/Http/Middleware/RateLimitMiddleware.php",
      "routes/api.php",
      "tests/Feature/RateLimitTest.php"
    ],
    "run_instructions": "composer install && php artisan serve",
    "test_command": "php artisan test",
    "verified": true,
    "verified_at": "2025-01-15T14:00:00Z"
  }
}

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.42%
按下载量换算39

Claude

31.69%
按下载量换算35

Cursor

17.28%
按下载量换算19

Gemini CLI

8.34%
按下载量换算9

安全审计

Gen Agent Trust Hub

可疑

Socket

可疑

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills