create-dockerignore

为 PHP 项目生成优化的 .dockerignore 配置,建议排除测试文件、文档、IDE 文件及开发产物,以最小化构建上下文。

仓库最近推送
GitHub Stars
109
Forks
26
Issues / PRs
1

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "create-dockerignore":https://skillpi.com/zh/skills/deepskill-22cfb408c35754e70f3a23916069d6c3bf3416a086342f68c4b68f93b6ade011。安装前核对上游来源和版本:https://github.com/dykyi-roman/awesome-claude-code。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

为 PHP 项目生成优化的 .dockerignore 配置,建议排除测试文件、文档、IDE 文件及开发产物,以最小化构建上下文。

0 下载

介绍来源: third_party · dykyi-roman · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: create-dockerignore
description: Generates optimized .dockerignore files for PHP projects. Excludes tests, docs, IDE files, and development artifacts to minimize build context.

.dockerignore Generator

Generates optimized .dockerignore files for PHP projects, reducing build context size and improving build performance.

Generated Files

.dockerignore             # Optimized exclusion rules

Generation Instructions

  1. Detect project type: Check for symfony.lock (Symfony), artisan (Laravel), or generic PHP
  2. Analyze existing files: Read .gitignore, check CI/CD config, identify test/doc directories
  3. Generate .dockerignore: Universal exclusions + framework-specific + proper ! negations

Universal PHP .dockerignore

# ===========================================
# .dockerignore — PHP Project
# ===========================================

# Version Control
.git
.gitignore
.gitattributes
.gitmodules

# CI/CD
.github
.gitlab
.gitlab-ci.yml
.circleci
Jenkinsfile
bitbucket-pipelines.yml

# IDE
.idea
.vscode
*.sublime-project
*.sublime-workspace
*.swp
*.swo
*~

# Dependencies (installed in container)
vendor/
node_modules/

# Testing
tests/
test/
spec/
phpunit.xml
phpunit.xml.dist
.phpunit.result.cache
.phpunit.cache/
behat.yml
behat.yml.dist
infection.json
infection.json.dist

# Documentation
docs/
doc/
*.md
!README.md
LICENSE

# Development Files
docker-compose*.yml
docker-compose*.yaml
Dockerfile*
.docker/
Makefile
Vagrantfile

# Cache and Temporary Files
var/cache/
var/log/
storage/logs/
storage/framework/cache/
storage/framework/sessions/
storage/framework/views/
*.log
tmp/
temp/

# Local Configuration
.env
.env.local
.env.*.local
.env.test
*.local.php
docker-compose.override.yml

# Static Analysis
phpstan.neon
phpstan.neon.dist
phpstan-baseline.neon
psalm.xml
psalm.xml.dist
.php-cs-fixer.php
.php-cs-fixer.dist.php
.php-cs-fixer.cache
.phpcs-cache
phpcs.xml
phpcs.xml.dist
deptrac.yaml
rector.php
ecs.php
pint.json

# Build Artifacts
coverage/
build/
report/
reports/
clover.xml
coverage.xml

# OS Files
.DS_Store
Thumbs.db

# Package Management
composer.phar
auth.json

# Claude / AI
.claude/
CLAUDE.md

Symfony-Specific Additions

# Symfony
symfony.lock
var/
assets/
public/build/
.symfony/
.symfony.local.yaml
.phpunit/

Laravel-Specific Additions

# Laravel
storage/
bootstrap/cache/
docker-compose.sail.yml
public/hot
public/storage
public/build/
public/mix-manifest.json
_ide_helper*.php
.phpstorm.meta.php
Homestead.json
Homestead.yaml

Important Negations

# Required Files (do NOT exclude)
!composer.json
!composer.lock
!symfony.lock
!.env.dist
!.env.example

Build Context Impact

Pattern Typical savings
.git 50-500 MB
vendor/ 100-500 MB
node_modules/ 200-800 MB
tests/ 5-50 MB

Validation Rules

  1. Never exclude: composer.json, composer.lock, source code (src/, app/, config/, public/), migrations
  2. Always exclude: .git, vendor/, tests, IDE files, local env files with secrets
  3. Framework awareness: Symfony: exclude var/, keep config/, public/, templates/; Laravel: exclude storage/, keep config/, public/, resources/

Usage

Provide:

  • Framework (Symfony/Laravel/generic PHP)
  • Monorepo structure (yes/no)
  • Custom exclusions (optional)

The generator will:

  1. Create .dockerignore with universal exclusions
  2. Add framework-specific exclusions
  3. Add proper negation rules for required files
  4. Optimize for minimal build context

当前收录版本

0.0.1

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 解决 PHP 项目 Docker 构建上下文过大的实际痛点,显著提升构建效率
  • 覆盖 Symfony、Laravel 等主流框架,受众广泛,实用价值高
触发精准90/100

亮点

  • 触发词精准,明确限定为 PHP 项目,边界清晰,不易误触
结构规范95/100

亮点

  • 结构完整,Phase/步骤清晰,包含端到端示例和详细规则说明
  • frontmatter 完整,文档组织良好,易于理解和使用
执行可靠90/100

亮点

  • 提供了完整的 .dockerignore 模板,涵盖通用和框架特定场景
  • 包含重要的否定规则(!)和验证规则,防止误排除关键文件,可靠性高
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。