Skip to content

netresearch/agent-rules-skill / skills/agent-rules

agent-rules

Flagged

Use when creating or updating AGENTS.md files, .github/copilot-instructions.md, or other AI agent rule files, onboarding AI agents to a project, standardizing agent documentation, or when anyone mentions AGENTS.md, agent rules, project onboarding, or codebase documentation for AI agents.

FileKindSize
AGENTS.mdmarkdown4.0 KB
CLAUDE.mdmarkdown9 B
SKILL.mdskill md5.2 KB
assets/.markdownlint-cli2.jsoncother624 B
assets/example-workflows/validate-agents.ymlconfig2.8 KB
assets/root-thin.mdmarkdown5.7 KB
assets/root-verbose.mdmarkdown5.5 KB
assets/scoped/backend-go.mdmarkdown3.6 KB
assets/scoped/backend-php.mdmarkdown3.0 KB
assets/scoped/backend-python.mdmarkdown2.6 KB
assets/scoped/backend-typescript.mdmarkdown2.8 KB
assets/scoped/claude-code-skill.mdmarkdown3.4 KB
assets/scoped/cli.mdmarkdown2.7 KB
assets/scoped/concourse.mdmarkdown5.2 KB
assets/scoped/ddev.mdmarkdown2.4 KB
assets/scoped/docker.mdmarkdown5.3 KB
assets/scoped/documentation.mdmarkdown3.5 KB
assets/scoped/examples.mdmarkdown3.4 KB
assets/scoped/frontend-typescript.mdmarkdown2.7 KB
assets/scoped/github-actions.mdmarkdown5.2 KB
assets/scoped/gitlab-ci.mdmarkdown4.6 KB
assets/scoped/oro-bundle.mdmarkdown6.5 KB
assets/scoped/oro-project.mdmarkdown5.5 KB
assets/scoped/python-modern.mdmarkdown6.1 KB
assets/scoped/resources.mdmarkdown3.5 KB
assets/scoped/skill-repo.mdmarkdown5.4 KB
assets/scoped/symfony.mdmarkdown5.3 KB
assets/scoped/testing.mdmarkdown3.0 KB
assets/scoped/typo3-docs.mdmarkdown3.6 KB
assets/scoped/typo3-extension.mdmarkdown5.1 KB
assets/scoped/typo3-project.mdmarkdown4.7 KB
assets/scoped/typo3-testing.mdmarkdown3.0 KB
checkpoints.yamlconfig14.4 KB
evals/evals.jsonconfig22.9 KB
references/ai-contribution-guidelines.mdmarkdown2.6 KB
references/ai-tool-compatibility.mdmarkdown8.0 KB
references/directory-coverage.mdmarkdown2.5 KB
references/examples/coding-agent-cli/AGENTS.mdmarkdown2.5 KB
references/examples/coding-agent-cli/go.modmanifest45 B
references/examples/coding-agent-cli/scripts-AGENTS.mdmarkdown10.1 KB
references/examples/express-api-ts/.env.exampleother232 B
references/examples/express-api-ts/AGENTS.mdmarkdown3.1 KB
references/examples/express-api-ts/package.jsonmanifest757 B
references/examples/express-api-ts/pnpm-lock.yamlmanifest101 B
references/examples/express-api-ts/src/AGENTS.mdmarkdown3.1 KB
references/examples/express-api-ts/src/config.tsscript917 B
references/examples/express-api-ts/src/controllers/userController.tsscript2.1 KB
references/examples/express-api-ts/src/index.tsscript671 B
references/examples/express-api-ts/src/middleware/errorHandler.tsscript1.0 KB
references/examples/express-api-ts/src/middleware/requestLogger.tsscript471 B
references/examples/express-api-ts/src/routes/health.tsscript428 B
references/examples/express-api-ts/src/routes/users.tsscript397 B
references/examples/express-api-ts/src/utils/errors.tsscript1.2 KB
references/examples/express-api-ts/src/utils/logger.tsscript441 B
references/examples/express-api-ts/tsconfig.jsonconfig630 B
references/examples/fastapi-app/.env.exampleother348 B
references/examples/fastapi-app/AGENTS.mdmarkdown3.2 KB
references/examples/fastapi-app/pyproject.tomlmanifest1.8 KB
references/examples/fastapi-app/src/AGENTS.mdmarkdown2.9 KB
references/examples/fastapi-app/src/__init__.pyscript58 B
references/examples/fastapi-app/src/config.pyscript1.1 KB
references/examples/fastapi-app/src/main.pyscript1.7 KB
references/examples/fastapi-app/src/models/__init__.pyscript278 B
references/examples/fastapi-app/src/models/item.pyscript1.0 KB
references/examples/fastapi-app/src/models/user.pyscript922 B
references/examples/fastapi-app/src/routes/__init__.pyscript110 B
references/examples/fastapi-app/src/routes/health.pyscript470 B
references/examples/fastapi-app/src/routes/items.pyscript1.9 KB
references/examples/fastapi-app/src/routes/users.pyscript1.7 KB
references/examples/fastapi-app/src/services/__init__.pyscript174 B
references/examples/fastapi-app/src/services/item_service.pyscript2.5 KB
references/examples/fastapi-app/src/services/user_service.pyscript2.1 KB
references/examples/fastapi-app/uv.lockmanifest136 B
references/examples/go-api-with-react-admin/.scopesother93 B
references/examples/go-api-with-react-admin/AGENTS.mdmarkdown3.0 KB
references/examples/go-api-with-react-admin/admin/package.jsonmanifest423 B
references/examples/go-api-with-react-admin/admin/src/App.tsxother101 B
references/examples/go-api-with-react-admin/cmd/api/main.goscript75 B
references/examples/go-api-with-react-admin/go.modmanifest31 B
references/examples/go-api-with-react-admin/main.goscript71 B
references/examples/go-with-internal-web-tsx/.scopesother102 B
references/examples/go-with-internal-web-tsx/AGENTS.mdmarkdown3.1 KB
references/examples/go-with-internal-web-tsx/go.modmanifest34 B
references/examples/go-with-internal-web-tsx/internal/web/AGENTS.mdmarkdown3.1 KB
references/examples/go-with-internal-web-tsx/internal/web/package.jsonmanifest329 B
references/examples/go-with-internal-web-tsx/internal/web/src/App.tsxother57 B
references/examples/go-with-internal-web-tsx/internal/web/src/Button.tsxother63 B
references/examples/go-with-internal-web-tsx/internal/web/src/Footer.tsxother63 B
references/examples/go-with-internal-web-tsx/internal/web/src/Header.tsxother63 B
references/examples/go-with-internal-web-tsx/internal/web/src/Sidebar.tsxother65 B
references/examples/go-with-internal-web-tsx/main.goscript85 B
references/examples/go-with-internal-web-tsx/package-lock.jsonmanifest87 B
references/examples/go-with-internal-web-tsx/package.jsonmanifest221 B
references/examples/ldap-selfservice/AGENTS.mdmarkdown2.5 KB
references/examples/ldap-selfservice/go.modmanifest45 B
references/examples/ldap-selfservice/internal-AGENTS.mdmarkdown10.0 KB
references/examples/ldap-selfservice/internal-web-AGENTS.mdmarkdown12.1 KB
references/examples/php-with-frontend/.scopesother89 B
references/examples/php-with-frontend/AGENTS.mdmarkdown3.1 KB
references/examples/php-with-frontend/composer.jsonconfig185 B
references/examples/php-with-frontend/package.jsonmanifest307 B
references/examples/php-with-frontend/pnpm-lock.yamlmanifest101 B
references/examples/php-with-frontend/src/Controller.phpscript41 B
references/examples/php-with-frontend/web/AGENTS.mdmarkdown3.1 KB
references/examples/php-with-frontend/web/package.jsonmanifest515 B
references/examples/php-with-frontend/web/src/App.tsxother63 B
references/examples/php-with-frontend/web/src/Button.tsxother215 B
references/examples/php-with-frontend/web/src/Footer.tsxother125 B
references/examples/php-with-frontend/web/src/Header.tsxother122 B
references/examples/php-with-frontend/web/src/main.tsxother41 B
references/examples/php-with-frontend/web/tsconfig.jsonconfig280 B
references/examples/pnpm-workspace/AGENTS.mdmarkdown2.6 KB
references/examples/pnpm-workspace/package.jsonmanifest105 B
references/examples/pnpm-workspace/packages/web/package.jsonmanifest187 B
references/examples/pnpm-workspace/packages/web/src/index.tsxother258 B
references/examples/pnpm-workspace/pnpm-lock.yamlmanifest920 B
references/examples/pnpm-workspace/pnpm-workspace.yamlconfig27 B
references/examples/simple-ldap-go/AGENTS.mdmarkdown2.5 KB
references/examples/simple-ldap-go/examples-AGENTS.mdmarkdown1.8 KB
references/examples/simple-ldap-go/go.modmanifest43 B
references/examples/t3x-rte-ckeditor-image/AGENTS.mdmarkdown2.5 KB
references/examples/t3x-rte-ckeditor-image/Classes-AGENTS.mdmarkdown12.0 KB
references/examples/t3x-rte-ckeditor-image/composer.jsonconfig174 B
references/feedback-memory-schema.mdmarkdown6.2 KB
references/fleet-sync-sweep.mdmarkdown4.8 KB
references/git-hooks-setup.mdmarkdown2.5 KB
references/output-structure.mdmarkdown5.4 KB
references/quality-rubric.mdmarkdown6.2 KB
references/scripts-guide.mdmarkdown7.7 KB
references/verification-guide.mdmarkdown9.4 KB
scripts/analyze-git-history.shexecutablescript10.2 KB
scripts/check-freshness.shexecutablescript8.9 KB
scripts/detect-golden-samples.shexecutablescript5.7 KB
scripts/detect-heuristics.shexecutablescript3.2 KB
scripts/detect-project.shexecutablescript19.6 KB
scripts/detect-scopes.shexecutablescript13.4 KB
scripts/detect-utilities.shexecutablescript4.6 KB
scripts/extract-adrs.shexecutablescript6.8 KB
scripts/extract-agent-configs.shexecutablescript9.3 KB
scripts/extract-architecture-rules.shexecutablescript19.9 KB
scripts/extract-ci-commands.shexecutablescript12.5 KB
scripts/extract-ci-rules.shexecutablescript16.1 KB
scripts/extract-commands.shexecutablescript11.9 KB
scripts/extract-documentation.shexecutablescript7.8 KB
scripts/extract-github-rulesets.shexecutablescript3.8 KB
scripts/extract-github-settings.shexecutablescript3.6 KB
scripts/extract-ide-settings.shexecutablescript7.0 KB
scripts/extract-platform-files.shexecutablescript8.0 KB
scripts/extract-quality-configs.shexecutablescript14.9 KB
scripts/generate-agents.shexecutablescript118.2 KB
scripts/generate-file-map.shexecutablescript4.6 KB
scripts/lib/config-root.shexecutablescript5.8 KB
scripts/lib/git.shscript1.2 KB
scripts/lib/summary.shscript11.7 KB
scripts/lib/template.shexecutablescript15.9 KB
scripts/score-agents.shexecutablescript9.8 KB
scripts/tests/test-agents-file-write-boundary.shscript5.8 KB
scripts/tests/test-agents-scan-dependency-trees.shexecutablescript4.5 KB
scripts/tests/test-changelog-rule.shexecutablescript3.4 KB
scripts/tests/test-claude-import-file.shscript3.3 KB
scripts/tests/test-command-allowlist.shexecutablescript4.7 KB
scripts/tests/test-dependency-tree-exclusion.shscript2.5 KB
scripts/tests/test-extract-commands-real-scripts.shexecutablescript4.0 KB
scripts/tests/test-git-history-counts.shexecutablescript3.6 KB
scripts/tests/test-golden-sample-file-names.shexecutablescript2.2 KB
scripts/tests/test-json-manifest.shexecutablescript5.5 KB
scripts/tests/test-last-verified-opt-in.shscript1.6 KB
scripts/tests/test-make-target-lookup.shscript2.5 KB
scripts/tests/test-merge-heuristic.shscript1.8 KB
scripts/tests/test-scope-index-heading.shexecutablescript4.4 KB
scripts/tests/test-scope-index-keeps-existing.shexecutablescript2.5 KB
scripts/tests/test-symlink-write-boundary.shexecutablescript6.3 KB
scripts/tests/test-untrusted-git-config.shscript5.0 KB
scripts/tests/test-verification-sidecar.shscript2.7 KB
scripts/validate-structure.shexecutablescript13.3 KB
scripts/verify-commands.shexecutablescript32.5 KB
scripts/verify-content.shexecutablescript13.2 KB

