本文へ移動
cccskills
無料GitHub で公開

aws-batch

Use when working with Aws Batch — aWS Batch compute environment management, job queue analysis, scheduling policy review, and array job monitoring. Covers compute resource utilization, job status tracking, failure investigation, Fargate vs EC2 comparison, and queue priority analysis.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md7.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

AWS Batch Skill

Analyze AWS Batch compute environments and jobs with parallel execution and anti-hallucination guardrails.

Relationship to other AWS skills:

  • aws-batch/ → Batch-specific analysis (compute environments, job queues, jobs)
  • aws/ → "How to execute" (parallel patterns, throttling, output format)

CRITICAL: Parallel Execution Requirement

ALL independent operations MUST run in parallel using background jobs (&) and wait.

#!/bin/bash
export AWS_PAGER=""

for ce in $compute_envs; do
  describe_compute_env "$ce" &
done
wait

Helper Functions

#!/bin/bash
export AWS_PAGER=""

# List compute environments
list_compute_environments() {
  aws batch describe-compute-environments \
    --output text \
    --query 'computeEnvironments[].[computeEnvironmentName,state,status,type,computeResources.type,computeResources.minvCpus,computeResources.maxvCpus,computeResources.desiredvCpus]'
}

# List job queues
list_job_queues() {
  aws batch describe-job-queues \
    --output text \
    --query 'jobQueues[].[jobQueueName,state,status,priority,computeEnvironmentOrder[].computeEnvironment]'
}

# List jobs by status
list_jobs() {
  local queue=$1 status=$2
  aws batch list-jobs --job-queue "$queue" --job-status "$status" \
    --output text \
    --query 'jobSummaryList[].[jobId,jobName,status,createdAt,startedAt,stoppedAt,statusReason]' | head -20
}

# Describe jobs (batch)
describe_jobs() {
  local job_ids="$@"
  aws batch describe-jobs --jobs $job_ids \
    --output text \
    --query 'jobs[].[jobId,jobName,status,statusReason,container.exitCode,container.reason,startedAt,stoppedAt]'
}

# List job definitions
list_job_definitions() {
  aws batch describe-job-definitions --status ACTIVE \
    --output text \
    --query 'jobDefinitions[].[jobDefinitionName,revision,type,status,containerProperties.vcpus,containerProperties.memory]' | head -20
}

# List scheduling policies
list_scheduling_policies() {
  aws batch list-scheduling-policies \
    --output text \
    --query 'schedulingPolicies[].[arn,name]' 2>/dev/null
}

Common Operations

1. Compute Environment Overview

#!/bin/bash
export AWS_PAGER=""
aws batch describe-compute-environments \
  --output text \
  --query 'computeEnvironments[].[computeEnvironmentName,state,status,type,computeResources.type,computeResources.minvCpus,computeResources.maxvCpus,computeResources.desiredvCpus]'

2. Job Queue Status with Active Jobs

#!/bin/bash
export AWS_PAGER=""
QUEUES=$(aws batch describe-job-queues --output text --query 'jobQueues[].jobQueueName')
for queue in $QUEUES; do
  {
    info=$(aws batch describe-job-queues --job-queues "$queue" \
      --output text --query 'jobQueues[].[jobQueueName,state,priority]')
    running=$(aws batch list-jobs --job-queue "$queue" --job-status RUNNING \
      --output text --query 'length(jobSummaryList)')
    pending=$(aws batch list-jobs --job-queue "$queue" --job-status PENDING \
      --output text --query 'length(jobSummaryList)')
    submitted=$(aws batch list-jobs --job-queue "$queue" --job-status SUBMITTED \
      --output text --query 'length(jobSummaryList)')
    printf "%s\tRunning:%s\tPending:%s\tSubmitted:%s\n" "$info" "$running" "$pending" "$submitted"
  } &
done
wait

3. Failed Job Investigation

#!/bin/bash
export AWS_PAGER=""
QUEUES=$(aws batch describe-job-queues --output text --query 'jobQueues[].jobQueueName')
for queue in $QUEUES; do
  FAILED=$(aws batch list-jobs --job-queue "$queue" --job-status FAILED \
    --output text --query 'jobSummaryList[:5].jobId')
  [ -z "$FAILED" ] && continue
  aws batch describe-jobs --jobs $FAILED \
    --output text \
    --query 'jobs[].[jobName,status,statusReason,container.exitCode,container.reason,stoppedAt]' &
done
wait

4. Array Job Progress

#!/bin/bash
export AWS_PAGER=""
QUEUE=$1
ARRAY_JOBS=$(aws batch list-jobs --job-queue "$QUEUE" --job-status RUNNING \
  --output text --query 'jobSummaryList[?arrayProperties].jobId')
for job_id in $ARRAY_JOBS; do
  aws batch describe-jobs --jobs "$job_id" \
    --output text \
    --query 'jobs[].[jobName,arrayProperties.size,arrayProperties.statusSummary]' &
done
wait

5. Job Definition Audit

#!/bin/bash
export AWS_PAGER=""
aws batch describe-job-definitions --status ACTIVE \
  --output text \
  --query 'jobDefinitions[].[jobDefinitionName,revision,type,platformCapabilities[0],containerProperties.image,containerProperties.vcpus,containerProperties.memory,retryStrategy.attempts]' | head -30

Anti-Hallucination Rules

  1. Compute environment types - MANAGED or UNMANAGED. Managed CEs auto-scale. Unmanaged CEs require manual instance management.
  2. Compute resource types - EC2, SPOT, FARGATE, or FARGATE_SPOT. Each has different pricing and availability characteristics.
  3. Job status flow - SUBMITTED -> PENDING -> RUNNABLE -> STARTING -> RUNNING -> SUCCEEDED/FAILED. Jobs do not skip states.
  4. vCPU units - minvCpus, maxvCpus, desiredvCpus are in vCPU units, not instance counts. The scheduler maps vCPUs to instance types.
  5. Array job indexing - Array job indices are 0-based. An array of size 100 has indices 0-99. Each index runs as a separate container.

