Analyze Ci Logs logo

Analyze Ci Logs

Community
dykyi-roman
analyze-ci-logs

Analyzes CI/CD pipeline logs to identify failure causes. Parses error messages, detects common failure patterns, and provides fix recommendations.

Overview

Publisherdykyi-roman
Repositoryawesome-claude-code
Skill nameanalyze-ci-logs
Stars
98
Forks
25
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dykyi-roman on GitHub. Read the source before you install it.

Installation

Install the Analyze Ci Logs AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code.git /tmp/awesome-claude-code
mkdir -p .claude/skills
cp -r /tmp/awesome-claude-code/skills/analyze-ci-logs .claude/skills/analyze-ci-logs
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Analyze Ci Logs in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Analyze Ci Logs on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Analyze Ci Logs is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

CI Log Analyzer

Analyzes CI/CD pipeline logs to diagnose failures and suggest fixes.

Failure Categories

1. Dependency Failures

┌─────────────────────────────────────────────────────────────────┐
│  DEPENDENCY FAILURE PATTERNS                                    │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  composer install:                                              │
│  • "Your requirements could not be resolved"                   │
│  • "Package not found"                                          │
│  • "Allowed memory exhausted"                                   │
│                                                                 │
│  npm/yarn:                                                      │
│  • "ERESOLVE unable to resolve dependency tree"                │
│  • "npm ERR! 404 Not Found"                                    │
│  • "ENOMEM: not enough memory"                                 │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

2. Test Failures

PHPUnit Test Failures:
• "Failed asserting that..."
• "Error: Call to undefined method..."
• "Exception: ..."
• "PHPUnit\Framework\MockObject\RuntimeException"

Common Causes:
• Missing test fixtures
• Database connection issues
• Timing-dependent tests
• Mock configuration errors

3. Static Analysis Failures

PHPStan Errors:
• "Parameter $x has no type specified"
• "Method .+::.+ has no return type specified"
• "Call to an undefined method"
• "Access to an undefined property"

Psalm Errors:
• "MixedAssignment"
• "UndefinedClass"
• "InvalidReturnType"

4. Infrastructure Failures

Docker Errors:
• "Cannot connect to the Docker daemon"
• "pull access denied"
• "no space left on device"

Service Errors:
• "Connection refused" (database/redis)
• "ECONNRESET"
• "Timeout exceeded"

Log Pattern Matching

PHPUnit Failure Parser

Pattern: /FAILURES!\nTests: (\d+), Assertions: (\d+), Failures: (\d+)/
Pattern: /1\) (.+)::(.+)\n(.+)\nFailed asserting that (.+)/
Pattern: /Error: (.+)\n(.+):(\d+)/

Example:
FAILURES!
Tests: 45, Assertions: 120, Failures: 2, Errors: 1

1) App\Tests\Unit\OrderTest::test_calculate_total
Failed asserting that 100 matches expected 99.

/app/tests/Unit/OrderTest.php:45

Parsed:
{
  "type": "test_failure",
  "test_class": "App\\Tests\\Unit\\OrderTest",
  "test_method": "test_calculate_total",
  "assertion": "Failed asserting that 100 matches expected 99",
  "file": "/app/tests/Unit/OrderTest.php",
  "line": 45
}

PHPStan Error Parser

Pattern: /------ (.+) ------\n\s*Line\s+(.+\.php)\n\s+(\d+)\s+(.+)/
Pattern: /\[ERROR\] Found (\d+) errors/

Example:
 ------ ----------------------------------------
  Line   src/Domain/Order/Order.php
 ------ ----------------------------------------
  45     Method Order::getTotal() has no return type specified.
  67     Parameter $discount has no type specified.
 ------ ----------------------------------------

 [ERROR] Found 2 errors

Parsed:
{
  "type": "phpstan_errors",
  "count": 2,
  "errors": [
    {"file": "src/Domain/Order/Order.php", "line": 45, "message": "Method Order::getTotal() has no return type specified."},
    {"file": "src/Domain/Order/Order.php", "line": 67, "message": "Parameter $discount has no type specified."}
  ]
}

Composer Error Parser

Pattern: /Your requirements could not be resolved to an installable set of packages./
Pattern: /Problem (\d+)\n\s+- (.+)/
Pattern: /- (.+) requires (.+) -> (.+)/

Example:
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - symfony/framework-bundle v6.0.0 requires php >=8.0.2 -> your php version (7.4.33) does not satisfy that requirement.

Parsed:
{
  "type": "dependency_conflict",
  "problems": [
    {
      "package": "symfony/framework-bundle",
      "requires": "php >=8.0.2",
      "actual": "7.4.33",
      "message": "PHP version mismatch"
    }
  ]
}

Analysis Output Format

markdown
# CI Pipeline Failure Analysis

