Skip to main content

Badges Dinámicos para Proyectos - Guía Completa

Autor: Abkrim
Última actualización: 31 Diciembre 2025
Propósito: Documentación unificada de badges para todos los proyectos


Índice


Plantilla Base Adaptable

<!-- PROJECT HEADER -->
# {NOMBRE_PROYECTO}

<!-- BADGES: Información del Paquete -->
[![Latest Version](https://img.shields.io/packagist/v/{vendor}/{package}.svg?style=flat-square)](https://packagist.org/packages/{vendor}/{package})
[![Total Downloads](https://img.shields.io/packagist/dt/{vendor}/{package}.svg?style=flat-square)](https://packagist.org/packages/{vendor}/{package})
[![Monthly Downloads](https://img.shields.io/packagist/dm/{vendor}/{package}.svg?style=flat-square)](https://packagist.org/packages/{vendor}/{package})

<!-- BADGES: Estado de CI/CD -->
[![Tests](https://img.shields.io/github/actions/workflow/status/{vendor}/{repo}/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/{vendor}/{repo}/actions?query=workflow%3Arun-tests+branch%3Amain)
[![Code Style](https://img.shields.io/github/actions/workflow/status/{vendor}/{repo}/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/{vendor}/{repo}/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![PHPStan](https://img.shields.io/github/actions/workflow/status/{vendor}/{repo}/phpstan.yml?branch=main&label=phpstan&style=flat-square)](https://github.com/{vendor}/{repo}/actions/workflows/phpstan.yml)

<!-- BADGES: Calidad de Código -->
[![PHPStan Level](https://img.shields.io/badge/PHPStan-level%20max-brightgreen.svg?style=flat-square&logo=php)](https://phpstan.org/)
[![Code Coverage](https://img.shields.io/codecov/c/github/{vendor}/{repo}?style=flat-square&logo=codecov)](https://codecov.io/gh/{vendor}/{repo})
[![Maintainability](https://img.shields.io/codeclimate/maintainability/{vendor}/{repo}?style=flat-square&logo=code-climate)](https://codeclimate.com/github/{vendor}/{repo})
[![Technical Debt](https://img.shields.io/codeclimate/tech-debt/{vendor}/{repo}?style=flat-square&logo=code-climate)](https://codeclimate.com/github/{vendor}/{repo})

<!-- BADGES: Requisitos Técnicos -->
[![PHP Version](https://img.shields.io/packagist/php-v/{vendor}/{package}.svg?style=flat-square&logo=php)](https://packagist.org/packages/{vendor}/{package})
[![Laravel Version](https://img.shields.io/badge/Laravel-12.x-red.svg?style=flat-square&logo=laravel)](https://laravel.com)

<!-- BADGES: Stack Tecnológico -->
[![Stack: RabbitMQ](https://img.shields.io/badge/Stack-RabbitMQ-FF6600?style=flat-square&logo=rabbitmq)](https://www.rabbitmq.com/)
[![Stack: Elasticsearch](https://img.shields.io/badge/Stack-Elasticsearch-005571?style=flat-square&logo=elasticsearch)](https://www.elastic.co/)
[![Stack: Redis](https://img.shields.io/badge/Stack-Redis-DC382D?style=flat-square&logo=redis)](https://redis.io/)
[![Stack: PostgreSQL](https://img.shields.io/badge/Stack-PostgreSQL-336791?style=flat-square&logo=postgresql)](https://www.postgresql.org/)

<!-- BADGES: Estado del Repositorio -->
[![Last Commit](https://img.shields.io/github/last-commit/{vendor}/{repo}?style=flat-square&logo=github)](https://github.com/{vendor}/{repo}/commits)
[![Commit Activity](https://img.shields.io/github/commit-activity/m/{vendor}/{repo}?style=flat-square&logo=github)](https://github.com/{vendor}/{repo}/graphs/commit-activity)
[![Issues](https://img.shields.io/github/issues/{vendor}/{repo}?style=flat-square&logo=github)](https://github.com/{vendor}/{repo}/issues)
[![Pull Requests](https://img.shields.io/github/issues-pr/{vendor}/{repo}?style=flat-square&logo=github)](https://github.com/{vendor}/{repo}/pulls)

<!-- BADGES: Estado del Proyecto -->
[![Project Status: Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Maintenance](https://img.shields.io/maintenance/yes/2025?style=flat-square)](https://github.com/{vendor}/{repo}/graphs/commit-activity)
[![License](https://img.shields.io/github/license/{vendor}/{repo}?style=flat-square)](LICENSE.md)

<!-- BADGES: Comunidad -->
[![GitHub Stars](https://img.shields.io/github/stars/{vendor}/{repo}?style=flat-square&logo=github)](https://github.com/{vendor}/{repo}/stargazers)
[![GitHub Forks](https://img.shields.io/github/forks/{vendor}/{repo}?style=flat-square&logo=github)](https://github.com/{vendor}/{repo}/network/members)
[![Contributors](https://img.shields.io/github/contributors/{vendor}/{repo}?style=flat-square&logo=github)](https://github.com/{vendor}/{repo}/graphs/contributors)

<!-- BADGES: Seguridad -->
[![Security](https://img.shields.io/badge/Security-Snyk-4C4A73?style=flat-square&logo=snyk)](https://snyk.io/)
[![Known Vulnerabilities](https://snyk.io/test/github/{vendor}/{repo}/badge.svg?style=flat-square)](https://snyk.io/test/github/{vendor}/{repo})

Variables a reemplazar

Variable Ejemplo Descripción
{vendor} AichaDigital Nombre de la organización/vendor
{repo} lara-verifactu Nombre del repositorio
{package} aichadigital/lara-verifactu Nombre completo del paquete en Packagist

Badges por Categoría

1. Información del Paquete (Packagist)

Versión y Descargas

<!-- Versión estable actual -->
[![Latest Version](https://img.shields.io/packagist/v/{vendor}/{package})](https://packagist.org/packages/{vendor}/{package})

<!-- Versión pre-release -->
[![Latest Unstable Version](https://img.shields.io/packagist/vpre/{vendor}/{package})](https://packagist.org/packages/{vendor}/{package})

<!-- Descargas totales -->
[![Total Downloads](https://img.shields.io/packagist/dt/{vendor}/{package})](https://packagist.org/packages/{vendor}/{package})

<!-- Descargas mensuales -->
[![Monthly Downloads](https://img.shields.io/packagist/dm/{vendor}/{package})](https://packagist.org/packages/{vendor}/{package})

<!-- Descargas diarias -->
[![Daily Downloads](https://img.shields.io/packagist/dd/{vendor}/{package})](https://packagist.org/packages/{vendor}/{package})

<!-- Licencia desde Packagist -->
[![License](https://img.shields.io/packagist/l/{vendor}/{package})](https://packagist.org/packages/{vendor}/{package})

Configuración

  • URL: https://packagist.org/
  • Requisitos: Paquete publicado en Packagist
  • Actualización: Automática tras cada release
  • Costo: Gratuito

2. CI/CD y Tests (GitHub Actions)

Workflows Estándar

<!-- Tests generales -->
[![Tests](https://github.com/{vendor}/{repo}/actions/workflows/run-tests.yml/badge.svg)](https://github.com/{vendor}/{repo}/actions/workflows/run-tests.yml)

<!-- Code Style (Pint/PHP-CS-Fixer) -->
[![Code Style](https://github.com/{vendor}/{repo}/actions/workflows/fix-php-code-style-issues.yml/badge.svg)](https://github.com/{vendor}/{repo}/actions/workflows/fix-php-code-style-issues.yml)

<!-- PHPStan -->
[![PHPStan](https://github.com/{vendor}/{repo}/actions/workflows/phpstan.yml/badge.svg)](https://github.com/{vendor}/{repo}/actions/workflows/phpstan.yml)

<!-- Pest/PHPUnit -->
[![Tests](https://github.com/{vendor}/{repo}/actions/workflows/tests.yml/badge.svg)](https://github.com/{vendor}/{repo}/actions/workflows/tests.yml)

<!-- Build Status (genérico) -->
[![Build Status](https://github.com/{vendor}/{repo}/workflows/CI/badge.svg)](https://github.com/{vendor}/{repo}/actions)

<!-- Estado específico de workflow con parámetros -->
[![Tests](https://img.shields.io/github/actions/workflow/status/{vendor}/{repo}/run-tests.yml?branch=main&label=tests)](https://github.com/{vendor}/{repo}/actions/workflows/run-tests.yml)

Configuración

  • Ubicación: .github/workflows/*.yml
  • Requisitos: Workflows activos en GitHub Actions
  • Actualización: Automática en cada push/PR
  • Costo: Gratuito para repos públicos

Ejemplo de workflow mínimo:

# .github/workflows/run-tests.yml
name: Tests

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:

      - uses: actions/checkout@v4
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: 8.3

      - run: composer install
      - run: vendor/bin/pest

3. Calidad de Código

PHPStan (Badges Manuales)

<!-- Level específico (0-9) - ACTUALIZAR MANUALMENTE -->
[![PHPStan Level 0](https://img.shields.io/badge/PHPStan-level%200-red.svg?logo=php)](https://phpstan.org/)
[![PHPStan Level 1](https://img.shields.io/badge/PHPStan-level%201-orange.svg?logo=php)](https://phpstan.org/)
[![PHPStan Level 2](https://img.shields.io/badge/PHPStan-level%202-yellow.svg?logo=php)](https://phpstan.org/)
[![PHPStan Level 3](https://img.shields.io/badge/PHPStan-level%203-yellowgreen.svg?logo=php)](https://phpstan.org/)
[![PHPStan Level 4](https://img.shields.io/badge/PHPStan-level%204-yellowgreen.svg?logo=php)](https://phpstan.org/)
[![PHPStan Level 5](https://img.shields.io/badge/PHPStan-level%205-green.svg?logo=php)](https://phpstan.org/)
[![PHPStan Level 6](https://img.shields.io/badge/PHPStan-level%206-green.svg?logo=php)](https://phpstan.org/)
[![PHPStan Level 7](https://img.shields.io/badge/PHPStan-level%207-brightgreen.svg?logo=php)](https://phpstan.org/)
[![PHPStan Level 8](https://img.shields.io/badge/PHPStan-level%208-brightgreen.svg?logo=php)](https://phpstan.org/)
[![PHPStan Level 9](https://img.shields.io/badge/PHPStan-level%209-brightgreen.svg?logo=php)](https://phpstan.org/)

<!-- Max Level (para proyectos con level 9) -->
[![PHPStan Level](https://img.shields.io/badge/PHPStan-level%20max-brightgreen.svg?logo=php)](https://phpstan.org/)

<!-- Badge con workflow dinámico (muestra estado del workflow) -->
[![PHPStan](https://github.com/{vendor}/{repo}/actions/workflows/phpstan.yml/badge.svg)](https://github.com/{vendor}/{repo}/actions/workflows/phpstan.yml)

Nota importante: PHPStan no tiene badge oficial dinámico que lea el level automáticamente. Debes actualizar el badge manualmente cuando cambies el level. Ver Solución Custom para PHPStan más abajo.

Codecov

<!-- Badge básico -->
[![Code Coverage](https://codecov.io/gh/{vendor}/{repo}/branch/main/graph/badge.svg)](https://codecov.io/gh/{vendor}/{repo})

<!-- Con token (para repos privados) -->
[![codecov](https://codecov.io/gh/{vendor}/{repo}/branch/main/graph/badge.svg?token=YOUR_TOKEN)](https://codecov.io/gh/{vendor}/{repo})

<!-- Badge con porcentaje visible -->
[![Coverage](https://img.shields.io/codecov/c/github/{vendor}/{repo}?logo=codecov)](https://codecov.io/gh/{vendor}/{repo})

Configuración:

  1. Crear cuenta en https://codecov.io/

  2. Vincular repositorio

  3. Obtener token (Settings > Repository > Upload Token)

  4. Añadir token a GitHub Secrets: CODECOV_TOKEN

  5. Configurar workflow:

# .github/workflows/tests.yml

- name: Run tests with coverage
  run: vendor/bin/pest --coverage --coverage-clover=coverage.xml

- name: Upload coverage to Codecov
  uses: codecov/codecov-action@v3
  with:
    files: ./coverage.xml
    fail_ci_if_error: true
    token: ${{ secrets.CODECOV_TOKEN }}

Costo: Gratuito para repos open source

Code Climate

<!-- Maintainability -->
[![Maintainability](https://api.codeclimate.com/v1/badges/{badge_id}/maintainability)](https://codeclimate.com/github/{vendor}/{repo}/maintainability)

<!-- Test Coverage -->
[![Test Coverage](https://api.codeclimate.com/v1/badges/{badge_id}/test_coverage)](https://codeclimate.com/github/{vendor}/{repo}/test_coverage)

<!-- Technical Debt -->
[![Technical Debt](https://img.shields.io/codeclimate/tech-debt/{vendor}/{repo})](https://codeclimate.com/github/{vendor}/{repo})

<!-- Badge de issues -->
[![Code Issues](https://img.shields.io/codeclimate/issues/{vendor}/{repo})](https://codeclimate.com/github/{vendor}/{repo}/issues)

Configuración:

  1. Crear cuenta en https://codeclimate.com/

  2. Conectar repositorio

  3. Obtener badge_id del dashboard (Repo Settings > Badges)

  4. Crear .codeclimate.yml:

version: "2"
checks:
  argument-count:
    enabled: true
    config:
      threshold: 4
  complex-logic:
    enabled: true
  method-complexity:
    enabled: true
    config:
      threshold: 10
  method-lines:
    enabled: true
    config:
      threshold: 50

Costo: Gratuito para repos open source

Scrutinizer

<!-- Quality Score -->
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/{vendor}/{repo}/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/{vendor}/{repo}/?branch=main)

<!-- Coverage -->
[![Code Coverage](https://scrutinizer-ci.com/g/{vendor}/{repo}/badges/coverage.png?b=main)](https://scrutinizer-ci.com/g/{vendor}/{repo}/?branch=main)

<!-- Build Status -->
[![Build Status](https://scrutinizer-ci.com/g/{vendor}/{repo}/badges/build.png?b=main)](https://scrutinizer-ci.com/g/{vendor}/{repo}/build-status/main)

Configuración:

  • URL: https://scrutinizer-ci.com/
  • Requisitos: Conectar repo, configurar .scrutinizer.yml
  • Costo: Gratuito para repos open source

SonarCloud

<!-- Quality Gate Status -->
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project={project_key}&metric=alert_status)](https://sonarcloud.io/dashboard?id={project_key})

<!-- Bugs -->
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project={project_key}&metric=bugs)](https://sonarcloud.io/dashboard?id={project_key})

<!-- Code Smells -->
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project={project_key}&metric=code_smells)](https://sonarcloud.io/dashboard?id={project_key})

<!-- Coverage -->
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project={project_key}&metric=coverage)](https://sonarcloud.io/dashboard?id={project_key})

<!-- Duplicated Lines -->
[![Duplicated Lines](https://sonarcloud.io/api/project_badges/measure?project={project_key}&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id={project_key})

<!-- Technical Debt -->
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project={project_key}&metric=sqale_index)](https://sonarcloud.io/dashboard?id={project_key})

<!-- Vulnerabilities -->
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project={project_key}&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id={project_key})

<!-- Security Rating -->
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project={project_key}&metric=security_rating)](https://sonarcloud.io/dashboard?id={project_key})

<!-- Maintainability Rating -->
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project={project_key}&metric=sqale_rating)](https://sonarcloud.io/dashboard?id={project_key})

<!-- Reliability Rating -->
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project={project_key}&metric=reliability_rating)](https://sonarcloud.io/dashboard?id={project_key})

Configuración:

  • URL: https://sonarcloud.io/
  • Requisitos: Vincular con GitHub/GitLab, configurar sonar-project.properties
  • Costo: Gratuito para repos open source

4. Requisitos Técnicos

<!-- PHP Version (desde composer.json - DINÁMICO) -->
[![PHP Version](https://img.shields.io/packagist/php-v/{vendor}/{package}?logo=php)](https://packagist.org/packages/{vendor}/{package})

<!-- PHP Version específica (manual) -->
[![PHP](https://img.shields.io/badge/PHP-%3E%3D8.2-777BB4?logo=php)](https://www.php.net/)
[![PHP](https://img.shields.io/badge/PHP-%3E%3D8.3-777BB4?logo=php)](https://www.php.net/)

<!-- Laravel Version (manual) -->
[![Laravel](https://img.shields.io/badge/Laravel-11.x-red?logo=laravel)](https://laravel.com)
[![Laravel](https://img.shields.io/badge/Laravel-12.x-red?logo=laravel)](https://laravel.com)

<!-- Versión múltiple de Laravel -->
[![Laravel](https://img.shields.io/badge/Laravel-11.x%20%7C%2012.x-red?logo=laravel)](https://laravel.com)

<!-- Composer Version -->
[![Composer](https://img.shields.io/badge/Composer-2.x-885630?logo=composer)](https://getcomposer.org/)

<!-- Node.js (si aplica) -->
[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20-339933?logo=node.js)](https://nodejs.org/)

Nota: El badge de PHP desde Packagist lee automáticamente el require.php de composer.json.


5. Stack Tecnológico

Bases de Datos

<!-- MySQL -->
[![MySQL](https://img.shields.io/badge/MySQL-8.0-4479A1?logo=mysql&logoColor=white)](https://www.mysql.com/)
[![MySQL](https://img.shields.io/badge/MySQL-8.x-4479A1?logo=mysql&logoColor=white)](https://www.mysql.com/)

<!-- PostgreSQL -->
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-16-336791?logo=postgresql)](https://www.postgresql.org/)
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-15%20%7C%2016-336791?logo=postgresql)](https://www.postgresql.org/)

<!-- MariaDB -->
[![MariaDB](https://img.shields.io/badge/MariaDB-11.x-003545?logo=mariadb)](https://mariadb.org/)

<!-- SQLite -->
[![SQLite](https://img.shields.io/badge/SQLite-3.x-003B57?logo=sqlite)](https://www.sqlite.org/)

<!-- MongoDB -->
[![MongoDB](https://img.shields.io/badge/MongoDB-7.x-47A248?logo=mongodb&logoColor=white)](https://www.mongodb.com/)

Message Queues

<!-- RabbitMQ -->
[![RabbitMQ](https://img.shields.io/badge/RabbitMQ-3.x-FF6600?logo=rabbitmq)](https://www.rabbitmq.com/)

<!-- Apache Kafka -->
[![Apache Kafka](https://img.shields.io/badge/Kafka-latest-231F20?logo=apache-kafka)](https://kafka.apache.org/)

<!-- AWS SQS -->
[![AWS SQS](https://img.shields.io/badge/AWS-SQS-FF9900?logo=amazon-aws)](https://aws.amazon.com/sqs/)

Cache y Storage

<!-- Redis -->
[![Redis](https://img.shields.io/badge/Redis-7.x-DC382D?logo=redis&logoColor=white)](https://redis.io/)

<!-- Memcached -->
[![Memcached](https://img.shields.io/badge/Memcached-latest-00D8FF)](https://memcached.org/)

<!-- MinIO -->
[![MinIO](https://img.shields.io/badge/MinIO-latest-C72E49?logo=minio&logoColor=white)](https://min.io/)

Search Engines

<!-- Elasticsearch -->
[![Elasticsearch](https://img.shields.io/badge/Elasticsearch-8.x-005571?logo=elasticsearch)](https://www.elastic.co/)

<!-- Algolia -->
[![Algolia](https://img.shields.io/badge/Algolia-latest-5468FF?logo=algolia&logoColor=white)](https://www.algolia.com/)

<!-- MeiliSearch -->
[![MeiliSearch](https://img.shields.io/badge/MeiliSearch-latest-FF69B4?logo=meilisearch&logoColor=white)](https://www.meilisearch.com/)

<!-- Typesense -->
[![Typesense](https://img.shields.io/badge/Typesense-latest-D91A5B)](https://typesense.org/)

Frontend (si aplica)

<!-- Vue.js -->
[![Vue.js](https://img.shields.io/badge/Vue.js-3.x-4FC08D?logo=vue.js&logoColor=white)](https://vuejs.org/)

<!-- React -->
[![React](https://img.shields.io/badge/React-18.x-61DAFB?logo=react&logoColor=black)](https://reactjs.org/)

<!-- Alpine.js -->
[![Alpine.js](https://img.shields.io/badge/Alpine.js-3.x-8BC0D0?logo=alpine.js&logoColor=black)](https://alpinejs.dev/)

<!-- Livewire -->
[![Livewire](https://img.shields.io/badge/Livewire-3.x-FB70A9?logo=livewire)](https://livewire.laravel.com/)

<!-- Inertia.js -->
[![Inertia.js](https://img.shields.io/badge/Inertia.js-latest-9553E9?logo=inertia)](https://inertiajs.com/)

<!-- Tailwind CSS -->
[![Tailwind CSS](https://img.shields.io/badge/Tailwind-3.x-06B6D4?logo=tailwind-css&logoColor=white)](https://tailwindcss.com/)

<!-- Bootstrap -->
[![Bootstrap](https://img.shields.io/badge/Bootstrap-5.x-7952B3?logo=bootstrap&logoColor=white)](https://getbootstrap.com/)

DevOps y Contenedores

<!-- Docker -->
[![Docker](https://img.shields.io/badge/Docker-latest-2496ED?logo=docker&logoColor=white)](https://www.docker.com/)

<!-- Kubernetes -->
[![Kubernetes](https://img.shields.io/badge/Kubernetes-latest-326CE5?logo=kubernetes&logoColor=white)](https://kubernetes.io/)

<!-- Proxmox -->
[![Proxmox](https://img.shields.io/badge/Proxmox-VE-E57000?logo=proxmox&logoColor=white)](https://www.proxmox.com/)

<!-- GitHub Actions -->
[![GitHub Actions](https://img.shields.io/badge/GitHub-Actions-2088FF?logo=github-actions&logoColor=white)](https://github.com/features/actions)

<!-- GitLab CI -->
[![GitLab CI](https://img.shields.io/badge/GitLab-CI-FC6D26?logo=gitlab&logoColor=white)](https://docs.gitlab.com/ee/ci/)


6. Estado del Repositorio

<!-- Último commit (DINÁMICO) -->
[![Last Commit](https://img.shields.io/github/last-commit/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo}/commits)

<!-- Actividad de commits mensual (DINÁMICO) -->
[![Commit Activity](https://img.shields.io/github/commit-activity/m/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo}/graphs/commit-activity)

<!-- Actividad de commits semanal (DINÁMICO) -->
[![Commit Activity](https://img.shields.io/github/commit-activity/w/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo}/graphs/commit-activity)

<!-- Actividad de commits anual (DINÁMICO) -->
[![Commit Activity](https://img.shields.io/github/commit-activity/y/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo}/graphs/commit-activity)

<!-- Issues abiertas (DINÁMICO) -->
[![Open Issues](https://img.shields.io/github/issues/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo}/issues)

<!-- Issues cerradas (DINÁMICO) -->
[![Closed Issues](https://img.shields.io/github/issues-closed/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo}/issues?q=is%3Aissue+is%3Aclosed)

<!-- Pull Requests abiertas (DINÁMICO) -->
[![Open PRs](https://img.shields.io/github/issues-pr/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo}/pulls)

<!-- Pull Requests cerradas (DINÁMICO) -->
[![Closed PRs](https://img.shields.io/github/issues-pr-closed/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo}/pulls?q=is%3Apr+is%3Aclosed)

<!-- Tamaño del repositorio (DINÁMICO) -->
[![Repo Size](https://img.shields.io/github/repo-size/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo})

<!-- Lenguaje principal (DINÁMICO) -->
[![Top Language](https://img.shields.io/github/languages/top/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo})

<!-- Conteo de lenguajes (DINÁMICO) -->
[![Language Count](https://img.shields.io/github/languages/count/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo})

<!-- Última release (DINÁMICO) -->
[![Latest Release](https://img.shields.io/github/v/release/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo}/releases/latest)

<!-- Release date (DINÁMICO) -->
[![Release Date](https://img.shields.io/github/release-date/{vendor}/{repo}?logo=github)](https://github.com/{vendor}/{repo}/releases)


7. Estado del Proyecto (dinámicos)

RepoStatus.org (Estados Oficiales)

<!-- Active: Proyecto activo con desarrollo regular -->
[![Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)

<!-- WIP: Work In Progress, funcional pero en desarrollo -->
[![WIP](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)

<!-- Suspended: Temporalmente detenido -->
[![Suspended](https://www.repostatus.org/badges/latest/suspended.svg)](https://www.repostatus.org/#suspended)

<!-- Abandoned: No mantenido -->
[![Abandoned](https://www.repostatus.org/badges/latest/abandoned.svg)](https://www.repostatus.org/#abandoned)

<!-- Moved: Repositorio movido a otra ubicación -->
[![Moved](https://www.repostatus.org/badges/latest/moved.svg)](https://www.repostatus.org/#moved)

<!-- Inactive: Funcional pero no mantenido activamente -->
[![Inactive](https://www.repostatus.org/badges/latest/inactive.svg)](https://www.repostatus.org/#inactive)

<!-- Unsupported: Funcional pero sin soporte -->
[![Unsupported](https://www.repostatus.org/badges/latest/unsupported.svg)](https://www.repostatus.org/#unsupported)

<!-- Concept: En fase de concepto -->
[![Concept](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept)

URL: https://www.repostatus.org/
Actualización: Manual (copiar el badge apropiado)

Maintenance Status (Año específico)

<!-- Mantenido actualmente (cambiar año según corresponda) -->
[![Maintenance](https://img.shields.io/maintenance/yes/2025)](https://github.com/{vendor}/{repo})

<!-- No mantenido -->
[![Maintenance](https://img.shields.io/maintenance/no/2025)](https://github.com/{vendor}/{repo})

Nota: Actualizar el año anualmente.


8. Licencia

<!-- Licencia desde GitHub (DINÁMICO) -->
[![License](https://img.shields.io/github/license/{vendor}/{repo})](https://github.com/{vendor}/{repo}/blob/main/LICENSE.md)

<!-- MIT -->
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

<!-- GPL v3 -->
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

<!-- Apache 2.0 -->
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

<!-- BSD 3-Clause -->
[![License: BSD-3](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

<!-- ISC -->
[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)

<!-- Propietaria -->
[![License: Proprietary](https://img.shields.io/badge/License-Proprietary-red.svg)](LICENSE.md)


9. Comunidad

<!-- Stars (DINÁMICO) -->
[![GitHub Stars](https://img.shields.io/github/stars/{vendor}/{repo}?style=social)](https://github.com/{vendor}/{repo}/stargazers)

<!-- Forks (DINÁMICO) -->
[![GitHub Forks](https://img.shields.io/github/forks/{vendor}/{repo}?style=social)](https://github.com/{vendor}/{repo}/network/members)

<!-- Watchers (DINÁMICO) -->
[![GitHub Watchers](https://img.shields.io/github/watchers/{vendor}/{repo}?style=social)](https://github.com/{vendor}/{repo}/watchers)

<!-- Contributors (DINÁMICO) -->
[![Contributors](https://img.shields.io/github/contributors/{vendor}/{repo})](https://github.com/{vendor}/{repo}/graphs/contributors)

<!-- Discussions (DINÁMICO) -->
[![GitHub Discussions](https://img.shields.io/github/discussions/{vendor}/{repo})](https://github.com/{vendor}/{repo}/discussions)

<!-- Sponsors -->
[![GitHub Sponsors](https://img.shields.io/github/sponsors/{vendor}?logo=github)](https://github.com/sponsors/{vendor})

<!-- Discord -->
[![Discord](https://img.shields.io/discord/{server_id}?logo=discord&label=Discord)](https://discord.gg/{invite_code})

<!-- Slack -->
[![Slack](https://img.shields.io/badge/Slack-Join-4A154B?logo=slack)](https://join.slack.com/...)

<!-- Twitter -->
[![Twitter Follow](https://img.shields.io/twitter/follow/{handle}?style=social)](https://twitter.com/{handle})


10. Seguridad

<!-- Snyk (DINÁMICO) -->
[![Known Vulnerabilities](https://snyk.io/test/github/{vendor}/{repo}/badge.svg)](https://snyk.io/test/github/{vendor}/{repo})

<!-- Dependabot (manual) -->
[![Dependabot](https://img.shields.io/badge/Dependabot-enabled-success?logo=dependabot)](https://github.com/{vendor}/{repo}/network/dependencies)

<!-- Security Policy (manual) -->
[![Security Policy](https://img.shields.io/badge/Security-Policy-blue)](https://github.com/{vendor}/{repo}/security/policy)

<!-- OSSF Best Practices (DINÁMICO tras registro) -->
[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/{project_id}/badge)](https://bestpractices.coreinfrastructure.org/projects/{project_id})

<!-- OSSF Scorecard -->
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/{vendor}/{repo}/badge)](https://api.securityscorecards.dev/projects/github.com/{vendor}/{repo})

Configuración Snyk:

  1. Crear cuenta en https://snyk.io/

  2. Conectar repositorio

  3. Badge aparece automáticamente

Costo: Gratuito para repos open source


11. Documentación

<!-- ReadTheDocs (DINÁMICO) -->
[![Documentation](https://readthedocs.org/projects/{project}/badge/?version=latest)](https://{project}.readthedocs.io/en/latest/)

<!-- GitHub Pages (manual) -->
[![Documentation](https://img.shields.io/badge/docs-GitHub%20Pages-blue?logo=github)](https://{vendor}.github.io/{repo}/)

<!-- Wiki (manual) -->
[![Wiki](https://img.shields.io/badge/docs-Wiki-blue?logo=github)](https://github.com/{vendor}/{repo}/wiki)

<!-- Gitbook -->
[![Gitbook](https://img.shields.io/badge/docs-Gitbook-blue?logo=gitbook&logoColor=white)](https://{organization}.gitbook.io/{project}/)

<!-- Badge de "docs" personalizado -->
[![Documentation](https://img.shields.io/badge/docs-latest-blue)](https://docs.{domain}.com)


Servicios Externos Recomendados

Servicio Propósito URL API Key Costo OSS Configuración
Packagist Stats de paquetes PHP https://packagist.org/ No Gratis Automático tras publish
Codecov Code Coverage https://codecov.io/ Gratis Token en GitHub Secrets
Code Climate Calidad de código https://codeclimate.com/ Gratis Conectar repo + .codeclimate.yml
Scrutinizer Análisis estático https://scrutinizer-ci.com/ No Gratis Conectar + .scrutinizer.yml
SonarCloud Análisis de seguridad https://sonarcloud.io/ Gratis sonar-project.properties
Snyk Vulnerabilidades https://snyk.io/ Gratis Conectar repositorio
Shields.io Badges personalizados https://shields.io/ No Gratis -
RepoStatus.org Estado del proyecto https://www.repostatus.org/ No Gratis -
OSSF Security Scorecard https://securityscorecards.dev/ No Gratis Configurar workflow

Ejemplos Completos por Tipo de Proyecto

Ejemplo 1: Paquete Laravel con Testing Completo

# Lara-Verifactu

> Paquete Laravel para integración con el sistema VeriFactu de la AEAT

[![Latest Version](https://img.shields.io/packagist/v/aichadigital/lara-verifactu?style=flat-square)](https://packagist.org/packages/aichadigital/lara-verifactu)
[![Total Downloads](https://img.shields.io/packagist/dt/aichadigital/lara-verifactu?style=flat-square)](https://packagist.org/packages/aichadigital/lara-verifactu)
[![Tests](https://img.shields.io/github/actions/workflow/status/AichaDigital/lara-verifactu/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/AichaDigital/lara-verifactu/actions/workflows/run-tests.yml)
[![PHPStan Level 9](https://img.shields.io/badge/PHPStan-level%209-brightgreen?style=flat-square&logo=php)](https://phpstan.org/)
[![Code Coverage](https://img.shields.io/codecov/c/github/AichaDigital/lara-verifactu?style=flat-square&logo=codecov)](https://codecov.io/gh/AichaDigital/lara-verifactu)

[![PHP Version](https://img.shields.io/packagist/php-v/aichadigital/lara-verifactu?style=flat-square&logo=php)](https://packagist.org/packages/aichadigital/lara-verifactu)
[![Laravel Version](https://img.shields.io/badge/Laravel-11.x%20%7C%2012.x-red?style=flat-square&logo=laravel)](https://laravel.com)
[![License](https://img.shields.io/github/license/AichaDigital/lara-verifactu?style=flat-square)](LICENSE.md)

## Instalación

\```bash
composer require aichadigital/lara-verifactu
\```

Ejemplo 2: Proyecto Laravel con Stack Completo

# Sistema de Subastas Online

> Plataforma empresarial para subastas en tiempo real

[![Project Status: Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Maintenance](https://img.shields.io/maintenance/yes/2025?style=flat-square)](https://github.com/AichaDigital/subastas-app)
[![Tests](https://img.shields.io/github/actions/workflow/status/AichaDigital/subastas-app/tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/AichaDigital/subastas-app/actions/workflows/tests.yml)
[![Last Commit](https://img.shields.io/github/last-commit/AichaDigital/subastas-app?style=flat-square)](https://github.com/AichaDigital/subastas-app/commits)

**Stack Tecnológico:**

[![PHP 8.3](https://img.shields.io/badge/PHP-8.3-777BB4?style=flat-square&logo=php)](https://www.php.net/)
[![Laravel 12](https://img.shields.io/badge/Laravel-12.x-red?style=flat-square&logo=laravel)](https://laravel.com)
[![Livewire](https://img.shields.io/badge/Livewire-3.x-FB70A9?style=flat-square&logo=livewire)](https://livewire.laravel.com/)

**Infraestructura:**

[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-16-336791?style=flat-square&logo=postgresql)](https://www.postgresql.org/)
[![Redis](https://img.shields.io/badge/Redis-7.x-DC382D?style=flat-square&logo=redis&logoColor=white)](https://redis.io/)
[![RabbitMQ](https://img.shields.io/badge/RabbitMQ-3.x-FF6600?style=flat-square&logo=rabbitmq)](https://www.rabbitmq.com/)
[![Elasticsearch](https://img.shields.io/badge/Elasticsearch-8.x-005571?style=flat-square&logo=elasticsearch)](https://www.elastic.co/)

[![License: Proprietary](https://img.shields.io/badge/License-Proprietary-red?style=flat-square)](LICENSE.md)

Ejemplo 3: Paquete PHP Standalone

# PHP-Utils

> Utilidades PHP para proyectos empresariales

[![Latest Version](https://img.shields.io/packagist/v/xerintel/php-utils?style=flat-square)](https://packagist.org/packages/xerintel/php-utils)
[![PHP Version](https://img.shields.io/packagist/php-v/xerintel/php-utils?style=flat-square&logo=php)](https://www.php.net/)
[![Tests](https://img.shields.io/github/actions/workflow/status/xerintel/php-utils/tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/xerintel/php-utils/actions/workflows/tests.yml)
[![PHPStan Level 8](https://img.shields.io/badge/PHPStan-level%208-brightgreen?style=flat-square&logo=php)](https://phpstan.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)](LICENSE.md)

Ejemplo 4: Proyecto con Monitorización y Seguridad

# Enterprise CRM

[![Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Tests](https://img.shields.io/github/actions/workflow/status/empresa/crm/tests.yml?branch=main&style=flat-square)](https://github.com/empresa/crm/actions)
[![Security](https://snyk.io/test/github/empresa/crm/badge.svg?style=flat-square)](https://snyk.io/test/github/empresa/crm)

**Calidad:**

[![Code Coverage](https://img.shields.io/codecov/c/github/empresa/crm?style=flat-square)](https://codecov.io/gh/empresa/crm)
[![Maintainability](https://api.codeclimate.com/v1/badges/ABC123/maintainability)](https://codeclimate.com/github/empresa/crm)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=empresa_crm&metric=alert_status)](https://sonarcloud.io/dashboard?id=empresa_crm)

**Stack:**

[![Laravel 12](https://img.shields.io/badge/Laravel-12.x-red?style=flat-square&logo=laravel)](https://laravel.com)
[![Vue.js 3](https://img.shields.io/badge/Vue.js-3.x-4FC08D?style=flat-square&logo=vue.js)](https://vuejs.org/)
[![MySQL 8](https://img.shields.io/badge/MySQL-8.0-4479A1?style=flat-square&logo=mysql)](https://www.mysql.com/)


Soluciones Especiales

Badge Dinámico para PHPStan (Solución Custom)

Como PHPStan no ofrece badges dinámicos oficiales, aquí hay una solución mediante GitHub Actions:

Opción 1: Badge con GitHub Actions Status

# .github/workflows/phpstan-badge.yml
name: PHPStan Badge

on:
  push:
    branches: [main]
  pull_request:

jobs:
  phpstan:
    name: PHPStan Level Check
    runs-on: ubuntu-latest
    
    steps:

      - uses: actions/checkout@v4
      
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: 8.3
      
      - name: Install dependencies
        run: composer install --no-interaction
      
      - name: Run PHPStan
        run: vendor/bin/phpstan analyse --no-progress

Badge a usar:

[![PHPStan](https://img.shields.io/github/actions/workflow/status/{vendor}/{repo}/phpstan-badge.yml?branch=main&label=PHPStan%20Level%209&style=flat-square)](https://github.com/{vendor}/{repo}/actions/workflows/phpstan-badge.yml)

Opción 2: Badge Dinámico con Gist (Avanzado)

# .github/workflows/phpstan-dynamic-badge.yml
name: PHPStan Dynamic Badge

on:
  push:
    branches: [main]

jobs:
  badge:
    runs-on: ubuntu-latest
    steps:

      - uses: actions/checkout@v4
      
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: 8.3
      
      - name: Install dependencies
        run: composer install --no-interaction
      
      - name: Extract PHPStan Level
        id: level
        run: |
          if [ -f phpstan.neon ]; then
            LEVEL=$(grep -oP "level: \K\d+" phpstan.neon || echo "0")
          elif [ -f phpstan.neon.dist ]; then
            LEVEL=$(grep -oP "level: \K\d+" phpstan.neon.dist || echo "0")
          else
            LEVEL="0"
          fi
          echo "level=$LEVEL" >> $GITHUB_OUTPUT
          echo "PHPStan Level: $LEVEL"
      
      - name: Create Badge
        uses: schneegans/dynamic-badges-action@v1.7.0
        with:
          auth: ${{ secrets.GIST_SECRET }}
          gistID: YOUR_GIST_ID_HERE
          filename: phpstan-${{ github.event.repository.name }}.json
          label: PHPStan
          message: level ${{ steps.level.outputs.level }}
          color: brightgreen

Configuración:

  1. Crear un GitHub Personal Access Token con scope gist

  2. Añadirlo a GitHub Secrets como GIST_SECRET

  3. Crear un Gist público en https://gist.github.com/

  4. Copiar el Gist ID (última parte de la URL)

  5. Reemplazar YOUR_GIST_ID_HERE en el workflow

Badge a usar:

[![PHPStan](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/{username}/{gist_id}/raw/phpstan-{repo}.json&style=flat-square)](https://phpstan.org/)

Opción 3: Badge Manual (Más simple)

Si prefieres simplicidad, actualiza manualmente el badge cuando cambies el level:

<!-- Level 0 (rojo) -->
[![PHPStan Level 0](https://img.shields.io/badge/PHPStan-level%200-red.svg?style=flat-square&logo=php)](https://phpstan.org/)

<!-- Level 5 (verde) -->
[![PHPStan Level 5](https://img.shields.io/badge/PHPStan-level%205-green.svg?style=flat-square&logo=php)](https://phpstan.org/)

<!-- Level 8 (verde brillante) -->
[![PHPStan Level 8](https://img.shields.io/badge/PHPStan-level%208-brightgreen.svg?style=flat-square&logo=php)](https://phpstan.org/)

<!-- Level 9 / Max (verde brillante) -->
[![PHPStan Level 9](https://img.shields.io/badge/PHPStan-level%209-brightgreen.svg?style=flat-square&logo=php)](https://phpstan.org/)
[![PHPStan Max](https://img.shields.io/badge/PHPStan-level%20max-brightgreen.svg?style=flat-square&logo=php)](https://phpstan.org/)

Colores recomendados por level:

  • Level 0-2: red
  • Level 3-4: orange o yellow
  • Level 5-6: yellowgreen o green
  • Level 7-9: brightgreen

Badges Personalizados con Shields.io

Para crear badges totalmente personalizados:

<!-- Badge estático simple -->
[![Custom](https://img.shields.io/badge/{label}-{message}-{color})](https://example.com)

<!-- Ejemplos reales -->
[![Hosted](https://img.shields.io/badge/Hosted-Proxmox-E57000?logo=proxmox)](https://www.proxmox.com/)
[![Monitoring](https://img.shields.io/badge/Monitoring-Zabbix-D20000?logo=zabbix)](https://www.zabbix.com/)
[![Stack](https://img.shields.io/badge/Stack-LEMP-339933)](https://www.nginx.com/)

<!-- Badge con endpoint dinámico -->
[![Dynamic](https://img.shields.io/endpoint?url=https://your-api.com/badge.json)](https://example.com)

Formato del endpoint JSON:

{
  "schemaVersion": 1,
  "label": "PHPStan",
  "message": "level 9",
  "color": "brightgreen",
  "logoSvg": "<svg>...</svg>"
}

Documentación completa: https://shields.io/


Checklist de Configuración

Requisitos Básicos

  • Repositorio público en GitHub
  • Archivo LICENSE.md presente
  • Archivo README.md con badges
  • .gitignore configurado
  • composer.json con metadatos completos

Para Paquetes Packagist

  • Publicado en https://packagist.org/
  • composer.json con:
    • name correcto
    • description clara
    • license especificada
    • require con versiones de PHP
    • autoload configurado
  • Tags/Releases versionados (semver)

Para GitHub Actions

  • Workflows en .github/workflows/
  • Workflow para tests: run-tests.yml
  • Workflow para code style: fix-php-code-style-issues.yml
  • Workflow para PHPStan: phpstan.yml
  • Secrets configurados (si se requieren)

Para Code Coverage

  • Cuenta en Codecov.io vinculada
  • Token añadido a GitHub Secrets: CODECOV_TOKEN
  • Workflow configurado para subir coverage
  • Tests generan archivo coverage.xml

Para Calidad de Código

  • Code Climate:
    • Repo conectado
    • .codeclimate.yml configurado
    • Badge ID obtenido
  • Scrutinizer:
    • Repo conectado
    • .scrutinizer.yml configurado
  • SonarCloud:
    • Proyecto configurado
    • sonar-project.properties creado
    • Project key obtenido

Para Seguridad

  • Snyk vinculado al repositorio
  • Dependabot habilitado
  • SECURITY.md presente
  • Vulnerabilities monitorizadas

Para Testing

  • Tests unitarios con PHPUnit o Pest
  • PHPStan configurado (phpstan.neon)
  • Code style configurado (Pint, PHP-CS-Fixer)
  • Coverage mínimo definido

Documentación

  • README.md completo
  • CONTRIBUTING.md (si es open source)
  • CHANGELOG.md mantenido
  • PHPDoc en código
  • Wiki o docs externas (opcional)

Referencias y Recursos

Documentación Oficial

  • Shields.io: https://shields.io/
  • Packagist: https://packagist.org/about
  • GitHub Actions: https://docs.github.com/en/actions
  • RepoStatus: https://www.repostatus.org/

Servicios de Calidad

  • Codecov: https://docs.codecov.com/
  • Code Climate: https://docs.codeclimate.com/
  • Scrutinizer: https://scrutinizer-ci.com/docs/
  • SonarCloud: https://docs.sonarcloud.io/

Herramientas de Testing

  • PHPStan: https://phpstan.org/user-guide/getting-started
  • Pest: https://pestphp.com/docs/
  • PHPUnit: https://phpunit.de/documentation.html
  • Laravel Pint: https://laravel.com/docs/11.x/pint

Seguridad

  • Snyk: https://docs.snyk.io/
  • Dependabot: https://docs.github.com/en/code-security/dependabot
  • OSSF: https://github.com/ossf/scorecard

Mantenimiento de este Documento

  • Responsable: Abkrim
  • Frecuencia de revisión: Trimestral
  • Última revisión: 31 Diciembre 2025
  • Próxima revisión: Marzo 2026

Historial de Cambios

Fecha Versión Cambios
2025-12-31 1.0 Creación del documento inicial

Soporte

Para dudas o sugerencias sobre esta guía:

  1. Abrir issue en el repositorio del proyecto

  2. Consultar con el equipo de desarrollo

  3. Revisar documentación oficial de cada servicio


Fin del documento