Output Format

Present results as a structured report:

Aws Batch Report
════════════════
Resources discovered: [count]

Resource       Status    Key Metric    Issues
──────────────────────────────────────────────
[name]         [ok/warn] [value]       [findings]

Summary: [total] resources | [ok] healthy | [warn] warnings | [crit] critical
Action Items: [list of prioritized findings]

Target ≤50 lines of output. Use tables for multi-resource comparisons.

Counter-Rationalizations

ShortcutCounterWhy
"I'll skip discovery and check known resources"Always run Phase 1 discovery firstResource names change, new resources appear — assumed names cause errors
"The user only asked for a quick check"Follow the full discovery → analysis flowQuick checks miss critical issues; structured analysis catches silent failures
"Default configuration is probably fine"Audit configuration explicitlyDefaults often leave logging, security, and optimization features disabled
"Metrics aren't needed for this"Always check relevant metrics when availableAPI/CLI responses show current state; metrics reveal trends and intermittent issues
"I don't have access to that"Try the command and report the actual errorAssumed permission failures prevent useful investigation; actual errors are informative

Common Pitfalls

  • PENDING vs RUNNABLE: PENDING means the job is waiting for dependencies. RUNNABLE means it is ready but waiting for compute capacity. Extended RUNNABLE time indicates insufficient capacity.
  • Fargate limitations: Fargate Batch jobs have vCPU/memory limits (max 16 vCPU, 120 GB). EC2 CEs support larger instances.
  • Spot interruptions: SPOT compute environments may lose instances. Check statusReason for "Host EC2 (instance i-xxx) terminated" messages.
  • CloudWatch statistics syntax: Use spaces not commas: --statistics Average Maximum.
  • Job definition revisions: Each update creates a new revision. Jobs reference a specific revision. Use :N suffix for specific revision or omit for latest active.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use this skill whenever the user wants to create or improve a presentation for an academic context — conference papers, seminar talks, thesis defenses, grant briefings, lab meetings, invited lectures, or any presentation where the audience will evaluate reasoning and evidence. Triggers include: 'conference talk', 'seminar slides', 'thesis defense', 'research presentation', 'academic deck', 'academic presentation'. Also triggers when the user asks to 'make slides' in combination with academic content (e.g., 'make slides for my paper on X', 'create a presentation for my dissertation defense', 'build a deck for my grant proposal'). This skill governs CONTENT and STRUCTURE decisions. For the technical work of creating or editing the .pptx file itself, also read the pptx SKILL.md.

日本語の概要は準備中です。原文の説明を表示しています。

skillmds/skillmd712026年10月9日 更新

adp

無料

Redpanda's Agentic Data Plane: governance infrastructure for building, running, and governing AI agents and MCP servers, plus a proxying AI Gateway for LLM providers, operated via `rpk ai` and the ADP API. Use when creating or managing AI agents (managed or self-managed) via `rpk ai agent` or `AgentRegistryService`; configuring MCP servers (remote or managed catalog, code mode, auth); setting up LLM providers or querying models via `rpk ai llm`/`rpk ai model` or the AI Gateway proxy; or configuring budgets, guardrails, or Cedar access-control policies through the governance APIs. Also covers reading agent transcripts and spending insights, and wiring OAuth clients or providers to the aigw Authorization Server. For the separate rpk cloud mcp control-plane MCP server, see `/redpanda:rpk-cloud`.

日本語の概要は準備中です。原文の説明を表示しています。

skillmds/skillmd712026年10月9日 更新

ads

無料

Operate professional paid advertising across Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, Apple, Amazon, Reddit, Pinterest, Snapchat, and X. Use for account intake, source-grounded audits, strategy, budget and measurement planning, creative production, experiments, reporting, monitoring, and explicitly approved campaign changes. Also trigger on PPC, paid social, retail media, attribution, tracking, landing pages, cross-platform conversion totals, negative keywords or search terms, beta-feature scoring, stale platform claims, API-token or credential setup, campaign deletion, and safe Claude Ads installation or uninstall.

日本語の概要は準備中です。原文の説明を表示しています。

skillmds/skillmd712026年10月9日 更新

ads-apple

無料

Audit Apple Ads measurement, AdServices and AdAttributionKit, campaign and keyword structure, Search Match, App Store placements, custom product pages, bidding, budgets, MMP reconciliation, and policy. Use for Apple Ads, Apple Search Ads, App Store ads, Search Match, custom product pages, AdServices, or Apple app-install campaigns.

日本語の概要は準備中です。原文の説明を表示しています。

skillmds/skillmd712026年10月9日 更新

Research competitor paid-ad presence, messaging, creative, formats, landing pages, keyword and auction signals, transparent ad libraries, and strategic gaps across supported platforms. Use for competitor ads, ad libraries, ad spy, competitive PPC analysis, competitor creative, Google Ads Transparency, Meta Ad Library, or paid-media competitor research.

日本語の概要は準備中です。原文の説明を表示しています。

skillmds/skillmd712026年10月9日 更新

ads-dna

無料

Extract a public-safe brand and offer profile for paid advertising from an authorized website and operator input. Triggers on: brand DNA, brand profile, brand identity, brand style, brand colors, brand voice, visual identity, style guide, website brand analysis.

日本語の概要は準備中です。原文の説明を表示しています。

skillmds/skillmd712026年10月9日 更新

skillmds のスキルをすべて見る

このスキルの問題を報告する