Skip to content

dirien/yet-another-agent-harness / .claude/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.mdmarkdown3.9 KB
CLAUDE.mdmarkdown9 B
SKILL.mdskill md4.5 KB
assets/example-workflows/validate-agents.ymlconfig2.7 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.yamlconfig9.0 KB
evals/evals.jsonconfig20.7 KB
references/ai-contribution-guidelines.mdmarkdown2.5 KB
references/ai-tool-compatibility.mdmarkdown7.9 KB
references/analysis.mdmarkdown10.8 KB
references/directory-coverage.mdmarkdown2.4 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.jsonmanifest422 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.jsonmanifest328 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.jsonmanifest0 B
references/examples/go-with-internal-web-tsx/package.jsonmanifest220 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.jsonmanifest306 B
references/examples/php-with-frontend/pnpm-lock.yamlmanifest0 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.jsonmanifest514 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.tsxother68 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.tsscript258 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.mdmarkdown7.2 KB
references/git-hooks-setup.mdmarkdown2.4 KB
references/output-structure.mdmarkdown4.9 KB
references/scripts-guide.mdmarkdown4.9 KB
references/verification-guide.mdmarkdown5.5 KB
scripts/analyze-git-history.shexecutablescript9.8 KB
scripts/check-freshness.shexecutablescript6.3 KB
scripts/detect-golden-samples.shexecutablescript5.3 KB
scripts/detect-heuristics.shexecutablescript3.2 KB
scripts/detect-project.shexecutablescript19.3 KB
scripts/detect-scopes.shexecutablescript12.1 KB
scripts/detect-utilities.shexecutablescript4.3 KB
scripts/extract-adrs.shexecutablescript6.6 KB
scripts/extract-agent-configs.shexecutablescript9.2 KB
scripts/extract-architecture-rules.shexecutablescript19.9 KB
scripts/extract-ci-commands.shexecutablescript12.5 KB
scripts/extract-ci-rules.shexecutablescript15.4 KB
scripts/extract-commands.shexecutablescript11.0 KB
scripts/extract-documentation.shexecutablescript7.7 KB
scripts/extract-github-rulesets.shexecutablescript3.5 KB
scripts/extract-github-settings.shexecutablescript3.3 KB
scripts/extract-ide-settings.shexecutablescript7.0 KB
scripts/extract-platform-files.shexecutablescript7.9 KB
scripts/extract-quality-configs.shexecutablescript14.8 KB
scripts/generate-agents.shexecutablescript113.6 KB
scripts/generate-file-map.shexecutablescript4.4 KB
scripts/lib/config-root.shexecutablescript5.8 KB
scripts/lib/summary.shscript10.7 KB
scripts/lib/template.shexecutablescript13.1 KB
scripts/validate-structure.shexecutablescript8.6 KB
scripts/verify-commands.shexecutablescript22.0 KB
scripts/verify-content.shexecutablescript9.5 KB

scripts/check-freshness.sh

View on GitHub
#!/usr/bin/env bash
# Check if AGENTS.md files are up to date with recent git commits
# Compares the "Last updated" date in each AGENTS.md with commits affecting that scope
set -euo pipefail

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

# Options
VERBOSE=false
DAYS_THRESHOLD=7  # Warn if commits are older than this many days after last update (used below)

# Parse flags
while [[ $# -gt 0 ]]; do
    case $1 in
        --verbose|-v)
            VERBOSE=true
            shift
            ;;
        --threshold=*)
            # shellcheck disable=SC2034  # Reserved for future threshold-based staleness check
            DAYS_THRESHOLD="${1#*=}"
            shift
            ;;
        --help|-h)
            cat <<EOF
Usage: check-freshness.sh [PROJECT_DIR] [OPTIONS]

Check if AGENTS.md files are up to date with recent git commits.

Options:
  --verbose, -v         Show detailed output including commit lists
  --threshold=DAYS      Days after last update to consider stale (default: 7)
  --help, -h            Show this help message

Examples:
  check-freshness.sh .                     # Check all AGENTS.md freshness
  check-freshness.sh . --verbose           # Show commit details
  check-freshness.sh . --threshold=14      # Use 14-day threshold
EOF
            exit 0
            ;;
        *)
            PROJECT_DIR="$1"
            shift
            ;;
    esac
done

# Ensure we're in a git repository
if ! git rev-parse --git-dir > /dev/null 2>&1; then
    echo "Error: Not a git repository"
    exit 1
fi

STALE_COUNT=0
FRESH_COUNT=0
UNKNOWN_COUNT=0

log() {
    if [ "$VERBOSE" = true ]; then
        echo "[INFO] $*" >&2
    fi
}