**Pipeline:** #12345
**Branch:** feature/new-checkout
**Commit:** abc1234
**Failed Job:** test-unit
**Duration:** 5m 32s

## Failure Summary

| Category | Count | Severity |
|----------|-------|----------|
| Test Failures | 3 | 🔴 Critical |
| PHPStan Errors | 0 | - |
| Infrastructure | 0 | - |

## Root Cause Analysis

### Primary Failure: Test Assertion Error

**Test:** `OrderTest::test_calculate_total_with_discount`
**File:** `tests/Unit/Domain/OrderTest.php:45`

**Error:**

Failed asserting that 90.0 matches expected 90.


**Analysis:**
The test expects an integer `90` but receives a float `90.0`. This is likely due to:
1. Changed calculation in `Order::calculateTotal()` now returns float
2. Test assertion uses strict comparison

**Suggested Fix:**
```php
// Option 1: Update test to expect float
self::assertSame(90.0, $order->calculateTotal());

// Option 2: Use assertEquals for loose comparison
self::assertEquals(90, $order->calculateTotal());

// Option 3: Use Money value object (recommended)
self::assertTrue($order->calculateTotal()->equals(Money::EUR(90)));

Secondary Failure: Mock Configuration

Test: PaymentServiceTest::test_process_payment File: tests/Unit/Application/PaymentServiceTest.php:78

Error:

Expectation failed for method name is "charge" when invoked 1 time(s).
Method was expected to be called 1 times, actually called 0 times.

Analysis: Mock expectation not met. The charge method was never called, indicating:

  1. Conditional logic preventing the call
  2. Early return before reaching the charge
  3. Exception thrown before charge

Suggested Fix: Review the test setup and ensure conditions are met for charge to be called.

Timeline

00:00 - Job started
00:15 - Composer install (cached)
00:45 - PHPStan passed
01:30 - PHPUnit started
04:45 - Test failure: OrderTest::test_calculate_total_with_discount
05:00 - Test failure: PaymentServiceTest::test_process_payment
05:32 - Job failed

Recommendations

  1. Immediate: Fix type mismatch in OrderTest
  2. Short-term: Add type declarations to prevent float/int confusion
  3. Long-term: Use Money value object for financial calculations

Related Changes

Recent commits that may have caused this failure:

  • abc1234 - Refactor calculateTotal to return float
  • def5678 - Update discount calculation logic

## Common Fixes Database

### Dependency Issues

| Error Pattern | Cause | Fix |
|---------------|-------|-----|
| `memory exhausted during composer` | Low memory limit | Add `COMPOSER_MEMORY_LIMIT=-1` |
| `package not found` | Private repo or typo | Check package name and auth |
| `requirements not resolved` | Version conflict | Run `composer why-not package` |

### Test Issues

| Error Pattern | Cause | Fix |
|---------------|-------|-----|
| `Connection refused 127.0.0.1:3306` | MySQL not ready | Add service health check |
| `Mock expectation failed` | Mock not configured | Review mock setup |
| `Class not found` | Autoloader issue | Run `composer dump-autoload` |

### Infrastructure Issues

| Error Pattern | Cause | Fix |
|---------------|-------|-----|
| `no space left on device` | Disk full | Clear Docker cache |
| `Cannot connect to Docker daemon` | DinD not running | Check Docker service |
| `pull access denied` | Auth issue | Add registry credentials |

## Analysis Instructions

1. **Extract log content:**
   - Identify job that failed
   - Get full log output
   - Note timestamps

2. **Identify failure type:**
   - Parse error messages
   - Categorize (test/lint/infra)
   - Determine severity

3. **Root cause analysis:**
   - Trace error to source
   - Check recent changes
   - Identify patterns

4. **Generate recommendations:**
   - Specific fixes
   - Prevention strategies
   - Related improvements

## Usage

Provide:
- CI log output (full or relevant section)
- Pipeline context (branch, commit)
- Recent changes (optional)

The analyzer will:
1. Parse log for errors
2. Categorize failures
3. Identify root cause
4. Suggest specific fixes
5. Provide prevention tips

Frequently asked questions

What does the Analyze Ci Logs AI skill do?

Analyzes CI/CD pipeline logs to identify failure causes. Parses error messages, detects common failure patterns, and provides fix recommendations.

Why use Analyze Ci Logs on TypingMind?

Because you install it once and use it with any model. Analyze Ci Logs is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Analyze Ci Logs in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dykyi-roman/awesome-claude-code/tree/master/skills/analyze-ci-logs. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Analyze Ci Logs?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Analyze Ci Logs?

As many as you like. As long as a model supports skills, you can use Analyze Ci Logs with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Analyze Ci Logs AI skill free?

Yes. It is published on GitHub by dykyi-roman under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