scripts/extract-quality-configs.sh

View on GitHub
#!/usr/bin/env bash
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: Netresearch DTT GmbH
# Extract detailed settings from quality tool configuration files
# (linters, formatters, type checkers, etc.)
set -euo pipefail

PROJECT_DIR="${1:-.}"
cd "$PROJECT_DIR"

# Helper to safely parse YAML values
yaml_get() {
    local file="$1"
    local key="$2"
    local default="${3:-}"

    if [ ! -f "$file" ]; then
        echo "$default"
        return
    fi

    # Simple YAML extraction (handles basic cases)
    grep -E "^${key}:" "$file" 2>/dev/null | sed "s/^${key}:[[:space:]]*//" | head -1 || echo "$default"
}

# Parse golangci-lint config (.golangci.yml or .golangci.yaml)
parse_golangci() {
    local config_file=""
    for f in .golangci.yml .golangci.yaml; do
        [ -f "$f" ] && config_file="$f" && break
    done

    if [ -z "$config_file" ]; then
        echo "{}"
        return
    fi

    local line_length=""
    local enabled_linters=()
    local disabled_linters=()

    # Extract line-length from linters-settings.lll
    line_length=$(grep -A5 "lll:" "$config_file" 2>/dev/null | grep "line-length:" | sed 's/.*line-length:[[:space:]]*//' | head -1 || echo "")

    # Extract enabled linters
    local in_enable=false
    while IFS= read -r line; do
        if [[ "$line" =~ ^[[:space:]]*enable: ]]; then
            in_enable=true
            continue
        fi
        if [[ "$line" =~ ^[[:space:]]*disable: ]] || [[ "$line" =~ ^[[:space:]]*[a-z]+: && ! "$line" =~ ^[[:space:]]*- ]]; then
            in_enable=false
        fi
        if $in_enable && [[ "$line" =~ ^[[:space:]]*-[[:space:]]*([a-z0-9_-]+) ]]; then
            enabled_linters+=("${BASH_REMATCH[1]}")
        fi
    done < "$config_file"

    # Extract disabled linters
    local in_disable=false
    while IFS= read -r line; do
        if [[ "$line" =~ ^[[:space:]]*disable: ]]; then
            in_disable=true
            continue
        fi
        if [[ "$line" =~ ^[[:space:]]*enable: ]] || [[ "$line" =~ ^[[:space:]]*[a-z]+: && ! "$line" =~ ^[[:space:]]*- ]]; then
            in_disable=false
        fi
        if $in_disable && [[ "$line" =~ ^[[:space:]]*-[[:space:]]*([a-z0-9_-]+) ]]; then
            disabled_linters+=("${BASH_REMATCH[1]}")
        fi
    done < "$config_file"

    # Build JSON arrays
    local enabled_json="[]"
    local disabled_json="[]"
    [ ${#enabled_linters[@]} -gt 0 ] && enabled_json=$(printf '%s\n' "${enabled_linters[@]}" | jq -R . | jq -s .)
    [ ${#disabled_linters[@]} -gt 0 ] && disabled_json=$(printf '%s\n' "${disabled_linters[@]}" | jq -R . | jq -s .)

    jq -n \
        --arg file "$config_file" \
        --arg line_length "$line_length" \
        --argjson enabled "$enabled_json" \
        --argjson disabled "$disabled_json" \
        '{
            file: $file,
            line_length: $line_length,
            enabled_linters: $enabled,
            disabled_linters: $disabled
        } | with_entries(select(.value != "" and .value != []))'
}

# Parse PHPStan config (phpstan.neon or phpstan.neon.dist)
parse_phpstan() {
    local config_file=""
    for f in phpstan.neon phpstan.neon.dist phpstan.dist.neon; do
        [ -f "$f" ] && config_file="$f" && break
    done

    if [ -z "$config_file" ]; then
        echo "{}"
        return
    fi

    local level=""
    local paths=()

    # Extract level
    level=$(grep -E "^[[:space:]]*level:" "$config_file" 2>/dev/null | sed 's/.*level:[[:space:]]*//' | head -1 || echo "")

    # Extract paths
    local in_paths=false
    while IFS= read -r line; do
        if [[ "$line" =~ ^[[:space:]]*paths: ]]; then
            in_paths=true
            continue
        fi
        if [[ "$line" =~ ^[[:space:]]*[a-z]+: && ! "$line" =~ ^[[:space:]]*- ]]; then
            in_paths=false
        fi
        if $in_paths && [[ "$line" =~ ^[[:space:]]*-[[:space:]]*(.+) ]]; then
            paths+=("${BASH_REMATCH[1]}")
        fi
    done < "$config_file"

    local paths_json="[]"
    [ ${#paths[@]} -gt 0 ] && paths_json=$(printf '%s\n' "${paths[@]}" | jq -R . | jq -s .)

    jq -n \
        --arg file "$config_file" \
        --arg level "$level" \
        --argjson paths "$paths_json" \
        '{
            file: $file,
            level: $level,
            paths: $paths
        } | with_entries(select(.value != "" and .value != []))'
}

# Parse ESLint config
parse_eslint() {
    local config_file=""
    for f in eslint.config.js eslint.config.mjs .eslintrc.js .eslintrc.cjs .eslintrc.json .eslintrc.yml .eslintrc.yaml .eslintrc; do
        [ -f "$f" ] && config_file="$f" && break
    done

    if [ -z "$config_file" ]; then
        echo "{}"
        return
    fi

    local extends=""
    local plugins=""

    # For JSON config files
    if [[ "$config_file" == *.json ]] || [[ "$config_file" == .eslintrc ]]; then
        extends=$(jq -r '.extends // [] | if type == "array" then . else [.] end | join(", ")' "$config_file" 2>/dev/null || echo "")
        plugins=$(jq -r '.plugins // [] | join(", ")' "$config_file" 2>/dev/null || echo "")
    fi

    jq -n \
        --arg file "$config_file" \
        --arg extends "$extends" \
        --arg plugins "$plugins" \
        '{
            file: $file,
            extends: $extends,
            plugins: $plugins
        } | with_entries(select(.value != ""))'
}

# Parse Prettier config
parse_prettier() {
    local config_file=""
    for f in .prettierrc .prettierrc.json .prettierrc.yml .prettierrc.yaml .prettierrc.js .prettierrc.cjs prettier.config.js prettier.config.cjs; do
        [ -f "$f" ] && config_file="$f" && break
    done

    if [ -z "$config_file" ]; then
        echo "{}"
        return
    fi

    local print_width=""
    local tab_width=""
    local use_tabs=""
    local semi=""
    local single_quote=""

    # For JSON config files
    if [[ "$config_file" == *.json ]] || [[ "$config_file" == .prettierrc ]]; then
        print_width=$(jq -r '.printWidth // ""' "$config_file" 2>/dev/null || echo "")
        tab_width=$(jq -r '.tabWidth // ""' "$config_file" 2>/dev/null || echo "")
        use_tabs=$(jq -r '.useTabs // ""' "$config_file" 2>/dev/null || echo "")
        semi=$(jq -r '.semi // ""' "$config_file" 2>/dev/null || echo "")
        single_quote=$(jq -r '.singleQuote // ""' "$config_file" 2>/dev/null || echo "")
    fi

    jq -n \
        --arg file "$config_file" \
        --arg print_width "$print_width" \
        --arg tab_width "$tab_width" \
        --arg use_tabs "$use_tabs" \
        --arg semi "$semi" \
        --arg single_quote "$single_quote" \
        '{
            file: $file,
            print_width: $print_width,
            tab_width: $tab_width,
            use_tabs: $use_tabs,
            semi: $semi,
            single_quote: $single_quote
        } | with_entries(select(.value != ""))'
}

# Parse TypeScript config (tsconfig.json)
parse_tsconfig() {
    if [ ! -f "tsconfig.json" ]; then
        echo "{}"
        return
    fi

    local strict=""
    local target=""
    local module=""
    local strict_null=""

    strict=$(jq -r '.compilerOptions.strict // ""' tsconfig.json 2>/dev/null || echo "")
    target=$(jq -r '.compilerOptions.target // ""' tsconfig.json 2>/dev/null || echo "")
    module=$(jq -r '.compilerOptions.module // ""' tsconfig.json 2>/dev/null || echo "")
    strict_null=$(jq -r '.compilerOptions.strictNullChecks // ""' tsconfig.json 2>/dev/null || echo "")

    jq -n \
        --arg file "tsconfig.json" \
        --arg strict "$strict" \
        --arg target "$target" \
        --arg module "$module" \
        --arg strict_null "$strict_null" \
        '{
            file: $file,
            strict: $strict,
            target: $target,
            module: $module,
            strict_null_checks: $strict_null
        } | with_entries(select(.value != ""))'
}

# Parse Ruff config (ruff.toml or pyproject.toml)
parse_ruff() {
    local config_file=""
    local line_length=""
    local select_rules=""
    local ignore_rules=""

    # Check for standalone ruff.toml
    if [ -f "ruff.toml" ]; then
        config_file="ruff.toml"
        line_length=$(grep -E "^line-length" "$config_file" 2>/dev/null | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
        select_rules=$(grep -E "^select" "$config_file" 2>/dev/null | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
        ignore_rules=$(grep -E "^ignore" "$config_file" 2>/dev/null | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
    elif [ -f "pyproject.toml" ] && grep -q '\[tool.ruff\]' pyproject.toml 2>/dev/null; then
        config_file="pyproject.toml"
        # Extract from [tool.ruff] section
        line_length=$(sed -n '/\[tool.ruff\]/,/^\[/p' pyproject.toml 2>/dev/null | grep -E "^line-length" | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
        select_rules=$(sed -n '/\[tool.ruff\]/,/^\[/p' pyproject.toml 2>/dev/null | grep -E "^select" | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
    fi

    if [ -z "$config_file" ]; then
        echo "{}"
        return
    fi

    jq -n \
        --arg file "$config_file" \
        --arg line_length "$line_length" \
        --arg select "$select_rules" \
        --arg ignore "$ignore_rules" \
        '{
            file: $file,
            line_length: $line_length,
            select: $select,
            ignore: $ignore
        } | with_entries(select(.value != ""))'
}

# Parse mypy config
parse_mypy() {
    local config_file=""
    local strict=""
    local python_version=""

    # Check various config locations
    if [ -f "mypy.ini" ]; then
        config_file="mypy.ini"
        strict=$(grep -E "^strict[[:space:]]*=" "$config_file" 2>/dev/null | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
        python_version=$(grep -E "^python_version[[:space:]]*=" "$config_file" 2>/dev/null | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
    elif [ -f ".mypy.ini" ]; then
        config_file=".mypy.ini"
        strict=$(grep -E "^strict[[:space:]]*=" "$config_file" 2>/dev/null | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
    elif [ -f "pyproject.toml" ] && grep -q '\[tool.mypy\]' pyproject.toml 2>/dev/null; then
        config_file="pyproject.toml"
        strict=$(sed -n '/\[tool.mypy\]/,/^\[/p' pyproject.toml 2>/dev/null | grep -E "^strict" | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
        python_version=$(sed -n '/\[tool.mypy\]/,/^\[/p' pyproject.toml 2>/dev/null | grep -E "^python_version" | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
    elif [ -f "setup.cfg" ] && grep -q '\[mypy\]' setup.cfg 2>/dev/null; then
        config_file="setup.cfg"
        strict=$(sed -n '/\[mypy\]/,/^\[/p' setup.cfg 2>/dev/null | grep -E "^strict[[:space:]]*=" | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
    fi

    if [ -z "$config_file" ]; then
        echo "{}"
        return
    fi

    jq -n \
        --arg file "$config_file" \
        --arg strict "$strict" \
        --arg python_version "$python_version" \
        '{
            file: $file,
            strict: $strict,
            python_version: $python_version
        } | with_entries(select(.value != ""))'
}

# Parse Black config
parse_black() {
    local config_file=""
    local line_length=""
    local target_version=""

    if [ -f "pyproject.toml" ] && grep -q '\[tool.black\]' pyproject.toml 2>/dev/null; then
        config_file="pyproject.toml"
        line_length=$(sed -n '/\[tool.black\]/,/^\[/p' pyproject.toml 2>/dev/null | grep -E "^line-length" | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
        target_version=$(sed -n '/\[tool.black\]/,/^\[/p' pyproject.toml 2>/dev/null | grep -E "^target-version" | sed 's/.*=[[:space:]]*//' | head -1 || echo "")
    fi

    if [ -z "$config_file" ]; then
        echo "{}"
        return
    fi

    jq -n \
        --arg file "$config_file" \
        --arg line_length "$line_length" \
        --arg target_version "$target_version" \
        '{
            file: $file,
            line_length: $line_length,
            target_version: $target_version
        } | with_entries(select(.value != ""))'
}

# Parse PHP-CS-Fixer config
parse_php_cs_fixer() {
    local config_file=""
    for f in .php-cs-fixer.php .php-cs-fixer.dist.php .php_cs .php_cs.dist; do
        [ -f "$f" ] && config_file="$f" && break
    done

    if [ -z "$config_file" ]; then
        echo "{}"
        return
    fi

    # Check for risky rules
    local has_risky="false"
    grep -q "setRiskyAllowed(true)" "$config_file" 2>/dev/null && has_risky="true"

    # Try to extract rule set
    local rule_set=""
    rule_set=$(grep -oE "@(PSR12|PSR2|Symfony|PhpCsFixer)" "$config_file" 2>/dev/null | head -1 || echo "")

    jq -n \
        --arg file "$config_file" \
        --arg rule_set "$rule_set" \
        --argjson risky "$has_risky" \
        '{
            file: $file,
            rule_set: $rule_set,
            risky_allowed: $risky
        } | with_entries(select(.value != "" and .value != false))'
}

# Detect which tools are configured
TOOLS=()
[ -f ".golangci.yml" ] || [ -f ".golangci.yaml" ] && TOOLS+=("golangci-lint")
[ -f "phpstan.neon" ] || [ -f "phpstan.neon.dist" ] || [ -f "phpstan.dist.neon" ] && TOOLS+=("phpstan")
for f in eslint.config.js eslint.config.mjs .eslintrc.js .eslintrc.cjs .eslintrc.json .eslintrc.yml .eslintrc.yaml .eslintrc; do
    [ -f "$f" ] && TOOLS+=("eslint") && break
done
for f in .prettierrc .prettierrc.json .prettierrc.yml prettier.config.js; do
    [ -f "$f" ] && TOOLS+=("prettier") && break
done
[ -f "tsconfig.json" ] && TOOLS+=("typescript")
{ [ -f "ruff.toml" ] || grep -q '\[tool.ruff\]' pyproject.toml 2>/dev/null; } && TOOLS+=("ruff")
{ [ -f "mypy.ini" ] || [ -f ".mypy.ini" ] || grep -q '\[tool.mypy\]' pyproject.toml 2>/dev/null || grep -q '\[mypy\]' setup.cfg 2>/dev/null; } && TOOLS+=("mypy")
grep -q '\[tool.black\]' pyproject.toml 2>/dev/null && TOOLS+=("black")
for f in .php-cs-fixer.php .php-cs-fixer.dist.php .php_cs .php_cs.dist; do
    [ -f "$f" ] && TOOLS+=("php-cs-fixer") && break
done

# Build tools list JSON
if [ ${#TOOLS[@]} -eq 0 ]; then
    TOOLS_JSON="[]"
else
    TOOLS_JSON=$(printf '%s\n' "${TOOLS[@]}" | jq -R . | jq -s .)
fi

# Parse each tool config
GOLANGCI_CONFIG=$(parse_golangci)
PHPSTAN_CONFIG=$(parse_phpstan)
ESLINT_CONFIG=$(parse_eslint)
PRETTIER_CONFIG=$(parse_prettier)
TSCONFIG=$(parse_tsconfig)
RUFF_CONFIG=$(parse_ruff)
MYPY_CONFIG=$(parse_mypy)
BLACK_CONFIG=$(parse_black)
PHP_CS_FIXER_CONFIG=$(parse_php_cs_fixer)

# Build final JSON output
jq -n \
    --argjson tools "$TOOLS_JSON" \
    --argjson golangci "$GOLANGCI_CONFIG" \
    --argjson phpstan "$PHPSTAN_CONFIG" \
    --argjson eslint "$ESLINT_CONFIG" \
    --argjson prettier "$PRETTIER_CONFIG" \
    --argjson typescript "$TSCONFIG" \
    --argjson ruff "$RUFF_CONFIG" \
    --argjson mypy "$MYPY_CONFIG" \
    --argjson black "$BLACK_CONFIG" \
    --argjson php_cs_fixer "$PHP_CS_FIXER_CONFIG" \
    '{
        detected_tools: $tools,
        golangci_lint: $golangci,
        phpstan: $phpstan,
        eslint: $eslint,
        prettier: $prettier,
        typescript: $typescript,
        ruff: $ruff,
        mypy: $mypy,
        black: $black,
        php_cs_fixer: $php_cs_fixer
    }'
rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.Stars: 470kUpdated Claude CodeCodexVerifiedInstall
academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).Stars: 197kUpdated Claude CodeCodexUnverifiedInstall
doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.Stars: 197kUpdated Claude CodeCodexVerifiedInstall