{
  "schemaVersion": "1.0",
  "item": {
    "slug": "s3-sort",
    "name": "Create and manage a sorted directory structure in AWS S3",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/6mile-puppet/s3-sort",
    "canonicalUrl": "https://clawhub.ai/6mile-puppet/s3-sort",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/s3-sort",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=s3-sort",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "s3-bulk-upload.sh",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/s3-sort"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/s3-sort",
    "agentPageUrl": "https://openagent3.xyz/skills/s3-sort/agent",
    "manifestUrl": "https://openagent3.xyz/skills/s3-sort/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/s3-sort/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "S3 Bulk Upload",
        "body": "Upload files to S3 with automatic organization using first-character prefixes (e.g., a/apple.txt, b/banana.txt, 0-9/123.txt)."
      },
      {
        "title": "Quick Start",
        "body": "Use the included script for bulk uploads:\n\n# Basic upload\n./s3-bulk-upload.sh ./files my-bucket\n\n# Dry run to preview\n./s3-bulk-upload.sh ./files my-bucket --dry-run\n\n# Use sync mode (faster for many files)\n./s3-bulk-upload.sh ./files my-bucket --sync\n\n# With storage class\n./s3-bulk-upload.sh ./files my-bucket --storage-class STANDARD_IA"
      },
      {
        "title": "Prerequisites",
        "body": "Verify AWS credentials are configured:\n\naws sts get-caller-identity\n\nIf this fails, ensure AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set, or configure via aws configure."
      },
      {
        "title": "Organization Logic",
        "body": "Files are organized by the first character of their filename:\n\nFirst CharacterPrefixa-zLowercase letter (e.g., a/, b/)A-ZLowercase letter (e.g., a/, b/)0-90-9/Other_other/"
      },
      {
        "title": "Single File Upload",
        "body": "Upload a single file with automatic prefix:\n\nFILE=\"example.txt\"\nBUCKET=\"my-bucket\"\n\n# Compute prefix from first character\nFIRST_CHAR=$(echo \"${FILE}\" | cut -c1 | tr '[:upper:]' '[:lower:]')\nif [[ \"$FIRST_CHAR\" =~ [a-z] ]]; then\n  PREFIX=\"$FIRST_CHAR\"\nelif [[ \"$FIRST_CHAR\" =~ [0-9] ]]; then\n  PREFIX=\"0-9\"\nelse\n  PREFIX=\"_other\"\nfi\n\naws s3 cp \"$FILE\" \"s3://${BUCKET}/${PREFIX}/${FILE}\""
      },
      {
        "title": "Bulk Upload",
        "body": "Upload all files from a directory:\n\nSOURCE_DIR=\"./files\"\nBUCKET=\"my-bucket\"\n\nfor FILE in \"$SOURCE_DIR\"/*; do\n  [ -f \"$FILE\" ] || continue\n  BASENAME=$(basename \"$FILE\")\n  FIRST_CHAR=$(echo \"$BASENAME\" | cut -c1 | tr '[:upper:]' '[:lower:]')\n\n  if [[ \"$FIRST_CHAR\" =~ [a-z] ]]; then\n    PREFIX=\"$FIRST_CHAR\"\n  elif [[ \"$FIRST_CHAR\" =~ [0-9] ]]; then\n    PREFIX=\"0-9\"\n  else\n    PREFIX=\"_other\"\n  fi\n\n  aws s3 cp \"$FILE\" \"s3://${BUCKET}/${PREFIX}/${BASENAME}\"\ndone"
      },
      {
        "title": "Efficient Bulk Sync",
        "body": "For large uploads, stage files with symlinks then use aws s3 sync:\n\nSOURCE_DIR=\"./files\"\nSTAGING_DIR=\"./staging\"\nBUCKET=\"my-bucket\"\n\n# Create staging directory with prefix structure\nrm -rf \"$STAGING_DIR\"\nmkdir -p \"$STAGING_DIR\"\n\nfor FILE in \"$SOURCE_DIR\"/*; do\n  [ -f \"$FILE\" ] || continue\n  BASENAME=$(basename \"$FILE\")\n  FIRST_CHAR=$(echo \"$BASENAME\" | cut -c1 | tr '[:upper:]' '[:lower:]')\n\n  if [[ \"$FIRST_CHAR\" =~ [a-z] ]]; then\n    PREFIX=\"$FIRST_CHAR\"\n  elif [[ \"$FIRST_CHAR\" =~ [0-9] ]]; then\n    PREFIX=\"0-9\"\n  else\n    PREFIX=\"_other\"\n  fi\n\n  mkdir -p \"$STAGING_DIR/$PREFIX\"\n  ln -s \"$(realpath \"$FILE\")\" \"$STAGING_DIR/$PREFIX/$BASENAME\"\ndone\n\n# Sync entire staging directory to S3\naws s3 sync \"$STAGING_DIR\" \"s3://${BUCKET}/\"\n\n# Clean up\nrm -rf \"$STAGING_DIR\""
      },
      {
        "title": "Verification",
        "body": "List files by prefix:\n\nBUCKET=\"my-bucket\"\nPREFIX=\"a\"\n\naws s3 ls \"s3://${BUCKET}/${PREFIX}/\" --recursive\n\nGenerate a manifest of all uploaded files:\n\nBUCKET=\"my-bucket\"\n\naws s3 ls \"s3://${BUCKET}/\" --recursive | awk '{print $4}'\n\nCount files per prefix:\n\nBUCKET=\"my-bucket\"\n\nfor PREFIX in {a..z} 0-9 _other; do\n  COUNT=$(aws s3 ls \"s3://${BUCKET}/${PREFIX}/\" --recursive 2>/dev/null | wc -l | tr -d ' ')\n  [ \"$COUNT\" -gt 0 ] && echo \"$PREFIX: $COUNT files\"\ndone"
      },
      {
        "title": "Error Handling",
        "body": "Common issues and solutions:\n\nErrorCauseSolutionAccessDeniedInsufficient permissionsCheck IAM policy has s3:PutObject on bucketNoSuchBucketBucket doesn't existCreate bucket or check bucket name spellingInvalidAccessKeyIdBad credentialsVerify AWS_ACCESS_KEY_ID is correctExpiredTokenSession token expiredRefresh credentials or re-authenticate\n\nTest bucket access before bulk upload:\n\nBUCKET=\"my-bucket\"\necho \"test\" | aws s3 cp - \"s3://${BUCKET}/_test_access.txt\" && \\\n  aws s3 rm \"s3://${BUCKET}/_test_access.txt\" && \\\n  echo \"Bucket access OK\""
      },
      {
        "title": "Storage Classes",
        "body": "Optimize costs with storage classes:\n\n# Standard (default)\naws s3 cp file.txt s3://bucket/prefix/file.txt\n\n# Infrequent Access (cheaper storage, retrieval fee)\naws s3 cp file.txt s3://bucket/prefix/file.txt --storage-class STANDARD_IA\n\n# Glacier Instant Retrieval (archive with fast access)\naws s3 cp file.txt s3://bucket/prefix/file.txt --storage-class GLACIER_IR\n\n# Intelligent Tiering (auto-optimize based on access patterns)\naws s3 cp file.txt s3://bucket/prefix/file.txt --storage-class INTELLIGENT_TIERING\n\nAdd --storage-class to bulk upload loops for cost optimization on infrequently accessed files."
      }
    ],
    "body": "S3 Bulk Upload\n\nUpload files to S3 with automatic organization using first-character prefixes (e.g., a/apple.txt, b/banana.txt, 0-9/123.txt).\n\nQuick Start\n\nUse the included script for bulk uploads:\n\n# Basic upload\n./s3-bulk-upload.sh ./files my-bucket\n\n# Dry run to preview\n./s3-bulk-upload.sh ./files my-bucket --dry-run\n\n# Use sync mode (faster for many files)\n./s3-bulk-upload.sh ./files my-bucket --sync\n\n# With storage class\n./s3-bulk-upload.sh ./files my-bucket --storage-class STANDARD_IA\n\nPrerequisites\n\nVerify AWS credentials are configured:\n\naws sts get-caller-identity\n\n\nIf this fails, ensure AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set, or configure via aws configure.\n\nOrganization Logic\n\nFiles are organized by the first character of their filename:\n\nFirst Character\tPrefix\na-z\tLowercase letter (e.g., a/, b/)\nA-Z\tLowercase letter (e.g., a/, b/)\n0-9\t0-9/\nOther\t_other/\nSingle File Upload\n\nUpload a single file with automatic prefix:\n\nFILE=\"example.txt\"\nBUCKET=\"my-bucket\"\n\n# Compute prefix from first character\nFIRST_CHAR=$(echo \"${FILE}\" | cut -c1 | tr '[:upper:]' '[:lower:]')\nif [[ \"$FIRST_CHAR\" =~ [a-z] ]]; then\n  PREFIX=\"$FIRST_CHAR\"\nelif [[ \"$FIRST_CHAR\" =~ [0-9] ]]; then\n  PREFIX=\"0-9\"\nelse\n  PREFIX=\"_other\"\nfi\n\naws s3 cp \"$FILE\" \"s3://${BUCKET}/${PREFIX}/${FILE}\"\n\nBulk Upload\n\nUpload all files from a directory:\n\nSOURCE_DIR=\"./files\"\nBUCKET=\"my-bucket\"\n\nfor FILE in \"$SOURCE_DIR\"/*; do\n  [ -f \"$FILE\" ] || continue\n  BASENAME=$(basename \"$FILE\")\n  FIRST_CHAR=$(echo \"$BASENAME\" | cut -c1 | tr '[:upper:]' '[:lower:]')\n\n  if [[ \"$FIRST_CHAR\" =~ [a-z] ]]; then\n    PREFIX=\"$FIRST_CHAR\"\n  elif [[ \"$FIRST_CHAR\" =~ [0-9] ]]; then\n    PREFIX=\"0-9\"\n  else\n    PREFIX=\"_other\"\n  fi\n\n  aws s3 cp \"$FILE\" \"s3://${BUCKET}/${PREFIX}/${BASENAME}\"\ndone\n\nEfficient Bulk Sync\n\nFor large uploads, stage files with symlinks then use aws s3 sync:\n\nSOURCE_DIR=\"./files\"\nSTAGING_DIR=\"./staging\"\nBUCKET=\"my-bucket\"\n\n# Create staging directory with prefix structure\nrm -rf \"$STAGING_DIR\"\nmkdir -p \"$STAGING_DIR\"\n\nfor FILE in \"$SOURCE_DIR\"/*; do\n  [ -f \"$FILE\" ] || continue\n  BASENAME=$(basename \"$FILE\")\n  FIRST_CHAR=$(echo \"$BASENAME\" | cut -c1 | tr '[:upper:]' '[:lower:]')\n\n  if [[ \"$FIRST_CHAR\" =~ [a-z] ]]; then\n    PREFIX=\"$FIRST_CHAR\"\n  elif [[ \"$FIRST_CHAR\" =~ [0-9] ]]; then\n    PREFIX=\"0-9\"\n  else\n    PREFIX=\"_other\"\n  fi\n\n  mkdir -p \"$STAGING_DIR/$PREFIX\"\n  ln -s \"$(realpath \"$FILE\")\" \"$STAGING_DIR/$PREFIX/$BASENAME\"\ndone\n\n# Sync entire staging directory to S3\naws s3 sync \"$STAGING_DIR\" \"s3://${BUCKET}/\"\n\n# Clean up\nrm -rf \"$STAGING_DIR\"\n\nVerification\n\nList files by prefix:\n\nBUCKET=\"my-bucket\"\nPREFIX=\"a\"\n\naws s3 ls \"s3://${BUCKET}/${PREFIX}/\" --recursive\n\n\nGenerate a manifest of all uploaded files:\n\nBUCKET=\"my-bucket\"\n\naws s3 ls \"s3://${BUCKET}/\" --recursive | awk '{print $4}'\n\n\nCount files per prefix:\n\nBUCKET=\"my-bucket\"\n\nfor PREFIX in {a..z} 0-9 _other; do\n  COUNT=$(aws s3 ls \"s3://${BUCKET}/${PREFIX}/\" --recursive 2>/dev/null | wc -l | tr -d ' ')\n  [ \"$COUNT\" -gt 0 ] && echo \"$PREFIX: $COUNT files\"\ndone\n\nError Handling\n\nCommon issues and solutions:\n\nError\tCause\tSolution\nAccessDenied\tInsufficient permissions\tCheck IAM policy has s3:PutObject on bucket\nNoSuchBucket\tBucket doesn't exist\tCreate bucket or check bucket name spelling\nInvalidAccessKeyId\tBad credentials\tVerify AWS_ACCESS_KEY_ID is correct\nExpiredToken\tSession token expired\tRefresh credentials or re-authenticate\n\nTest bucket access before bulk upload:\n\nBUCKET=\"my-bucket\"\necho \"test\" | aws s3 cp - \"s3://${BUCKET}/_test_access.txt\" && \\\n  aws s3 rm \"s3://${BUCKET}/_test_access.txt\" && \\\n  echo \"Bucket access OK\"\n\nStorage Classes\n\nOptimize costs with storage classes:\n\n# Standard (default)\naws s3 cp file.txt s3://bucket/prefix/file.txt\n\n# Infrequent Access (cheaper storage, retrieval fee)\naws s3 cp file.txt s3://bucket/prefix/file.txt --storage-class STANDARD_IA\n\n# Glacier Instant Retrieval (archive with fast access)\naws s3 cp file.txt s3://bucket/prefix/file.txt --storage-class GLACIER_IR\n\n# Intelligent Tiering (auto-optimize based on access patterns)\naws s3 cp file.txt s3://bucket/prefix/file.txt --storage-class INTELLIGENT_TIERING\n\n\nAdd --storage-class to bulk upload loops for cost optimization on infrequently accessed files."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/6mile-puppet/s3-sort",
    "publisherUrl": "https://clawhub.ai/6mile-puppet/s3-sort",
    "owner": "6mile-puppet",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/s3-sort",
    "downloadUrl": "https://openagent3.xyz/downloads/s3-sort",
    "agentUrl": "https://openagent3.xyz/skills/s3-sort/agent",
    "manifestUrl": "https://openagent3.xyz/skills/s3-sort/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/s3-sort/agent.md"
  }
}