# Extract the "Last updated" date from AGENTS.md header
# Format: <!-- Managed by agent: ... Last updated: YYYY-MM-DD -->
extract_last_updated() {
    local file="$1"
    local date_str

    # Try to extract date from header comment
    date_str=$(grep -o 'Last updated: [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}' "$file" 2>/dev/null | head -1 | sed 's/Last updated: //')

    if [ -n "$date_str" ]; then
        echo "$date_str"
        return 0
    fi

    # Try alternative formats
    # "Created: YYYY-MM-DD" or "Updated: YYYY-MM-DD"
    date_str=$(grep -oE '(Created|Updated): [0-9]{4}-[0-9]{2}-[0-9]{2}' "$file" 2>/dev/null | head -1 | grep -oE '[0-9]{4}-[0-9]{2}-[0-9]{2}')

    if [ -n "$date_str" ]; then
        echo "$date_str"
        return 0
    fi

    return 1
}

# Get the scope directory for an AGENTS.md file
# Root AGENTS.md covers the whole repo, scoped files cover their directory
get_scope_path() {
    local agents_file="$1"
    local dir

    dir=$(dirname "$agents_file")

    if [ "$dir" = "." ]; then
        echo "."  # Root covers everything
    else
        echo "$dir"
    fi
}

# Count commits in a scope since a given date
count_commits_since() {
    local scope_path="$1"
    local since_date="$2"
    local count

    if [ "$scope_path" = "." ]; then
        # Root: check all commits except AGENTS.md files themselves
        count=$(git log --oneline --since="$since_date" -- . ':(exclude)**/AGENTS.md' 2>/dev/null | wc -l)
    else
        # Scoped: check commits in that directory
        count=$(git log --oneline --since="$since_date" -- "$scope_path" ':(exclude)**/AGENTS.md' 2>/dev/null | wc -l)
    fi

    echo "$count"
}

# Get commit summary for a scope since a given date
get_commits_since() {
    local scope_path="$1"
    local since_date="$2"

    if [ "$scope_path" = "." ]; then
        git log --oneline --since="$since_date" -- . ':(exclude)**/AGENTS.md' 2>/dev/null | head -10
    else
        git log --oneline --since="$since_date" -- "$scope_path" ':(exclude)**/AGENTS.md' 2>/dev/null | head -10
    fi
}

# Get files changed in a scope since a given date
get_changed_files_since() {
    local scope_path="$1"
    local since_date="$2"

    if [ "$scope_path" = "." ]; then
        git log --name-only --pretty=format: --since="$since_date" -- . ':(exclude)**/AGENTS.md' 2>/dev/null | sort -u | grep -v '^$' | head -20
    else
        git log --name-only --pretty=format: --since="$since_date" -- "$scope_path" ':(exclude)**/AGENTS.md' 2>/dev/null | sort -u | grep -v '^$' | head -20
    fi
}

# Check freshness of a single AGENTS.md file
check_file_freshness() {
    local agents_file="$1"
    local rel_path="${agents_file#"$PROJECT_DIR"/}"
    local last_updated
    local scope_path
    local commit_count

    echo "Checking: $rel_path"

    # Extract last updated date
    if ! last_updated=$(extract_last_updated "$agents_file"); then
        echo "  ⚠️  No 'Last updated' date found in header"
        ((UNKNOWN_COUNT++)) || true
        return 1
    fi

    log "  Last updated: $last_updated"

    # Get scope path
    scope_path=$(get_scope_path "$agents_file")
    log "  Scope: $scope_path"

    # Count commits since last update
    commit_count=$(count_commits_since "$scope_path" "$last_updated")

    if [ "$commit_count" -eq 0 ]; then
        echo "  ✅ Up to date (no commits since $last_updated)"
        ((FRESH_COUNT++)) || true
        return 0
    fi

    # Check if commits are significant
    echo "  ⚠️  Potentially stale: $commit_count commit(s) since $last_updated"
    ((STALE_COUNT++)) || true

    if [ "$VERBOSE" = true ]; then
        echo "  Recent commits:"
        get_commits_since "$scope_path" "$last_updated" | while read -r line; do
            echo "    - $line"
        done

        echo "  Changed files:"
        get_changed_files_since "$scope_path" "$last_updated" | while read -r line; do
            echo "    - $line"
        done
    fi

    return 1
}

# Main
echo "Checking AGENTS.md freshness in: $PROJECT_DIR"
echo ""

# Find all AGENTS.md files
AGENTS_FILES=$(find "$PROJECT_DIR" -name "AGENTS.md" -type f 2>/dev/null | sort)

if [ -z "$AGENTS_FILES" ]; then
    echo "No AGENTS.md files found"
    exit 0
fi

# Check each file
while read -r file; do
    check_file_freshness "$file"
    echo ""
done <<< "$AGENTS_FILES"

# Summary
echo "=== Freshness Summary ==="
echo "✅ Up to date: $FRESH_COUNT"
echo "⚠️  Potentially stale: $STALE_COUNT"
[ "$UNKNOWN_COUNT" -gt 0 ] && echo "❓ Unknown (no date): $UNKNOWN_COUNT"

if [ "$STALE_COUNT" -gt 0 ]; then
    echo ""
    echo "Recommendation: Review the stale AGENTS.md files and update if needed."
    echo "Use --verbose to see which commits and files have changed."
    exit 1
fi

exit 0
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: 471kUpdated 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: 198kUpdated 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: 198kUpdated 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: 198kUpdated Claude CodeCodexVerifiedInstall