Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

developer-internals

БесплатноБез исполняемых скриптовНе проверен

Internal gh-aw architecture: validation, pure session graders, safe output messages, schema validation, YAML compatibility, and MCP logs guardrail.

githubот github★ 5 758 звёзд на GitHub

Об этом скилле

gh-aw Internal Architecture

Use this reference when working on the gh-aw compiler internals, validation system, session graders, safe output processing, or MCP server features.

Table of Contents

Validation Architecture

The validation system ensures workflow configurations are correct, secure, and compatible with GitHub Actions before compilation.

Architecture Overview

graph LR
    WF[Workflow] --> CV[Centralized Validation]
    WF --> DV[Domain-Specific Validation]
    CV --> validation.go
    DV --> strict_mode_validation.go
    DV --> strict_mode_permissions_validation.go
    DV --> pip.go
    DV --> npm.go
    DV --> expression_safety_validation.go
    DV --> engine.go
    DV --> mcp-config.go

Centralized Validation

Location: pkg/workflow/validation.go (core compile-time checks)

Purpose: General-purpose validation that applies across the entire workflow system

Key Functions:

  • validateExpressionSizes() - Ensures GitHub Actions expression size limits
  • validateContainerImages() - Verifies Docker images exist and are accessible
  • validateRuntimePackages() - Validates runtime package dependencies
  • validateGitHubActionsSchema() - Validates against GitHub Actions YAML schema
  • validateNoDuplicateCacheIDs() - Ensures unique cache identifiers
  • validateSecretReferences() - Validates secret reference syntax
  • validateRepositoryFeatures() - Checks repository capabilities
  • validateHTTPTransportSupport() - Validates HTTP transport configuration
  • validateWorkflowRunBranches() - Validates workflow run branch configuration

When to add validation here:

  • Cross-cutting concerns that span multiple domains
  • Core workflow integrity checks
  • GitHub Actions compatibility validation
  • General schema and configuration validation
  • Repository-level feature detection

Domain-Specific Validation

Domain-specific validation is organized into separate files in pkg/workflow/:

Strict Mode Validation

Files: pkg/workflow/strict_mode_validation.go and the strict_mode_*.go validators

Enforces security and safety constraints in strict mode:

  • validateStrictPermissions() - Refuses write permissions
  • validateStrictNetwork() - Requires explicit network configuration
  • validateStrictMCPNetwork() - Requires network config on custom MCP servers
  • validateStrictBashTools() - Refuses bash wildcard tools

Python Package Validation

File: pkg/workflow/pip.go

Validates Python package availability on PyPI.

NPM Package Validation

File: pkg/workflow/npm.go

Validates NPX package availability on npm registry.

Expression Safety

File: pkg/workflow/expression_safety_validation.go

Validates GitHub Actions expression security with allowlist-based validation. The matching test coverage lives in pkg/workflow/expression_safety_test.go.

Validation Decision Tree

graph TD
    A[New Validation Requirement] --> B{Security or strict mode?}
    B -->|Yes| C[strict_mode_validation.go]
    B -->|No| D{Only applies to one domain?}
    D -->|Yes| E{Domain-specific file exists?}
    E -->|Yes| F[Add to domain file]
    E -->|No| G[Create new domain file]
    D -->|No| H{Cross-cutting concern?}
    H -->|Yes| I[validation.go]
    H -->|No| J{Validates external resources?}
    J -->|Yes| K[Domain-specific file]
    J -->|No| I

Validation Patterns

Allowlist Validation

Used for security-sensitive validation with limited set of valid options:

func validateExpressionSafety(content string) error {
    matches := expressionRegex.FindAllStringSubmatch(content, -1)
    var unauthorizedExpressions []string

    for _, match := range matches {
        expression := strings.TrimSpace(match[1])
        if !isAllowed(expression) {
            unauthorizedExpressions = append(unauthorizedExpressions, expression)
        }
    }

    if len(unauthorizedExpressions) > 0 {
        return fmt.Errorf("unauthorized expressions: %v", unauthorizedExpressions)
    }
    return nil
}

External Resource Validation

Used for validating external dependencies:

func validateDockerImage(image string, verbose bool) error {
    cmd := exec.Command("docker", "inspect", image)
    output, err := cmd.CombinedOutput()

    if err != nil {
        pullCmd := exec.Command("docker", "pull", image)
        if pullErr := pullCmd.Run(); pullErr != nil {
            return fmt.Errorf("docker image not found: %s", image)
        }
    }
    return nil
}

Schema Validation

Used for configuration file validation:

func (c *Compiler) validateGitHubActionsSchema(yamlContent string) error {
    schema := loadGitHubActionsSchema()
Полный SKILL.md на GitHub

Установить developer-internals в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл developer-internals?

Internal gh-aw architecture: validation, pure session graders, safe output messages, schema validation, YAML compatibility, and MCP logs guardrail.

Как установить скилл developer-internals?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл developer-internals запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить developer-internals с